\frac{2}{1 + e^{-2 \cdot x}} - 1\begin{array}{l}
\mathbf{if}\;x \le -0.008638132025518943:\\
\;\;\;\;\mathsf{fma}\left(\left(\frac{\sqrt{2}}{\left|\sqrt[3]{1 + e^{x \cdot -2}}\right|}\right), \left(\frac{\frac{\sqrt{2}}{\sqrt{1 + e^{x \cdot -2}}}}{\sqrt{\sqrt[3]{1 + e^{x \cdot -2}}}}\right), -1\right)\\
\mathbf{elif}\;x \le 0.006936161389017993:\\
\;\;\;\;\mathsf{fma}\left(\left({x}^{5}\right), \frac{2}{15}, x\right) - \frac{1}{3} \cdot \left(\left(x \cdot x\right) \cdot x\right)\\
\mathbf{else}:\\
\;\;\;\;\log \left(e^{\frac{\frac{2}{\sqrt{1 + e^{x \cdot -2}}}}{\sqrt{1 + e^{x \cdot -2}}} - 1}\right)\\
\end{array}double f(double x, double __attribute__((unused)) y) {
double r1490262 = 2.0;
double r1490263 = 1.0;
double r1490264 = -2.0;
double r1490265 = x;
double r1490266 = r1490264 * r1490265;
double r1490267 = exp(r1490266);
double r1490268 = r1490263 + r1490267;
double r1490269 = r1490262 / r1490268;
double r1490270 = r1490269 - r1490263;
return r1490270;
}
double f(double x, double __attribute__((unused)) y) {
double r1490271 = x;
double r1490272 = -0.008638132025518943;
bool r1490273 = r1490271 <= r1490272;
double r1490274 = 2.0;
double r1490275 = sqrt(r1490274);
double r1490276 = 1.0;
double r1490277 = -2.0;
double r1490278 = r1490271 * r1490277;
double r1490279 = exp(r1490278);
double r1490280 = r1490276 + r1490279;
double r1490281 = cbrt(r1490280);
double r1490282 = fabs(r1490281);
double r1490283 = r1490275 / r1490282;
double r1490284 = sqrt(r1490280);
double r1490285 = r1490275 / r1490284;
double r1490286 = sqrt(r1490281);
double r1490287 = r1490285 / r1490286;
double r1490288 = -1.0;
double r1490289 = fma(r1490283, r1490287, r1490288);
double r1490290 = 0.006936161389017993;
bool r1490291 = r1490271 <= r1490290;
double r1490292 = 5.0;
double r1490293 = pow(r1490271, r1490292);
double r1490294 = 0.13333333333333333;
double r1490295 = fma(r1490293, r1490294, r1490271);
double r1490296 = 0.3333333333333333;
double r1490297 = r1490271 * r1490271;
double r1490298 = r1490297 * r1490271;
double r1490299 = r1490296 * r1490298;
double r1490300 = r1490295 - r1490299;
double r1490301 = r1490274 / r1490284;
double r1490302 = r1490301 / r1490284;
double r1490303 = r1490302 - r1490276;
double r1490304 = exp(r1490303);
double r1490305 = log(r1490304);
double r1490306 = r1490291 ? r1490300 : r1490305;
double r1490307 = r1490273 ? r1490289 : r1490306;
return r1490307;
}



Bits error versus x



Bits error versus y
if x < -0.008638132025518943Initial program 0.0
rmApplied add-log-exp0.0
Applied add-log-exp0.0
Applied diff-log0.0
Simplified0.0
rmApplied add-sqr-sqrt0.0
Applied associate-/r*0.0
rmApplied add-cube-cbrt0.0
Applied add-cube-cbrt0.0
Applied sqrt-prod0.0
Applied *-un-lft-identity0.0
Applied add-sqr-sqrt0.0
Applied times-frac0.0
Applied times-frac0.0
Applied prod-diff0.0
Applied exp-sum0.0
Applied log-prod0.0
Simplified0.0
Simplified0.0
if -0.008638132025518943 < x < 0.006936161389017993Initial program 59.0
Taylor expanded around 0 0.0
Simplified0.0
if 0.006936161389017993 < x Initial program 0.0
rmApplied add-log-exp0.0
Applied add-log-exp0.0
Applied diff-log0.0
Simplified0.0
rmApplied add-sqr-sqrt0.0
Applied associate-/r*0.0
Final simplification0.0
herbie shell --seed 2019128 +o rules:numerics
(FPCore (x y)
:name "Logistic function from Lakshay Garg"
(- (/ 2 (+ 1 (exp (* -2 x)))) 1))