x \cdot \log \left(\frac{x}{y}\right) - zx \cdot \left(2 \cdot \log \left(\frac{\sqrt[3]{x}}{\sqrt[3]{y}}\right) + \log \left(\frac{\sqrt[3]{x}}{\sqrt[3]{y}}\right)\right) - zdouble f(double x, double y, double z) {
double r233866 = x;
double r233867 = y;
double r233868 = r233866 / r233867;
double r233869 = log(r233868);
double r233870 = r233866 * r233869;
double r233871 = z;
double r233872 = r233870 - r233871;
return r233872;
}
double f(double x, double y, double z) {
double r233873 = x;
double r233874 = 2.0;
double r233875 = cbrt(r233873);
double r233876 = y;
double r233877 = cbrt(r233876);
double r233878 = r233875 / r233877;
double r233879 = log(r233878);
double r233880 = r233874 * r233879;
double r233881 = r233880 + r233879;
double r233882 = r233873 * r233881;
double r233883 = z;
double r233884 = r233882 - r233883;
return r233884;
}




Bits error versus x




Bits error versus y




Bits error versus z
Results
| Original | 15.2 |
|---|---|
| Target | 7.9 |
| Herbie | 0.2 |
Initial program 15.2
rmApplied add-cube-cbrt15.2
Applied add-cube-cbrt15.2
Applied times-frac15.2
Applied log-prod3.6
Simplified0.2
Final simplification0.2
herbie shell --seed 2019326 +o rules:numerics
(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))