\left(\left(\left(x - 0.5\right) \cdot \log x - x\right) + 0.91893853320467001\right) + \frac{\left(\left(y + 7.93650079365100015 \cdot 10^{-4}\right) \cdot z - 0.0027777777777778\right) \cdot z + 0.0833333333333329956}{x}\left(\left(x - 0.5\right) \cdot \log \left(\sqrt[3]{x} \cdot \sqrt[3]{x}\right) + \left(\left(\log \left({x}^{\frac{1}{3}}\right) \cdot \left(x - 0.5\right) - x\right) + 0.91893853320467001\right)\right) + \frac{\left(\left(y + 7.93650079365100015 \cdot 10^{-4}\right) \cdot z - 0.0027777777777778\right) \cdot z + 0.0833333333333329956}{x}double code(double x, double y, double z) {
return (((((x - 0.5) * log(x)) - x) + 0.91893853320467) + ((((((y + 0.0007936500793651) * z) - 0.0027777777777778) * z) + 0.083333333333333) / x));
}
double code(double x, double y, double z) {
return ((((x - 0.5) * log((cbrt(x) * cbrt(x)))) + (((log(pow(x, 0.3333333333333333)) * (x - 0.5)) - x) + 0.91893853320467)) + ((((((y + 0.0007936500793651) * z) - 0.0027777777777778) * z) + 0.083333333333333) / x));
}




Bits error versus x




Bits error versus y




Bits error versus z
Results
| Original | 5.6 |
|---|---|
| Target | 1.1 |
| Herbie | 5.5 |
Initial program 5.6
rmApplied add-cube-cbrt5.6
Applied log-prod5.6
Applied distribute-lft-in5.6
Applied associate--l+5.6
Applied associate-+l+5.6
Simplified5.6
rmApplied pow1/35.5
Final simplification5.5
herbie shell --seed 2020091
(FPCore (x y z)
:name "Numeric.SpecFunctions:$slogFactorial from math-functions-0.1.5.2, B"
:precision binary64
:herbie-target
(+ (+ (+ (* (- x 0.5) (log x)) (- 0.91893853320467 x)) (/ 0.083333333333333 x)) (* (/ z x) (- (* z (+ y 0.0007936500793651)) 0.0027777777777778)))
(+ (+ (- (* (- x 0.5) (log x)) x) 0.91893853320467) (/ (+ (* (- (* (+ y 0.0007936500793651) z) 0.0027777777777778) z) 0.083333333333333) x)))