\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[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 r128910 = x0;
double r128911 = 1.0;
double r128912 = x1;
double r128913 = r128911 - r128912;
double r128914 = r128910 / r128913;
double r128915 = r128914 - r128910;
return r128915;
}
double f(double x0, double x1) {
double r128916 = x1;
double r128917 = 0.00021208908081054686;
bool r128918 = r128916 <= r128917;
double r128919 = x0;
double r128920 = 1.0;
double r128921 = r128920 - r128916;
double r128922 = r128919 / r128921;
double r128923 = cbrt(r128919);
double r128924 = r128923 * r128923;
double r128925 = sqrt(r128921);
double r128926 = r128924 / r128925;
double r128927 = r128923 / r128925;
double r128928 = r128926 * r128927;
double r128929 = r128922 * r128928;
double r128930 = r128919 * r128919;
double r128931 = r128929 - r128930;
double r128932 = exp(r128931);
double r128933 = log(r128932);
double r128934 = r128922 + r128919;
double r128935 = r128933 / r128934;
double r128936 = r128922 * r128922;
double r128937 = r128936 - r128930;
double r128938 = exp(r128937);
double r128939 = log(r128938);
double r128940 = r128939 / r128934;
double r128941 = r128918 ? r128935 : r128940;
return r128941;
}




Bits error versus x0




Bits error versus x1
Results
| Original | 7.8 |
|---|---|
| Target | 0.3 |
| Herbie | 4.7 |
if x1 < 0.00021208908081054686Initial program 11.2
rmApplied flip--11.4
rmApplied add-sqr-sqrt8.1
Applied add-cube-cbrt8.1
Applied times-frac8.1
rmApplied add-log-exp8.1
Applied add-log-exp8.1
Applied diff-log7.4
Simplified7.4
if 0.00021208908081054686 < x1 Initial program 4.5
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 2019298
(FPCore (x0 x1)
:name "(- (/ x0 (- 1 x1)) x0)"
:precision binary64
:pre (or (and (== x0 1.855) (== x1 2.09000000000000012e-4)) (and (== x0 2.98499999999999988) (== x1 0.018599999999999998)))
:herbie-target
(/ (* x0 x1) (- 1 x1))
(- (/ x0 (- 1 x1)) x0))