\left(\left(x - \left(y + 0.5\right) \cdot \log y\right) + y\right) - z
\left(x - \left(\left(y + 0.5\right) \cdot 0 + \mathsf{fma}\left(\log y, y + 0.5, -y\right)\right)\right) - zdouble f(double x, double y, double z) {
double r196587 = x;
double r196588 = y;
double r196589 = 0.5;
double r196590 = r196588 + r196589;
double r196591 = log(r196588);
double r196592 = r196590 * r196591;
double r196593 = r196587 - r196592;
double r196594 = r196593 + r196588;
double r196595 = z;
double r196596 = r196594 - r196595;
return r196596;
}
double f(double x, double y, double z) {
double r196597 = x;
double r196598 = y;
double r196599 = 0.5;
double r196600 = r196598 + r196599;
double r196601 = 0.0;
double r196602 = r196600 * r196601;
double r196603 = log(r196598);
double r196604 = -r196598;
double r196605 = fma(r196603, r196600, r196604);
double r196606 = r196602 + r196605;
double r196607 = r196597 - r196606;
double r196608 = z;
double r196609 = r196607 - r196608;
return r196609;
}




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 associate-+l-0.1
rmApplied *-un-lft-identity0.1
Applied log-prod0.1
Applied distribute-rgt-in0.1
Applied associate--l+0.1
Simplified0.1
Final simplification0.1
herbie shell --seed 2019304 +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))