rationalNormalize
rationalNormalize(
numerator,denominator?):Rational
Defined in: packages/math-numbers/src/rational/rational-normalize.ts:13
Builds a rational from a numerator and denominator, moving the sign onto the numerator.
The result is not reduced — reduction costs a GCD, and a chain of operations only needs it once, at the end. Pass through ratReduce when lowest terms are wanted.
Parameters
Section titled “Parameters”numerator
Section titled “numerator”bigint
denominator?
Section titled “denominator?”bigint = 1n
Returns
Section titled “Returns”Throws
Section titled “Throws”When denominator is zero.