\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 r277796 = x0;
double r277797 = 1.0;
double r277798 = x1;
double r277799 = r277797 - r277798;
double r277800 = r277796 / r277799;
double r277801 = r277800 - r277796;
return r277801;
}
double f(double x0, double x1) {
double r277802 = x1;
double r277803 = 0.00021208908081054686;
bool r277804 = r277802 <= r277803;
double r277805 = x0;
double r277806 = 1.0;
double r277807 = r277806 - r277802;
double r277808 = r277805 / r277807;
double r277809 = cbrt(r277805);
double r277810 = r277809 * r277809;
double r277811 = sqrt(r277807);
double r277812 = r277810 / r277811;
double r277813 = r277809 / r277811;
double r277814 = r277812 * r277813;
double r277815 = r277808 * r277814;
double r277816 = r277805 * r277805;
double r277817 = r277815 - r277816;
double r277818 = exp(r277817);
double r277819 = log(r277818);
double r277820 = r277808 + r277805;
double r277821 = r277819 / r277820;
double r277822 = r277808 * r277808;
double r277823 = r277822 - r277816;
double r277824 = exp(r277823);
double r277825 = log(r277824);
double r277826 = r277825 / r277820;
double r277827 = r277804 ? r277821 : r277826;
return r277827;
}




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))