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 r350895 = x;
double r350896 = y;
double r350897 = r350895 / r350896;
double r350898 = log(r350897);
double r350899 = r350895 * r350898;
double r350900 = z;
double r350901 = r350899 - r350900;
return r350901;
}
double f(double x, double y, double z) {
double r350902 = x;
double r350903 = 2.0;
double r350904 = cbrt(r350902);
double r350905 = y;
double r350906 = cbrt(r350905);
double r350907 = r350904 / r350906;
double r350908 = log(r350907);
double r350909 = r350903 * r350908;
double r350910 = r350902 * r350909;
double r350911 = r350902 * r350908;
double r350912 = r350910 + r350911;
double r350913 = z;
double r350914 = r350912 - r350913;
return r350914;
}




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.5
Applied distribute-lft-in3.5
Simplified0.2
Final simplification0.2
herbie shell --seed 2019303 +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))