\frac{x \cdot \left(y + z\right)}{z}\begin{array}{l}
\mathbf{if}\;y \le -9.08005395530494447 \cdot 10^{51}:\\
\;\;\;\;\mathsf{fma}\left(y, \frac{x}{z}, x\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{\frac{z}{y}} + x\\
\end{array}double f(double x, double y, double z) {
double r435546 = x;
double r435547 = y;
double r435548 = z;
double r435549 = r435547 + r435548;
double r435550 = r435546 * r435549;
double r435551 = r435550 / r435548;
return r435551;
}
double f(double x, double y, double z) {
double r435552 = y;
double r435553 = -9.080053955304944e+51;
bool r435554 = r435552 <= r435553;
double r435555 = x;
double r435556 = z;
double r435557 = r435555 / r435556;
double r435558 = fma(r435552, r435557, r435555);
double r435559 = r435556 / r435552;
double r435560 = r435555 / r435559;
double r435561 = r435560 + r435555;
double r435562 = r435554 ? r435558 : r435561;
return r435562;
}




Bits error versus x




Bits error versus y




Bits error versus z
| Original | 12.1 |
|---|---|
| Target | 3.1 |
| Herbie | 2.3 |
if y < -9.080053955304944e+51Initial program 11.9
Simplified3.7
if -9.080053955304944e+51 < y Initial program 12.1
Simplified5.0
rmApplied fma-udef5.0
Simplified4.1
rmApplied associate-/l*2.0
Final simplification2.3
herbie shell --seed 2020045 +o rules:numerics
(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))