\frac{x0}{1 - x1} - x0\frac{{\left(\log \left(\frac{1}{\sqrt{e^{x0}}}\right)\right)}^{3} + {\left(\mathsf{fma}\left(\frac{\sqrt[3]{x0}}{1 - x1}, {x0}^{\frac{2}{3}}, \log \left(\frac{1}{\sqrt{e^{x0}}}\right)\right)\right)}^{3}}{\mathsf{fma}\left(\frac{\sqrt[3]{x0}}{1 - x1}, {x0}^{\frac{2}{3}}, \log \left(\frac{1}{\sqrt{e^{x0}}}\right)\right) \cdot \left(\frac{\sqrt[3]{x0}}{1 - x1} \cdot {x0}^{\frac{2}{3}}\right) + \log \left(\sqrt{e^{x0}}\right) \cdot \log \left(\sqrt{e^{x0}}\right)}double f(double x0, double x1) {
double r151414 = x0;
double r151415 = 1.0;
double r151416 = x1;
double r151417 = r151415 - r151416;
double r151418 = r151414 / r151417;
double r151419 = r151418 - r151414;
return r151419;
}
double f(double x0, double x1) {
double r151420 = 1.0;
double r151421 = x0;
double r151422 = exp(r151421);
double r151423 = sqrt(r151422);
double r151424 = r151420 / r151423;
double r151425 = log(r151424);
double r151426 = 3.0;
double r151427 = pow(r151425, r151426);
double r151428 = cbrt(r151421);
double r151429 = 1.0;
double r151430 = x1;
double r151431 = r151429 - r151430;
double r151432 = r151428 / r151431;
double r151433 = 0.6666666666666666;
double r151434 = pow(r151421, r151433);
double r151435 = fma(r151432, r151434, r151425);
double r151436 = pow(r151435, r151426);
double r151437 = r151427 + r151436;
double r151438 = r151432 * r151434;
double r151439 = r151435 * r151438;
double r151440 = log(r151423);
double r151441 = r151440 * r151440;
double r151442 = r151439 + r151441;
double r151443 = r151437 / r151442;
return r151443;
}




Bits error versus x0




Bits error versus x1
| Original | 7.8 |
|---|---|
| Target | 0.2 |
| Herbie | 5.4 |
Initial program 7.8
rmApplied *-un-lft-identity7.8
Applied add-cube-cbrt7.8
Applied times-frac8.2
Applied fma-neg6.9
rmApplied add-log-exp7.8
Simplified6.9
rmApplied add-sqr-sqrt7.3
Applied *-un-lft-identity7.3
Applied unpow-prod-down7.3
Applied times-frac6.9
Applied log-prod7.0
Simplified7.0
Simplified6.4
rmApplied flip3-+5.5
Simplified5.4
Final simplification5.4
herbie shell --seed 2020056 +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))