x \cdot \log \left(\frac{x}{y}\right) - zx \cdot \left(\log \left(\frac{\sqrt[3]{x}}{\sqrt[3]{y}}\right) + \log \left(\frac{\sqrt[3]{x}}{\sqrt[3]{y}}\right) \cdot 2\right) - z(FPCore (x y z) :precision binary64 (- (* x (log (/ x y))) z))
(FPCore (x y z) :precision binary64 (- (* x (+ (log (/ (cbrt x) (cbrt y))) (* (log (/ (cbrt x) (cbrt y))) 2.0))) z))
double code(double x, double y, double z) {
return (x * log(x / y)) - z;
}
double code(double x, double y, double z) {
return (x * (log(cbrt(x) / cbrt(y)) + (log(cbrt(x) / cbrt(y)) * 2.0))) - z;
}




Bits error versus x




Bits error versus y




Bits error versus z
Results
| Original | 15.8 |
|---|---|
| Target | 8.1 |
| Herbie | 0.2 |
Initial program 15.8
rmApplied add-cube-cbrt_binary64_1477615.8
Applied add-cube-cbrt_binary64_1477615.8
Applied times-frac_binary64_1474715.8
Applied log-prod_binary64_148273.9
Simplified0.2
Final simplification0.2
herbie shell --seed 2021047
(FPCore (x y z)
:name "Numeric.SpecFunctions.Extra:bd0 from math-functions-0.1.5.2"
:precision binary64
:herbie-target
(if (< y 7.595077799083773e-308) (- (* x (log (/ x y))) z) (- (* x (- (log x) (log y))) z))
(- (* x (log (/ x y))) z))