\frac{a1 \cdot a2}{b1 \cdot b2}\begin{array}{l}
\mathbf{if}\;b1 \cdot b2 \le -7.49674299200361345 \cdot 10^{288}:\\
\;\;\;\;\frac{\frac{a1}{b2}}{\frac{b1}{a2}}\\
\mathbf{elif}\;b1 \cdot b2 \le -1.5748794443415678 \cdot 10^{-93}:\\
\;\;\;\;\frac{a1}{b2 \cdot b1} \cdot a2\\
\mathbf{elif}\;b1 \cdot b2 \le 7.07595946555220674 \cdot 10^{-255} \lor \neg \left(b1 \cdot b2 \le 2.41792096653949384 \cdot 10^{269}\right):\\
\;\;\;\;\frac{a1}{b1} \cdot \frac{a2}{b2}\\
\mathbf{else}:\\
\;\;\;\;a1 \cdot \frac{a2}{b1 \cdot b2}\\
\end{array}double f(double a1, double a2, double b1, double b2) {
double r133936 = a1;
double r133937 = a2;
double r133938 = r133936 * r133937;
double r133939 = b1;
double r133940 = b2;
double r133941 = r133939 * r133940;
double r133942 = r133938 / r133941;
return r133942;
}
double f(double a1, double a2, double b1, double b2) {
double r133943 = b1;
double r133944 = b2;
double r133945 = r133943 * r133944;
double r133946 = -7.496742992003613e+288;
bool r133947 = r133945 <= r133946;
double r133948 = a1;
double r133949 = r133948 / r133944;
double r133950 = a2;
double r133951 = r133943 / r133950;
double r133952 = r133949 / r133951;
double r133953 = -1.5748794443415678e-93;
bool r133954 = r133945 <= r133953;
double r133955 = r133944 * r133943;
double r133956 = r133948 / r133955;
double r133957 = r133956 * r133950;
double r133958 = 7.075959465552207e-255;
bool r133959 = r133945 <= r133958;
double r133960 = 2.4179209665394938e+269;
bool r133961 = r133945 <= r133960;
double r133962 = !r133961;
bool r133963 = r133959 || r133962;
double r133964 = r133948 / r133943;
double r133965 = r133950 / r133944;
double r133966 = r133964 * r133965;
double r133967 = r133950 / r133945;
double r133968 = r133948 * r133967;
double r133969 = r133963 ? r133966 : r133968;
double r133970 = r133954 ? r133957 : r133969;
double r133971 = r133947 ? r133952 : r133970;
return r133971;
}




Bits error versus a1




Bits error versus a2




Bits error versus b1




Bits error versus b2
Results
| Original | 11.1 |
|---|---|
| Target | 11.6 |
| Herbie | 5.8 |
if (* b1 b2) < -7.496742992003613e+288Initial program 18.6
rmApplied associate-/l*18.4
Simplified6.9
rmApplied associate-/r*3.1
if -7.496742992003613e+288 < (* b1 b2) < -1.5748794443415678e-93Initial program 4.8
rmApplied associate-/l*4.2
Simplified11.0
rmApplied associate-*r/4.2
Applied associate-/r/4.1
if -1.5748794443415678e-93 < (* b1 b2) < 7.075959465552207e-255 or 2.4179209665394938e+269 < (* b1 b2) Initial program 23.4
rmApplied times-frac8.5
if 7.075959465552207e-255 < (* b1 b2) < 2.4179209665394938e+269Initial program 5.0
rmApplied associate-/l*5.6
Simplified11.5
rmApplied associate-*r/5.6
Simplified5.6
rmApplied div-inv5.9
Simplified5.7
Final simplification5.8
herbie shell --seed 2020046
(FPCore (a1 a2 b1 b2)
:name "Quotient of products"
:precision binary64
:herbie-target
(* (/ a1 b1) (/ a2 b2))
(/ (* a1 a2) (* b1 b2)))