\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 r2379 = x;
double r2380 = y;
double r2381 = z;
double r2382 = r2380 + r2381;
double r2383 = r2379 * r2382;
double r2384 = r2383 / r2381;
return r2384;
}
double f(double x, double y, double z) {
double r2385 = y;
double r2386 = -2.6033079480859914e+30;
bool r2387 = r2385 <= r2386;
double r2388 = x;
double r2389 = z;
double r2390 = r2388 / r2389;
double r2391 = fma(r2390, r2385, r2388);
double r2392 = r2385 / r2389;
double r2393 = fma(r2392, r2388, r2388);
double r2394 = r2387 ? r2391 : r2393;
return r2394;
}




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