x \cdot \log \left(\frac{x}{y}\right) - z\left(x \cdot \left(2 \cdot \log \left(\frac{\sqrt[3]{x}}{\sqrt[3]{y}}\right)\right) + x \cdot \log \left(\frac{\sqrt[3]{x}}{\sqrt[3]{y}}\right)\right) - zdouble f(double x, double y, double z) {
double r349670 = x;
double r349671 = y;
double r349672 = r349670 / r349671;
double r349673 = log(r349672);
double r349674 = r349670 * r349673;
double r349675 = z;
double r349676 = r349674 - r349675;
return r349676;
}
double f(double x, double y, double z) {
double r349677 = x;
double r349678 = 2.0;
double r349679 = cbrt(r349677);
double r349680 = y;
double r349681 = cbrt(r349680);
double r349682 = r349679 / r349681;
double r349683 = log(r349682);
double r349684 = r349678 * r349683;
double r349685 = r349677 * r349684;
double r349686 = r349677 * r349683;
double r349687 = r349685 + r349686;
double r349688 = z;
double r349689 = r349687 - r349688;
return r349689;
}




Bits error versus x




Bits error versus y




Bits error versus z
Results
| Original | 15.6 |
|---|---|
| Target | 8.0 |
| Herbie | 0.2 |
Initial program 15.6
rmApplied add-cube-cbrt15.6
Applied add-cube-cbrt15.6
Applied times-frac15.6
Applied log-prod3.8
Applied distribute-lft-in3.8
Simplified0.2
Final simplification0.2
herbie shell --seed 2019351 +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))