\left(\left(x - \left(y + 0.5\right) \cdot \log y\right) + y\right) - z
x - \left(\left(\left(y + 0.5\right) \cdot \log y - y\right) + z\right)
double f(double x, double y, double z) {
double r391056 = x;
double r391057 = y;
double r391058 = 0.5;
double r391059 = r391057 + r391058;
double r391060 = log(r391057);
double r391061 = r391059 * r391060;
double r391062 = r391056 - r391061;
double r391063 = r391062 + r391057;
double r391064 = z;
double r391065 = r391063 - r391064;
return r391065;
}
double f(double x, double y, double z) {
double r391066 = x;
double r391067 = y;
double r391068 = 0.5;
double r391069 = r391067 + r391068;
double r391070 = log(r391067);
double r391071 = r391069 * r391070;
double r391072 = r391071 - r391067;
double r391073 = z;
double r391074 = r391072 + r391073;
double r391075 = r391066 - r391074;
return r391075;
}




Bits error versus x




Bits error versus y




Bits error versus z
Results
| Original | 0.1 |
|---|---|
| Target | 0.1 |
| Herbie | 0.1 |
Initial program 0.1
rmApplied associate-+l-0.1
Applied associate--l-0.1
Final simplification0.1
herbie shell --seed 2020042
(FPCore (x y z)
:name "Numeric.SpecFunctions:stirlingError from math-functions-0.1.5.2"
:precision binary64
:herbie-target
(- (- (+ y x) z) (* (+ y 0.5) (log y)))
(- (+ (- x (* (+ y 0.5) (log y))) y) z))