Average Error: 10.9 → 2.9
Time: 2.5min
Precision: binary64
Cost: 3140
\[\frac{a1 \cdot a2}{b1 \cdot b2}\]
\[\begin{array}{l} \mathbf{if}\;b1 \cdot b2 \leq -4.2694800775142445 \cdot 10^{+241}:\\ \;\;\;\;\frac{a2 \cdot \frac{a1}{b1}}{b2}\\ \mathbf{elif}\;b1 \cdot b2 \leq -1.1223206066020718 \cdot 10^{-235}:\\ \;\;\;\;\frac{\frac{\sqrt[3]{a1} \cdot \frac{\sqrt[3]{a1}}{\sqrt[3]{-b1 \cdot b2}}}{\sqrt[3]{\sqrt{-b1 \cdot b2}}} \cdot \left(\frac{\sqrt[3]{a1}}{\sqrt[3]{-b1 \cdot b2}} \cdot \left(-a2\right)\right)}{\sqrt[3]{\sqrt{-b1 \cdot b2}}}\\ \mathbf{elif}\;b1 \cdot b2 \leq 5.330746503442893 \cdot 10^{-288}:\\ \;\;\;\;\frac{a2 \cdot \frac{a1}{b1}}{b2}\\ \mathbf{elif}\;b1 \cdot b2 \leq 7.94098457665328 \cdot 10^{+210}:\\ \;\;\;\;\frac{\frac{\sqrt[3]{a1} \cdot \sqrt[3]{a1}}{\sqrt[3]{-b1 \cdot b2}}}{\frac{\sqrt[3]{-b1 \cdot b2}}{\frac{\sqrt[3]{a1}}{\sqrt[3]{-b1 \cdot b2}} \cdot \left(-a2\right)}}\\ \mathbf{else}:\\ \;\;\;\;\frac{a1}{b1} \cdot \frac{a2}{b2}\\ \end{array}\]
\frac{a1 \cdot a2}{b1 \cdot b2}
\begin{array}{l}
\mathbf{if}\;b1 \cdot b2 \leq -4.2694800775142445 \cdot 10^{+241}:\\
\;\;\;\;\frac{a2 \cdot \frac{a1}{b1}}{b2}\\

\mathbf{elif}\;b1 \cdot b2 \leq -1.1223206066020718 \cdot 10^{-235}:\\
\;\;\;\;\frac{\frac{\sqrt[3]{a1} \cdot \frac{\sqrt[3]{a1}}{\sqrt[3]{-b1 \cdot b2}}}{\sqrt[3]{\sqrt{-b1 \cdot b2}}} \cdot \left(\frac{\sqrt[3]{a1}}{\sqrt[3]{-b1 \cdot b2}} \cdot \left(-a2\right)\right)}{\sqrt[3]{\sqrt{-b1 \cdot b2}}}\\

\mathbf{elif}\;b1 \cdot b2 \leq 5.330746503442893 \cdot 10^{-288}:\\
\;\;\;\;\frac{a2 \cdot \frac{a1}{b1}}{b2}\\

\mathbf{elif}\;b1 \cdot b2 \leq 7.94098457665328 \cdot 10^{+210}:\\
\;\;\;\;\frac{\frac{\sqrt[3]{a1} \cdot \sqrt[3]{a1}}{\sqrt[3]{-b1 \cdot b2}}}{\frac{\sqrt[3]{-b1 \cdot b2}}{\frac{\sqrt[3]{a1}}{\sqrt[3]{-b1 \cdot b2}} \cdot \left(-a2\right)}}\\

\mathbf{else}:\\
\;\;\;\;\frac{a1}{b1} \cdot \frac{a2}{b2}\\

\end{array}
(FPCore (a1 a2 b1 b2) :precision binary64 (/ (* a1 a2) (* b1 b2)))
(FPCore (a1 a2 b1 b2)
 :precision binary64
 (if (<= (* b1 b2) -4.2694800775142445e+241)
   (/ (* a2 (/ a1 b1)) b2)
   (if (<= (* b1 b2) -1.1223206066020718e-235)
     (/
      (*
       (/
        (* (cbrt a1) (/ (cbrt a1) (cbrt (- (* b1 b2)))))
        (cbrt (sqrt (- (* b1 b2)))))
       (* (/ (cbrt a1) (cbrt (- (* b1 b2)))) (- a2)))
      (cbrt (sqrt (- (* b1 b2)))))
     (if (<= (* b1 b2) 5.330746503442893e-288)
       (/ (* a2 (/ a1 b1)) b2)
       (if (<= (* b1 b2) 7.94098457665328e+210)
         (/
          (/ (* (cbrt a1) (cbrt a1)) (cbrt (- (* b1 b2))))
          (/
           (cbrt (- (* b1 b2)))
           (* (/ (cbrt a1) (cbrt (- (* b1 b2)))) (- a2))))
         (* (/ a1 b1) (/ a2 b2)))))))
