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 r419769 = x;
double r419770 = y;
double r419771 = r419769 / r419770;
double r419772 = log(r419771);
double r419773 = r419769 * r419772;
double r419774 = z;
double r419775 = r419773 - r419774;
return r419775;
}
double f(double x, double y, double z) {
double r419776 = x;
double r419777 = 2.0;
double r419778 = cbrt(r419776);
double r419779 = y;
double r419780 = cbrt(r419779);
double r419781 = r419778 / r419780;
double r419782 = log(r419781);
double r419783 = r419777 * r419782;
double r419784 = r419783 + r419782;
double r419785 = r419776 * r419784;
double r419786 = z;
double r419787 = r419785 - r419786;
return r419787;
}




Bits error versus x




Bits error versus y




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