\frac{2}{1 + e^{-2 \cdot x}} - 1\begin{array}{l}
\mathbf{if}\;-2 \cdot x \le -0.422043425737493039:\\
\;\;\;\;\frac{8 \cdot \frac{1}{{\left(e^{-2 \cdot x} + 1\right)}^{3}} - 1}{\frac{\frac{2}{e^{-2 \cdot x} + 1} \cdot \left({\left(\frac{2}{1 + e^{-2 \cdot x}}\right)}^{3} + {1}^{3}\right)}{\frac{2}{1 + e^{-2 \cdot x}} \cdot \frac{2}{1 + e^{-2 \cdot x}} + \left(1 \cdot 1 - \frac{2}{1 + e^{-2 \cdot x}} \cdot 1\right)} + 1 \cdot 1}\\
\mathbf{elif}\;-2 \cdot x \le 9.24010699698761472 \cdot 10^{-9}:\\
\;\;\;\;\mathsf{fma}\left(1, x, -\mathsf{fma}\left(5.55112 \cdot 10^{-17}, {x}^{4}, 0.33333333333333337 \cdot {x}^{3}\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{{\left(\frac{2}{1 + e^{-2 \cdot x}}\right)}^{3} - {1}^{3}}{\frac{\sqrt[3]{2} \cdot \sqrt[3]{2}}{\sqrt{e^{-2 \cdot x} + 1}} \cdot \left(\frac{\sqrt[3]{2}}{\sqrt{e^{-2 \cdot x} + 1}} \cdot \left(\frac{2}{1 + e^{-2 \cdot x}} + 1\right)\right) + 1 \cdot 1}\\
\end{array}double f(double x, double __attribute__((unused)) y) {
double r73934 = 2.0;
double r73935 = 1.0;
double r73936 = -2.0;
double r73937 = x;
double r73938 = r73936 * r73937;
double r73939 = exp(r73938);
double r73940 = r73935 + r73939;
double r73941 = r73934 / r73940;
double r73942 = r73941 - r73935;
return r73942;
}
double f(double x, double __attribute__((unused)) y) {
double r73943 = -2.0;
double r73944 = x;
double r73945 = r73943 * r73944;
double r73946 = -0.42204342573749304;
bool r73947 = r73945 <= r73946;
double r73948 = 8.0;
double r73949 = 1.0;
double r73950 = exp(r73945);
double r73951 = 1.0;
double r73952 = r73950 + r73951;
double r73953 = 3.0;
double r73954 = pow(r73952, r73953);
double r73955 = r73949 / r73954;
double r73956 = r73948 * r73955;
double r73957 = r73956 - r73951;
double r73958 = 2.0;
double r73959 = r73958 / r73952;
double r73960 = r73951 + r73950;
double r73961 = r73958 / r73960;
double r73962 = pow(r73961, r73953);
double r73963 = pow(r73951, r73953);
double r73964 = r73962 + r73963;
double r73965 = r73959 * r73964;
double r73966 = r73961 * r73961;
double r73967 = r73951 * r73951;
double r73968 = r73961 * r73951;
double r73969 = r73967 - r73968;
double r73970 = r73966 + r73969;
double r73971 = r73965 / r73970;
double r73972 = r73971 + r73967;
double r73973 = r73957 / r73972;
double r73974 = 9.240106996987615e-09;
bool r73975 = r73945 <= r73974;
double r73976 = 5.551115123125783e-17;
double r73977 = 4.0;
double r73978 = pow(r73944, r73977);
double r73979 = 0.33333333333333337;
double r73980 = pow(r73944, r73953);
double r73981 = r73979 * r73980;
double r73982 = fma(r73976, r73978, r73981);
double r73983 = -r73982;
double r73984 = fma(r73951, r73944, r73983);
double r73985 = r73962 - r73963;
double r73986 = cbrt(r73958);
double r73987 = r73986 * r73986;
double r73988 = sqrt(r73952);
double r73989 = r73987 / r73988;
double r73990 = r73986 / r73988;
double r73991 = r73961 + r73951;
double r73992 = r73990 * r73991;
double r73993 = r73989 * r73992;
double r73994 = r73993 + r73967;
double r73995 = r73985 / r73994;
double r73996 = r73975 ? r73984 : r73995;
double r73997 = r73947 ? r73973 : r73996;
return r73997;
}



Bits error versus x



Bits error versus y
if (* -2.0 x) < -0.42204342573749304Initial program 0.0
rmApplied flip3--0.0
Simplified0.0
Taylor expanded around inf 0.0
rmApplied flip3-+0.0
Applied associate-*r/0.0
if -0.42204342573749304 < (* -2.0 x) < 9.240106996987615e-09Initial program 59.4
Taylor expanded around 0 0.1
Simplified0.1
if 9.240106996987615e-09 < (* -2.0 x) Initial program 0.2
rmApplied flip3--0.2
Simplified0.2
rmApplied add-sqr-sqrt0.2
Applied add-cube-cbrt0.2
Applied times-frac0.2
Applied associate-*l*0.2
Final simplification0.1
herbie shell --seed 2020024 +o rules:numerics
(FPCore (x y)
:name "Logistic function from Lakshay Garg"
:precision binary64
(- (/ 2 (+ 1 (exp (* -2 x)))) 1))