double code(double a1, double a2, double b1, double b2) {
	return (a1 * a2) / (b1 * b2);
}
double code(double a1, double a2, double b1, double b2) {
	double tmp;
	if ((b1 * b2) <= -4.2694800775142445e+241) {
		tmp = (a2 * (a1 / b1)) / b2;
	} else if ((b1 * b2) <= -1.1223206066020718e-235) {
		tmp = (((cbrt(a1) * (cbrt(a1) / cbrt(-(b1 * b2)))) / cbrt(sqrt(-(b1 * b2)))) * ((cbrt(a1) / cbrt(-(b1 * b2))) * -a2)) / cbrt(sqrt(-(b1 * b2)));
	} else if ((b1 * b2) <= 5.330746503442893e-288) {
		tmp = (a2 * (a1 / b1)) / b2;
	} else if ((b1 * b2) <= 7.94098457665328e+210) {
		tmp = ((cbrt(a1) * cbrt(a1)) / cbrt(-(b1 * b2))) / (cbrt(-(b1 * b2)) / ((cbrt(a1) / cbrt(-(b1 * b2))) * -a2));
	} else {
		tmp = (a1 / b1) * (a2 / b2);
	}
	return tmp;
}

Error

Bits error versus a1

Bits error versus a2

Bits error versus b1

Bits error versus b2

Try it out

Your Program's Arguments

Results

Enter valid numbers for all inputs

Target

