klyn.math.Rational.operator==
method
public static operator==(readonly notnull r1 as Rational, readonly notnull r2 as Rational) as Boolean
Description

Value equality between two rational numbers.

Fractions are compared by cross-multiplication so reduced and non-reduced forms are considered equal (ex: 1/2 == 4/8). Products are evaluated as Long to preserve all Int component values.

Parameters
ParameterDescription
r1First rational number.
r2Second rational number.
Returns

True when both values represent the same rational quantity.

Example
assert Rational(1, 2) == Rational(4, 8)
assert Rational(1, 65536) != Rational(65537, 65536)