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




Bits error versus x




Bits error versus y




Bits error versus z
Results
| Original | 15.4 |
|---|---|
| Target | 8.1 |
| Herbie | 0.2 |
Initial program 15.4
rmApplied add-cube-cbrt15.4
Applied add-cube-cbrt15.4
Applied times-frac15.4
Applied log-prod3.7
Applied distribute-lft-in3.7
Simplified0.2
Final simplification0.2
herbie shell --seed 2020150
(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))