\frac{a1 \cdot a2}{b1 \cdot b2}\begin{array}{l}
\mathbf{if}\;b1 \cdot b2 \le -4.9182133109132441 \cdot 10^{88}:\\
\;\;\;\;\frac{a1 \cdot \frac{a2}{b2}}{b1}\\
\mathbf{elif}\;b1 \cdot b2 \le -3.7720840321361484 \cdot 10^{-215}:\\
\;\;\;\;\left(a1 \cdot a2\right) \cdot \frac{1}{b1 \cdot b2}\\
\mathbf{elif}\;b1 \cdot b2 \le 2.02333864 \cdot 10^{-317}:\\
\;\;\;\;\frac{a2 \cdot \frac{a1}{b1}}{b2}\\
\mathbf{elif}\;b1 \cdot b2 \le 3.785288238963702 \cdot 10^{229}:\\
\;\;\;\;\left(a1 \cdot a2\right) \cdot \frac{1}{b1 \cdot b2}\\
\mathbf{else}:\\
\;\;\;\;\left(\sqrt[3]{\frac{a1}{b1}} \cdot \sqrt[3]{\frac{a1}{b1}}\right) \cdot \left(\sqrt[3]{\frac{a1}{b1}} \cdot \frac{a2}{b2}\right)\\
\end{array}double f(double a1, double a2, double b1, double b2) {
double r94447 = a1;
double r94448 = a2;
double r94449 = r94447 * r94448;
double r94450 = b1;
double r94451 = b2;
double r94452 = r94450 * r94451;
double r94453 = r94449 / r94452;
return r94453;
}
double f(double a1, double a2, double b1, double b2) {
double r94454 = b1;
double r94455 = b2;
double r94456 = r94454 * r94455;
double r94457 = -4.918213310913244e+88;
bool r94458 = r94456 <= r94457;
double r94459 = a1;
double r94460 = a2;
double r94461 = r94460 / r94455;
double r94462 = r94459 * r94461;
double r94463 = r94462 / r94454;
double r94464 = -3.7720840321361484e-215;
bool r94465 = r94456 <= r94464;
double r94466 = r94459 * r94460;
double r94467 = 1.0;
double r94468 = r94467 / r94456;
double r94469 = r94466 * r94468;
double r94470 = 2.0233386402977e-317;
bool r94471 = r94456 <= r94470;
double r94472 = r94459 / r94454;
double r94473 = r94460 * r94472;
double r94474 = r94473 / r94455;
double r94475 = 3.785288238963702e+229;
bool r94476 = r94456 <= r94475;
double r94477 = cbrt(r94472);
double r94478 = r94477 * r94477;
double r94479 = r94477 * r94461;
double r94480 = r94478 * r94479;
double r94481 = r94476 ? r94469 : r94480;
double r94482 = r94471 ? r94474 : r94481;
double r94483 = r94465 ? r94469 : r94482;
double r94484 = r94458 ? r94463 : r94483;
return r94484;
}




Bits error versus a1




Bits error versus a2




Bits error versus b1




Bits error versus b2
Results
| Original | 11.3 |
|---|---|
| Target | 11.8 |
| Herbie | 5.9 |
if (* b1 b2) < -4.918213310913244e+88Initial program 12.1
rmApplied times-frac8.1
rmApplied associate-*l/7.9
if -4.918213310913244e+88 < (* b1 b2) < -3.7720840321361484e-215 or 2.0233386402977e-317 < (* b1 b2) < 3.785288238963702e+229Initial program 4.6
rmApplied div-inv4.8
if -3.7720840321361484e-215 < (* b1 b2) < 2.0233386402977e-317Initial program 44.2
rmApplied times-frac9.3
rmApplied associate-*r/9.8
Simplified9.8
if 3.785288238963702e+229 < (* b1 b2) Initial program 16.9
rmApplied times-frac3.9
rmApplied add-cube-cbrt4.3
Applied associate-*l*4.3
Final simplification5.9
herbie shell --seed 2019199
(FPCore (a1 a2 b1 b2)
:name "Quotient of products"
:herbie-target
(* (/ a1 b1) (/ a2 b2))
(/ (* a1 a2) (* b1 b2)))