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 r391408 = x;
double r391409 = y;
double r391410 = r391408 / r391409;
double r391411 = log(r391410);
double r391412 = r391408 * r391411;
double r391413 = z;
double r391414 = r391412 - r391413;
return r391414;
}
double f(double x, double y, double z) {
double r391415 = x;
double r391416 = 2.0;
double r391417 = cbrt(r391415);
double r391418 = y;
double r391419 = cbrt(r391418);
double r391420 = r391417 / r391419;
double r391421 = log(r391420);
double r391422 = r391416 * r391421;
double r391423 = r391422 + r391421;
double r391424 = r391415 * r391423;
double r391425 = z;
double r391426 = r391424 - r391425;
return r391426;
}




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 2020024
(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))