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 r281853 = x;
double r281854 = y;
double r281855 = r281853 / r281854;
double r281856 = log(r281855);
double r281857 = r281853 * r281856;
double r281858 = z;
double r281859 = r281857 - r281858;
return r281859;
}
double f(double x, double y, double z) {
double r281860 = x;
double r281861 = 2.0;
double r281862 = cbrt(r281860);
double r281863 = y;
double r281864 = cbrt(r281863);
double r281865 = r281862 / r281864;
double r281866 = log(r281865);
double r281867 = r281861 * r281866;
double r281868 = r281860 * r281867;
double r281869 = r281860 * r281866;
double r281870 = r281868 + r281869;
double r281871 = z;
double r281872 = r281870 - r281871;
return r281872;
}




Bits error versus x




Bits error versus y




Bits error versus z
Results
| Original | 14.9 |
|---|---|
| Target | 7.5 |
| Herbie | 0.2 |
Initial program 14.9
rmApplied add-cube-cbrt14.9
Applied add-cube-cbrt14.9
Applied times-frac14.9
Applied log-prod3.4
Applied distribute-lft-in3.4
Simplified0.2
Final simplification0.2
herbie shell --seed 2019306 +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.59507779908377277e-308) (- (* x (log (/ x y))) z) (- (* x (- (log x) (log y))) z))
(- (* x (log (/ x y))) z))