x \cdot \log \left(\frac{x}{y}\right) - z\left(\left(\left(2 \cdot \log \left(\frac{\sqrt[3]{x}}{\sqrt[3]{y}}\right)\right) \cdot 1\right) \cdot x + x \cdot \log \left(\frac{\sqrt[3]{x}}{\sqrt[3]{y}}\right)\right) - zdouble f(double x, double y, double z) {
double r447986 = x;
double r447987 = y;
double r447988 = r447986 / r447987;
double r447989 = log(r447988);
double r447990 = r447986 * r447989;
double r447991 = z;
double r447992 = r447990 - r447991;
return r447992;
}
double f(double x, double y, double z) {
double r447993 = 2.0;
double r447994 = x;
double r447995 = cbrt(r447994);
double r447996 = y;
double r447997 = cbrt(r447996);
double r447998 = r447995 / r447997;
double r447999 = log(r447998);
double r448000 = r447993 * r447999;
double r448001 = 1.0;
double r448002 = r448000 * r448001;
double r448003 = r448002 * r447994;
double r448004 = r447994 * r447999;
double r448005 = r448003 + r448004;
double r448006 = z;
double r448007 = r448005 - r448006;
return r448007;
}




Bits error versus x




Bits error versus y




Bits error versus z
Results
| Original | 15.3 |
|---|---|
| Target | 7.8 |
| Herbie | 0.2 |
Initial program 15.3
rmApplied add-cube-cbrt15.3
Applied add-cube-cbrt15.3
Applied times-frac15.3
Applied log-prod3.6
Applied distribute-lft-in3.6
Simplified0.2
Final simplification0.2
herbie shell --seed 2020081 +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))