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 r325930 = x;
double r325931 = y;
double r325932 = r325930 / r325931;
double r325933 = log(r325932);
double r325934 = r325930 * r325933;
double r325935 = z;
double r325936 = r325934 - r325935;
return r325936;
}
double f(double x, double y, double z) {
double r325937 = x;
double r325938 = 2.0;
double r325939 = cbrt(r325937);
double r325940 = y;
double r325941 = cbrt(r325940);
double r325942 = r325939 / r325941;
double r325943 = log(r325942);
double r325944 = r325938 * r325943;
double r325945 = r325944 + r325943;
double r325946 = r325937 * r325945;
double r325947 = z;
double r325948 = r325946 - r325947;
return r325948;
}




Bits error versus x




Bits error versus y




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