\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 r319738 = x;
double r319739 = y;
double r319740 = 0.5;
double r319741 = r319739 + r319740;
double r319742 = log(r319739);
double r319743 = r319741 * r319742;
double r319744 = r319738 - r319743;
double r319745 = r319744 + r319739;
double r319746 = z;
double r319747 = r319745 - r319746;
return r319747;
}
double f(double x, double y, double z) {
double r319748 = x;
double r319749 = y;
double r319750 = 0.5;
double r319751 = r319749 + r319750;
double r319752 = log(r319749);
double r319753 = r319751 * r319752;
double r319754 = r319753 - r319749;
double r319755 = z;
double r319756 = r319754 + r319755;
double r319757 = r319748 - r319756;
return r319757;
}




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