public simplify() as Void
Reduces the fraction and makes its denominator positive. Intermediate magnitudes use Long so Int.MIN_VALUE remains exact. The instance is unchanged if its normalized components cannot fit Int.
value = Rational(Int.MIN_VALUE, -2) value.simplify() assert value.numerator == 1_073_741_824 assert value.denominator == 1