\frac{x0}{1 - x1} - x0\begin{array}{l}
\mathbf{if}\;x1 \le 2.12089080810546861 \cdot 10^{-4}:\\
\;\;\;\;\frac{\log \left(e^{\left(\frac{x0}{1 \cdot 1 - x1 \cdot x1} \cdot \left(1 + x1\right)\right) \cdot \frac{x0}{1 - x1} - x0 \cdot x0}\right)}{\sqrt[3]{{\left(\frac{x0}{1 - x1}\right)}^{3}} + x0}\\
\mathbf{else}:\\
\;\;\;\;\frac{\log \left(e^{\frac{x0}{1 - x1} \cdot \frac{x0}{1 - x1} - x0 \cdot x0}\right)}{\frac{x0}{1 - x1} + x0}\\
\end{array}double f(double x0, double x1) {
double r95627 = x0;
double r95628 = 1.0;
double r95629 = x1;
double r95630 = r95628 - r95629;
double r95631 = r95627 / r95630;
double r95632 = r95631 - r95627;
return r95632;
}
double f(double x0, double x1) {
double r95633 = x1;
double r95634 = 0.00021208908081054686;
bool r95635 = r95633 <= r95634;
double r95636 = x0;
double r95637 = 1.0;
double r95638 = r95637 * r95637;
double r95639 = r95633 * r95633;
double r95640 = r95638 - r95639;
double r95641 = r95636 / r95640;
double r95642 = r95637 + r95633;
double r95643 = r95641 * r95642;
double r95644 = r95637 - r95633;
double r95645 = r95636 / r95644;
double r95646 = r95643 * r95645;
double r95647 = r95636 * r95636;
double r95648 = r95646 - r95647;
double r95649 = exp(r95648);
double r95650 = log(r95649);
double r95651 = 3.0;
double r95652 = pow(r95645, r95651);
double r95653 = cbrt(r95652);
double r95654 = r95653 + r95636;
double r95655 = r95650 / r95654;
double r95656 = r95645 * r95645;
double r95657 = r95656 - r95647;
double r95658 = exp(r95657);
double r95659 = log(r95658);
double r95660 = r95645 + r95636;
double r95661 = r95659 / r95660;
double r95662 = r95635 ? r95655 : r95661;
return r95662;
}




Bits error versus x0




Bits error versus x1
Results
| Original | 7.9 |
|---|---|
| Target | 0.3 |
| Herbie | 4.7 |
if x1 < 0.00021208908081054686Initial program 11.2
rmApplied flip--11.4
rmApplied flip--8.1
Applied associate-/r/8.1
rmApplied add-log-exp8.1
Applied add-log-exp8.1
Applied diff-log7.4
Simplified7.4
rmApplied add-cbrt-cube7.4
Applied add-cbrt-cube7.4
Applied cbrt-undiv7.4
Simplified7.4
if 0.00021208908081054686 < x1 Initial program 4.6
rmApplied flip--3.2
rmApplied add-log-exp3.2
Applied add-log-exp3.2
Applied diff-log3.5
Simplified2.0
Final simplification4.7
herbie shell --seed 2019195
(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.0 x1))
(- (/ x0 (- 1.0 x1)) x0))