\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 r211636 = x0;
double r211637 = 1.0;
double r211638 = x1;
double r211639 = r211637 - r211638;
double r211640 = r211636 / r211639;
double r211641 = r211640 - r211636;
return r211641;
}
double f(double x0, double x1) {
double r211642 = 1.0;
double r211643 = x0;
double r211644 = exp(r211643);
double r211645 = sqrt(r211644);
double r211646 = r211642 / r211645;
double r211647 = log(r211646);
double r211648 = cbrt(r211643);
double r211649 = 1.0;
double r211650 = x1;
double r211651 = r211649 - r211650;
double r211652 = r211648 / r211651;
double r211653 = 0.6666666666666666;
double r211654 = pow(r211643, r211653);
double r211655 = fma(r211652, r211654, r211647);
double r211656 = r211647 + r211655;
double r211657 = log(r211656);
double r211658 = exp(r211657);
return r211658;
}




Bits error versus x0




Bits error versus x1
| Original | 7.9 |
|---|---|
| Target | 0.2 |
| 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.1
Simplified7.1
Simplified6.4
Final simplification6.4
herbie shell --seed 2020057 +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))