\frac{a1 \cdot a2}{b1 \cdot b2}\begin{array}{l}
\mathbf{if}\;b1 \cdot b2 \le -1.428461434113379888690634738591477366935 \cdot 10^{241}:\\
\;\;\;\;\frac{1}{\frac{b2}{a1 \cdot \frac{a2}{b1}}}\\
\mathbf{elif}\;b1 \cdot b2 \le -1.173735067615666191078493755628268490435 \cdot 10^{-115}:\\
\;\;\;\;\frac{1}{b1 \cdot b2} \cdot \left(a2 \cdot a1\right)\\
\mathbf{elif}\;b1 \cdot b2 \le 4.720017116358327401313860013731916291401 \cdot 10^{-317}:\\
\;\;\;\;\frac{\frac{a1}{b1} \cdot a2}{b2}\\
\mathbf{elif}\;b1 \cdot b2 \le 4.631581414509871450239539618490595928788 \cdot 10^{66}:\\
\;\;\;\;\frac{1}{b1 \cdot b2} \cdot \left(a2 \cdot a1\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{a1}{\frac{b1}{a2}}}{b2}\\
\end{array}double f(double a1, double a2, double b1, double b2) {
double r5499627 = a1;
double r5499628 = a2;
double r5499629 = r5499627 * r5499628;
double r5499630 = b1;
double r5499631 = b2;
double r5499632 = r5499630 * r5499631;
double r5499633 = r5499629 / r5499632;
return r5499633;
}
double f(double a1, double a2, double b1, double b2) {
double r5499634 = b1;
double r5499635 = b2;
double r5499636 = r5499634 * r5499635;
double r5499637 = -1.42846143411338e+241;
bool r5499638 = r5499636 <= r5499637;
double r5499639 = 1.0;
double r5499640 = a1;
double r5499641 = a2;
double r5499642 = r5499641 / r5499634;
double r5499643 = r5499640 * r5499642;
double r5499644 = r5499635 / r5499643;
double r5499645 = r5499639 / r5499644;
double r5499646 = -1.1737350676156662e-115;
bool r5499647 = r5499636 <= r5499646;
double r5499648 = r5499639 / r5499636;
double r5499649 = r5499641 * r5499640;
double r5499650 = r5499648 * r5499649;
double r5499651 = 4.7200171163583e-317;
bool r5499652 = r5499636 <= r5499651;
double r5499653 = r5499640 / r5499634;
double r5499654 = r5499653 * r5499641;
double r5499655 = r5499654 / r5499635;
double r5499656 = 4.6315814145098715e+66;
bool r5499657 = r5499636 <= r5499656;
double r5499658 = r5499634 / r5499641;
double r5499659 = r5499640 / r5499658;
double r5499660 = r5499659 / r5499635;
double r5499661 = r5499657 ? r5499650 : r5499660;
double r5499662 = r5499652 ? r5499655 : r5499661;
double r5499663 = r5499647 ? r5499650 : r5499662;
double r5499664 = r5499638 ? r5499645 : r5499663;
return r5499664;
}




Bits error versus a1




Bits error versus a2




Bits error versus b1




Bits error versus b2
Results
| Original | 11.5 |
|---|---|
| Target | 11.1 |
| Herbie | 6.2 |
if (* b1 b2) < -1.42846143411338e+241Initial program 19.0
rmApplied times-frac3.3
rmApplied associate-*r/3.4
rmApplied div-inv3.4
Applied associate-*l*3.7
Simplified3.7
rmApplied clear-num4.0
if -1.42846143411338e+241 < (* b1 b2) < -1.1737350676156662e-115 or 4.7200171163583e-317 < (* b1 b2) < 4.6315814145098715e+66Initial program 4.6
rmApplied div-inv4.8
if -1.1737350676156662e-115 < (* b1 b2) < 4.7200171163583e-317Initial program 30.2
rmApplied times-frac10.5
rmApplied associate-*r/11.0
if 4.6315814145098715e+66 < (* b1 b2) Initial program 11.5
rmApplied times-frac7.8
rmApplied associate-*r/7.7
rmApplied *-un-lft-identity7.7
Applied associate-/r*7.7
Simplified7.6
Final simplification6.2
herbie shell --seed 2019172
(FPCore (a1 a2 b1 b2)
:name "Quotient of products"
:herbie-target
(* (/ a1 b1) (/ a2 b2))
(/ (* a1 a2) (* b1 b2)))