\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 r395807 = x;
double r395808 = y;
double r395809 = 0.5;
double r395810 = r395808 + r395809;
double r395811 = log(r395808);
double r395812 = r395810 * r395811;
double r395813 = r395807 - r395812;
double r395814 = r395813 + r395808;
double r395815 = z;
double r395816 = r395814 - r395815;
return r395816;
}
double f(double x, double y, double z) {
double r395817 = x;
double r395818 = y;
double r395819 = 0.5;
double r395820 = r395818 + r395819;
double r395821 = log(r395818);
double r395822 = r395820 * r395821;
double r395823 = r395822 - r395818;
double r395824 = z;
double r395825 = r395823 + r395824;
double r395826 = r395817 - r395825;
return r395826;
}




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