\frac{x0}{1 - x1} - x0{\left({e}^{\left(\sqrt[3]{\log \left(\mathsf{fma}\left(\left(\sqrt[3]{x0} \cdot \sqrt[3]{x0}\right), \left(\frac{\sqrt[3]{x0}}{1 - x1}\right), \left(-x0\right)\right)\right)} \cdot \sqrt[3]{\log \left(\mathsf{fma}\left(\left(\sqrt[3]{x0} \cdot \sqrt[3]{x0}\right), \left(\frac{\sqrt[3]{x0}}{1 - x1}\right), \left(-x0\right)\right)\right)}\right)}\right)}^{\left(\sqrt[3]{\log \left(\mathsf{fma}\left(\left(\sqrt[3]{x0} \cdot \sqrt[3]{x0}\right), \left(\frac{\sqrt[3]{x0}}{1 - x1}\right), \left(-x0\right)\right)\right)}\right)}double f(double x0, double x1) {
double r20081091 = x0;
double r20081092 = 1.0;
double r20081093 = x1;
double r20081094 = r20081092 - r20081093;
double r20081095 = r20081091 / r20081094;
double r20081096 = r20081095 - r20081091;
return r20081096;
}
double f(double x0, double x1) {
double r20081097 = exp(1.0);
double r20081098 = x0;
double r20081099 = cbrt(r20081098);
double r20081100 = r20081099 * r20081099;
double r20081101 = 1.0;
double r20081102 = x1;
double r20081103 = r20081101 - r20081102;
double r20081104 = r20081099 / r20081103;
double r20081105 = -r20081098;
double r20081106 = fma(r20081100, r20081104, r20081105);
double r20081107 = log(r20081106);
double r20081108 = cbrt(r20081107);
double r20081109 = r20081108 * r20081108;
double r20081110 = pow(r20081097, r20081109);
double r20081111 = pow(r20081110, r20081108);
return r20081111;
}




Bits error versus x0




Bits error versus x1
| Original | 7.8 |
|---|---|
| Target | 0.3 |
| Herbie | 7.2 |
Initial program 7.8
rmApplied *-un-lft-identity7.8
Applied *-un-lft-identity7.8
Applied distribute-lft-out--7.8
Applied add-cube-cbrt7.8
Applied times-frac8.1
Applied fma-neg6.9
Simplified6.9
rmApplied add-exp-log6.9
rmApplied *-un-lft-identity6.9
Applied exp-prod6.9
Simplified6.9
rmApplied add-cube-cbrt7.1
Applied pow-unpow7.2
Final simplification7.2
herbie shell --seed 2019120 +o rules:numerics
(FPCore (x0 x1)
:name "(- (/ x0 (- 1 x1)) x0)"
: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))