\frac{a1 \cdot a2}{b1 \cdot b2}\begin{array}{l}
\mathbf{if}\;b1 \cdot b2 \le -3.78185687302351595353600927911780875218 \cdot 10^{144}:\\
\;\;\;\;\frac{a1}{b1} \cdot \frac{a2}{b2}\\
\mathbf{elif}\;b1 \cdot b2 \le -4.150210671513833606732172966148884455885 \cdot 10^{-228}:\\
\;\;\;\;\frac{a1}{\frac{1}{\frac{a2}{b1 \cdot b2}}}\\
\mathbf{elif}\;b1 \cdot b2 \le 4.343720045836759282443581250746346844563 \cdot 10^{-182} \lor \neg \left(b1 \cdot b2 \le 4.542196225721951094431610617285657897859 \cdot 10^{280}\right):\\
\;\;\;\;\frac{1}{b1} \cdot \left(\frac{a1}{b2} \cdot a2\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{a1}{b1 \cdot b2} \cdot a2\\
\end{array}double f(double a1, double a2, double b1, double b2) {
double r134331 = a1;
double r134332 = a2;
double r134333 = r134331 * r134332;
double r134334 = b1;
double r134335 = b2;
double r134336 = r134334 * r134335;
double r134337 = r134333 / r134336;
return r134337;
}
double f(double a1, double a2, double b1, double b2) {
double r134338 = b1;
double r134339 = b2;
double r134340 = r134338 * r134339;
double r134341 = -3.781856873023516e+144;
bool r134342 = r134340 <= r134341;
double r134343 = a1;
double r134344 = r134343 / r134338;
double r134345 = a2;
double r134346 = r134345 / r134339;
double r134347 = r134344 * r134346;
double r134348 = -4.1502106715138336e-228;
bool r134349 = r134340 <= r134348;
double r134350 = 1.0;
double r134351 = r134345 / r134340;
double r134352 = r134350 / r134351;
double r134353 = r134343 / r134352;
double r134354 = 4.343720045836759e-182;
bool r134355 = r134340 <= r134354;
double r134356 = 4.542196225721951e+280;
bool r134357 = r134340 <= r134356;
double r134358 = !r134357;
bool r134359 = r134355 || r134358;
double r134360 = r134350 / r134338;
double r134361 = r134343 / r134339;
double r134362 = r134361 * r134345;
double r134363 = r134360 * r134362;
double r134364 = r134343 / r134340;
double r134365 = r134364 * r134345;
double r134366 = r134359 ? r134363 : r134365;
double r134367 = r134349 ? r134353 : r134366;
double r134368 = r134342 ? r134347 : r134367;
return r134368;
}




Bits error versus a1




Bits error versus a2




Bits error versus b1




Bits error versus b2
Results
| Original | 11.5 |
|---|---|
| Target | 11.2 |
| Herbie | 5.1 |
if (* b1 b2) < -3.781856873023516e+144Initial program 14.7
rmApplied times-frac5.7
if -3.781856873023516e+144 < (* b1 b2) < -4.1502106715138336e-228Initial program 4.4
rmApplied associate-/l*4.1
rmApplied clear-num4.4
if -4.1502106715138336e-228 < (* b1 b2) < 4.343720045836759e-182 or 4.542196225721951e+280 < (* b1 b2) Initial program 26.9
rmApplied associate-/l*27.3
rmApplied associate-/r/27.2
rmApplied *-un-lft-identity27.2
Applied times-frac13.2
Applied associate-*l*6.6
if 4.343720045836759e-182 < (* b1 b2) < 4.542196225721951e+280Initial program 5.3
rmApplied associate-/l*4.6
rmApplied associate-/r/4.4
Final simplification5.1
herbie shell --seed 2019209
(FPCore (a1 a2 b1 b2)
:name "Quotient of products"
:precision binary64
:herbie-target
(* (/ a1 b1) (/ a2 b2))
(/ (* a1 a2) (* b1 b2)))