Skip to content

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.

bigint

bigint = 1n

Rational

When denominator is zero.