\left(\left(\left(x - 0.5\right) \cdot \log x - x\right) + 0.91893853320467\right) + \frac{\left(\left(y + 0.0007936500793651\right) \cdot z - 0.0027777777777778\right) \cdot z + 0.083333333333333}{x}\left(\left(\left(x - 0.5\right) \cdot \log \left(\sqrt[3]{x} \cdot \sqrt[3]{x}\right) + \left(\left(x - 0.5\right) \cdot \log \left(\sqrt[3]{x}\right) - x\right)\right) + 0.91893853320467\right) + \frac{z \cdot \left(\left(y + 0.0007936500793651\right) \cdot z - 0.0027777777777778\right) + 0.083333333333333}{x}(FPCore (x y z)
:precision binary64
(+
(+ (- (* (- x 0.5) (log x)) x) 0.91893853320467)
(/
(+
(* (- (* (+ y 0.0007936500793651) z) 0.0027777777777778) z)
0.083333333333333)
x)))(FPCore (x y z)
:precision binary64
(+
(+
(+
(* (- x 0.5) (log (* (cbrt x) (cbrt x))))
(- (* (- x 0.5) (log (cbrt x))) x))
0.91893853320467)
(/
(+
(* z (- (* (+ y 0.0007936500793651) z) 0.0027777777777778))
0.083333333333333)
x)))double code(double x, double y, double z) {
return ((double) (((double) (((double) (((double) (((double) (x - 0.5)) * ((double) log(x)))) - x)) + 0.91893853320467)) + (((double) (((double) (((double) (((double) (((double) (y + 0.0007936500793651)) * z)) - 0.0027777777777778)) * z)) + 0.083333333333333)) / x)));
}
double code(double x, double y, double z) {
return ((double) (((double) (((double) (((double) (((double) (x - 0.5)) * ((double) log(((double) (((double) cbrt(x)) * ((double) cbrt(x)))))))) + ((double) (((double) (((double) (x - 0.5)) * ((double) log(((double) cbrt(x)))))) - x)))) + 0.91893853320467)) + (((double) (((double) (z * ((double) (((double) (((double) (y + 0.0007936500793651)) * z)) - 0.0027777777777778)))) + 0.083333333333333)) / x)));
}




Bits error versus x




Bits error versus y




Bits error versus z
Results
| Original | 6.3 |
|---|---|
| Target | 1.3 |
| Herbie | 6.3 |
Initial program 6.3
rmApplied add-cube-cbrt_binary646.3
Applied log-prod_binary646.3
Applied distribute-lft-in_binary646.3
Applied associate--l+_binary646.3
Final simplification6.3
herbie shell --seed 2020205
(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)))