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 r291600 = x;
double r291601 = y;
double r291602 = r291600 / r291601;
double r291603 = log(r291602);
double r291604 = r291600 * r291603;
double r291605 = z;
double r291606 = r291604 - r291605;
return r291606;
}
double f(double x, double y, double z) {
double r291607 = x;
double r291608 = 2.0;
double r291609 = cbrt(r291607);
double r291610 = y;
double r291611 = cbrt(r291610);
double r291612 = r291609 / r291611;
double r291613 = log(r291612);
double r291614 = r291608 * r291613;
double r291615 = r291614 + r291613;
double r291616 = r291607 * r291615;
double r291617 = z;
double r291618 = r291616 - r291617;
return r291618;
}




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 +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))