x \cdot \log \left(\frac{x}{y}\right) - z\left(\log \left(\frac{\sqrt[3]{x}}{\sqrt[3]{y}}\right) \cdot x + \left(\log \left(\frac{\sqrt[3]{x}}{\sqrt[3]{y}}\right) + \log \left(\frac{\sqrt[3]{x}}{\sqrt[3]{y}}\right)\right) \cdot x\right) - zdouble f(double x, double y, double z) {
double r13980006 = x;
double r13980007 = y;
double r13980008 = r13980006 / r13980007;
double r13980009 = log(r13980008);
double r13980010 = r13980006 * r13980009;
double r13980011 = z;
double r13980012 = r13980010 - r13980011;
return r13980012;
}
double f(double x, double y, double z) {
double r13980013 = x;
double r13980014 = cbrt(r13980013);
double r13980015 = y;
double r13980016 = cbrt(r13980015);
double r13980017 = r13980014 / r13980016;
double r13980018 = log(r13980017);
double r13980019 = r13980018 * r13980013;
double r13980020 = r13980018 + r13980018;
double r13980021 = r13980020 * r13980013;
double r13980022 = r13980019 + r13980021;
double r13980023 = z;
double r13980024 = r13980022 - r13980023;
return r13980024;
}




Bits error versus x




Bits error versus y




Bits error versus z
Results
| Original | 15.3 |
|---|---|
| Target | 7.8 |
| Herbie | 0.2 |
Initial program 15.3
rmApplied add-cube-cbrt15.3
Applied add-cube-cbrt15.3
Applied times-frac15.3
Applied log-prod3.8
Applied distribute-rgt-in3.8
Simplified0.2
Final simplification0.2
herbie shell --seed 2019200 +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))