\frac{a1 \cdot a2}{b1 \cdot b2}\begin{array}{l}
\mathbf{if}\;b1 \cdot b2 \le -8.129877692652163 \cdot 10^{+206}:\\
\;\;\;\;\frac{a1}{b1} \cdot \frac{a2}{b2}\\
\mathbf{elif}\;b1 \cdot b2 \le -1.1447059923691223 \cdot 10^{-264}:\\
\;\;\;\;\frac{a2}{b1 \cdot b2} \cdot a1\\
\mathbf{elif}\;b1 \cdot b2 \le -0.0:\\
\;\;\;\;\frac{a1}{b1} \cdot \frac{a2}{b2}\\
\mathbf{elif}\;b1 \cdot b2 \le 3.5304753089027245 \cdot 10^{+60}:\\
\;\;\;\;\frac{a2 \cdot a1}{b1 \cdot b2}\\
\mathbf{else}:\\
\;\;\;\;\frac{a1}{b1} \cdot \frac{a2}{b2}\\
\end{array}double f(double a1, double a2, double b1, double b2) {
double r4703075 = a1;
double r4703076 = a2;
double r4703077 = r4703075 * r4703076;
double r4703078 = b1;
double r4703079 = b2;
double r4703080 = r4703078 * r4703079;
double r4703081 = r4703077 / r4703080;
return r4703081;
}
double f(double a1, double a2, double b1, double b2) {
double r4703082 = b1;
double r4703083 = b2;
double r4703084 = r4703082 * r4703083;
double r4703085 = -8.129877692652163e+206;
bool r4703086 = r4703084 <= r4703085;
double r4703087 = a1;
double r4703088 = r4703087 / r4703082;
double r4703089 = a2;
double r4703090 = r4703089 / r4703083;
double r4703091 = r4703088 * r4703090;
double r4703092 = -1.1447059923691223e-264;
bool r4703093 = r4703084 <= r4703092;
double r4703094 = r4703089 / r4703084;
double r4703095 = r4703094 * r4703087;
double r4703096 = -0.0;
bool r4703097 = r4703084 <= r4703096;
double r4703098 = 3.5304753089027245e+60;
bool r4703099 = r4703084 <= r4703098;
double r4703100 = r4703089 * r4703087;
double r4703101 = r4703100 / r4703084;
double r4703102 = r4703099 ? r4703101 : r4703091;
double r4703103 = r4703097 ? r4703091 : r4703102;
double r4703104 = r4703093 ? r4703095 : r4703103;
double r4703105 = r4703086 ? r4703091 : r4703104;
return r4703105;
}




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.8 |
if (* b1 b2) < -8.129877692652163e+206 or -1.1447059923691223e-264 < (* b1 b2) < -0.0 or 3.5304753089027245e+60 < (* b1 b2) Initial program 17.7
rmApplied times-frac6.8
if -8.129877692652163e+206 < (* b1 b2) < -1.1447059923691223e-264Initial program 5.4
rmApplied times-frac14.7
rmApplied div-inv14.8
Applied associate-*l*11.3
Simplified4.3
if -0.0 < (* b1 b2) < 3.5304753089027245e+60Initial program 5.8
rmApplied times-frac15.2
rmApplied div-inv15.3
Applied associate-*r*16.0
Taylor expanded around inf 5.8
Final simplification5.8
herbie shell --seed 2019151 +o rules:numerics
(FPCore (a1 a2 b1 b2)
:name "Quotient of products"
:herbie-target
(* (/ a1 b1) (/ a2 b2))
(/ (* a1 a2) (* b1 b2)))