\frac{2}{1 + e^{-2 \cdot x}} - 1\begin{array}{l}
\mathbf{if}\;-2 \cdot x \le -0.2905948704643001034853000419388990849257:\\
\;\;\;\;\frac{\log \left(e^{\frac{4}{\left(e^{-2 \cdot x} + 1\right) \cdot \left(e^{-2 \cdot x} + 1\right)} - 1}\right)}{1 + \frac{2}{e^{-2 \cdot x} + 1}}\\
\mathbf{elif}\;-2 \cdot x \le 1.627379555188875196866448791591097666753 \cdot 10^{-8}:\\
\;\;\;\;1 \cdot x - \left(x \cdot x\right) \cdot \left(x \cdot 0.3333333333333333703407674875052180141211 + \left(x \cdot x\right) \cdot 5.5511151231257827021181583404541015625 \cdot 10^{-17}\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{4}{\left(e^{-2 \cdot x} + 1\right) \cdot \left(e^{-2 \cdot x} + 1\right)} - 1}{1 + \frac{2}{e^{-2 \cdot x} + 1}}\\
\end{array}double f(double x, double __attribute__((unused)) y) {
double r2129363 = 2.0;
double r2129364 = 1.0;
double r2129365 = -2.0;
double r2129366 = x;
double r2129367 = r2129365 * r2129366;
double r2129368 = exp(r2129367);
double r2129369 = r2129364 + r2129368;
double r2129370 = r2129363 / r2129369;
double r2129371 = r2129370 - r2129364;
return r2129371;
}
double f(double x, double __attribute__((unused)) y) {
double r2129372 = -2.0;
double r2129373 = x;
double r2129374 = r2129372 * r2129373;
double r2129375 = -0.2905948704643001;
bool r2129376 = r2129374 <= r2129375;
double r2129377 = 4.0;
double r2129378 = exp(r2129374);
double r2129379 = 1.0;
double r2129380 = r2129378 + r2129379;
double r2129381 = r2129380 * r2129380;
double r2129382 = r2129377 / r2129381;
double r2129383 = r2129382 - r2129379;
double r2129384 = exp(r2129383);
double r2129385 = log(r2129384);
double r2129386 = 2.0;
double r2129387 = r2129386 / r2129380;
double r2129388 = r2129379 + r2129387;
double r2129389 = r2129385 / r2129388;
double r2129390 = 1.6273795551888752e-08;
bool r2129391 = r2129374 <= r2129390;
double r2129392 = r2129379 * r2129373;
double r2129393 = r2129373 * r2129373;
double r2129394 = 0.33333333333333337;
double r2129395 = r2129373 * r2129394;
double r2129396 = 5.551115123125783e-17;
double r2129397 = r2129393 * r2129396;
double r2129398 = r2129395 + r2129397;
double r2129399 = r2129393 * r2129398;
double r2129400 = r2129392 - r2129399;
double r2129401 = r2129383 / r2129388;
double r2129402 = r2129391 ? r2129400 : r2129401;
double r2129403 = r2129376 ? r2129389 : r2129402;
return r2129403;
}



Bits error versus x



Bits error versus y
Results
if (* -2.0 x) < -0.2905948704643001Initial program 0.0
rmApplied flip--0.0
Taylor expanded around inf 0.0
Simplified0.0
rmApplied add-log-exp0.0
Applied add-log-exp0.0
Applied diff-log0.0
Simplified0.0
if -0.2905948704643001 < (* -2.0 x) < 1.6273795551888752e-08Initial program 59.3
Taylor expanded around 0 0.1
Simplified0.1
if 1.6273795551888752e-08 < (* -2.0 x) Initial program 0.3
rmApplied flip--0.3
Taylor expanded around inf 0.3
Simplified0.3
Final simplification0.1
herbie shell --seed 2019170
(FPCore (x y)
:name "Logistic function from Lakshay Garg"
(- (/ 2.0 (+ 1.0 (exp (* -2.0 x)))) 1.0))