\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 r201486 = x0;
double r201487 = 1.0;
double r201488 = x1;
double r201489 = r201487 - r201488;
double r201490 = r201486 / r201489;
double r201491 = r201490 - r201486;
return r201491;
}
double f(double x0, double x1) {
double r201492 = 1.0;
double r201493 = x0;
double r201494 = exp(r201493);
double r201495 = sqrt(r201494);
double r201496 = r201492 / r201495;
double r201497 = log(r201496);
double r201498 = cbrt(r201493);
double r201499 = 1.0;
double r201500 = x1;
double r201501 = r201499 - r201500;
double r201502 = r201498 / r201501;
double r201503 = 0.6666666666666666;
double r201504 = pow(r201493, r201503);
double r201505 = fma(r201502, r201504, r201497);
double r201506 = r201497 + r201505;
double r201507 = log(r201506);
double r201508 = exp(r201507);
return r201508;
}




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-neg7.0
rmApplied add-exp-log7.0
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 2020081 +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))