\frac{x0}{1 - x1} - x0e^{\log \left(\log \left(\frac{1}{\sqrt{e^{x0}}}\right) + \mathsf{fma}\left(\frac{\sqrt[3]{x0}}{1 - x1}, {x0}^{\frac{2}{3}}, \log \left(\frac{1}{\sqrt{e^{x0}}}\right)\right)\right)}double f(double x0, double x1) {
double r159864 = x0;
double r159865 = 1.0;
double r159866 = x1;
double r159867 = r159865 - r159866;
double r159868 = r159864 / r159867;
double r159869 = r159868 - r159864;
return r159869;
}
double f(double x0, double x1) {
double r159870 = 1.0;
double r159871 = x0;
double r159872 = exp(r159871);
double r159873 = sqrt(r159872);
double r159874 = r159870 / r159873;
double r159875 = log(r159874);
double r159876 = cbrt(r159871);
double r159877 = 1.0;
double r159878 = x1;
double r159879 = r159877 - r159878;
double r159880 = r159876 / r159879;
double r159881 = 0.6666666666666666;
double r159882 = pow(r159871, r159881);
double r159883 = fma(r159880, r159882, r159875);
double r159884 = r159875 + r159883;
double r159885 = log(r159884);
double r159886 = exp(r159885);
return r159886;
}




Bits error versus x0




Bits error versus x1
| Original | 7.9 |
|---|---|
| Target | 0.3 |
| Herbie | 6.4 |
Initial program 7.9
rmApplied *-un-lft-identity7.9
Applied add-cube-cbrt7.9
Applied times-frac8.2
Applied fma-neg6.9
rmApplied add-exp-log6.9
rmApplied add-log-exp7.8
Simplified6.7
rmApplied add-sqr-sqrt7.2
Applied *-un-lft-identity7.2
Applied unpow-prod-down7.2
Applied times-frac6.8
Applied log-prod7.0
Simplified7.0
Simplified6.4
Final simplification6.4
herbie shell --seed 2019353 +o rules:numerics
(FPCore (x0 x1)
:name "(- (/ x0 (- 1 x1)) x0)"
:precision binary64
:pre (or (and (== x0 1.855) (== x1 0.000209)) (and (== x0 2.985) (== x1 0.0186)))
:herbie-target
(/ (* x0 x1) (- 1 x1))
(- (/ x0 (- 1 x1)) x0))