Pike v8.1 release 6

Class Gmp.mpq

Description

Rational number stored in canonical form. The canonical from means that the denominator and the numerator have no common factors, and that the denominator is positive. Zero has the unique representation 0/1. All functions canonicalize their result.


Method create

Gmp.mpq Gmp.mpq(void|string|int|float|Gmp.mpz|Gmp.mpq x)
Gmp.mpq Gmp.mpq(int|Gmp.mpz numerator, int|Gmp.mpz denominator)
Gmp.mpq Gmp.mpq(string x, int base)