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 f(double x, double y, double z) {
double r556050 = x;
double r556051 = y;
double r556052 = r556050 / r556051;
double r556053 = log(r556052);
double r556054 = r556050 * r556053;
double r556055 = z;
double r556056 = r556054 - r556055;
return r556056;
}
double f(double x, double y, double z) {
double r556057 = x;
double r556058 = 2.0;
double r556059 = cbrt(r556057);
double r556060 = y;
double r556061 = cbrt(r556060);
double r556062 = r556059 / r556061;
double r556063 = log(r556062);
double r556064 = r556058 * r556063;
double r556065 = r556057 * r556064;
double r556066 = r556057 * r556063;
double r556067 = r556065 + r556066;
double r556068 = z;
double r556069 = r556067 - r556068;
return r556069;
}




Bits error versus x




Bits error versus y




Bits error versus z
Results
| Original | 14.8 |
|---|---|
| Target | 7.5 |
| Herbie | 0.2 |
Initial program 14.8
rmApplied add-cube-cbrt14.8
Applied add-cube-cbrt14.8
Applied times-frac14.8
Applied log-prod3.5
Applied distribute-lft-in3.5
Simplified0.2
Final simplification0.2
herbie shell --seed 2020036
(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))