\frac{x0}{1 - x1} - x0\begin{array}{l}
\mathbf{if}\;x1 \le 2.12089080810546861 \cdot 10^{-4}:\\
\;\;\;\;\frac{\log \left(e^{\frac{x0}{1 - x1} \cdot \left(\frac{\sqrt[3]{x0} \cdot \sqrt[3]{x0}}{\sqrt{1 - x1}} \cdot \frac{\sqrt[3]{x0}}{\sqrt{1 - x1}}\right) - x0 \cdot x0}\right)}{\frac{x0}{1 - x1} + 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 r230744 = x0;
double r230745 = 1.0;
double r230746 = x1;
double r230747 = r230745 - r230746;
double r230748 = r230744 / r230747;
double r230749 = r230748 - r230744;
return r230749;
}
double f(double x0, double x1) {
double r230750 = x1;
double r230751 = 0.00021208908081054686;
bool r230752 = r230750 <= r230751;
double r230753 = x0;
double r230754 = 1.0;
double r230755 = r230754 - r230750;
double r230756 = r230753 / r230755;
double r230757 = cbrt(r230753);
double r230758 = r230757 * r230757;
double r230759 = sqrt(r230755);
double r230760 = r230758 / r230759;
double r230761 = r230757 / r230759;
double r230762 = r230760 * r230761;
double r230763 = r230756 * r230762;
double r230764 = r230753 * r230753;
double r230765 = r230763 - r230764;
double r230766 = exp(r230765);
double r230767 = log(r230766);
double r230768 = r230756 + r230753;
double r230769 = r230767 / r230768;
double r230770 = r230756 * r230756;
double r230771 = r230770 - r230764;
double r230772 = exp(r230771);
double r230773 = log(r230772);
double r230774 = r230773 / r230768;
double r230775 = r230752 ? r230769 : r230774;
return r230775;
}




Bits error versus x0




Bits error versus x1
Results
| Original | 7.9 |
|---|---|
| Target | 0.2 |
| Herbie | 4.7 |
if x1 < 0.00021208908081054686Initial program 11.2
rmApplied flip--11.4
rmApplied add-sqr-sqrt8.0
Applied add-cube-cbrt8.0
Applied times-frac8.0
rmApplied add-log-exp8.0
Applied add-log-exp8.0
Applied diff-log7.4
Simplified7.4
if 0.00021208908081054686 < x1 Initial program 4.5
rmApplied flip--3.1
rmApplied add-log-exp3.1
Applied add-log-exp3.1
Applied diff-log3.5
Simplified1.9
Final simplification4.7
herbie shell --seed 2020060
(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))