| kind | = | "Number Decimal" |
An exact, unlimited representation of a decimal number
- *(multiplier)
- **(exponent)
- +(addend)
- -(subtrahend)
- /(divisor)
- <=>(other)
- ==(other)
- ===(other)
- asText()
- hash()
- inspect()
- notice()
- sqrt()
returns the product of this number and the argument. if the argument is a rational, the receiver will be converted into a form suitable for multiplying against a decimal, and then multiplied. if the argument is neither a Rational nor a Decimal, it tries to call asDecimal, and if that fails it signals a condition.
returns the sum of this number and the argument. if the argument is a rational, it will be converted into a form suitable for addition against a decimal, and then added. if the argument is neither a Rational nor a Decimal, it tries to call asDecimal, and if that fails it signals a condition.
returns the difference between this number and the argument. if the argument is a rational, it will be converted into a form suitable for subtracting against a decimal, and then subtracted. if the argument is neither a Rational nor a Decimal, it tries to call asDecimal, and if that fails it signals a condition.
compares this number against the argument, returning -1, 0 or 1 based on which one is larger. if the argument is a rational, it will be converted into a form suitable for comparing against a decimal, and then compared. if the argument is neither a Rational nor a Decimal, it tries to call asDecimal, and if that doesn't work it returns nil.
compares this number against the argument, true if this number is the same, otherwise false
nil
[ show source ]
method(other,
if(self same?(
0.0),
Reflector other:mimics?(cell(:other),
0.0),
bind(rescue(Condition Error, fn(c, false)),
self ==(
other))))