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 r462972 = x;
double r462973 = y;
double r462974 = r462972 / r462973;
double r462975 = log(r462974);
double r462976 = r462972 * r462975;
double r462977 = z;
double r462978 = r462976 - r462977;
return r462978;
}
double f(double x, double y, double z) {
double r462979 = x;
double r462980 = 2.0;
double r462981 = cbrt(r462979);
double r462982 = y;
double r462983 = cbrt(r462982);
double r462984 = r462981 / r462983;
double r462985 = log(r462984);
double r462986 = r462980 * r462985;
double r462987 = r462986 + r462985;
double r462988 = r462979 * r462987;
double r462989 = z;
double r462990 = r462988 - r462989;
return r462990;
}




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