\frac{2}{1 + e^{-2 \cdot x}} - 1\begin{array}{l}
\mathbf{if}\;-2 \cdot x \le -0.001478341405381730123969052925758660421707:\\
\;\;\;\;e^{\log \left(\frac{\frac{4}{{\left(e^{-2 \cdot x} + 1\right)}^{2}} - 1}{\frac{2}{1 + e^{-2 \cdot x}} + 1}\right)}\\
\mathbf{elif}\;-2 \cdot x \le 1.202042202386769937275221194206142882877 \cdot 10^{-6}:\\
\;\;\;\;1 \cdot x - \left(5.5511151231257827021181583404541015625 \cdot 10^{-17} \cdot {x}^{4} + 0.3333333333333333703407674875052180141211 \cdot {x}^{3}\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{\sqrt[3]{\frac{4}{{\left(e^{-2 \cdot x} + 1\right)}^{2}} - 1} \cdot \sqrt[3]{\frac{4}{{\left(e^{-2 \cdot x} + 1\right)}^{2}} - 1}}{\sqrt[3]{\frac{2}{1 + e^{-2 \cdot x}} + 1}}}{\sqrt[3]{\frac{2}{1 + e^{-2 \cdot x}} + 1}} \cdot \frac{\sqrt[3]{\frac{4}{{\left(e^{-2 \cdot x} + 1\right)}^{2}} - 1}}{\sqrt[3]{\frac{2}{1 + e^{-2 \cdot x}} + 1}}\\
\end{array}double f(double x, double __attribute__((unused)) y) {
double r34524 = 2.0;
double r34525 = 1.0;
double r34526 = -2.0;
double r34527 = x;
double r34528 = r34526 * r34527;
double r34529 = exp(r34528);
double r34530 = r34525 + r34529;
double r34531 = r34524 / r34530;
double r34532 = r34531 - r34525;
return r34532;
}
double f(double x, double __attribute__((unused)) y) {
double r34533 = -2.0;
double r34534 = x;
double r34535 = r34533 * r34534;
double r34536 = -0.0014783414053817301;
bool r34537 = r34535 <= r34536;
double r34538 = 4.0;
double r34539 = exp(r34535);
double r34540 = 1.0;
double r34541 = r34539 + r34540;
double r34542 = 2.0;
double r34543 = pow(r34541, r34542);
double r34544 = r34538 / r34543;
double r34545 = r34544 - r34540;
double r34546 = 2.0;
double r34547 = r34540 + r34539;
double r34548 = r34546 / r34547;
double r34549 = r34548 + r34540;
double r34550 = r34545 / r34549;
double r34551 = log(r34550);
double r34552 = exp(r34551);
double r34553 = 1.20204220238677e-06;
bool r34554 = r34535 <= r34553;
double r34555 = r34540 * r34534;
double r34556 = 5.551115123125783e-17;
double r34557 = 4.0;
double r34558 = pow(r34534, r34557);
double r34559 = r34556 * r34558;
double r34560 = 0.33333333333333337;
double r34561 = 3.0;
double r34562 = pow(r34534, r34561);
double r34563 = r34560 * r34562;
double r34564 = r34559 + r34563;
double r34565 = r34555 - r34564;
double r34566 = cbrt(r34545);
double r34567 = r34566 * r34566;
double r34568 = cbrt(r34549);
double r34569 = r34567 / r34568;
double r34570 = r34569 / r34568;
double r34571 = r34566 / r34568;
double r34572 = r34570 * r34571;
double r34573 = r34554 ? r34565 : r34572;
double r34574 = r34537 ? r34552 : r34573;
return r34574;
}



Bits error versus x



Bits error versus y
Results
if (* -2.0 x) < -0.0014783414053817301Initial program 0.0
rmApplied flip--0.0
Simplified0.0
rmApplied add-sqr-sqrt0.0
Applied associate-/r*0.0
Taylor expanded around inf 0.0
Simplified0.0
rmApplied add-exp-log1.0
Applied add-exp-log0.0
Applied div-exp0.0
Simplified0.0
if -0.0014783414053817301 < (* -2.0 x) < 1.20204220238677e-06Initial program 59.5
Taylor expanded around 0 0.0
if 1.20204220238677e-06 < (* -2.0 x) Initial program 0.2
rmApplied flip--0.2
Simplified0.2
rmApplied add-sqr-sqrt0.2
Applied associate-/r*0.2
Taylor expanded around inf 0.2
Simplified0.2
rmApplied add-cube-cbrt0.2
Applied add-cube-cbrt0.2
Applied times-frac0.2
Simplified0.2
Simplified0.2
Final simplification0.1
herbie shell --seed 2019208
(FPCore (x y)
:name "Logistic function from Lakshay Garg"
:precision binary64
(- (/ 2 (+ 1 (exp (* -2 x)))) 1))