x \cdot \log \left(\frac{x}{y}\right) - z\left(\left(\left(2 \cdot \log \left(\frac{\sqrt[3]{x}}{\sqrt[3]{y}}\right)\right) \cdot 1\right) \cdot x + x \cdot \log \left(\frac{\sqrt[3]{x}}{\sqrt[3]{y}}\right)\right) - zdouble f(double x, double y, double z) {
double r474626 = x;
double r474627 = y;
double r474628 = r474626 / r474627;
double r474629 = log(r474628);
double r474630 = r474626 * r474629;
double r474631 = z;
double r474632 = r474630 - r474631;
return r474632;
}
double f(double x, double y, double z) {
double r474633 = 2.0;
double r474634 = x;
double r474635 = cbrt(r474634);
double r474636 = y;
double r474637 = cbrt(r474636);
double r474638 = r474635 / r474637;
double r474639 = log(r474638);
double r474640 = r474633 * r474639;
double r474641 = 1.0;
double r474642 = r474640 * r474641;
double r474643 = r474642 * r474634;
double r474644 = r474634 * r474639;
double r474645 = r474643 + r474644;
double r474646 = z;
double r474647 = r474645 - r474646;
return r474647;
}




Bits error versus x




Bits error versus y




Bits error versus z
Results
| Original | 15.1 |
|---|---|
| Target | 7.7 |
| Herbie | 0.2 |
Initial program 15.1
rmApplied add-cube-cbrt15.1
Applied add-cube-cbrt15.1
Applied times-frac15.1
Applied log-prod3.4
Applied distribute-lft-in3.4
Simplified0.2
Final simplification0.2
herbie shell --seed 2020018 +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))