\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 r189469 = x0;
double r189470 = 1.0;
double r189471 = x1;
double r189472 = r189470 - r189471;
double r189473 = r189469 / r189472;
double r189474 = r189473 - r189469;
return r189474;
}
double f(double x0, double x1) {
double r189475 = 1.0;
double r189476 = x0;
double r189477 = exp(r189476);
double r189478 = sqrt(r189477);
double r189479 = r189475 / r189478;
double r189480 = log(r189479);
double r189481 = 3.0;
double r189482 = pow(r189480, r189481);
double r189483 = cbrt(r189476);
double r189484 = 1.0;
double r189485 = x1;
double r189486 = r189484 - r189485;
double r189487 = r189483 / r189486;
double r189488 = 0.6666666666666666;
double r189489 = pow(r189476, r189488);
double r189490 = fma(r189487, r189489, r189480);
double r189491 = pow(r189490, r189481);
double r189492 = r189482 + r189491;
double r189493 = r189487 * r189489;
double r189494 = r189490 * r189493;
double r189495 = log(r189478);
double r189496 = r189495 * r189495;
double r189497 = r189494 + r189496;
double r189498 = r189492 / r189497;
return r189498;
}




Bits error versus x0




Bits error versus x1
| Original | 7.9 |
|---|---|
| Target | 0.3 |
| Herbie | 5.5 |
Initial program 7.9
rmApplied *-un-lft-identity7.9
Applied add-cube-cbrt7.9
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.5
Final simplification5.5
herbie shell --seed 2019354 +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))