\left(\left(x - \left(y + 0.5\right) \cdot \log y\right) + y\right) - z
\left(x + \left(\left(y - \left(\left(-\log y\right) \cdot \frac{-1}{6}\right) \cdot \left(3 \cdot y + 1.5\right)\right) - \log \left(\sqrt{y}\right) \cdot \left(y + 0.5\right)\right)\right) - zdouble f(double x, double y, double z) {
double r292075 = x;
double r292076 = y;
double r292077 = 0.5;
double r292078 = r292076 + r292077;
double r292079 = log(r292076);
double r292080 = r292078 * r292079;
double r292081 = r292075 - r292080;
double r292082 = r292081 + r292076;
double r292083 = z;
double r292084 = r292082 - r292083;
return r292084;
}
double f(double x, double y, double z) {
double r292085 = x;
double r292086 = y;
double r292087 = log(r292086);
double r292088 = -r292087;
double r292089 = -0.16666666666666666;
double r292090 = r292088 * r292089;
double r292091 = 3.0;
double r292092 = r292091 * r292086;
double r292093 = 1.5;
double r292094 = r292092 + r292093;
double r292095 = r292090 * r292094;
double r292096 = r292086 - r292095;
double r292097 = sqrt(r292086);
double r292098 = log(r292097);
double r292099 = 0.5;
double r292100 = r292086 + r292099;
double r292101 = r292098 * r292100;
double r292102 = r292096 - r292101;
double r292103 = r292085 + r292102;
double r292104 = z;
double r292105 = r292103 - r292104;
return r292105;
}




Bits error versus x




Bits error versus y




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