\frac{a1 \cdot a2}{b1 \cdot b2}\begin{array}{l}
\mathbf{if}\;\frac{a1 \cdot a2}{b1 \cdot b2} \le -3.949560208634886 \cdot 10^{-267}:\\
\;\;\;\;\frac{a1 \cdot a2}{b1 \cdot b2}\\
\mathbf{elif}\;\frac{a1 \cdot a2}{b1 \cdot b2} \le 0.0:\\
\;\;\;\;\frac{\frac{a1}{\frac{b2}{a2}}}{b1}\\
\mathbf{elif}\;\frac{a1 \cdot a2}{b1 \cdot b2} \le 1.46049949258473444 \cdot 10^{301}:\\
\;\;\;\;\frac{a1 \cdot a2}{b1 \cdot b2}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{a1}{\sqrt[3]{b1} \cdot \sqrt[3]{b1}} \cdot \frac{a2}{\sqrt[3]{b1}}}{b2}\\
\end{array}double f(double a1, double a2, double b1, double b2) {
double r137580 = a1;
double r137581 = a2;
double r137582 = r137580 * r137581;
double r137583 = b1;
double r137584 = b2;
double r137585 = r137583 * r137584;
double r137586 = r137582 / r137585;
return r137586;
}
double f(double a1, double a2, double b1, double b2) {
double r137587 = a1;
double r137588 = a2;
double r137589 = r137587 * r137588;
double r137590 = b1;
double r137591 = b2;
double r137592 = r137590 * r137591;
double r137593 = r137589 / r137592;
double r137594 = -3.949560208634886e-267;
bool r137595 = r137593 <= r137594;
double r137596 = 0.0;
bool r137597 = r137593 <= r137596;
double r137598 = r137591 / r137588;
double r137599 = r137587 / r137598;
double r137600 = r137599 / r137590;
double r137601 = 1.4604994925847344e+301;
bool r137602 = r137593 <= r137601;
double r137603 = cbrt(r137590);
double r137604 = r137603 * r137603;
double r137605 = r137587 / r137604;
double r137606 = r137588 / r137603;
double r137607 = r137605 * r137606;
double r137608 = r137607 / r137591;
double r137609 = r137602 ? r137593 : r137608;
double r137610 = r137597 ? r137600 : r137609;
double r137611 = r137595 ? r137593 : r137610;
return r137611;
}




Bits error versus a1




Bits error versus a2




Bits error versus b1




Bits error versus b2
Results
| Original | 11.1 |
|---|---|
| Target | 11.2 |
| Herbie | 5.2 |
if (/ (* a1 a2) (* b1 b2)) < -3.949560208634886e-267 or 0.0 < (/ (* a1 a2) (* b1 b2)) < 1.4604994925847344e+301Initial program 4.5
rmApplied associate-/r*9.4
rmApplied clear-num9.6
rmApplied associate-/r/9.8
Applied associate-/r*9.9
Simplified9.5
Taylor expanded around 0 4.5
if -3.949560208634886e-267 < (/ (* a1 a2) (* b1 b2)) < 0.0Initial program 12.1
rmApplied associate-/r*6.8
rmApplied clear-num7.3
rmApplied associate-/r/7.3
Applied associate-/r*6.8
Simplified6.8
rmApplied associate-/l*4.5
if 1.4604994925847344e+301 < (/ (* a1 a2) (* b1 b2)) Initial program 62.4
rmApplied associate-/r*48.4
rmApplied add-cube-cbrt48.6
Applied times-frac14.1
Final simplification5.2
herbie shell --seed 2020062 +o rules:numerics
(FPCore (a1 a2 b1 b2)
:name "Quotient of products"
:precision binary64
:herbie-target
(* (/ a1 b1) (/ a2 b2))
(/ (* a1 a2) (* b1 b2)))