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 r337707 = x;
double r337708 = y;
double r337709 = r337707 / r337708;
double r337710 = log(r337709);
double r337711 = r337707 * r337710;
double r337712 = z;
double r337713 = r337711 - r337712;
return r337713;
}
double f(double x, double y, double z) {
double r337714 = x;
double r337715 = 2.0;
double r337716 = cbrt(r337714);
double r337717 = y;
double r337718 = cbrt(r337717);
double r337719 = r337716 / r337718;
double r337720 = log(r337719);
double r337721 = r337715 * r337720;
double r337722 = r337721 + r337720;
double r337723 = r337714 * r337722;
double r337724 = z;
double r337725 = r337723 - r337724;
return r337725;
}




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