\frac{2}{1 + e^{-2 \cdot x}} - 1\begin{array}{l}
\mathbf{if}\;-2 \cdot x \le -12083926.2470296454:\\
\;\;\;\;\frac{\left(\sqrt[3]{\frac{2}{1 + e^{-2 \cdot x}} \cdot \frac{\frac{2}{\sqrt{1 + e^{-2 \cdot x}}}}{\sqrt{1 + e^{-2 \cdot x}}} - 1 \cdot 1} \cdot \sqrt[3]{\frac{2}{1 + e^{-2 \cdot x}} \cdot \frac{\frac{2}{\sqrt{1 + e^{-2 \cdot x}}}}{\sqrt{1 + e^{-2 \cdot x}}} - 1 \cdot 1}\right) \cdot \sqrt[3]{\frac{2}{1 + e^{-2 \cdot x}} \cdot \frac{\frac{2}{\sqrt{1 + e^{-2 \cdot x}}}}{\sqrt{1 + e^{-2 \cdot x}}} - 1 \cdot 1}}{\frac{2}{1 + e^{-2 \cdot x}} + 1}\\
\mathbf{elif}\;-2 \cdot x \le 4.592736067343327 \cdot 10^{-10}:\\
\;\;\;\;\frac{\left(1 \cdot {x}^{2} + 2 \cdot x\right) - 0.66666666666666696 \cdot {x}^{3}}{\frac{2}{1 + e^{-2 \cdot x}} + 1}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{2}{1 + e^{-2 \cdot x}} \cdot \frac{2}{1 + e^{-2 \cdot x}} - 1 \cdot 1}{\left(\sqrt[3]{2} \cdot \sqrt[3]{2}\right) \cdot \frac{\sqrt[3]{2}}{1 + e^{-2 \cdot x}} + 1}\\
\end{array}double code(double x, double y) {
return ((2.0 / (1.0 + exp((-2.0 * x)))) - 1.0);
}
double code(double x, double y) {
double temp;
if (((-2.0 * x) <= -12083926.247029645)) {
temp = (((cbrt((((2.0 / (1.0 + exp((-2.0 * x)))) * ((2.0 / sqrt((1.0 + exp((-2.0 * x))))) / sqrt((1.0 + exp((-2.0 * x)))))) - (1.0 * 1.0))) * cbrt((((2.0 / (1.0 + exp((-2.0 * x)))) * ((2.0 / sqrt((1.0 + exp((-2.0 * x))))) / sqrt((1.0 + exp((-2.0 * x)))))) - (1.0 * 1.0)))) * cbrt((((2.0 / (1.0 + exp((-2.0 * x)))) * ((2.0 / sqrt((1.0 + exp((-2.0 * x))))) / sqrt((1.0 + exp((-2.0 * x)))))) - (1.0 * 1.0)))) / ((2.0 / (1.0 + exp((-2.0 * x)))) + 1.0));
} else {
double temp_1;
if (((-2.0 * x) <= 4.5927360673433267e-10)) {
temp_1 = ((((1.0 * pow(x, 2.0)) + (2.0 * x)) - (0.666666666666667 * pow(x, 3.0))) / ((2.0 / (1.0 + exp((-2.0 * x)))) + 1.0));
} else {
temp_1 = ((((2.0 / (1.0 + exp((-2.0 * x)))) * (2.0 / (1.0 + exp((-2.0 * x))))) - (1.0 * 1.0)) / (((cbrt(2.0) * cbrt(2.0)) * (cbrt(2.0) / (1.0 + exp((-2.0 * x))))) + 1.0));
}
temp = temp_1;
}
return temp;
}



Bits error versus x



Bits error versus y
Results
if (* -2.0 x) < -12083926.247029645Initial program 0
rmApplied flip--0
rmApplied add-sqr-sqrt0
Applied associate-/r*0
rmApplied add-cube-cbrt0
if -12083926.247029645 < (* -2.0 x) < 4.5927360673433267e-10Initial program 58.9
rmApplied flip--58.9
Taylor expanded around 0 0.7
if 4.5927360673433267e-10 < (* -2.0 x) Initial program 0.4
rmApplied flip--0.4
rmApplied *-un-lft-identity0.4
Applied add-cube-cbrt0.4
Applied times-frac0.4
Simplified0.4
Final simplification0.5
herbie shell --seed 2020065
(FPCore (x y)
:name "Logistic function from Lakshay Garg"
:precision binary64
(- (/ 2 (+ 1 (exp (* -2 x)))) 1))