\frac{x \cdot \left(y + z\right)}{z}\begin{array}{l}
\mathbf{if}\;y \le -2.6033079480859914 \cdot 10^{30}:\\
\;\;\;\;\mathsf{fma}\left(\frac{x}{z}, y, x\right)\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(\frac{y}{z}, x, x\right)\\
\end{array}double f(double x, double y, double z) {
double r433567 = x;
double r433568 = y;
double r433569 = z;
double r433570 = r433568 + r433569;
double r433571 = r433567 * r433570;
double r433572 = r433571 / r433569;
return r433572;
}
double f(double x, double y, double z) {
double r433573 = y;
double r433574 = -2.6033079480859914e+30;
bool r433575 = r433573 <= r433574;
double r433576 = x;
double r433577 = z;
double r433578 = r433576 / r433577;
double r433579 = fma(r433578, r433573, r433576);
double r433580 = r433573 / r433577;
double r433581 = fma(r433580, r433576, r433576);
double r433582 = r433575 ? r433579 : r433581;
return r433582;
}




Bits error versus x




Bits error versus y




Bits error versus z
| Original | 12.6 |
|---|---|
| Target | 3.2 |
| Herbie | 2.4 |
if y < -2.6033079480859914e+30Initial program 11.2
Taylor expanded around 0 8.5
Simplified3.6
if -2.6033079480859914e+30 < y Initial program 13.0
Simplified2.1
Final simplification2.4
herbie shell --seed 2020025 +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))