\frac{2}{1 + e^{-2 \cdot x}} - 1\begin{array}{l}
\mathbf{if}\;-2 \cdot x \le -0.1231080354848577279591737010377983096987:\\
\;\;\;\;\left(\sqrt{\frac{2}{1 + e^{-2 \cdot x}}} + \sqrt{1}\right) \cdot \frac{\frac{2}{1 + e^{-2 \cdot x}} - 1}{\sqrt{\frac{2}{1 + e^{-2 \cdot x}}} + \sqrt{1}}\\
\mathbf{elif}\;-2 \cdot x \le 2.985881592287361997487503412755010037682 \cdot 10^{-10}:\\
\;\;\;\;\left(\sqrt{\frac{2}{1 + e^{-2 \cdot x}}} + \sqrt{1}\right) \cdot \frac{1 \cdot x - \left(5.5511151231257827021181583404541015625 \cdot 10^{-17} \cdot {x}^{4} + 0.3333333333333333703407674875052180141211 \cdot {x}^{3}\right)}{\sqrt{\frac{2}{1 + e^{-2 \cdot x}}} + \sqrt{1}}\\
\mathbf{else}:\\
\;\;\;\;\left(\sqrt{\frac{2}{1 + e^{-2 \cdot x}}} + \sqrt{1}\right) \cdot \sqrt[3]{{\left(\sqrt{\frac{2}{1 + e^{-2 \cdot x}}} - \sqrt{1}\right)}^{3}}\\
\end{array}double f(double x, double __attribute__((unused)) y) {
double r57135 = 2.0;
double r57136 = 1.0;
double r57137 = -2.0;
double r57138 = x;
double r57139 = r57137 * r57138;
double r57140 = exp(r57139);
double r57141 = r57136 + r57140;
double r57142 = r57135 / r57141;
double r57143 = r57142 - r57136;
return r57143;
}
double f(double x, double __attribute__((unused)) y) {
double r57144 = -2.0;
double r57145 = x;
double r57146 = r57144 * r57145;
double r57147 = -0.12310803548485773;
bool r57148 = r57146 <= r57147;
double r57149 = 2.0;
double r57150 = 1.0;
double r57151 = exp(r57146);
double r57152 = r57150 + r57151;
double r57153 = r57149 / r57152;
double r57154 = sqrt(r57153);
double r57155 = sqrt(r57150);
double r57156 = r57154 + r57155;
double r57157 = r57153 - r57150;
double r57158 = r57157 / r57156;
double r57159 = r57156 * r57158;
double r57160 = 2.985881592287362e-10;
bool r57161 = r57146 <= r57160;
double r57162 = r57150 * r57145;
double r57163 = 5.551115123125783e-17;
double r57164 = 4.0;
double r57165 = pow(r57145, r57164);
double r57166 = r57163 * r57165;
double r57167 = 0.33333333333333337;
double r57168 = 3.0;
double r57169 = pow(r57145, r57168);
double r57170 = r57167 * r57169;
double r57171 = r57166 + r57170;
double r57172 = r57162 - r57171;
double r57173 = r57172 / r57156;
double r57174 = r57156 * r57173;
double r57175 = r57154 - r57155;
double r57176 = pow(r57175, r57168);
double r57177 = cbrt(r57176);
double r57178 = r57156 * r57177;
double r57179 = r57161 ? r57174 : r57178;
double r57180 = r57148 ? r57159 : r57179;
return r57180;
}



Bits error versus x



Bits error versus y
Results
if (* -2.0 x) < -0.12310803548485773Initial program 0.0
rmApplied add-sqr-sqrt0.0
Applied add-sqr-sqrt1.6
Applied difference-of-squares1.0
rmApplied add-cbrt-cube1.0
Simplified1.0
rmApplied flip--1.6
Applied cube-div1.6
Applied cbrt-div2.3
Simplified1.0
Simplified0.0
if -0.12310803548485773 < (* -2.0 x) < 2.985881592287362e-10Initial program 59.4
rmApplied add-sqr-sqrt59.4
Applied add-sqr-sqrt59.5
Applied difference-of-squares59.5
rmApplied add-cbrt-cube59.5
Simplified59.5
rmApplied flip--59.5
Applied cube-div59.5
Applied cbrt-div59.5
Simplified59.4
Simplified59.4
Taylor expanded around 0 0.1
if 2.985881592287362e-10 < (* -2.0 x) Initial program 0.4
rmApplied add-sqr-sqrt0.4
Applied add-sqr-sqrt0.4
Applied difference-of-squares0.4
rmApplied add-cbrt-cube0.4
Simplified0.4
Final simplification0.1
herbie shell --seed 2019291
(FPCore (x y)
:name "Logistic function from Lakshay Garg"
:precision binary64
(- (/ 2 (+ 1 (exp (* -2 x)))) 1))