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 r324627 = x;
double r324628 = y;
double r324629 = r324627 / r324628;
double r324630 = log(r324629);
double r324631 = r324627 * r324630;
double r324632 = z;
double r324633 = r324631 - r324632;
return r324633;
}
double f(double x, double y, double z) {
double r324634 = x;
double r324635 = 2.0;
double r324636 = cbrt(r324634);
double r324637 = y;
double r324638 = cbrt(r324637);
double r324639 = r324636 / r324638;
double r324640 = log(r324639);
double r324641 = r324635 * r324640;
double r324642 = r324641 + r324640;
double r324643 = r324634 * r324642;
double r324644 = z;
double r324645 = r324643 - r324644;
return r324645;
}




Bits error versus x




Bits error versus y




Bits error versus z
Results
| Original | 14.8 |
|---|---|
| Target | 7.8 |
| 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
Simplified0.2
Final simplification0.2
herbie shell --seed 2019347 +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))