\frac{a1 \cdot a2}{b1 \cdot b2}\begin{array}{l}
\mathbf{if}\;b1 \cdot b2 \le -5.98446143373493 \cdot 10^{+245}:\\
\;\;\;\;\frac{a1}{b1} \cdot \frac{a2}{b2}\\
\mathbf{elif}\;b1 \cdot b2 \le -1.0084599578011689 \cdot 10^{-263}:\\
\;\;\;\;a2 \cdot \frac{a1}{b1 \cdot b2}\\
\mathbf{elif}\;b1 \cdot b2 \le 3.019673003289364 \cdot 10^{-116}:\\
\;\;\;\;\frac{\frac{a1}{\frac{b1}{a2}}}{b2}\\
\mathbf{elif}\;b1 \cdot b2 \le 8.38868406756228 \cdot 10^{+184}:\\
\;\;\;\;\frac{a1}{\frac{b1 \cdot b2}{a2}}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{a1}{\frac{b1}{a2}}}{b2}\\
\end{array}double f(double a1, double a2, double b1, double b2) {
double r6042929 = a1;
double r6042930 = a2;
double r6042931 = r6042929 * r6042930;
double r6042932 = b1;
double r6042933 = b2;
double r6042934 = r6042932 * r6042933;
double r6042935 = r6042931 / r6042934;
return r6042935;
}
double f(double a1, double a2, double b1, double b2) {
double r6042936 = b1;
double r6042937 = b2;
double r6042938 = r6042936 * r6042937;
double r6042939 = -5.98446143373493e+245;
bool r6042940 = r6042938 <= r6042939;
double r6042941 = a1;
double r6042942 = r6042941 / r6042936;
double r6042943 = a2;
double r6042944 = r6042943 / r6042937;
double r6042945 = r6042942 * r6042944;
double r6042946 = -1.0084599578011689e-263;
bool r6042947 = r6042938 <= r6042946;
double r6042948 = r6042941 / r6042938;
double r6042949 = r6042943 * r6042948;
double r6042950 = 3.019673003289364e-116;
bool r6042951 = r6042938 <= r6042950;
double r6042952 = r6042936 / r6042943;
double r6042953 = r6042941 / r6042952;
double r6042954 = r6042953 / r6042937;
double r6042955 = 8.38868406756228e+184;
bool r6042956 = r6042938 <= r6042955;
double r6042957 = r6042938 / r6042943;
double r6042958 = r6042941 / r6042957;
double r6042959 = r6042956 ? r6042958 : r6042954;
double r6042960 = r6042951 ? r6042954 : r6042959;
double r6042961 = r6042947 ? r6042949 : r6042960;
double r6042962 = r6042940 ? r6042945 : r6042961;
return r6042962;
}




Bits error versus a1




Bits error versus a2




Bits error versus b1




Bits error versus b2
Results
| Original | 11.1 |
|---|---|
| Target | 10.9 |
| Herbie | 5.0 |
if (* b1 b2) < -5.98446143373493e+245Initial program 18.0
rmApplied times-frac3.4
if -5.98446143373493e+245 < (* b1 b2) < -1.0084599578011689e-263Initial program 4.8
rmApplied associate-/r*11.1
rmApplied div-inv11.1
rmApplied *-un-lft-identity11.1
Applied associate-*l*11.1
Simplified4.6
if -1.0084599578011689e-263 < (* b1 b2) < 3.019673003289364e-116 or 8.38868406756228e+184 < (* b1 b2) Initial program 21.6
rmApplied associate-/r*11.4
rmApplied associate-/l*7.2
if 3.019673003289364e-116 < (* b1 b2) < 8.38868406756228e+184Initial program 3.4
rmApplied associate-/l*3.2
Final simplification5.0
herbie shell --seed 2019146
(FPCore (a1 a2 b1 b2)
:name "Quotient of products"
:herbie-target
(* (/ a1 b1) (/ a2 b2))
(/ (* a1 a2) (* b1 b2)))