\left(\left(x - \left(y + 0.5\right) \cdot \log y\right) + y\right) - z
\left(\left(x - \left(\left(y + 0.5\right) \cdot \left(2 \cdot \log \left(\sqrt[3]{y}\right)\right) + \log \left({\left(\frac{1}{y}\right)}^{\frac{-1}{3}}\right) \cdot \left(y + 0.5\right)\right)\right) + y\right) - zdouble code(double x, double y, double z) {
return (((x - ((y + 0.5) * log(y))) + y) - z);
}
double code(double x, double y, double z) {
return (((x - (((y + 0.5) * (2.0 * log(cbrt(y)))) + (log(pow((1.0 / y), -0.3333333333333333)) * (y + 0.5)))) + y) - z);
}




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 add-cube-cbrt0.1
Applied log-prod0.2
Applied distribute-lft-in0.2
Simplified0.2
Simplified0.2
Taylor expanded around inf 0.1
Final simplification0.1
herbie shell --seed 2020053
(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))