\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 r172698 = x0;
double r172699 = 1.0;
double r172700 = x1;
double r172701 = r172699 - r172700;
double r172702 = r172698 / r172701;
double r172703 = r172702 - r172698;
return r172703;
}
double f(double x0, double x1) {
double r172704 = 1.0;
double r172705 = x0;
double r172706 = exp(r172705);
double r172707 = sqrt(r172706);
double r172708 = r172704 / r172707;
double r172709 = log(r172708);
double r172710 = cbrt(r172705);
double r172711 = 1.0;
double r172712 = x1;
double r172713 = r172711 - r172712;
double r172714 = r172710 / r172713;
double r172715 = 0.6666666666666666;
double r172716 = pow(r172705, r172715);
double r172717 = fma(r172714, r172716, r172709);
double r172718 = r172709 + r172717;
double r172719 = log(r172718);
double r172720 = exp(r172719);
return r172720;
}




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))