\frac{x \cdot \left(y + z\right)}{z}\left(x \cdot y\right) \cdot \frac{1}{z} + xdouble f(double x, double y, double z) {
double r277094 = x;
double r277095 = y;
double r277096 = z;
double r277097 = r277095 + r277096;
double r277098 = r277094 * r277097;
double r277099 = r277098 / r277096;
return r277099;
}
double f(double x, double y, double z) {
double r277100 = x;
double r277101 = y;
double r277102 = r277100 * r277101;
double r277103 = 1.0;
double r277104 = z;
double r277105 = r277103 / r277104;
double r277106 = r277102 * r277105;
double r277107 = r277106 + r277100;
return r277107;
}




Bits error versus x




Bits error versus y




Bits error versus z
Results
| Original | 12.4 |
|---|---|
| Target | 3.1 |
| Herbie | 4.9 |
if x < -1.0974667898439183e+134 or 1.0010617300760747e-92 < x Initial program 21.3
Taylor expanded around 0 7.2
rmApplied div-inv7.3
rmApplied associate-*l*0.7
if -1.0974667898439183e+134 < x < 1.0010617300760747e-92Initial program 6.5
Taylor expanded around 0 3.2
rmApplied div-inv3.3
Final simplification4.9
herbie shell --seed 2019304
(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))