\frac{a1 \cdot a2}{b1 \cdot b2}\begin{array}{l}
\mathbf{if}\;\frac{a1 \cdot a2}{b1 \cdot b2} = -\infty:\\
\;\;\;\;\frac{a1}{b1} \cdot \frac{a2}{b2}\\
\mathbf{elif}\;\frac{a1 \cdot a2}{b1 \cdot b2} \le -7.06903222862990289 \cdot 10^{-292} \lor \neg \left(\frac{a1 \cdot a2}{b1 \cdot b2} \le 0.0\right) \land \frac{a1 \cdot a2}{b1 \cdot b2} \le 8.84189546408013918 \cdot 10^{245}:\\
\;\;\;\;\left(\sqrt[3]{\frac{a1 \cdot a2}{b1 \cdot b2}} \cdot \sqrt[3]{\frac{a1 \cdot a2}{b1 \cdot b2}}\right) \cdot \sqrt[3]{\frac{a1 \cdot a2}{b1 \cdot b2}}\\
\mathbf{else}:\\
\;\;\;\;\frac{\sqrt[3]{a1} \cdot \sqrt[3]{a1}}{b2} \cdot \frac{\sqrt[3]{a1}}{\frac{b1}{a2}}\\
\end{array}double f(double a1, double a2, double b1, double b2) {
double r103932 = a1;
double r103933 = a2;
double r103934 = r103932 * r103933;
double r103935 = b1;
double r103936 = b2;
double r103937 = r103935 * r103936;
double r103938 = r103934 / r103937;
return r103938;
}
double f(double a1, double a2, double b1, double b2) {
double r103939 = a1;
double r103940 = a2;
double r103941 = r103939 * r103940;
double r103942 = b1;
double r103943 = b2;
double r103944 = r103942 * r103943;
double r103945 = r103941 / r103944;
double r103946 = -inf.0;
bool r103947 = r103945 <= r103946;
double r103948 = r103939 / r103942;
double r103949 = r103940 / r103943;
double r103950 = r103948 * r103949;
double r103951 = -7.069032228629903e-292;
bool r103952 = r103945 <= r103951;
double r103953 = 0.0;
bool r103954 = r103945 <= r103953;
double r103955 = !r103954;
double r103956 = 8.84189546408014e+245;
bool r103957 = r103945 <= r103956;
bool r103958 = r103955 && r103957;
bool r103959 = r103952 || r103958;
double r103960 = cbrt(r103945);
double r103961 = r103960 * r103960;
double r103962 = r103961 * r103960;
double r103963 = cbrt(r103939);
double r103964 = r103963 * r103963;
double r103965 = r103964 / r103943;
double r103966 = r103942 / r103940;
double r103967 = r103963 / r103966;
double r103968 = r103965 * r103967;
double r103969 = r103959 ? r103962 : r103968;
double r103970 = r103947 ? r103950 : r103969;
return r103970;
}




Bits error versus a1




Bits error versus a2




Bits error versus b1




Bits error versus b2
Results
| Original | 11.1 |
|---|---|
| Target | 11.6 |
| Herbie | 3.2 |
if (/ (* a1 a2) (* b1 b2)) < -inf.0Initial program 64.0
rmApplied times-frac11.7
if -inf.0 < (/ (* a1 a2) (* b1 b2)) < -7.069032228629903e-292 or 0.0 < (/ (* a1 a2) (* b1 b2)) < 8.84189546408014e+245Initial program 0.8
rmApplied add-cube-cbrt1.8
if -7.069032228629903e-292 < (/ (* a1 a2) (* b1 b2)) < 0.0 or 8.84189546408014e+245 < (/ (* a1 a2) (* b1 b2)) Initial program 20.6
rmApplied associate-/l*14.0
Simplified6.3
rmApplied add-cube-cbrt6.6
Applied times-frac4.4
Final simplification3.2
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)))