An exact fractional number.
A ratio has two slots: numerator and denominator. It is normalized so that it has a positive denominator, and the greatest common divisor of the numerator and the denominator is one. Ratios are never automatically converted to integers. For example, ratio(4, 2) would return 2/1.
A numeric operation involving two ratios produces a normalized ratio result. A numeric operation involving a ratio and an integer produced a normalized ratio result. A numeric operation involving a ratio and a float produces a float result.
concrete free sealed functional
| numerator: | An instance of <extended-integer>. |
| denominator: | An instance of <extended-integer>. Guaranteed positive. |