randRangeNonZero(-9, 9) randRange(2, 9)
randRangeNonZero(-9, 9) randRange(2, 9)
randFromArray([1, -1]) randFromArray([1, -1]) NEG1 === -1 ? "-" : "" NEG2 === -1 ? "-" : "" N2 > 0 ? N1 * D2 : -N1 * D2 D1 * abs(N2) getGCD(NUMERATOR, DENOMINATOR)
Reduce to lowest terms:

`fraction(N1, D1) \div fraction(N2, D2) = {?}`

NUMERATOR / DENOMINATOR

Dividing by a fraction is the same as multiplying by the reciprocal of the fraction.

The reciprocal of `fraction(N2, D2)` is `fraction(D2, N2)`.

Therefore:

`\qquad fraction(N1, D1) \div fraction(N2, D2) = fraction(N1, D1) \times fraction(D2, N2)`

`\phantom{\qquad fraction(N1, D1) \div fraction(N2, D2)} = \dfrac{N1 \times -D2}{D1 \times abs(N2)}`

`\phantom{\qquad fraction(N1, D1) \div fraction(N2, D2)} = fraction(NUMERATOR, DENOMINATOR)`

Simplify:

`\qquadfractionReduce(NUMERATOR, DENOMINATOR)`