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 r466389 = x;
double r466390 = y;
double r466391 = r466389 / r466390;
double r466392 = log(r466391);
double r466393 = r466389 * r466392;
double r466394 = z;
double r466395 = r466393 - r466394;
return r466395;
}
double f(double x, double y, double z) {
double r466396 = x;
double r466397 = 2.0;
double r466398 = cbrt(r466396);
double r466399 = y;
double r466400 = cbrt(r466399);
double r466401 = r466398 / r466400;
double r466402 = log(r466401);
double r466403 = r466397 * r466402;
double r466404 = r466403 + r466402;
double r466405 = r466396 * r466404;
double r466406 = z;
double r466407 = r466405 - r466406;
return r466407;
}




Bits error versus x




Bits error versus y




Bits error versus z
Results
| Original | 15.1 |
|---|---|
| Target | 7.2 |
| Herbie | 0.2 |
Initial program 15.1
rmApplied add-cube-cbrt15.1
Applied add-cube-cbrt15.1
Applied times-frac15.1
Applied log-prod3.5
Simplified0.2
Final simplification0.2
herbie shell --seed 2019354 +o rules:numerics
(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))