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 r289713 = x;
double r289714 = y;
double r289715 = r289713 / r289714;
double r289716 = log(r289715);
double r289717 = r289713 * r289716;
double r289718 = z;
double r289719 = r289717 - r289718;
return r289719;
}
double f(double x, double y, double z) {
double r289720 = x;
double r289721 = 2.0;
double r289722 = cbrt(r289720);
double r289723 = y;
double r289724 = cbrt(r289723);
double r289725 = r289722 / r289724;
double r289726 = log(r289725);
double r289727 = r289721 * r289726;
double r289728 = r289727 + r289726;
double r289729 = r289720 * r289728;
double r289730 = z;
double r289731 = r289729 - r289730;
return r289731;
}




Bits error versus x




Bits error versus y




Bits error versus z
Results
| Original | 15.0 |
|---|---|
| Target | 7.6 |
| Herbie | 0.2 |
Initial program 15.0
rmApplied add-cube-cbrt15.0
Applied add-cube-cbrt15.0
Applied times-frac15.0
Applied log-prod3.4
Simplified0.2
Final simplification0.2
herbie shell --seed 2019325
(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))