Rational numbers for Javascript