+
Point of view
NUMBER
class BIG_INTEGER_NUMBER
Summary
Class invariant
• denominator.is_positive
• is_integer_general_number implies denominator.is_one
• not is_integer_general_number implies numerator.gcd(denominator) @= 1
Overview
creation features
exported features
Misc:
Multiplication
division
Implementation:
comparisons with NUMBER
comparisons with REAL_64
Implementation:
Binary operators for two NUMBERs:
Unary operators for two NUMBERs:
To know more about a NUMBER:
Conversions and printing:
To mimic NUMERIC:
To mix NUMBER and INTEGER_64:
Misc:
Implementation:
To implement efficient calculus
is_positive: BOOLEAN
effective function
Is Current > 0 ?
is_negative: BOOLEAN
effective function
Is Current < 0 ?
infix "\\" (other: NUMBER): NUMBER
effective function
Remainder of division of Current by other.
infix "@\\" (other: INTEGER_64): NUMBER
effective function
Remainder of division of Current by other.
hash_code: INTEGER_32
effective function
The hash-code value of Current.
effective function
Great Common Divisor of Current and other.
is_integer_value: BOOLEAN
constant attribute
force_to_real_64: REAL_64
effective function
Conversion of Current in a REAL_64.
prefix "-": NUMBER
effective function
Opposite of Current.
infix "+" (other: NUMBER): NUMBER
effective function
Sum of Current and other.
infix "//" (other: NUMBER): NUMBER
effective function
Divide Current by other (Integer division).
infix "@//" (other: INTEGER_64): NUMBER
effective function
Divide Current by other (Integer division).
infix "*" (other: NUMBER): NUMBER
effective function
Product of Current and other.
infix "@/" (other: INTEGER_64): NUMBER
effective function
Quotient of Current and other.
infix "@+" (other: INTEGER_64): NUMBER
effective function
Sum of Current and other.
infix "@*" (other: INTEGER_64): NUMBER
effective function
add_with_big_integer_number (other: BIG_INTEGER_NUMBER): NUMBER
effective function
add_with_fraction_with_big_integer_number (other: FRACTION_WITH_BIG_INTEGER_NUMBER): NUMBER
effective function
multiply_with_big_integer_number (other: BIG_INTEGER_NUMBER): NUMBER
effective function
multiply_with_fraction_with_big_integer_number (other: FRACTION_WITH_BIG_INTEGER_NUMBER): NUMBER
effective function
integer_divide_integer_64_number (other: INTEGER_64_NUMBER): INTEGER_GENERAL_NUMBER
effective function
remainder_of_divide_integer_64_number (other: INTEGER_64_NUMBER): INTEGER_GENERAL_NUMBER
effective function
integer_divide_big_integer_number (other: BIG_INTEGER_NUMBER): INTEGER_GENERAL_NUMBER
effective function
remainder_of_divide_big_integer_number (other: BIG_INTEGER_NUMBER): INTEGER_GENERAL_NUMBER
effective function
gcd_with_integer_64_number (other: INTEGER_64_NUMBER): INTEGER_GENERAL_NUMBER
effective function
inverse: NUMBER
effective function
infix "@=" (other: INTEGER_64): BOOLEAN
effective function
Is Current equal other ?
infix "@<" (other: INTEGER_64): BOOLEAN
effective function
Is Current strictly less than other?
infix "@>" (other: INTEGER_64): BOOLEAN
effective function
Is Current strictly greater than other?
infix "@>=" (other: INTEGER_64): BOOLEAN
effective function
Is Current greater or equal than other?
infix "@<=" (other: INTEGER_64): BOOLEAN
effective function
Is Current less or equal other?
infix "<" (other: NUMBER): BOOLEAN
effective function
Is Current strictly less than other?
infix "#=" (other: REAL_64): BOOLEAN
effective function
Is Current equal other?
infix "#<" (other: REAL_64): BOOLEAN
effective function
Is Current strictly less than other?
infix "#<=" (other: REAL_64): BOOLEAN
effective function
Is Current less or equal other?
infix "#>" (other: REAL_64): BOOLEAN
effective function
Is Current strictly greater than other?
infix "#>=" (other: REAL_64): BOOLEAN
effective function
Is Current greater or equal than other?
greater_with_big_integer_number (other: BIG_INTEGER_NUMBER): BOOLEAN
effective function
greater_with_fraction_with_big_integer_number (other: FRACTION_WITH_BIG_INTEGER_NUMBER): BOOLEAN
effective function
is_zero: BOOLEAN
constant attribute
Is it 0 ?
is_one: BOOLEAN
constant attribute
Is it 1 ?
is_equal (other: NUMBER): BOOLEAN
effective function
Compares two LARGE_INTEGERs.
append_in (buffer: STRING)
effective procedure
Append the equivalent of to_string at the end of buffer.
append_in_unicode (buffer: UNICODE_STRING)
effective procedure
Append the equivalent of to_unicode_string at the end of buffer.
effective function
value_length: INTEGER_32
effective function
put_into_mutable_big_integer (mut: MUTABLE_BIG_INTEGER)
effective procedure
effective function
factorial: NUMBER
effective function
effective function
effective function
append_decimal_in (buffer: STRING, digits: INTEGER_32, all_digits: BOOLEAN)
effective procedure
Append the equivalent of to_decimal at the end of buffer.
gcd_with_big_integer_number (other: BIG_INTEGER_NUMBER): INTEGER_GENERAL_NUMBER
effective function
infix "-" (other: NUMBER): NUMBER
effective function
Difference of Current and other.
infix "/" (other: NUMBER): NUMBER
effective function
Quotient of Current and other.
infix "^" (exp: NUMBER): NUMBER
effective function
Current raised to exp-th power.
infix "<=" (other: NUMBER): BOOLEAN
effective function
Is Current less or equal than other?
infix ">" (other: NUMBER): BOOLEAN
effective function
Is Current strictly greater than other?
infix ">=" (other: NUMBER): BOOLEAN
effective function
Is Current greater or equal than other?
prefix "+": NUMBER
frozen
effective function
Unary plus of Current.
is_integer_8: BOOLEAN
frozen
effective function
Does Current value fit on an INTEGER_8?
is_integer_16: BOOLEAN
frozen
effective function
Does Current value fit on an INTEGER_16?
is_integer_32: BOOLEAN
frozen
effective function
Does Current value fit on an INTEGER?
is_integer: BOOLEAN
frozen
effective function
is_integer_64: BOOLEAN
frozen
effective function
Does Current value fit on an INTEGER_64?
in_range (lower: NUMBER, upper: NUMBER): BOOLEAN
effective function
Return True if Current is in range [lower..upper]
compare (other: NUMBER): INTEGER_32
effective function
Compare Current with other.
three_way_comparison (other: NUMBER): INTEGER_32
effective function
Compare Current with other.
min (other: NUMBER): NUMBER
effective function
Minimum of Current and other.
max (other: NUMBER): NUMBER
effective function
Maximum of Current and other.
is_odd: BOOLEAN
effective function
Is odd ?
is_even: BOOLEAN
effective function
Is even ?
is_integer_general_number: BOOLEAN
frozen
effective function
is_fraction_general_number: BOOLEAN
frozen
effective function
fit_real: BOOLEAN
frozen
effective function
to_integer_8: INTEGER_8
frozen
effective function
Conversion of Current in an INTEGER_8.
to_integer_16: INTEGER_16
frozen
effective function
Conversion of Current in an INTEGER_16.
to_integer_32: INTEGER_32
frozen
effective function
Conversion of Current in an INTEGER_32.
to_integer: INTEGER_32
frozen
effective function
to_integer_64: INTEGER_64
frozen
effective function
Conversion of Current in an INTEGER.
to_string: STRING
frozen
effective function
Convert the NUMBER into a new allocated STRING.
to_unicode_string: UNICODE_STRING
frozen
effective function
Convert the NUMBER into a new allocated UNICODE_STRING.
to_string_format (s: INTEGER_32): STRING
frozen
effective function
Same as to_string but the result is on s character and the number is right aligned.
to_unicode_string_format (s: INTEGER_32): UNICODE_STRING
frozen
effective function
Same as to_unicode_string but the result is on s character and the number is right aligned.
append_in_format (str: STRING, s: INTEGER_32)
frozen
effective procedure
Append the equivalent of to_string_format at the end of str.
append_in_unicode_format (str: UNICODE_STRING, s: INTEGER_32)
frozen
effective procedure
Append the equivalent of to_unicode_string_format at the end of str.
to_decimal (digits: INTEGER_32, all_digits: BOOLEAN): STRING
frozen
effective function
Convert Current into its decimal view.
decimal_digit: CHARACTER
frozen
effective function
Gives the corresponding CHARACTER for range 0..9.
digit: CHARACTER
effective function
Gives the corresponding CHARACTER for range 0..9.
divisible (other: NUMBER): BOOLEAN
effective function
Is other a valid divisor for Current ?
one: NUMBER
once function
The neutral element of multiplication.
zero: NUMBER
once function
The neutral element of addition.
sign: INTEGER_8
frozen
effective function
Sign of Current (0 or -1 or 1).
sqrt: REAL_64
effective function
Compute the square routine.
log: REAL_64
frozen
effective function
infix "@-" (other: INTEGER_64): NUMBER
effective function
Difference of Current and other.
infix "@^" (exp: INTEGER_64): NUMBER
effective function
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.
add_with_integer_64_number (other: INTEGER_64_NUMBER): NUMBER
frozen
effective function
multiply_with_integer_64_number (other: INTEGER_64_NUMBER): NUMBER
effective function
greater_with_integer_64_number (other: INTEGER_64_NUMBER): BOOLEAN
effective function
max_double: NUMBER
once function
min_double: NUMBER
once function
mutable_register1: MUTABLE_BIG_INTEGER
once function
mutable_register2: MUTABLE_BIG_INTEGER
once function
mutable_register3: MUTABLE_BIG_INTEGER
once function
mutable_register4: MUTABLE_BIG_INTEGER
once function