x \cdot \log \left(\frac{x}{y}\right) - z\left(x \cdot \left(\log \left(\frac{\sqrt[3]{x}}{\sqrt[3]{y}}\right) + \log \left(\frac{\sqrt[3]{x}}{\sqrt[3]{y}}\right)\right) + \log \left(\frac{\sqrt[3]{x}}{\sqrt[3]{y}}\right) \cdot x\right) - zdouble f(double x, double y, double z) {
double r18896998 = x;
double r18896999 = y;
double r18897000 = r18896998 / r18896999;
double r18897001 = log(r18897000);
double r18897002 = r18896998 * r18897001;
double r18897003 = z;
double r18897004 = r18897002 - r18897003;
return r18897004;
}
double f(double x, double y, double z) {
double r18897005 = x;
double r18897006 = cbrt(r18897005);
double r18897007 = y;
double r18897008 = cbrt(r18897007);
double r18897009 = r18897006 / r18897008;
double r18897010 = log(r18897009);
double r18897011 = r18897010 + r18897010;
double r18897012 = r18897005 * r18897011;
double r18897013 = r18897010 * r18897005;
double r18897014 = r18897012 + r18897013;
double r18897015 = z;
double r18897016 = r18897014 - r18897015;
return r18897016;
}




Bits error versus x




Bits error versus y




Bits error versus z
Results
| Original | 14.8 |
|---|---|
| Target | 7.7 |
| Herbie | 0.2 |
Initial program 14.8
rmApplied add-cube-cbrt14.8
Applied add-cube-cbrt14.8
Applied times-frac14.8
Applied log-prod3.6
Applied distribute-lft-in3.6
Simplified0.2
Final simplification0.2
herbie shell --seed 2019163 +o rules:numerics
(FPCore (x y z)
:name "Numeric.SpecFunctions.Extra:bd0 from math-functions-0.1.5.2"
:herbie-target
(if (< y 7.595077799083773e-308) (- (* x (log (/ x y))) z) (- (* x (- (log x) (log y))) z))
(- (* x (log (/ x y))) z))