Rational numbers rat(n,d) are constructed by two integers, the nominator n and the denominator d. We interprete numbers rat(0,d) as zero (where d!=0), and rat(n,0) as infinity.
Constructor | Description |
|
Instance member | Description |
Full Usage:
this.d
Returns: int
|
|
Full Usage:
this.n
Returns: int
|
|
Static member | Description |
multiplication of rational numbers
|
|
addition of rational numbers
|
|
subtraction of rational numbers
|
|
division of rational numbers
|
|
|
multiplicative inverse of a rational number
|
|
checking wether a number equals to zero
|
|
checking whether a number is negative
|
|
checking wether a number equals to zero
|
|
checking whether a number is positive
|
|
checking wether a number equals to zero
|
|
maximum of two rational numbers
|
|
minimum of two rational numbers
|
|
change sign of rational numbers
|
|
conversion from a floating point number
|
|
parsing from a string
|
|
conversion to floating point numbers
|
|
converting a rational number to a Latex string
|