\frac{a1 \cdot a2}{b1 \cdot b2}\begin{array}{l}
\mathbf{if}\;b1 \cdot b2 \le -3.8341689569487066 \cdot 10^{+275}:\\
\;\;\;\;\frac{a1}{b1} \cdot \frac{a2}{b2}\\
\mathbf{elif}\;b1 \cdot b2 \le -2.019091421874218 \cdot 10^{-217}:\\
\;\;\;\;\frac{a2}{b1 \cdot b2} \cdot a1\\
\mathbf{elif}\;b1 \cdot b2 \le 2.455350833773267 \cdot 10^{-192}:\\
\;\;\;\;\frac{a1}{b1} \cdot \frac{a2}{b2}\\
\mathbf{elif}\;b1 \cdot b2 \le 1.1689482458211706 \cdot 10^{+282}:\\
\;\;\;\;\frac{a2}{b1 \cdot b2} \cdot a1\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{b2} \cdot \left(a2 \cdot \frac{a1}{b1}\right)\\
\end{array}double f(double a1, double a2, double b1, double b2) {
double r5588630 = a1;
double r5588631 = a2;
double r5588632 = r5588630 * r5588631;
double r5588633 = b1;
double r5588634 = b2;
double r5588635 = r5588633 * r5588634;
double r5588636 = r5588632 / r5588635;
return r5588636;
}
double f(double a1, double a2, double b1, double b2) {
double r5588637 = b1;
double r5588638 = b2;
double r5588639 = r5588637 * r5588638;
double r5588640 = -3.8341689569487066e+275;
bool r5588641 = r5588639 <= r5588640;
double r5588642 = a1;
double r5588643 = r5588642 / r5588637;
double r5588644 = a2;
double r5588645 = r5588644 / r5588638;
double r5588646 = r5588643 * r5588645;
double r5588647 = -2.019091421874218e-217;
bool r5588648 = r5588639 <= r5588647;
double r5588649 = r5588644 / r5588639;
double r5588650 = r5588649 * r5588642;
double r5588651 = 2.455350833773267e-192;
bool r5588652 = r5588639 <= r5588651;
double r5588653 = 1.1689482458211706e+282;
bool r5588654 = r5588639 <= r5588653;
double r5588655 = 1.0;
double r5588656 = r5588655 / r5588638;
double r5588657 = r5588644 * r5588643;
double r5588658 = r5588656 * r5588657;
double r5588659 = r5588654 ? r5588650 : r5588658;
double r5588660 = r5588652 ? r5588646 : r5588659;
double r5588661 = r5588648 ? r5588650 : r5588660;
double r5588662 = r5588641 ? r5588646 : r5588661;
return r5588662;
}




Bits error versus a1




Bits error versus a2




Bits error versus b1




Bits error versus b2
Results
| Original | 10.9 |
|---|---|
| Target | 10.7 |
| Herbie | 4.9 |
if (* b1 b2) < -3.8341689569487066e+275 or -2.019091421874218e-217 < (* b1 b2) < 2.455350833773267e-192Initial program 26.3
rmApplied times-frac5.8
if -3.8341689569487066e+275 < (* b1 b2) < -2.019091421874218e-217 or 2.455350833773267e-192 < (* b1 b2) < 1.1689482458211706e+282Initial program 4.4
rmApplied times-frac13.4
rmApplied div-inv13.5
Applied associate-*l*11.0
Simplified4.9
if 1.1689482458211706e+282 < (* b1 b2) Initial program 19.9
rmApplied times-frac3.0
rmApplied div-inv3.0
Applied associate-*r*3.0
Final simplification4.9
herbie shell --seed 2019138 +o rules:numerics
(FPCore (a1 a2 b1 b2)
:name "Quotient of products"
:herbie-target
(* (/ a1 b1) (/ a2 b2))
(/ (* a1 a2) (* b1 b2)))