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 r457416 = x;
double r457417 = y;
double r457418 = r457416 / r457417;
double r457419 = log(r457418);
double r457420 = r457416 * r457419;
double r457421 = z;
double r457422 = r457420 - r457421;
return r457422;
}
double f(double x, double y, double z) {
double r457423 = x;
double r457424 = 2.0;
double r457425 = cbrt(r457423);
double r457426 = y;
double r457427 = cbrt(r457426);
double r457428 = r457425 / r457427;
double r457429 = log(r457428);
double r457430 = r457424 * r457429;
double r457431 = r457430 + r457429;
double r457432 = r457423 * r457431;
double r457433 = z;
double r457434 = r457432 - r457433;
return r457434;
}




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.59507779908377277e-308) (- (* x (log (/ x y))) z) (- (* x (- (log x) (log y))) z))
(- (* x (log (/ x y))) z))