\frac{a1 \cdot a2}{b1 \cdot b2}\begin{array}{l}
\mathbf{if}\;b1 \cdot b2 \le -1.8654071526797647 \cdot 10^{+191}:\\
\;\;\;\;\left(a2 \cdot \frac{a1}{b1}\right) \cdot \frac{1}{b2}\\
\mathbf{elif}\;b1 \cdot b2 \le -1.0176507098003041 \cdot 10^{-184}:\\
\;\;\;\;\frac{a1}{\frac{b1 \cdot b2}{a2}}\\
\mathbf{elif}\;b1 \cdot b2 \le 2.105160204145219 \cdot 10^{-202}:\\
\;\;\;\;\left(\frac{a1}{b1} \cdot \left(\sqrt[3]{a2} \cdot \sqrt[3]{a2}\right)\right) \cdot \frac{\sqrt[3]{a2}}{b2}\\
\mathbf{elif}\;b1 \cdot b2 \le 3.692200814826821 \cdot 10^{+161}:\\
\;\;\;\;\frac{a1}{\frac{b1 \cdot b2}{a2}}\\
\mathbf{else}:\\
\;\;\;\;\left(a2 \cdot \frac{a1}{b1}\right) \cdot \frac{1}{b2}\\
\end{array}double f(double a1, double a2, double b1, double b2) {
double r22479787 = a1;
double r22479788 = a2;
double r22479789 = r22479787 * r22479788;
double r22479790 = b1;
double r22479791 = b2;
double r22479792 = r22479790 * r22479791;
double r22479793 = r22479789 / r22479792;
return r22479793;
}
double f(double a1, double a2, double b1, double b2) {
double r22479794 = b1;
double r22479795 = b2;
double r22479796 = r22479794 * r22479795;
double r22479797 = -1.8654071526797647e+191;
bool r22479798 = r22479796 <= r22479797;
double r22479799 = a2;
double r22479800 = a1;
double r22479801 = r22479800 / r22479794;
double r22479802 = r22479799 * r22479801;
double r22479803 = 1.0;
double r22479804 = r22479803 / r22479795;
double r22479805 = r22479802 * r22479804;
double r22479806 = -1.0176507098003041e-184;
bool r22479807 = r22479796 <= r22479806;
double r22479808 = r22479796 / r22479799;
double r22479809 = r22479800 / r22479808;
double r22479810 = 2.105160204145219e-202;
bool r22479811 = r22479796 <= r22479810;
double r22479812 = cbrt(r22479799);
double r22479813 = r22479812 * r22479812;
double r22479814 = r22479801 * r22479813;
double r22479815 = r22479812 / r22479795;
double r22479816 = r22479814 * r22479815;
double r22479817 = 3.692200814826821e+161;
bool r22479818 = r22479796 <= r22479817;
double r22479819 = r22479818 ? r22479809 : r22479805;
double r22479820 = r22479811 ? r22479816 : r22479819;
double r22479821 = r22479807 ? r22479809 : r22479820;
double r22479822 = r22479798 ? r22479805 : r22479821;
return r22479822;
}




Bits error versus a1




Bits error versus a2




Bits error versus b1




Bits error versus b2
Results
| Original | 11.2 |
|---|---|
| Target | 11.1 |
| Herbie | 5.0 |
if (* b1 b2) < -1.8654071526797647e+191 or 3.692200814826821e+161 < (* b1 b2) Initial program 14.2
rmApplied times-frac4.9
rmApplied div-inv5.0
Applied associate-*r*5.1
if -1.8654071526797647e+191 < (* b1 b2) < -1.0176507098003041e-184 or 2.105160204145219e-202 < (* b1 b2) < 3.692200814826821e+161Initial program 4.2
rmApplied associate-/l*4.1
if -1.0176507098003041e-184 < (* b1 b2) < 2.105160204145219e-202Initial program 31.8
rmApplied times-frac8.8
rmApplied *-un-lft-identity8.8
Applied add-cube-cbrt9.8
Applied times-frac9.8
Applied associate-*r*8.5
Final simplification5.0
herbie shell --seed 2019112 +o rules:numerics
(FPCore (a1 a2 b1 b2)
:name "Quotient of products"
:herbie-target
(* (/ a1 b1) (/ a2 b2))
(/ (* a1 a2) (* b1 b2)))