\left(\left(x - \left(y + 0.5\right) \cdot \log y\right) + y\right) - z
\left(\left(x - \left(\left(2 \cdot \log \left(\sqrt[3]{y}\right)\right) \cdot \left(y + 0.5\right) + \left(\left(y + 0.5\right) \cdot \frac{1}{3}\right) \cdot \log y\right)\right) + y\right) - zdouble f(double x, double y, double z) {
double r371755 = x;
double r371756 = y;
double r371757 = 0.5;
double r371758 = r371756 + r371757;
double r371759 = log(r371756);
double r371760 = r371758 * r371759;
double r371761 = r371755 - r371760;
double r371762 = r371761 + r371756;
double r371763 = z;
double r371764 = r371762 - r371763;
return r371764;
}
double f(double x, double y, double z) {
double r371765 = x;
double r371766 = 2.0;
double r371767 = y;
double r371768 = cbrt(r371767);
double r371769 = log(r371768);
double r371770 = r371766 * r371769;
double r371771 = 0.5;
double r371772 = r371767 + r371771;
double r371773 = r371770 * r371772;
double r371774 = 0.3333333333333333;
double r371775 = r371772 * r371774;
double r371776 = log(r371767);
double r371777 = r371775 * r371776;
double r371778 = r371773 + r371777;
double r371779 = r371765 - r371778;
double r371780 = r371779 + r371767;
double r371781 = z;
double r371782 = r371780 - r371781;
return r371782;
}




Bits error versus x




Bits error versus y




Bits error versus z
Results
| Original | 0.1 |
|---|---|
| Target | 0.1 |
| Herbie | 0.1 |
Initial program 0.1
rmApplied add-cube-cbrt0.1
Applied log-prod0.2
Applied distribute-lft-in0.2
Simplified0.2
rmApplied pow1/30.2
Applied log-pow0.1
Applied associate-*r*0.1
Final simplification0.1
herbie shell --seed 2020045
(FPCore (x y z)
:name "Numeric.SpecFunctions:stirlingError from math-functions-0.1.5.2"
:precision binary64
:herbie-target
(- (- (+ y x) z) (* (+ y 0.5) (log y)))
(- (+ (- x (* (+ y 0.5) (log y))) y) z))