Original10.9
Target11.2
Herbie2.9
\[\frac{a1}{b1} \cdot \frac{a2}{b2}\]
Alternative 1
Accuracy2.9
Cost3140
\[\begin{array}{l} \mathbf{if}\;b1 \cdot b2 \leq -4.2694800775142445 \cdot 10^{+241}:\\ \;\;\;\;\frac{a2 \cdot \frac{a1}{b1}}{b2}\\ \mathbf{elif}\;b1 \cdot b2 \leq -1.1223206066020718 \cdot 10^{-235}:\\ \;\;\;\;\frac{\frac{\sqrt[3]{a1} \cdot \frac{\sqrt[3]{a1}}{\sqrt[3]{-b1 \cdot b2}}}{\sqrt[3]{\sqrt{-b1 \cdot b2}}} \cdot \left(\frac{\sqrt[3]{a1}}{\sqrt[3]{-b1 \cdot b2}} \cdot \left(-a2\right)\right)}{\sqrt[3]{\sqrt{-b1 \cdot b2}}}\\ \mathbf{elif}\;b1 \cdot b2 \leq 5.330746503442893 \cdot 10^{-288}:\\ \;\;\;\;\frac{a2 \cdot \frac{a1}{b1}}{b2}\\ \mathbf{elif}\;b1 \cdot b2 \leq 7.94098457665328 \cdot 10^{+210}:\\ \;\;\;\;\left(\sqrt[3]{a1} \cdot \frac{\sqrt[3]{a1}}{\sqrt[3]{-b1 \cdot b2}}\right) \cdot \frac{\frac{\sqrt[3]{a1}}{\sqrt[3]{-b1 \cdot b2}} \cdot \left(-a2\right)}{\sqrt[3]{-b1 \cdot b2}}\\ \mathbf{else}:\\ \;\;\;\;\frac{a1}{b1} \cdot \frac{a2}{b2}\\ \end{array}\]
Alternative 2
Accuracy2.9
Cost3078
\[\begin{array}{l} \mathbf{if}\;b1 \cdot b2 \leq -4.2694800775142445 \cdot 10^{+241}:\\ \;\;\;\;\frac{a2 \cdot \frac{a1}{b1}}{b2}\\ \mathbf{elif}\;b1 \cdot b2 \leq -1.1223206066020718 \cdot 10^{-235}:\\ \;\;\;\;\frac{\frac{\sqrt[3]{a1} \cdot \frac{\sqrt[3]{a1}}{\sqrt[3]{-b1 \cdot b2}}}{\sqrt[3]{\sqrt{-b1 \cdot b2}}} \cdot \left(\frac{\sqrt[3]{a1}}{\sqrt[3]{-b1 \cdot b2}} \cdot \left(-a2\right)\right)}{\sqrt[3]{\sqrt{-b1 \cdot b2}}}\\ \mathbf{elif}\;b1 \cdot b2 \leq 5.330746503442893 \cdot 10^{-288} \lor \neg \left(b1 \cdot b2 \leq 7.94098457665328 \cdot 10^{+210}\right):\\ \;\;\;\;\frac{a2 \cdot \frac{a1}{b1}}{b2}\\ \mathbf{else}:\\ \;\;\;\;\left(\sqrt[3]{a1} \cdot \frac{\sqrt[3]{a1}}{\sqrt[3]{-b1 \cdot b2}}\right) \cdot \frac{\frac{\sqrt[3]{a1}}{\sqrt[3]{-b1 \cdot b2}} \cdot \left(-a2\right)}{\sqrt[3]{-b1 \cdot b2}}\\ \end{array}\]
Alternative 3
Accuracy2.8
Cost3078
\[\begin{array}{l} \mathbf{if}\;b1 \cdot b2 \leq -4.2694800775142445 \cdot 10^{+241}:\\ \;\;\;\;\frac{a2 \cdot \frac{a1}{b1}}{b2}\\ \mathbf{elif}\;b1 \cdot b2 \leq -1.1223206066020718 \cdot 10^{-235}:\\ \;\;\;\;\frac{\sqrt[3]{a1} \cdot \frac{\sqrt[3]{a1}}{\sqrt[3]{-b1 \cdot b2}}}{\sqrt[3]{\sqrt{-b1 \cdot b2}}} \cdot \frac{\frac{\sqrt[3]{a1}}{\sqrt[3]{-b1 \cdot b2}} \cdot \left(-a2\right)}{\sqrt[3]{\sqrt{-b1 \cdot b2}}}\\ \mathbf{elif}\;b1 \cdot b2 \leq 5.330746503442893 \cdot 10^{-288} \lor \neg \left(b1 \cdot b2 \leq 7.94098457665328 \cdot 10^{+210}\right):\\ \;\;\;\;\frac{a2 \cdot \frac{a1}{b1}}{b2}\\ \mathbf{else}:\\ \;\;\;\;\left(\sqrt[3]{a1} \cdot \frac{\sqrt[3]{a1}}{\sqrt[3]{-b1 \cdot b2}}\right) \cdot \frac{\frac{\sqrt[3]{a1}}{\sqrt[3]{-b1 \cdot b2}} \cdot \left(-a2\right)}{\sqrt[3]{-b1 \cdot b2}}\\ \end{array}\]
Alternative 4
Accuracy8.0
Cost2752
\[\frac{\sqrt[3]{a1} \cdot \frac{\sqrt[3]{a1}}{\sqrt[3]{-b1 \cdot b2}}}{\sqrt[3]{\sqrt[3]{-b1 \cdot b2} \cdot \sqrt[3]{-b1 \cdot b2}}} \cdot \frac{\frac{\sqrt[3]{a1}}{\sqrt[3]{-b1 \cdot b2}} \cdot \left(-a2\right)}{\sqrt[3]{\sqrt[3]{-b1 \cdot b2}}}\]
Alternative 5
Accuracy8.1
Cost2816
\[\frac{\sqrt[3]{a1} \cdot \frac{\sqrt[3]{a1}}{\sqrt[3]{-b1 \cdot b2}}}{\sqrt[3]{\sqrt[3]{-b1 \cdot b2}} \cdot \sqrt[3]{\sqrt[3]{-b1 \cdot b2}}} \cdot \frac{\frac{\sqrt[3]{a1}}{\sqrt[3]{-b1 \cdot b2}} \cdot \left(-a2\right)}{\sqrt[3]{\sqrt[3]{-b1 \cdot b2}}}\]
Alternative 6
Accuracy8.4
Cost1856
\[\left(\sqrt[3]{a1} \cdot \frac{\sqrt[3]{a1}}{\sqrt[3]{-b1 \cdot b2}}\right) \cdot \frac{\frac{\sqrt[3]{a1}}{\sqrt[3]{-b1 \cdot b2}} \cdot \left(-a2\right)}{\sqrt[3]{-b1 \cdot b2}}\]
Alternative 7
Accuracy8.5
Cost1856
\[\frac{\frac{\sqrt[3]{a1} \cdot \sqrt[3]{a1}}{\sqrt[3]{-b1 \cdot b2}} \cdot \left(\left(-a2\right) \cdot \frac{\sqrt[3]{a1}}{\sqrt[3]{-b1 \cdot b2}}\right)}{\sqrt[3]{-b1 \cdot b2}}\]
Alternative 8
Accuracy10.7
Cost1600
\[\frac{\frac{a1}{\sqrt[3]{-b1 \cdot b2} \cdot \left(\sqrt[3]{1} \cdot \sqrt[3]{-b1 \cdot b2}\right)} \cdot \left(-a2\right)}{\sqrt[3]{-b1 \cdot b2}}\]

