\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 r212075 = x0;
double r212076 = 1.0;
double r212077 = x1;
double r212078 = r212076 - r212077;
double r212079 = r212075 / r212078;
double r212080 = r212079 - r212075;
return r212080;
}
double f(double x0, double x1) {
double r212081 = 1.0;
double r212082 = x0;
double r212083 = exp(r212082);
double r212084 = sqrt(r212083);
double r212085 = r212081 / r212084;
double r212086 = log(r212085);
double r212087 = 3.0;
double r212088 = pow(r212086, r212087);
double r212089 = cbrt(r212082);
double r212090 = 1.0;
double r212091 = x1;
double r212092 = r212090 - r212091;
double r212093 = r212089 / r212092;
double r212094 = 0.6666666666666666;
double r212095 = pow(r212082, r212094);
double r212096 = fma(r212093, r212095, r212086);
double r212097 = pow(r212096, r212087);
double r212098 = r212088 + r212097;
double r212099 = r212093 * r212095;
double r212100 = r212096 * r212099;
double r212101 = log(r212084);
double r212102 = r212101 * r212101;
double r212103 = r212100 + r212102;
double r212104 = r212098 / r212103;
return r212104;
}




Bits error versus x0




Bits error versus x1
| Original | 7.9 |
|---|---|
| Target | 0.2 |
| Herbie | 5.4 |
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.4
Final simplification5.4
herbie shell --seed 2020036 +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))