\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 r181254 = x0;
double r181255 = 1.0;
double r181256 = x1;
double r181257 = r181255 - r181256;
double r181258 = r181254 / r181257;
double r181259 = r181258 - r181254;
return r181259;
}
double f(double x0, double x1) {
double r181260 = 1.0;
double r181261 = x0;
double r181262 = exp(r181261);
double r181263 = sqrt(r181262);
double r181264 = r181260 / r181263;
double r181265 = log(r181264);
double r181266 = 3.0;
double r181267 = pow(r181265, r181266);
double r181268 = cbrt(r181261);
double r181269 = 1.0;
double r181270 = x1;
double r181271 = r181269 - r181270;
double r181272 = r181268 / r181271;
double r181273 = 0.6666666666666666;
double r181274 = pow(r181261, r181273);
double r181275 = fma(r181272, r181274, r181265);
double r181276 = pow(r181275, r181266);
double r181277 = r181267 + r181276;
double r181278 = r181272 * r181274;
double r181279 = r181275 * r181278;
double r181280 = log(r181263);
double r181281 = r181280 * r181280;
double r181282 = r181279 + r181281;
double r181283 = r181277 / r181282;
return r181283;
}




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-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.4
Final simplification5.4
herbie shell --seed 2020033 +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))