\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 r183444 = x0;
double r183445 = 1.0;
double r183446 = x1;
double r183447 = r183445 - r183446;
double r183448 = r183444 / r183447;
double r183449 = r183448 - r183444;
return r183449;
}
double f(double x0, double x1) {
double r183450 = 1.0;
double r183451 = x0;
double r183452 = exp(r183451);
double r183453 = sqrt(r183452);
double r183454 = r183450 / r183453;
double r183455 = log(r183454);
double r183456 = cbrt(r183451);
double r183457 = 1.0;
double r183458 = x1;
double r183459 = r183457 - r183458;
double r183460 = r183456 / r183459;
double r183461 = 0.6666666666666666;
double r183462 = pow(r183451, r183461);
double r183463 = fma(r183460, r183462, r183455);
double r183464 = r183455 + r183463;
double r183465 = log(r183464);
double r183466 = exp(r183465);
return r183466;
}




Bits error versus x0




Bits error versus x1
| Original | 7.8 |
|---|---|
| Target | 0.3 |
| Herbie | 6.3 |
Initial program 7.8
rmApplied *-un-lft-identity7.8
Applied add-cube-cbrt7.8
Applied times-frac8.1
Applied fma-neg6.9
rmApplied add-exp-log6.9
rmApplied add-log-exp7.7
Simplified6.6
rmApplied add-sqr-sqrt7.1
Applied *-un-lft-identity7.1
Applied unpow-prod-down7.1
Applied times-frac6.7
Applied log-prod7.0
Simplified7.0
Simplified6.3
Final simplification6.3
herbie shell --seed 2020089 +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))