\frac{a1 \cdot a2}{b1 \cdot b2}\begin{array}{l}
\mathbf{if}\;b1 \cdot b2 \le -9.174780128289902610188694526480175085773 \cdot 10^{270}:\\
\;\;\;\;\frac{a1}{b1} \cdot \frac{a2}{b2}\\
\mathbf{elif}\;b1 \cdot b2 \le -8.033401676922496301543611475377383307118 \cdot 10^{-176}:\\
\;\;\;\;\frac{1}{\frac{b1 \cdot b2}{a2 \cdot a1}}\\
\mathbf{elif}\;b1 \cdot b2 \le -0.0:\\
\;\;\;\;\frac{\frac{a2}{b1}}{\frac{b2}{a1}}\\
\mathbf{elif}\;b1 \cdot b2 \le 1.093710991773609759276773437739228178965 \cdot 10^{120}:\\
\;\;\;\;\frac{1}{\frac{b1 \cdot b2}{a2 \cdot a1}}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{a2}{b1}}{\frac{b2}{a1}}\\
\end{array}double f(double a1, double a2, double b1, double b2) {
double r6392207 = a1;
double r6392208 = a2;
double r6392209 = r6392207 * r6392208;
double r6392210 = b1;
double r6392211 = b2;
double r6392212 = r6392210 * r6392211;
double r6392213 = r6392209 / r6392212;
return r6392213;
}
double f(double a1, double a2, double b1, double b2) {
double r6392214 = b1;
double r6392215 = b2;
double r6392216 = r6392214 * r6392215;
double r6392217 = -9.174780128289903e+270;
bool r6392218 = r6392216 <= r6392217;
double r6392219 = a1;
double r6392220 = r6392219 / r6392214;
double r6392221 = a2;
double r6392222 = r6392221 / r6392215;
double r6392223 = r6392220 * r6392222;
double r6392224 = -8.033401676922496e-176;
bool r6392225 = r6392216 <= r6392224;
double r6392226 = 1.0;
double r6392227 = r6392221 * r6392219;
double r6392228 = r6392216 / r6392227;
double r6392229 = r6392226 / r6392228;
double r6392230 = -0.0;
bool r6392231 = r6392216 <= r6392230;
double r6392232 = r6392221 / r6392214;
double r6392233 = r6392215 / r6392219;
double r6392234 = r6392232 / r6392233;
double r6392235 = 1.0937109917736098e+120;
bool r6392236 = r6392216 <= r6392235;
double r6392237 = r6392236 ? r6392229 : r6392234;
double r6392238 = r6392231 ? r6392234 : r6392237;
double r6392239 = r6392225 ? r6392229 : r6392238;
double r6392240 = r6392218 ? r6392223 : r6392239;
return r6392240;
}




Bits error versus a1




Bits error versus a2




Bits error versus b1




Bits error versus b2
Results
| Original | 11.4 |
|---|---|
| Target | 11.3 |
| Herbie | 5.8 |
if (* b1 b2) < -9.174780128289903e+270Initial program 20.3
rmApplied times-frac3.3
if -9.174780128289903e+270 < (* b1 b2) < -8.033401676922496e-176 or -0.0 < (* b1 b2) < 1.0937109917736098e+120Initial program 4.9
rmApplied clear-num5.3
if -8.033401676922496e-176 < (* b1 b2) < -0.0 or 1.0937109917736098e+120 < (* b1 b2) Initial program 21.7
rmApplied associate-/r*11.3
rmApplied *-un-lft-identity11.3
Applied associate-/r*11.3
Simplified7.2
rmApplied associate-/r/7.7
Applied associate-/l*7.8
Final simplification5.8
herbie shell --seed 2019179
(FPCore (a1 a2 b1 b2)
:name "Quotient of products"
:herbie-target
(* (/ a1 b1) (/ a2 b2))
(/ (* a1 a2) (* b1 b2)))