\frac{a1 \cdot a2}{b1 \cdot b2}\begin{array}{l}
\mathbf{if}\;b1 \cdot b2 \le -3.83139257688113893 \cdot 10^{179} \lor \neg \left(b1 \cdot b2 \le -1.85368990459426914 \cdot 10^{-182} \lor \neg \left(b1 \cdot b2 \le 1.4192384906235271 \cdot 10^{-201} \lor \neg \left(b1 \cdot b2 \le 1.8190010618023067 \cdot 10^{202}\right)\right)\right):\\
\;\;\;\;\frac{\frac{a1}{b1}}{\frac{b2}{a2}}\\
\mathbf{else}:\\
\;\;\;\;a2 \cdot \frac{a1}{b1 \cdot b2}\\
\end{array}double f(double a1, double a2, double b1, double b2) {
double r139147 = a1;
double r139148 = a2;
double r139149 = r139147 * r139148;
double r139150 = b1;
double r139151 = b2;
double r139152 = r139150 * r139151;
double r139153 = r139149 / r139152;
return r139153;
}
double f(double a1, double a2, double b1, double b2) {
double r139154 = b1;
double r139155 = b2;
double r139156 = r139154 * r139155;
double r139157 = -3.831392576881139e+179;
bool r139158 = r139156 <= r139157;
double r139159 = -1.853689904594269e-182;
bool r139160 = r139156 <= r139159;
double r139161 = 1.4192384906235271e-201;
bool r139162 = r139156 <= r139161;
double r139163 = 1.8190010618023067e+202;
bool r139164 = r139156 <= r139163;
double r139165 = !r139164;
bool r139166 = r139162 || r139165;
double r139167 = !r139166;
bool r139168 = r139160 || r139167;
double r139169 = !r139168;
bool r139170 = r139158 || r139169;
double r139171 = a1;
double r139172 = r139171 / r139154;
double r139173 = a2;
double r139174 = r139155 / r139173;
double r139175 = r139172 / r139174;
double r139176 = r139171 / r139156;
double r139177 = r139173 * r139176;
double r139178 = r139170 ? r139175 : r139177;
return r139178;
}




Bits error versus a1




Bits error versus a2




Bits error versus b1




Bits error versus b2
Results
| Original | 11.2 |
|---|---|
| Target | 11.0 |
| Herbie | 5.3 |
if (* b1 b2) < -3.831392576881139e+179 or -1.853689904594269e-182 < (* b1 b2) < 1.4192384906235271e-201 or 1.8190010618023067e+202 < (* b1 b2) Initial program 20.1
rmApplied associate-/l*19.7
rmApplied *-un-lft-identity19.7
Applied times-frac10.8
Applied associate-/r*6.6
Simplified6.6
if -3.831392576881139e+179 < (* b1 b2) < -1.853689904594269e-182 or 1.4192384906235271e-201 < (* b1 b2) < 1.8190010618023067e+202Initial program 4.3
rmApplied associate-/l*4.2
rmApplied associate-/r/4.3
rmApplied *-commutative4.3
Final simplification5.3
herbie shell --seed 2020027
(FPCore (a1 a2 b1 b2)
:name "Quotient of products"
:precision binary64
:herbie-target
(* (/ a1 b1) (/ a2 b2))
(/ (* a1 a2) (* b1 b2)))