\frac{x0}{1 - x1} - x0{e}^{\left(2 \cdot \log \left(\sqrt[3]{\mathsf{fma}\left({x0}^{\frac{2}{3}}, \frac{\sqrt[3]{x0}}{1 - x1}, -x0\right)}\right)\right)} \cdot {e}^{\left(\log \left(\sqrt[3]{\mathsf{fma}\left({x0}^{\frac{2}{3}}, \frac{\sqrt[3]{x0}}{1 - x1}, -x0\right)}\right)\right)}double f(double x0, double x1) {
double r305387 = x0;
double r305388 = 1.0;
double r305389 = x1;
double r305390 = r305388 - r305389;
double r305391 = r305387 / r305390;
double r305392 = r305391 - r305387;
return r305392;
}
double f(double x0, double x1) {
double r305393 = exp(1.0);
double r305394 = 2.0;
double r305395 = x0;
double r305396 = 0.6666666666666666;
double r305397 = pow(r305395, r305396);
double r305398 = cbrt(r305395);
double r305399 = 1.0;
double r305400 = x1;
double r305401 = r305399 - r305400;
double r305402 = r305398 / r305401;
double r305403 = -r305395;
double r305404 = fma(r305397, r305402, r305403);
double r305405 = cbrt(r305404);
double r305406 = log(r305405);
double r305407 = r305394 * r305406;
double r305408 = pow(r305393, r305407);
double r305409 = pow(r305393, r305406);
double r305410 = r305408 * r305409;
return r305410;
}




Bits error versus x0




Bits error versus x1
| Original | 7.9 |
|---|---|
| Target | 0.3 |
| Herbie | 6.9 |
Initial program 7.9
rmApplied *-un-lft-identity7.9
Applied add-cube-cbrt7.9
Applied times-frac8.2
Applied fma-neg6.9
rmApplied add-exp-log6.9
Simplified6.9
rmApplied pow16.9
Applied log-pow6.9
Applied exp-prod6.9
Simplified6.9
rmApplied add-cube-cbrt6.9
Applied log-prod6.9
Applied unpow-prod-up6.9
Simplified6.9
Final simplification6.9
herbie shell --seed 2020047 +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))