\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 r139693 = x0;
double r139694 = 1.0;
double r139695 = x1;
double r139696 = r139694 - r139695;
double r139697 = r139693 / r139696;
double r139698 = r139697 - r139693;
return r139698;
}
double f(double x0, double x1) {
double r139699 = 1.0;
double r139700 = x0;
double r139701 = exp(r139700);
double r139702 = sqrt(r139701);
double r139703 = r139699 / r139702;
double r139704 = log(r139703);
double r139705 = 3.0;
double r139706 = pow(r139704, r139705);
double r139707 = cbrt(r139700);
double r139708 = 1.0;
double r139709 = x1;
double r139710 = r139708 - r139709;
double r139711 = r139707 / r139710;
double r139712 = 0.6666666666666666;
double r139713 = pow(r139700, r139712);
double r139714 = fma(r139711, r139713, r139704);
double r139715 = pow(r139714, r139705);
double r139716 = r139706 + r139715;
double r139717 = r139711 * r139713;
double r139718 = r139714 * r139717;
double r139719 = log(r139702);
double r139720 = r139719 * r139719;
double r139721 = r139718 + r139720;
double r139722 = r139716 / r139721;
return r139722;
}




Bits error versus x0




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