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 r458890 = x;
double r458891 = y;
double r458892 = r458890 / r458891;
double r458893 = log(r458892);
double r458894 = r458890 * r458893;
double r458895 = z;
double r458896 = r458894 - r458895;
return r458896;
}
double f(double x, double y, double z) {
double r458897 = x;
double r458898 = 2.0;
double r458899 = cbrt(r458897);
double r458900 = y;
double r458901 = cbrt(r458900);
double r458902 = r458899 / r458901;
double r458903 = log(r458902);
double r458904 = r458898 * r458903;
double r458905 = r458904 + r458903;
double r458906 = r458897 * r458905;
double r458907 = z;
double r458908 = r458906 - r458907;
return r458908;
}




Bits error versus x




Bits error versus y




Bits error versus z
Results
| Original | 15.7 |
|---|---|
| Target | 8.0 |
| Herbie | 0.2 |
Initial program 15.7
rmApplied add-cube-cbrt15.7
Applied add-cube-cbrt15.7
Applied times-frac15.7
Applied log-prod3.5
Simplified0.2
Final simplification0.2
herbie shell --seed 2020021 +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))