\frac{x \cdot \left(y + z\right)}{z}\begin{array}{l}
\mathbf{if}\;x \le -1.9968229567179367 \cdot 10^{-62} \lor \neg \left(x \le 3.19439199967627457 \cdot 10^{-43}\right):\\
\;\;\;\;\mathsf{fma}\left(\frac{y}{z}, x, x\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\sqrt[3]{z} \cdot \sqrt[3]{z}} \cdot \left(\frac{y}{\sqrt[3]{z}} \cdot x\right) + x\\
\end{array}double f(double x, double y, double z) {
double r407239 = x;
double r407240 = y;
double r407241 = z;
double r407242 = r407240 + r407241;
double r407243 = r407239 * r407242;
double r407244 = r407243 / r407241;
return r407244;
}
double f(double x, double y, double z) {
double r407245 = x;
double r407246 = -1.9968229567179367e-62;
bool r407247 = r407245 <= r407246;
double r407248 = 3.1943919996762746e-43;
bool r407249 = r407245 <= r407248;
double r407250 = !r407249;
bool r407251 = r407247 || r407250;
double r407252 = y;
double r407253 = z;
double r407254 = r407252 / r407253;
double r407255 = fma(r407254, r407245, r407245);
double r407256 = 1.0;
double r407257 = cbrt(r407253);
double r407258 = r407257 * r407257;
double r407259 = r407256 / r407258;
double r407260 = r407252 / r407257;
double r407261 = r407260 * r407245;
double r407262 = r407259 * r407261;
double r407263 = r407262 + r407245;
double r407264 = r407251 ? r407255 : r407263;
return r407264;
}




Bits error versus x




Bits error versus y




Bits error versus z
| Original | 13.1 |
|---|---|
| Target | 2.9 |
| Herbie | 1.8 |
if x < -1.9968229567179367e-62 or 3.1943919996762746e-43 < x Initial program 19.2
Simplified0.3
if -1.9968229567179367e-62 < x < 3.1943919996762746e-43Initial program 6.5
Simplified6.3
rmApplied fma-udef6.3
rmApplied add-cube-cbrt6.8
Applied *-un-lft-identity6.8
Applied times-frac6.8
Applied associate-*l*3.6
Final simplification1.8
herbie shell --seed 2020047 +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))