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 r533597 = x;
double r533598 = y;
double r533599 = r533597 / r533598;
double r533600 = log(r533599);
double r533601 = r533597 * r533600;
double r533602 = z;
double r533603 = r533601 - r533602;
return r533603;
}
double f(double x, double y, double z) {
double r533604 = x;
double r533605 = 2.0;
double r533606 = cbrt(r533604);
double r533607 = y;
double r533608 = cbrt(r533607);
double r533609 = r533606 / r533608;
double r533610 = log(r533609);
double r533611 = r533605 * r533610;
double r533612 = r533611 + r533610;
double r533613 = r533604 * r533612;
double r533614 = z;
double r533615 = r533613 - r533614;
return r533615;
}




Bits error versus x




Bits error versus y




Bits error versus z
Results
| Original | 14.9 |
|---|---|
| Target | 7.7 |
| Herbie | 0.2 |
Initial program 14.9
rmApplied add-cube-cbrt14.9
Applied add-cube-cbrt14.9
Applied times-frac14.9
Applied log-prod3.6
Simplified0.2
Final simplification0.2
herbie shell --seed 2020057 +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))