\frac{x \cdot \left(y + z\right)}{z}\begin{array}{l}
\mathbf{if}\;z \le -1.016978897081638 \cdot 10^{-26}:\\
\;\;\;\;x \cdot \frac{y + z}{z}\\
\mathbf{elif}\;z \le -2.4206933261639595 \cdot 10^{-283}:\\
\;\;\;\;\frac{x \cdot y}{z} + x\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{\frac{z}{y + z}}\\
\end{array}double f(double x, double y, double z) {
double r507837 = x;
double r507838 = y;
double r507839 = z;
double r507840 = r507838 + r507839;
double r507841 = r507837 * r507840;
double r507842 = r507841 / r507839;
return r507842;
}
double f(double x, double y, double z) {
double r507843 = z;
double r507844 = -1.016978897081638e-26;
bool r507845 = r507843 <= r507844;
double r507846 = x;
double r507847 = y;
double r507848 = r507847 + r507843;
double r507849 = r507848 / r507843;
double r507850 = r507846 * r507849;
double r507851 = -2.4206933261639595e-283;
bool r507852 = r507843 <= r507851;
double r507853 = r507846 * r507847;
double r507854 = r507853 / r507843;
double r507855 = r507854 + r507846;
double r507856 = r507843 / r507848;
double r507857 = r507846 / r507856;
double r507858 = r507852 ? r507855 : r507857;
double r507859 = r507845 ? r507850 : r507858;
return r507859;
}




Bits error versus x




Bits error versus y




Bits error versus z
Results
| Original | 12.1 |
|---|---|
| Target | 3.1 |
| Herbie | 2.4 |
if z < -1.016978897081638e-26Initial program 14.9
rmApplied *-un-lft-identity14.9
Applied times-frac0.1
Simplified0.1
if -1.016978897081638e-26 < z < -2.4206933261639595e-283Initial program 6.7
Taylor expanded around 0 3.9
if -2.4206933261639595e-283 < z Initial program 12.3
rmApplied associate-/l*3.3
Final simplification2.4
herbie shell --seed 2020045
(FPCore (x y z)
:name "Numeric.SpecFunctions:choose from math-functions-0.1.5.2"
:precision binary64
:herbie-target
(/ x (/ z (+ y z)))
(/ (* x (+ y z)) z))