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 r440081 = x;
double r440082 = y;
double r440083 = r440081 / r440082;
double r440084 = log(r440083);
double r440085 = r440081 * r440084;
double r440086 = z;
double r440087 = r440085 - r440086;
return r440087;
}
double f(double x, double y, double z) {
double r440088 = x;
double r440089 = 2.0;
double r440090 = cbrt(r440088);
double r440091 = y;
double r440092 = cbrt(r440091);
double r440093 = r440090 / r440092;
double r440094 = log(r440093);
double r440095 = r440089 * r440094;
double r440096 = r440095 + r440094;
double r440097 = r440088 * r440096;
double r440098 = z;
double r440099 = r440097 - r440098;
return r440099;
}




Bits error versus x




Bits error versus y




Bits error versus z
Results
| Original | 15.3 |
|---|---|
| Target | 7.7 |
| Herbie | 0.2 |
Initial program 15.3
rmApplied add-cube-cbrt15.3
Applied add-cube-cbrt15.3
Applied times-frac15.3
Applied log-prod3.8
Simplified0.2
Final simplification0.2
herbie shell --seed 2020083
(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))