\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 r391499 = x;
double r391500 = y;
double r391501 = z;
double r391502 = r391500 + r391501;
double r391503 = r391499 * r391502;
double r391504 = r391503 / r391501;
return r391504;
}
double f(double x, double y, double z) {
double r391505 = z;
double r391506 = -1.016978897081638e-26;
bool r391507 = r391505 <= r391506;
double r391508 = x;
double r391509 = y;
double r391510 = r391509 + r391505;
double r391511 = r391510 / r391505;
double r391512 = r391508 * r391511;
double r391513 = -2.4206933261639595e-283;
bool r391514 = r391505 <= r391513;
double r391515 = r391508 * r391509;
double r391516 = r391515 / r391505;
double r391517 = r391516 + r391508;
double r391518 = r391505 / r391510;
double r391519 = r391508 / r391518;
double r391520 = r391514 ? r391517 : r391519;
double r391521 = r391507 ? r391512 : r391520;
return r391521;
}




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))