\left(\left(x - \left(y + 0.5\right) \cdot \log y\right) + y\right) - z
\left(x + \mathsf{fma}\left(\mathsf{fma}\left(1.5, \frac{-1}{3}, -y\right), \log y, y\right)\right) - zdouble f(double x, double y, double z) {
double r266376 = x;
double r266377 = y;
double r266378 = 0.5;
double r266379 = r266377 + r266378;
double r266380 = log(r266377);
double r266381 = r266379 * r266380;
double r266382 = r266376 - r266381;
double r266383 = r266382 + r266377;
double r266384 = z;
double r266385 = r266383 - r266384;
return r266385;
}
double f(double x, double y, double z) {
double r266386 = x;
double r266387 = 1.5;
double r266388 = -0.3333333333333333;
double r266389 = y;
double r266390 = -r266389;
double r266391 = fma(r266387, r266388, r266390);
double r266392 = log(r266389);
double r266393 = fma(r266391, r266392, r266389);
double r266394 = r266386 + r266393;
double r266395 = z;
double r266396 = r266394 - r266395;
return r266396;
}




Bits error versus x




Bits error versus y




Bits error versus z
| Original | 0.1 |
|---|---|
| Target | 0.1 |
| Herbie | 0.1 |
Initial program 0.1
rmApplied add-cube-cbrt0.1
Applied log-prod0.2
Applied distribute-lft-in0.2
Simplified0.2
Simplified0.2
Taylor expanded around inf 0.2
Simplified0.2
rmApplied sub-neg0.2
Applied associate-+l+0.2
Simplified0.1
Final simplification0.1
herbie shell --seed 2019235 +o rules:numerics
(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))