+
Point of view
INTERNALS_HANDLER
deferred class REAL_GENERAL
Summary
Overview
exported features
Conversions:
• rounded: REAL_GENERAL
Round to nearest integer away from zero.
• floor: REAL_GENERAL
Largest integral value no greater than Current.
• ceiling: REAL_GENERAL
Smallest integral value no smaller than Current.
Object Printing:
Maths functions:
• sqrt: REAL_GENERAL
Square root of Current.
• sin: REAL_GENERAL
Sine of Current.
• cos: REAL_GENERAL
Cosine of Current.
• tan: REAL_GENERAL
Tangent of Current.
• asin: REAL_GENERAL
Arc Sine of Current.
• acos: REAL_GENERAL
Arc Cosine of Current.
• atan: REAL_GENERAL
Arc Tangent of Current.
• atan2 (x: REAL_GENERAL): REAL_GENERAL
Arc Tangent of Current / x.
• sinh: REAL_GENERAL
Hyperbolic Sine of Current.
• cosh: REAL_GENERAL
Hyperbolic Cosine of Current.
• tanh: REAL_GENERAL
Hyperbolic Tangent of Current.
• exp: REAL_GENERAL
Exponential of Current.
• log: REAL_GENERAL
Natural Logarithm of Current.
• log10: REAL_GENERAL
Base-10 Logarithm of Current.
• pow (e: REAL_GENERAL): REAL_GENERAL
Current raised to the power of e (ANSI C pow).
Hashing:
Miscellaneous:
• sign: INTEGER_8
Sign of Current (0 -1 or 1).
• mantissa_bits: INTEGER_8
Give the number of bits, corresponding to the mantissa, in the binary representation of the real number.
• exponent_bits: INTEGER_8
Give the number of bits, corresponding to the exponent, in the binary representation of the real number.
• one: REAL_GENERAL
Neutral element for "*" and "/".
• zero: REAL_GENERAL
Neutral element for "+" and "-".
• in_range (lower: REAL_GENERAL, upper: REAL_GENERAL): BOOLEAN
Return True if Current is in range [lower..upper]
• compare (other: REAL_GENERAL): INTEGER_32
If current object equal to other, 0 if smaller, -1; if greater, 1.
• three_way_comparison (other: REAL_GENERAL): INTEGER_32
If current object equal to other, 0 if smaller, -1; if greater, 1.
• min (other: REAL_GENERAL): REAL_GENERAL
Minimum of Current and other.
• max (other: REAL_GENERAL): REAL_GENERAL
Maximum of Current and other.
is_equal (other: REAL_GENERAL): BOOLEAN
effective function
Is other attached to an object considered equal to current object?
prefix "+": REAL_GENERAL
effective function
Unary plus of Current.
prefix "-": REAL_GENERAL
Unary minus of Current.
infix "+" (other: REAL_GENERAL): REAL_GENERAL
Sum with other (commutative).
infix "-" (other: REAL_GENERAL): REAL_GENERAL
Result of substracting other.
infix "*" (other: REAL_GENERAL): REAL_GENERAL
Product by other.
infix "/" (other: REAL_GENERAL): REAL_GENERAL
Division by other.
infix "^" (e: INTEGER_32): REAL_GENERAL
infix "<" (other: REAL_GENERAL): BOOLEAN
Is Current strictly less than other?
infix "<=" (other: REAL_GENERAL): BOOLEAN
Is Current less than or equal other?
infix ">" (other: REAL_GENERAL): BOOLEAN
Is Current strictly greater than other?
infix ">=" (other: REAL_GENERAL): BOOLEAN
Is Current greater than or equal than other?
abs: REAL_GENERAL
effective function
is_not_a_number: BOOLEAN
Also known as NaN in IEEE-754.
is_infinity: BOOLEAN
Is either plus or minus infinity?
is_zero: BOOLEAN
effective function
Is either -0.0 or +0.0 ?
infix "~=" (other: REAL_GENERAL): BOOLEAN
deferred function
Is Current near equal to other.
is_subnormal: BOOLEAN
Is it too small to be represented in normalized format.
is_normal: BOOLEAN
The most general situation (see ensure).
divisible (other: REAL_GENERAL): BOOLEAN
effective function
May Current be divided by other ?
rounded: REAL_GENERAL
frozen
Round to nearest integer away from zero.
floor: REAL_GENERAL
frozen
Largest integral value no greater than Current.
ceiling: REAL_GENERAL
frozen
Smallest integral value no smaller than Current.
to_string: STRING
effective function
Convert Current into a new allocated STRING using 6 as the default number of digits for the fractional part.
to_string_format (f: INTEGER_32): STRING
effective function
Convert Current into a new allocated STRING using f digits for fractional part.
to_string_scientific (f: INTEGER_32): STRING
effective function
Convert Current into a new allocated STRING, using the scientific notation with f digits for the fractional part.
append_in (buffer: STRING)
effective procedure
Append the equivalent of to_string at the end of buffer.
append_in_format (str: STRING, f: INTEGER_32)
effective procedure
Append the equivalent of to_string_format at the end of buffer.
append_in_scientific (str: STRING, f: INTEGER_32)
effective procedure
Append the equivalent of to_string_scientific at the end of buffer.
out_in_tagged_out_memory
effective procedure
Append terse printable represention of current object in tagged_out_memory.
fill_tagged_out_memory
effective procedure
Append a viewable information in tagged_out_memory in order to affect the behavior of out, tagged_out, etc.
sqrt: REAL_GENERAL
frozen
Square root of Current.
sin: REAL_GENERAL
frozen
Sine of Current.
cos: REAL_GENERAL
frozen
Cosine of Current.
tan: REAL_GENERAL
frozen
Tangent of Current.
asin: REAL_GENERAL
frozen
Arc Sine of Current.
acos: REAL_GENERAL
frozen
Arc Cosine of Current.
atan: REAL_GENERAL
frozen
Arc Tangent of Current.
atan2 (x: REAL_GENERAL): REAL_GENERAL
frozen
Arc Tangent of Current / x.
sinh: REAL_GENERAL
frozen
Hyperbolic Sine of Current.
cosh: REAL_GENERAL
frozen
Hyperbolic Cosine of Current.
tanh: REAL_GENERAL
frozen
Hyperbolic Tangent of Current.
exp: REAL_GENERAL
frozen
Exponential of Current.
log: REAL_GENERAL
frozen
Natural Logarithm of Current.
log10: REAL_GENERAL
frozen
Base-10 Logarithm of Current.
pow (e: REAL_GENERAL): REAL_GENERAL
frozen
Current raised to the power of e (ANSI C pow).
hash_code: INTEGER_32
deferred function
The hash-code value of Current.
sign: INTEGER_8
effective function
Sign of Current (0 -1 or 1).
mantissa_bits: INTEGER_8
deferred function
Give the number of bits, corresponding to the mantissa, in the binary representation of the real number.
exponent_bits: INTEGER_8
deferred function
Give the number of bits, corresponding to the exponent, in the binary representation of the real number.
one: REAL_GENERAL
deferred function
Neutral element for "*" and "/".
zero: REAL_GENERAL
deferred function
Neutral element for "+" and "-".
in_range (lower: REAL_GENERAL, upper: REAL_GENERAL): BOOLEAN
effective function
Return True if Current is in range [lower..upper]