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 r477045 = x;
double r477046 = y;
double r477047 = r477045 / r477046;
double r477048 = log(r477047);
double r477049 = r477045 * r477048;
double r477050 = z;
double r477051 = r477049 - r477050;
return r477051;
}
double f(double x, double y, double z) {
double r477052 = x;
double r477053 = 2.0;
double r477054 = cbrt(r477052);
double r477055 = y;
double r477056 = cbrt(r477055);
double r477057 = r477054 / r477056;
double r477058 = log(r477057);
double r477059 = r477053 * r477058;
double r477060 = r477059 + r477058;
double r477061 = r477052 * r477060;
double r477062 = z;
double r477063 = r477061 - r477062;
return r477063;
}




Bits error versus x




Bits error versus y




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