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 r587044 = x;
double r587045 = y;
double r587046 = r587044 / r587045;
double r587047 = log(r587046);
double r587048 = r587044 * r587047;
double r587049 = z;
double r587050 = r587048 - r587049;
return r587050;
}
double f(double x, double y, double z) {
double r587051 = x;
double r587052 = 2.0;
double r587053 = cbrt(r587051);
double r587054 = y;
double r587055 = cbrt(r587054);
double r587056 = r587053 / r587055;
double r587057 = log(r587056);
double r587058 = r587052 * r587057;
double r587059 = r587058 + r587057;
double r587060 = r587051 * r587059;
double r587061 = z;
double r587062 = r587060 - r587061;
return r587062;
}




Bits error versus x




Bits error versus y




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