\frac{a1 \cdot a2}{b1 \cdot b2}\begin{array}{l}
\mathbf{if}\;\frac{a1 \cdot a2}{b1 \cdot b2} \le -2.2640381336687406 \cdot 10^{-291}:\\
\;\;\;\;\frac{a1 \cdot a2}{b1 \cdot b2}\\
\mathbf{elif}\;\frac{a1 \cdot a2}{b1 \cdot b2} \le 4.7958098716047684 \cdot 10^{-250}:\\
\;\;\;\;\frac{a1}{b1} \cdot \frac{a2}{b2}\\
\mathbf{elif}\;\frac{a1 \cdot a2}{b1 \cdot b2} \le 5.738750803985727 \cdot 10^{+303}:\\
\;\;\;\;\frac{1}{\frac{b1 \cdot b2}{a1 \cdot a2}}\\
\mathbf{else}:\\
\;\;\;\;\frac{a2}{b1} \cdot \frac{a1}{b2}\\
\end{array}double f(double a1, double a2, double b1, double b2) {
double r5576364 = a1;
double r5576365 = a2;
double r5576366 = r5576364 * r5576365;
double r5576367 = b1;
double r5576368 = b2;
double r5576369 = r5576367 * r5576368;
double r5576370 = r5576366 / r5576369;
return r5576370;
}
double f(double a1, double a2, double b1, double b2) {
double r5576371 = a1;
double r5576372 = a2;
double r5576373 = r5576371 * r5576372;
double r5576374 = b1;
double r5576375 = b2;
double r5576376 = r5576374 * r5576375;
double r5576377 = r5576373 / r5576376;
double r5576378 = -2.2640381336687406e-291;
bool r5576379 = r5576377 <= r5576378;
double r5576380 = 4.7958098716047684e-250;
bool r5576381 = r5576377 <= r5576380;
double r5576382 = r5576371 / r5576374;
double r5576383 = r5576372 / r5576375;
double r5576384 = r5576382 * r5576383;
double r5576385 = 5.738750803985727e+303;
bool r5576386 = r5576377 <= r5576385;
double r5576387 = 1.0;
double r5576388 = r5576376 / r5576373;
double r5576389 = r5576387 / r5576388;
double r5576390 = r5576372 / r5576374;
double r5576391 = r5576371 / r5576375;
double r5576392 = r5576390 * r5576391;
double r5576393 = r5576386 ? r5576389 : r5576392;
double r5576394 = r5576381 ? r5576384 : r5576393;
double r5576395 = r5576379 ? r5576377 : r5576394;
return r5576395;
}




Bits error versus a1




Bits error versus a2




Bits error versus b1




Bits error versus b2
Results
| Original | 11.1 |
|---|---|
| Target | 10.8 |
| Herbie | 4.1 |
if (/ (* a1 a2) (* b1 b2)) < -2.2640381336687406e-291Initial program 6.8
if -2.2640381336687406e-291 < (/ (* a1 a2) (* b1 b2)) < 4.7958098716047684e-250Initial program 12.6
rmApplied times-frac3.8
if 4.7958098716047684e-250 < (/ (* a1 a2) (* b1 b2)) < 5.738750803985727e+303Initial program 0.8
rmApplied clear-num0.8
Taylor expanded around -inf 0.8
if 5.738750803985727e+303 < (/ (* a1 a2) (* b1 b2)) Initial program 60.8
rmApplied clear-num60.8
rmApplied div-inv60.8
Simplified45.4
rmApplied *-un-lft-identity45.4
Applied times-frac14.0
Applied associate-*r*6.2
Simplified6.0
Final simplification4.1
herbie shell --seed 2019134 +o rules:numerics
(FPCore (a1 a2 b1 b2)
:name "Quotient of products"
:herbie-target
(* (/ a1 b1) (/ a2 b2))
(/ (* a1 a2) (* b1 b2)))