+
Point of view
TYPED_INTERNALS
deferred class FLOAT
Summary
Overview
Exported features
Conversions:
  • rounded: FLOAT
    Round to nearest integer away from zero.
  • floor: FLOAT
    Largest integral value no greater than Current.
  • ceiling: FLOAT
    Smallest integral value no smaller than Current.
Object Printing:
Maths functions:
  • sqrt: FLOAT
    Square root of Current.
  • sin: FLOAT
    Sine of Current.
  • cos: FLOAT
    Cosine of Current.
  • tan: FLOAT
    Tangent of Current.
  • asin: FLOAT
    Arc Sine of Current.
  • acos: FLOAT
    Arc Cosine of Current.
  • atan: FLOAT
    Arc Tangent of Current.
  • atan2 (x: FLOAT): FLOAT
    Arc Tangent of Current / x.
  • sinh: FLOAT
    Hyperbolic Sine of Current.
  • cosh: FLOAT
    Hyperbolic Cosine of Current.
  • tanh: FLOAT
    Hyperbolic Tangent of Current.
  • exp: FLOAT
    Exponential of Current.
  • log: FLOAT
    Natural Logarithm of Current.
  • log10: FLOAT
    Base-10 Logarithm of Current.
  • pow (e: FLOAT): FLOAT
    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.
  • prefix "+": FLOAT
    Unary plus of Current.
  • prefix "-": FLOAT
    Unary minus of Current.
  • one: FLOAT
    Neutral element for "*" and "/".
  • zero: FLOAT
    Neutral element for "+" and "-".
  • is_equal (other: FLOAT): BOOLEAN
    Is other attached to an object considered equal to current object?
  • infix "<" (other: FLOAT): BOOLEAN
    Is Current strictly less than other?
  • infix "<=" (other: FLOAT): BOOLEAN
    Is Current less than or equal other?
  • infix ">" (other: FLOAT): BOOLEAN
    Is Current strictly greater than other?
  • infix ">=" (other: FLOAT): BOOLEAN
    Is Current greater than or equal than other?
  • in_range (lower: FLOAT, upper: FLOAT): BOOLEAN
    Return True if Current is in range [lower..upper]
    See also min, max, compare.
  • compare (other: FLOAT): INTEGER_32
    If current object equal to other, 0 if smaller, -1; if greater, 1.
  • three_way_comparison (other: FLOAT): INTEGER_32
    If current object equal to other, 0 if smaller, -1; if greater, 1.
  • min (other: FLOAT): FLOAT
    Minimum of Current and other.
  • max (other: FLOAT): FLOAT
    Maximum of Current and other.
  • bounded_by (a_min: FLOAT, a_max: FLOAT): FLOAT
    A value that is equal to Current if it is between the limits set by a_min and a_max.
infix "+" (another: FLOAT): FLOAT
deferred function
Sum with other (commutative).
infix "-" (another: FLOAT): FLOAT
deferred function
Result of subtracting other.
infix "*" (another: FLOAT): FLOAT
deferred function
Product by other.
infix "/" (another: FLOAT): FLOAT
deferred function
Division by other.
infix "^" (another: INTEGER_32): FLOAT
deferred function
Raise Current to e-th power (see also pow).
abs: FLOAT
deferred function
is_not_a_number: BOOLEAN
deferred function
Also known as NaN in IEEE-754.
is_infinity: BOOLEAN
deferred function
Is either plus or minus infinity?
is_zero: BOOLEAN
deferred function
Is either -0.0 or +0.0 ?
infix "~=" (other: FLOAT): BOOLEAN
deferred function
Is Current near equal to other.
is_subnormal: BOOLEAN
deferred function
Is it too small to be represented in normalized format.
is_normal: BOOLEAN
deferred function
The most general situation (see ensure).
divisible (other: FLOAT): BOOLEAN
deferred function
May Current be divided by other ?
rounded: FLOAT
frozen
deferred function
Round to nearest integer away from zero.
floor: FLOAT
frozen
deferred function
Largest integral value no greater than Current.
ceiling: FLOAT
frozen
deferred function
Smallest integral value no smaller than Current.
to_string: STRING
deferred 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
deferred function
Convert Current into a new allocated STRING using f digits for fractional part.
to_string_scientific (f: INTEGER_32): STRING
deferred function
Convert Current into a new allocated STRING, using the scientific notation with f digits for the fractional part.
append_in (buffer: STRING)
deferred procedure
Append the equivalent of to_string at the end of buffer.
append_in_format (str: STRING, f: INTEGER_32)
deferred procedure
Append the equivalent of to_string_format at the end of buffer.
append_in_scientific (str: STRING, f: INTEGER_32)
deferred procedure
Append the equivalent of to_string_scientific at the end of buffer.
sqrt: FLOAT
frozen
deferred function
Square root of Current.
sin: FLOAT
frozen
deferred function
Sine of Current.
cos: FLOAT
frozen
deferred function
Cosine of Current.
tan: FLOAT
frozen
deferred function
Tangent of Current.
asin: FLOAT
frozen
deferred function
Arc Sine of Current.
acos: FLOAT
frozen
deferred function
Arc Cosine of Current.
atan: FLOAT
frozen
deferred function
Arc Tangent of Current.
atan2 (x: FLOAT): FLOAT
frozen
deferred function
Arc Tangent of Current / x.
sinh: FLOAT
frozen
deferred function
Hyperbolic Sine of Current.
cosh: FLOAT
frozen
deferred function
Hyperbolic Cosine of Current.
tanh: FLOAT
frozen
deferred function
Hyperbolic Tangent of Current.
exp: FLOAT
frozen
deferred function
Exponential of Current.
log: FLOAT
frozen
deferred function
Natural Logarithm of Current.
log10: FLOAT
frozen
deferred function
Base-10 Logarithm of Current.
pow (e: FLOAT): FLOAT
frozen
deferred function
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
deferred 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.
prefix "+": FLOAT
deferred function
Unary plus of Current.
prefix "-": FLOAT
deferred function
Unary minus of Current.
one: FLOAT
deferred function
Neutral element for "*" and "/".
zero: FLOAT
deferred function
Neutral element for "+" and "-".
is_equal (other: FLOAT): BOOLEAN
deferred function
Is other attached to an object considered equal to current object?
infix "<" (other: FLOAT): BOOLEAN
deferred function
Is Current strictly less than other?
infix "<=" (other: FLOAT): BOOLEAN
effective function
Is Current less than or equal other?
infix ">" (other: FLOAT): BOOLEAN
effective function
Is Current strictly greater than other?
infix ">=" (other: FLOAT): BOOLEAN
effective function
Is Current greater than or equal than other?
in_range (lower: FLOAT, upper: FLOAT): BOOLEAN
effective function
Return True if Current is in range [lower..upper]
See also min, max, compare.
compare (other: FLOAT): INTEGER_32
effective function
If current object equal to other, 0 if smaller, -1; if greater, 1.
three_way_comparison (other: FLOAT): INTEGER_32
effective function
If current object equal to other, 0 if smaller, -1; if greater, 1.
min (other: FLOAT): FLOAT
effective function
Minimum of Current and other.
max (other: FLOAT): FLOAT
effective function
Maximum of Current and other.
bounded_by (a_min: FLOAT, a_max: FLOAT): FLOAT
effective function
A value that is equal to Current if it is between the limits set by a_min and a_max.