\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 r171252 = x0;
double r171253 = 1.0;
double r171254 = x1;
double r171255 = r171253 - r171254;
double r171256 = r171252 / r171255;
double r171257 = r171256 - r171252;
return r171257;
}
double f(double x0, double x1) {
double r171258 = 1.0;
double r171259 = x0;
double r171260 = exp(r171259);
double r171261 = sqrt(r171260);
double r171262 = r171258 / r171261;
double r171263 = log(r171262);
double r171264 = 3.0;
double r171265 = pow(r171263, r171264);
double r171266 = cbrt(r171259);
double r171267 = 1.0;
double r171268 = x1;
double r171269 = r171267 - r171268;
double r171270 = r171266 / r171269;
double r171271 = 0.6666666666666666;
double r171272 = pow(r171259, r171271);
double r171273 = fma(r171270, r171272, r171263);
double r171274 = pow(r171273, r171264);
double r171275 = r171265 + r171274;
double r171276 = r171270 * r171272;
double r171277 = r171273 * r171276;
double r171278 = log(r171261);
double r171279 = r171278 * r171278;
double r171280 = r171277 + r171279;
double r171281 = r171275 / r171280;
return r171281;
}




Bits error versus x0




Bits error versus x1
| Original | 7.9 |
|---|---|
| Target | 0.3 |
| 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 2020025 +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))