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 r361417 = x;
double r361418 = y;
double r361419 = r361417 / r361418;
double r361420 = log(r361419);
double r361421 = r361417 * r361420;
double r361422 = z;
double r361423 = r361421 - r361422;
return r361423;
}
double f(double x, double y, double z) {
double r361424 = x;
double r361425 = 2.0;
double r361426 = cbrt(r361424);
double r361427 = y;
double r361428 = cbrt(r361427);
double r361429 = r361426 / r361428;
double r361430 = log(r361429);
double r361431 = r361425 * r361430;
double r361432 = r361431 + r361430;
double r361433 = r361424 * r361432;
double r361434 = z;
double r361435 = r361433 - r361434;
return r361435;
}




Bits error versus x




Bits error versus y




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