\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 r367755 = x;
double r367756 = y;
double r367757 = 0.5;
double r367758 = r367756 + r367757;
double r367759 = log(r367756);
double r367760 = r367758 * r367759;
double r367761 = r367755 - r367760;
double r367762 = r367761 + r367756;
double r367763 = z;
double r367764 = r367762 - r367763;
return r367764;
}
double f(double x, double y, double z) {
double r367765 = x;
double r367766 = y;
double r367767 = 0.5;
double r367768 = r367766 + r367767;
double r367769 = log(r367766);
double r367770 = r367768 * r367769;
double r367771 = r367770 - r367766;
double r367772 = z;
double r367773 = r367771 + r367772;
double r367774 = r367765 - r367773;
return r367774;
}




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