\frac{a1 \cdot a2}{b1 \cdot b2}\begin{array}{l}
\mathbf{if}\;b1 \cdot b2 \le -1.512192312330299 \cdot 10^{168}:\\
\;\;\;\;\frac{a1 \cdot \frac{a2}{b2}}{b1}\\
\mathbf{elif}\;b1 \cdot b2 \le -1.78311602156644772 \cdot 10^{-257}:\\
\;\;\;\;\left(a1 \cdot a2\right) \cdot \frac{1}{b1 \cdot b2}\\
\mathbf{elif}\;b1 \cdot b2 \le 5.89224416336 \cdot 10^{-314}:\\
\;\;\;\;\frac{1}{\frac{\frac{b2}{a2}}{a1} \cdot b1}\\
\mathbf{elif}\;b1 \cdot b2 \le 1.7927717050604466 \cdot 10^{257}:\\
\;\;\;\;\left(a1 \cdot a2\right) \cdot \frac{1}{b1 \cdot b2}\\
\mathbf{else}:\\
\;\;\;\;\frac{a1 \cdot \frac{a2}{b2}}{b1}\\
\end{array}double f(double a1, double a2, double b1, double b2) {
double r116244 = a1;
double r116245 = a2;
double r116246 = r116244 * r116245;
double r116247 = b1;
double r116248 = b2;
double r116249 = r116247 * r116248;
double r116250 = r116246 / r116249;
return r116250;
}
double f(double a1, double a2, double b1, double b2) {
double r116251 = b1;
double r116252 = b2;
double r116253 = r116251 * r116252;
double r116254 = -1.512192312330299e+168;
bool r116255 = r116253 <= r116254;
double r116256 = a1;
double r116257 = a2;
double r116258 = r116257 / r116252;
double r116259 = r116256 * r116258;
double r116260 = r116259 / r116251;
double r116261 = -1.7831160215664477e-257;
bool r116262 = r116253 <= r116261;
double r116263 = r116256 * r116257;
double r116264 = 1.0;
double r116265 = r116264 / r116253;
double r116266 = r116263 * r116265;
double r116267 = 5.8922441633555e-314;
bool r116268 = r116253 <= r116267;
double r116269 = r116252 / r116257;
double r116270 = r116269 / r116256;
double r116271 = r116270 * r116251;
double r116272 = r116264 / r116271;
double r116273 = 1.7927717050604466e+257;
bool r116274 = r116253 <= r116273;
double r116275 = r116274 ? r116266 : r116260;
double r116276 = r116268 ? r116272 : r116275;
double r116277 = r116262 ? r116266 : r116276;
double r116278 = r116255 ? r116260 : r116277;
return r116278;
}




Bits error versus a1




Bits error versus a2




Bits error versus b1




Bits error versus b2
Results
| Original | 11.3 |
|---|---|
| Target | 11.3 |
| Herbie | 5.5 |
if (* b1 b2) < -1.512192312330299e+168 or 1.7927717050604466e+257 < (* b1 b2) Initial program 15.6
rmApplied associate-/r*7.8
rmApplied clear-num8.4
rmApplied associate-/r/8.6
Applied associate-/r*8.0
Simplified4.6
if -1.512192312330299e+168 < (* b1 b2) < -1.7831160215664477e-257 or 5.8922441633555e-314 < (* b1 b2) < 1.7927717050604466e+257Initial program 5.4
rmApplied div-inv5.5
if -1.7831160215664477e-257 < (* b1 b2) < 5.8922441633555e-314Initial program 50.6
rmApplied associate-/r*20.2
rmApplied clear-num20.3
rmApplied associate-/r/20.3
Simplified7.9
Final simplification5.5
herbie shell --seed 2020042
(FPCore (a1 a2 b1 b2)
:name "Quotient of products"
:precision binary64
:herbie-target
(* (/ a1 b1) (/ a2 b2))
(/ (* a1 a2) (* b1 b2)))