\frac{x0}{1 - x1} - x0\begin{array}{l}
\mathbf{if}\;x1 \le 2.12089080810546861321705391922876060562 \cdot 10^{-4}:\\
\;\;\;\;\frac{\log \left(e^{\frac{x0}{1 - x1} \cdot \left(\frac{\sqrt{x0}}{\sqrt{1 - x1}} \cdot \frac{\sqrt{x0}}{\sqrt{1 - x1}}\right) - 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 r144655 = x0;
double r144656 = 1.0;
double r144657 = x1;
double r144658 = r144656 - r144657;
double r144659 = r144655 / r144658;
double r144660 = r144659 - r144655;
return r144660;
}
double f(double x0, double x1) {
double r144661 = x1;
double r144662 = 0.00021208908081054686;
bool r144663 = r144661 <= r144662;
double r144664 = x0;
double r144665 = 1.0;
double r144666 = r144665 - r144661;
double r144667 = r144664 / r144666;
double r144668 = sqrt(r144664);
double r144669 = sqrt(r144666);
double r144670 = r144668 / r144669;
double r144671 = r144670 * r144670;
double r144672 = r144667 * r144671;
double r144673 = r144664 * r144664;
double r144674 = r144672 - r144673;
double r144675 = exp(r144674);
double r144676 = log(r144675);
double r144677 = 3.0;
double r144678 = pow(r144667, r144677);
double r144679 = cbrt(r144678);
double r144680 = r144679 + r144664;
double r144681 = r144676 / r144680;
double r144682 = r144667 * r144667;
double r144683 = r144682 - r144673;
double r144684 = exp(r144683);
double r144685 = log(r144684);
double r144686 = r144667 + r144664;
double r144687 = r144685 / r144686;
double r144688 = r144663 ? r144681 : r144687;
return r144688;
}




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 add-sqr-sqrt8.1
Applied add-sqr-sqrt8.1
Applied times-frac8.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 2019354
(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))