randFromArray([1, -1]) NEG1 === -1 ? "-" : "" randRange(1, 9) randRange(2, 9) randFromArray([1, -1]) NEG2 === -1 ? "-" : "" randRange(1, 9) randRange(2, 9)

\displaystyle NEG1S \frac{A}{B} \times NEG2S \frac{C}{D}

(NEG1 * A * NEG2 * C) / (B * D)

\displaystyle {} = \frac{NEG1 * A \times NEG2 * C}{B \times D}

\displaystyle {} = \frac{NEG1 * A * NEG2 * C}{B * D}

\displaystyle {} = fractionReduce(NEG1 * A * NEG2 * C, B * D)