Derivation

  1. Split input into 4 regimes
  2. if (*.f64 b1 b2) < -4.2694800775142445e241 or -1.1223206066020718e-235 < (*.f64 b1 b2) < 5.33074650344289276e-288

    1. Initial program 28.7

      \[\frac{a1 \cdot a2}{b1 \cdot b2}\]
    2. Using strategy rm
    3. Applied associate-/r*_binary64_309111.4

      \[\leadsto \color{blue}{\frac{\frac{a1 \cdot a2}{b1}}{b2}}\]
    4. Simplified4.9

      \[\leadsto \frac{\color{blue}{a2 \cdot \frac{a1}{b1}}}{b2}\]

    if -4.2694800775142445e241 < (*.f64 b1 b2) < -1.1223206066020718e-235

    1. Initial program 4.6

      \[\frac{a1 \cdot a2}{b1 \cdot b2}\]
    2. Using strategy rm
    3. Applied frac-2neg_binary64_31584.6

      \[\leadsto \color{blue}{\frac{-a1 \cdot a2}{-b1 \cdot b2}}\]
    4. Using strategy rm
    5. Applied add-cube-cbrt_binary64_31825.4

      \[\leadsto \frac{-a1 \cdot a2}{\color{blue}{\left(\sqrt[3]{-b1 \cdot b2} \cdot \sqrt[3]{-b1 \cdot b2}\right) \cdot \sqrt[3]{-b1 \cdot b2}}}\]
    6. Applied associate-/r*_binary64_30915.4

      \[\leadsto \color{blue}{\frac{\frac{-a1 \cdot a2}{\sqrt[3]{-b1 \cdot b2} \cdot \sqrt[3]{-b1 \cdot b2}}}{\sqrt[3]{-b1 \cdot b2}}}\]
    7. Simplified5.1

      \[\leadsto \frac{\color{blue}{\frac{a1}{\sqrt[3]{-b1 \cdot b2} \cdot \sqrt[3]{-b1 \cdot b2}} \cdot \left(-a2\right)}}{\sqrt[3]{-b1 \cdot b2}}\]
    8. Using strategy rm
    9. Applied add-cube-cbrt_binary64_31825.3

      \[\leadsto \frac{\frac{\color{blue}{\left(\sqrt[3]{a1} \cdot \sqrt[3]{a1}\right) \cdot \sqrt[3]{a1}}}{\sqrt[3]{-b1 \cdot b2} \cdot \sqrt[3]{-b1 \cdot b2}} \cdot \left(-a2\right)}{\sqrt[3]{-b1 \cdot b2}}\]
    10. Applied times-frac_binary64_31535.3

      \[\leadsto \frac{\color{blue}{\left(\frac{\sqrt[3]{a1} \cdot \sqrt[3]{a1}}{\sqrt[3]{-b1 \cdot b2}} \cdot \frac{\sqrt[3]{a1}}{\sqrt[3]{-b1 \cdot b2}}\right)} \cdot \left(-a2\right)}{\sqrt[3]{-b1 \cdot b2}}\]
    11. Applied associate-*l*_binary64_30882.6

      \[\leadsto \frac{\color{blue}{\frac{\sqrt[3]{a1} \cdot \sqrt[3]{a1}}{\sqrt[3]{-b1 \cdot b2}} \cdot \left(\frac{\sqrt[3]{a1}}{\sqrt[3]{-b1 \cdot b2}} \cdot \left(-a2\right)\right)}}{\sqrt[3]{-b1 \cdot b2}}\]
    12. Simplified2.6

      \[\leadsto \frac{\frac{\sqrt[3]{a1} \cdot \sqrt[3]{a1}}{\sqrt[3]{-b1 \cdot b2}} \cdot \color{blue}{\left(\left(-a2\right) \cdot \frac{\sqrt[3]{a1}}{\sqrt[3]{-b1 \cdot b2}}\right)}}{\sqrt[3]{-b1 \cdot b2}}\]
    13. Using strategy rm
    14. Applied add-sqr-sqrt_binary64_31692.6

      \[\leadsto \frac{\frac{\sqrt[3]{a1} \cdot \sqrt[3]{a1}}{\sqrt[3]{-b1 \cdot b2}} \cdot \left(\left(-a2\right) \cdot \frac{\sqrt[3]{a1}}{\sqrt[3]{-b1 \cdot b2}}\right)}{\sqrt[3]{\color{blue}{\sqrt{-b1 \cdot b2} \cdot \sqrt{-b1 \cdot b2}}}}\]
    15. Applied cbrt-prod_binary64_31782.6

      \[\leadsto \frac{\frac{\sqrt[3]{a1} \cdot \sqrt[3]{a1}}{\sqrt[3]{-b1 \cdot b2}} \cdot \left(\left(-a2\right) \cdot \frac{\sqrt[3]{a1}}{\sqrt[3]{-b1 \cdot b2}}\right)}{\color{blue}{\sqrt[3]{\sqrt{-b1 \cdot b2}} \cdot \sqrt[3]{\sqrt{-b1 \cdot b2}}}}\]
    16. Applied associate-/r*_binary64_30912.6

      \[\leadsto \color{blue}{\frac{\frac{\frac{\sqrt[3]{a1} \cdot \sqrt[3]{a1}}{\sqrt[3]{-b1 \cdot b2}} \cdot \left(\left(-a2\right) \cdot \frac{\sqrt[3]{a1}}{\sqrt[3]{-b1 \cdot b2}}\right)}{\sqrt[3]{\sqrt{-b1 \cdot b2}}}}{\sqrt[3]{\sqrt{-b1 \cdot b2}}}}\]
    17. Simplified1.9

      \[\leadsto \frac{\color{blue}{\frac{\sqrt[3]{a1} \cdot \frac{\sqrt[3]{a1}}{\sqrt[3]{-b1 \cdot b2}}}{\sqrt[3]{\sqrt{-b1 \cdot b2}}} \cdot \left(\left(-a2\right) \cdot \frac{\sqrt[3]{a1}}{\sqrt[3]{-b1 \cdot b2}}\right)}}{\sqrt[3]{\sqrt{-b1 \cdot b2}}}\]

    if 5.33074650344289276e-288 < (*.f64 b1 b2) < 7.94098457665328e210

    1. Initial program 4.5

      \[\frac{a1 \cdot a2}{b1 \cdot b2}\]
    2. Using strategy rm
    3. Applied frac-2neg_binary64_31584.5

      \[\leadsto \color{blue}{\frac{-a1 \cdot a2}{-b1 \cdot b2}}\]
    4. Using strategy rm
    5. Applied add-cube-cbrt_binary64_31825.4

      \[\leadsto \frac{-a1 \cdot a2}{\color{blue}{\left(\sqrt[3]{-b1 \cdot b2} \cdot \sqrt[3]{-b1 \cdot b2}\right) \cdot \sqrt[3]{-b1 \cdot b2}}}\]
    6. Applied associate-/r*_binary64_30915.4

      \[\leadsto \color{blue}{\frac{\frac{-a1 \cdot a2}{\sqrt[3]{-b1 \cdot b2} \cdot \sqrt[3]{-b1 \cdot b2}}}{\sqrt[3]{-b1 \cdot b2}}}\]
    7. Simplified4.7

      \[\leadsto \frac{\color{blue}{\frac{a1}{\sqrt[3]{-b1 \cdot b2} \cdot \sqrt[3]{-b1 \cdot b2}} \cdot \left(-a2\right)}}{\sqrt[3]{-b1 \cdot b2}}\]
    8. Using strategy rm
    9. Applied add-cube-cbrt_binary64_31824.9

      \[\leadsto \frac{\frac{\color{blue}{\left(\sqrt[3]{a1} \cdot \sqrt[3]{a1}\right) \cdot \sqrt[3]{a1}}}{\sqrt[3]{-b1 \cdot b2} \cdot \sqrt[3]{-b1 \cdot b2}} \cdot \left(-a2\right)}{\sqrt[3]{-b1 \cdot b2}}\]
    10. Applied times-frac_binary64_31534.9

      \[\leadsto \frac{\color{blue}{\left(\frac{\sqrt[3]{a1} \cdot \sqrt[3]{a1}}{\sqrt[3]{-b1 \cdot b2}} \cdot \frac{\sqrt[3]{a1}}{\sqrt[3]{-b1 \cdot b2}}\right)} \cdot \left(-a2\right)}{\sqrt[3]{-b1 \cdot b2}}\]
    11. Applied associate-*l*_binary64_30882.2

      \[\leadsto \frac{\color{blue}{\frac{\sqrt[3]{a1} \cdot \sqrt[3]{a1}}{\sqrt[3]{-b1 \cdot b2}} \cdot \left(\frac{\sqrt[3]{a1}}{\sqrt[3]{-b1 \cdot b2}} \cdot \left(-a2\right)\right)}}{\sqrt[3]{-b1 \cdot b2}}\]
    12. Simplified2.2

      \[\leadsto \frac{\frac{\sqrt[3]{a1} \cdot \sqrt[3]{a1}}{\sqrt[3]{-b1 \cdot b2}} \cdot \color{blue}{\left(\left(-a2\right) \cdot \frac{\sqrt[3]{a1}}{\sqrt[3]{-b1 \cdot b2}}\right)}}{\sqrt[3]{-b1 \cdot b2}}\]
    13. Using strategy rm
    14. Applied associate-/l*_binary64_30922.1

      \[\leadsto \color{blue}{\frac{\frac{\sqrt[3]{a1} \cdot \sqrt[3]{a1}}{\sqrt[3]{-b1 \cdot b2}}}{\frac{\sqrt[3]{-b1 \cdot b2}}{\left(-a2\right) \cdot \frac{\sqrt[3]{a1}}{\sqrt[3]{-b1 \cdot b2}}}}}\]

    if 7.94098457665328e210 < (*.f64 b1 b2)

    1. Initial program 15.8

      \[\frac{a1 \cdot a2}{b1 \cdot b2}\]
    2. Using strategy rm
    3. Applied times-frac_binary64_31534.7

      \[\leadsto \color{blue}{\frac{a1}{b1} \cdot \frac{a2}{b2}}\]
  3. Recombined 4 regimes into one program.
  4. Final simplification2.9

    \[\leadsto \begin{array}{l} \mathbf{if}\;b1 \cdot b2 \leq -4.2694800775142445 \cdot 10^{+241}:\\ \;\;\;\;\frac{a2 \cdot \frac{a1}{b1}}{b2}\\ \mathbf{elif}\;b1 \cdot b2 \leq -1.1223206066020718 \cdot 10^{-235}:\\ \;\;\;\;\frac{\frac{\sqrt[3]{a1} \cdot \frac{\sqrt[3]{a1}}{\sqrt[3]{-b1 \cdot b2}}}{\sqrt[3]{\sqrt{-b1 \cdot b2}}} \cdot \left(\frac{\sqrt[3]{a1}}{\sqrt[3]{-b1 \cdot b2}} \cdot \left(-a2\right)\right)}{\sqrt[3]{\sqrt{-b1 \cdot b2}}}\\ \mathbf{elif}\;b1 \cdot b2 \leq 5.330746503442893 \cdot 10^{-288}:\\ \;\;\;\;\frac{a2 \cdot \frac{a1}{b1}}{b2}\\ \mathbf{elif}\;b1 \cdot b2 \leq 7.94098457665328 \cdot 10^{+210}:\\ \;\;\;\;\frac{\frac{\sqrt[3]{a1} \cdot \sqrt[3]{a1}}{\sqrt[3]{-b1 \cdot b2}}}{\frac{\sqrt[3]{-b1 \cdot b2}}{\frac{\sqrt[3]{a1}}{\sqrt[3]{-b1 \cdot b2}} \cdot \left(-a2\right)}}\\ \mathbf{else}:\\ \;\;\;\;\frac{a1}{b1} \cdot \frac{a2}{b2}\\ \end{array}\]

Reproduce

herbie shell --seed 2020322 
(FPCore (a1 a2 b1 b2)
  :name "Quotient of products"
  :precision binary64

  :herbie-target
  (* (/ a1 b1) (/ a2 b2))

  (/ (* a1 a2) (* b1 b2)))