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 r558600 = x;
double r558601 = y;
double r558602 = r558600 / r558601;
double r558603 = log(r558602);
double r558604 = r558600 * r558603;
double r558605 = z;
double r558606 = r558604 - r558605;
return r558606;
}
double f(double x, double y, double z) {
double r558607 = x;
double r558608 = 2.0;
double r558609 = cbrt(r558607);
double r558610 = y;
double r558611 = cbrt(r558610);
double r558612 = r558609 / r558611;
double r558613 = log(r558612);
double r558614 = r558608 * r558613;
double r558615 = r558614 + r558613;
double r558616 = r558607 * r558615;
double r558617 = z;
double r558618 = r558616 - r558617;
return r558618;
}




Bits error versus x




Bits error versus y




Bits error versus z
Results
| Original | 15.1 |
|---|---|
| Target | 7.7 |
| 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 2020046
(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))