\frac{a1 \cdot a2}{b1 \cdot b2}\begin{array}{l}
\mathbf{if}\;\frac{a1 \cdot a2}{b1 \cdot b2} \le -9.0953428171912087 \cdot 10^{282}:\\
\;\;\;\;\frac{\frac{a1}{b1} \cdot a2}{b2}\\
\mathbf{elif}\;\frac{a1 \cdot a2}{b1 \cdot b2} \le -4.7932051454 \cdot 10^{-314}:\\
\;\;\;\;\frac{a1 \cdot a2}{b1 \cdot b2}\\
\mathbf{elif}\;\frac{a1 \cdot a2}{b1 \cdot b2} \le -0.0:\\
\;\;\;\;\frac{a1 \cdot \frac{a2}{b2}}{b1}\\
\mathbf{elif}\;\frac{a1 \cdot a2}{b1 \cdot b2} \le 6.7389682791900477 \cdot 10^{297}:\\
\;\;\;\;\frac{a1 \cdot a2}{b1 \cdot b2}\\
\mathbf{else}:\\
\;\;\;\;\left(\sqrt[3]{\frac{\frac{a1}{b1}}{\sqrt[3]{b2} \cdot \sqrt[3]{b2}} \cdot \frac{a2}{\sqrt[3]{b2}}} \cdot \sqrt[3]{\frac{\frac{a1}{b1}}{\sqrt[3]{b2} \cdot \sqrt[3]{b2}} \cdot \frac{a2}{\sqrt[3]{b2}}}\right) \cdot \sqrt[3]{\frac{\frac{a1}{b1}}{\sqrt[3]{b2} \cdot \sqrt[3]{b2}} \cdot \frac{a2}{\sqrt[3]{b2}}}\\
\end{array}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 VAR;
if ((((a1 * a2) / (b1 * b2)) <= -9.095342817191209e+282)) {
VAR = (((a1 / b1) * a2) / b2);
} else {
double VAR_1;
if ((((a1 * a2) / (b1 * b2)) <= -4.7932051454338e-314)) {
VAR_1 = ((a1 * a2) / (b1 * b2));
} else {
double VAR_2;
if ((((a1 * a2) / (b1 * b2)) <= -0.0)) {
VAR_2 = ((a1 * (a2 / b2)) / b1);
} else {
double VAR_3;
if ((((a1 * a2) / (b1 * b2)) <= 6.738968279190048e+297)) {
VAR_3 = ((a1 * a2) / (b1 * b2));
} else {
VAR_3 = ((cbrt((((a1 / b1) / (cbrt(b2) * cbrt(b2))) * (a2 / cbrt(b2)))) * cbrt((((a1 / b1) / (cbrt(b2) * cbrt(b2))) * (a2 / cbrt(b2))))) * cbrt((((a1 / b1) / (cbrt(b2) * cbrt(b2))) * (a2 / cbrt(b2)))));
}
VAR_2 = VAR_3;
}
VAR_1 = VAR_2;
}
VAR = VAR_1;
}
return VAR;
}




Bits error versus a1




Bits error versus a2




Bits error versus b1




Bits error versus b2
Results
| Original | 10.9 |
|---|---|
| Target | 11.7 |
| Herbie | 3.1 |
if (/ (* a1 a2) (* b1 b2)) < -9.095342817191209e+282Initial program 51.3
rmApplied times-frac15.9
rmApplied associate-*r/17.1
if -9.095342817191209e+282 < (/ (* a1 a2) (* b1 b2)) < -4.7932051454338e-314 or -0.0 < (/ (* a1 a2) (* b1 b2)) < 6.738968279190048e+297Initial program 0.8
if -4.7932051454338e-314 < (/ (* a1 a2) (* b1 b2)) < -0.0Initial program 13.1
rmApplied times-frac2.5
rmApplied associate-*l/3.8
if 6.738968279190048e+297 < (/ (* a1 a2) (* b1 b2)) Initial program 61.8
rmApplied times-frac6.5
rmApplied add-cube-cbrt7.5
Applied *-un-lft-identity7.5
Applied times-frac7.5
Applied associate-*r*10.3
Simplified10.3
rmApplied add-cube-cbrt10.5
Final simplification3.1
herbie shell --seed 2020100
(FPCore (a1 a2 b1 b2)
:name "Quotient of products"
:precision binary64
:herbie-target
(* (/ a1 b1) (/ a2 b2))
(/ (* a1 a2) (* b1 b2)))