x \cdot \log \left(\frac{x}{y}\right) - z\left(x \cdot \left(\log \left(\frac{\sqrt[3]{x}}{\sqrt[3]{y}}\right) \cdot 2\right) + x \cdot \log \left(\frac{\sqrt[3]{x}}{\sqrt[3]{y}}\right)\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))) 2.0)) (* x (log (/ (cbrt x) (cbrt y))))) z))
double code(double x, double y, double z) {
return ((double) (((double) (x * ((double) log((x / y))))) - z));
}
double code(double x, double y, double z) {
return ((double) (((double) (((double) (x * ((double) (((double) log((((double) cbrt(x)) / ((double) cbrt(y))))) * 2.0)))) + ((double) (x * ((double) log((((double) cbrt(x)) / ((double) cbrt(y))))))))) - z));
}




Bits error versus x




Bits error versus y




Bits error versus z
Results
| Original | 14.9 |
|---|---|
| Target | 7.6 |
| Herbie | 0.2 |
Initial program Error: 14.9 bits
rmApplied add-cube-cbrtError: 14.9 bits
Applied add-cube-cbrtError: 14.9 bits
Applied times-fracError: 14.9 bits
Applied log-prodError: 3.6 bits
Applied distribute-lft-inError: 3.6 bits
SimplifiedError: 0.2 bits
Final simplificationError: 0.2 bits
herbie shell --seed 2020203
(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))