\left(\left(x - \left(y + 0.5\right) \cdot \log y\right) + y\right) - z
\mathsf{fma}\left(\sqrt[3]{y} \cdot \sqrt[3]{y}, \sqrt[3]{y}, x - \mathsf{fma}\left(\log y, y + 0.5, z\right)\right)
(FPCore (x y z) :precision binary64 (- (+ (- x (* (+ y 0.5) (log y))) y) z))
(FPCore (x y z) :precision binary64 (fma (* (cbrt y) (cbrt y)) (cbrt y) (- x (fma (log y) (+ y 0.5) z))))
double 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 fma((cbrt(y) * cbrt(y)), cbrt(y), (x - fma(log(y), (y + 0.5), z)));
}




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
Simplified0.1
Applied add-cube-cbrt_binary640.1
Applied fma-neg_binary640.1
Simplified0.1
Final simplification0.1
herbie shell --seed 2022005
(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))