fraction(N1, D1) \div fraction(N2, D2, false, false, false, N2 < 0) = {?}
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, false, false, false, N2 < 0) =
fraction(N1, D1) \times fraction(D2, N2, false, false, false, N2 < 0)
\qquad\phantom{fraction(N1, D1) \div fraction(N2, D2, false, false, false, N2 < 0)} =
\dfrac{N1 \times negParens(N2 < 0 ? -D2 : D2)}{D1 \times abs(N2)}
\qquad\phantom{fraction(N1, D1) \div fraction(N2, D2, false, false, false, N2 < 0)} =
fraction(NUMERATOR, DENOMINATOR)
Simplify:
\qquadfractionReduce(NUMERATOR, DENOMINATOR)