\frac{x0}{1 - x1} - x0\begin{array}{l}
\mathbf{if}\;x1 \le 0.00021208908081054686:\\
\;\;\;\;{e}^{\left(\log \left((\left(\sqrt[3]{x0} \cdot \sqrt[3]{x0}\right) \cdot \left(\frac{\sqrt[3]{x0}}{1 - x1}\right) + \left(-x0\right))_*\right)\right)}\\
\mathbf{else}:\\
\;\;\;\;(\left(\frac{\sqrt{x0}}{\sqrt{x1} + 1}\right) \cdot \left(\frac{\sqrt{x0}}{1 - \sqrt{x1}}\right) + \left(-x0\right))_*\\
\end{array}double f(double x0, double x1) {
double r19830990 = x0;
double r19830991 = 1.0;
double r19830992 = x1;
double r19830993 = r19830991 - r19830992;
double r19830994 = r19830990 / r19830993;
double r19830995 = r19830994 - r19830990;
return r19830995;
}
double f(double x0, double x1) {
double r19830996 = x1;
double r19830997 = 0.00021208908081054686;
bool r19830998 = r19830996 <= r19830997;
double r19830999 = exp(1.0);
double r19831000 = x0;
double r19831001 = cbrt(r19831000);
double r19831002 = r19831001 * r19831001;
double r19831003 = 1.0;
double r19831004 = r19831003 - r19830996;
double r19831005 = r19831001 / r19831004;
double r19831006 = -r19831000;
double r19831007 = fma(r19831002, r19831005, r19831006);
double r19831008 = log(r19831007);
double r19831009 = pow(r19830999, r19831008);
double r19831010 = sqrt(r19831000);
double r19831011 = sqrt(r19830996);
double r19831012 = r19831011 + r19831003;
double r19831013 = r19831010 / r19831012;
double r19831014 = r19831003 - r19831011;
double r19831015 = r19831010 / r19831014;
double r19831016 = fma(r19831013, r19831015, r19831006);
double r19831017 = r19830998 ? r19831009 : r19831016;
return r19831017;
}




Bits error versus x0




Bits error versus x1
| Original | 7.8 |
|---|---|
| Target | 0.2 |
| Herbie | 6.0 |
if x1 < 0.00021208908081054686Initial program 11.2
rmApplied *-un-lft-identity11.2
Applied add-cube-cbrt11.2
Applied times-frac10.9
Applied fma-neg8.9
Simplified8.9
rmApplied add-exp-log8.9
rmApplied pow18.9
Applied log-pow8.9
Applied exp-prod8.9
Simplified8.9
if 0.00021208908081054686 < x1 Initial program 4.5
rmApplied add-sqr-sqrt4.5
Applied *-un-lft-identity4.5
Applied difference-of-squares4.5
Applied add-sqr-sqrt4.5
Applied times-frac5.2
Applied fma-neg3.2
Final simplification6.0
herbie shell --seed 2019107 +o rules:numerics
(FPCore (x0 x1)
:name "(- (/ x0 (- 1 x1)) x0)"
: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))