Average Error: 29.1 → 0.2
Time: 42.7s
Precision: 64
\[\frac{2}{1 + e^{-2 \cdot x}} - 1\]
\[\begin{array}{l} \mathbf{if}\;x \cdot -2 \le -0.1837147540782742005660566064761951565742:\\ \;\;\;\;\frac{\sqrt[3]{\mathsf{fma}\left(\left(\frac{2}{e^{x \cdot -2} + 1} \cdot \left(\frac{2}{e^{x \cdot -2} + 1} \cdot \frac{2}{e^{x \cdot -2} + 1}\right) - \left(1 \cdot 1\right) \cdot 1\right) \cdot \left(\frac{2}{e^{x \cdot -2} + 1} \cdot \left(\frac{2}{e^{x \cdot -2} + 1} \cdot \frac{2}{e^{x \cdot -2} + 1}\right) - \left(1 \cdot 1\right) \cdot 1\right), \frac{2}{e^{x \cdot -2} + 1} \cdot \frac{2}{e^{x \cdot -2} + 1}, \left(-1 \cdot 1\right) \cdot \left(\left(\frac{2}{e^{x \cdot -2} + 1} \cdot \left(\frac{2}{e^{x \cdot -2} + 1} \cdot \frac{2}{e^{x \cdot -2} + 1}\right) - \left(1 \cdot 1\right) \cdot 1\right) \cdot \mathsf{log1p}\left(\mathsf{expm1}\left(\frac{2}{e^{x \cdot -2} + 1} \cdot \left(\frac{2}{e^{x \cdot -2} + 1} \cdot \frac{2}{e^{x \cdot -2} + 1}\right) - \left(1 \cdot 1\right) \cdot 1\right)\right)\right)\right)}}{\sqrt[3]{\mathsf{fma}\left(1, 1 + \frac{2}{e^{x \cdot -2} + 1}, \frac{2}{e^{x \cdot -2} + 1} \cdot \frac{2}{e^{x \cdot -2} + 1}\right) \cdot \left(\mathsf{fma}\left(1, 1 + \frac{2}{e^{x \cdot -2} + 1}, \frac{2}{e^{x \cdot -2} + 1} \cdot \frac{2}{e^{x \cdot -2} + 1}\right) \cdot \left(1 + \frac{2}{e^{x \cdot -2} + 1}\right)\right)}}\\ \mathbf{elif}\;x \cdot -2 \le 1.042492423760650159831312601586774009566 \cdot 10^{-10}:\\ \;\;\;\;x \cdot \left(1 - 0.3333333333333333703407674875052180141211 \cdot \left(x \cdot x\right)\right) - \left(\left(x \cdot x\right) \cdot \left(x \cdot x\right)\right) \cdot 5.5511151231257827021181583404541015625 \cdot 10^{-17}\\ \mathbf{else}:\\ \;\;\;\;\frac{\sqrt[3]{\mathsf{fma}\left(\left(\frac{2}{e^{x \cdot -2} + 1} \cdot \left(\frac{2}{e^{x \cdot -2} + 1} \cdot \frac{2}{e^{x \cdot -2} + 1}\right) - \left(1 \cdot 1\right) \cdot 1\right) \cdot \left(\frac{2}{e^{x \cdot -2} + 1} \cdot \left(\frac{2}{e^{x \cdot -2} + 1} \cdot \frac{2}{e^{x \cdot -2} + 1}\right) - \left(1 \cdot 1\right) \cdot 1\right), \frac{2}{e^{x \cdot -2} + 1} \cdot \frac{2}{e^{x \cdot -2} + 1}, \left(-1 \cdot 1\right) \cdot \left(\left(\frac{2}{e^{x \cdot -2} + 1} \cdot \left(\frac{2}{e^{x \cdot -2} + 1} \cdot \frac{2}{e^{x \cdot -2} + 1}\right) - \left(1 \cdot 1\right) \cdot 1\right) \cdot \mathsf{log1p}\left(\mathsf{expm1}\left(\frac{2}{e^{x \cdot -2} + 1} \cdot \left(\frac{2}{e^{x \cdot -2} + 1} \cdot \frac{2}{e^{x \cdot -2} + 1}\right) - \left(1 \cdot 1\right) \cdot 1\right)\right)\right)\right)}}{\sqrt[3]{\mathsf{fma}\left(1, 1 + \frac{2}{e^{x \cdot -2} + 1}, \frac{2}{e^{x \cdot -2} + 1} \cdot \frac{2}{e^{x \cdot -2} + 1}\right) \cdot \left(\mathsf{fma}\left(1, 1 + \frac{2}{e^{x \cdot -2} + 1}, \frac{2}{e^{x \cdot -2} + 1} \cdot \frac{2}{e^{x \cdot -2} + 1}\right) \cdot \left(1 + \frac{2}{e^{x \cdot -2} + 1}\right)\right)}}\\ \end{array}\]
\frac{2}{1 + e^{-2 \cdot x}} - 1
\begin{array}{l}
\mathbf{if}\;x \cdot -2 \le -0.1837147540782742005660566064761951565742:\\
\;\;\;\;\frac{\sqrt[3]{\mathsf{fma}\left(\left(\frac{2}{e^{x \cdot -2} + 1} \cdot \left(\frac{2}{e^{x \cdot -2} + 1} \cdot \frac{2}{e^{x \cdot -2} + 1}\right) - \left(1 \cdot 1\right) \cdot 1\right) \cdot \left(\frac{2}{e^{x \cdot -2} + 1} \cdot \left(\frac{2}{e^{x \cdot -2} + 1} \cdot \frac{2}{e^{x \cdot -2} + 1}\right) - \left(1 \cdot 1\right) \cdot 1\right), \frac{2}{e^{x \cdot -2} + 1} \cdot \frac{2}{e^{x \cdot -2} + 1}, \left(-1 \cdot 1\right) \cdot \left(\left(\frac{2}{e^{x \cdot -2} + 1} \cdot \left(\frac{2}{e^{x \cdot -2} + 1} \cdot \frac{2}{e^{x \cdot -2} + 1}\right) - \left(1 \cdot 1\right) \cdot 1\right) \cdot \mathsf{log1p}\left(\mathsf{expm1}\left(\frac{2}{e^{x \cdot -2} + 1} \cdot \left(\frac{2}{e^{x \cdot -2} + 1} \cdot \frac{2}{e^{x \cdot -2} + 1}\right) - \left(1 \cdot 1\right) \cdot 1\right)\right)\right)\right)}}{\sqrt[3]{\mathsf{fma}\left(1, 1 + \frac{2}{e^{x \cdot -2} + 1}, \frac{2}{e^{x \cdot -2} + 1} \cdot \frac{2}{e^{x \cdot -2} + 1}\right) \cdot \left(\mathsf{fma}\left(1, 1 + \frac{2}{e^{x \cdot -2} + 1}, \frac{2}{e^{x \cdot -2} + 1} \cdot \frac{2}{e^{x \cdot -2} + 1}\right) \cdot \left(1 + \frac{2}{e^{x \cdot -2} + 1}\right)\right)}}\\

\mathbf{elif}\;x \cdot -2 \le 1.042492423760650159831312601586774009566 \cdot 10^{-10}:\\
\;\;\;\;x \cdot \left(1 - 0.3333333333333333703407674875052180141211 \cdot \left(x \cdot x\right)\right) - \left(\left(x \cdot x\right) \cdot \left(x \cdot x\right)\right) \cdot 5.5511151231257827021181583404541015625 \cdot 10^{-17}\\

\mathbf{else}:\\
\;\;\;\;\frac{\sqrt[3]{\mathsf{fma}\left(\left(\frac{2}{e^{x \cdot -2} + 1} \cdot \left(\frac{2}{e^{x \cdot -2} + 1} \cdot \frac{2}{e^{x \cdot -2} + 1}\right) - \left(1 \cdot 1\right) \cdot 1\right) \cdot \left(\frac{2}{e^{x \cdot -2} + 1} \cdot \left(\frac{2}{e^{x \cdot -2} + 1} \cdot \frac{2}{e^{x \cdot -2} + 1}\right) - \left(1 \cdot 1\right) \cdot 1\right), \frac{2}{e^{x \cdot -2} + 1} \cdot \frac{2}{e^{x \cdot -2} + 1}, \left(-1 \cdot 1\right) \cdot \left(\left(\frac{2}{e^{x \cdot -2} + 1} \cdot \left(\frac{2}{e^{x \cdot -2} + 1} \cdot \frac{2}{e^{x \cdot -2} + 1}\right) - \left(1 \cdot 1\right) \cdot 1\right) \cdot \mathsf{log1p}\left(\mathsf{expm1}\left(\frac{2}{e^{x \cdot -2} + 1} \cdot \left(\frac{2}{e^{x \cdot -2} + 1} \cdot \frac{2}{e^{x \cdot -2} + 1}\right) - \left(1 \cdot 1\right) \cdot 1\right)\right)\right)\right)}}{\sqrt[3]{\mathsf{fma}\left(1, 1 + \frac{2}{e^{x \cdot -2} + 1}, \frac{2}{e^{x \cdot -2} + 1} \cdot \frac{2}{e^{x \cdot -2} + 1}\right) \cdot \left(\mathsf{fma}\left(1, 1 + \frac{2}{e^{x \cdot -2} + 1}, \frac{2}{e^{x \cdot -2} + 1} \cdot \frac{2}{e^{x \cdot -2} + 1}\right) \cdot \left(1 + \frac{2}{e^{x \cdot -2} + 1}\right)\right)}}\\

\end{array}
double f(double x, double __attribute__((unused)) y) {
        double r3080315 = 2.0;
        double r3080316 = 1.0;
        double r3080317 = -2.0;
        double r3080318 = x;
        double r3080319 = r3080317 * r3080318;
        double r3080320 = exp(r3080319);
        double r3080321 = r3080316 + r3080320;
        double r3080322 = r3080315 / r3080321;
        double r3080323 = r3080322 - r3080316;
        return r3080323;
}

double f(double x, double __attribute__((unused)) y) {
        double r3080324 = x;
        double r3080325 = -2.0;
        double r3080326 = r3080324 * r3080325;
        double r3080327 = -0.1837147540782742;
        bool r3080328 = r3080326 <= r3080327;
        double r3080329 = 2.0;
        double r3080330 = exp(r3080326);
        double r3080331 = 1.0;
        double r3080332 = r3080330 + r3080331;
        double r3080333 = r3080329 / r3080332;
        double r3080334 = r3080333 * r3080333;
        double r3080335 = r3080333 * r3080334;
        double r3080336 = r3080331 * r3080331;
        double r3080337 = r3080336 * r3080331;
        double r3080338 = r3080335 - r3080337;
        double r3080339 = r3080338 * r3080338;
        double r3080340 = -r3080336;
        double r3080341 = expm1(r3080338);
        double r3080342 = log1p(r3080341);
        double r3080343 = r3080338 * r3080342;
        double r3080344 = r3080340 * r3080343;
        double r3080345 = fma(r3080339, r3080334, r3080344);
        double r3080346 = cbrt(r3080345);
        double r3080347 = r3080331 + r3080333;
        double r3080348 = fma(r3080331, r3080347, r3080334);
        double r3080349 = r3080348 * r3080347;
        double r3080350 = r3080348 * r3080349;
        double r3080351 = cbrt(r3080350);
        double r3080352 = r3080346 / r3080351;
        double r3080353 = 1.0424924237606502e-10;
        bool r3080354 = r3080326 <= r3080353;
        double r3080355 = 0.33333333333333337;
        double r3080356 = r3080324 * r3080324;
        double r3080357 = r3080355 * r3080356;
        double r3080358 = r3080331 - r3080357;
        double r3080359 = r3080324 * r3080358;
        double r3080360 = r3080356 * r3080356;
        double r3080361 = 5.551115123125783e-17;
        double r3080362 = r3080360 * r3080361;
        double r3080363 = r3080359 - r3080362;
        double r3080364 = r3080354 ? r3080363 : r3080352;
        double r3080365 = r3080328 ? r3080352 : r3080364;
        return r3080365;
}

Error

Bits error versus x

Bits error versus y

Derivation

  1. Split input into 2 regimes
  2. if (* -2.0 x) < -0.1837147540782742 or 1.0424924237606502e-10 < (* -2.0 x)

    1. Initial program 0.2

      \[\frac{2}{1 + e^{-2 \cdot x}} - 1\]
    2. Using strategy rm
    3. Applied add-cbrt-cube0.2

      \[\leadsto \color{blue}{\sqrt[3]{\left(\left(\frac{2}{1 + e^{-2 \cdot x}} - 1\right) \cdot \left(\frac{2}{1 + e^{-2 \cdot x}} - 1\right)\right) \cdot \left(\frac{2}{1 + e^{-2 \cdot x}} - 1\right)}}\]
    4. Using strategy rm
    5. Applied flip--0.2

      \[\leadsto \sqrt[3]{\left(\left(\frac{2}{1 + e^{-2 \cdot x}} - 1\right) \cdot \left(\frac{2}{1 + e^{-2 \cdot x}} - 1\right)\right) \cdot \color{blue}{\frac{\frac{2}{1 + e^{-2 \cdot x}} \cdot \frac{2}{1 + e^{-2 \cdot x}} - 1 \cdot 1}{\frac{2}{1 + e^{-2 \cdot x}} + 1}}}\]
    6. Applied flip3--0.2

      \[\leadsto \sqrt[3]{\left(\left(\frac{2}{1 + e^{-2 \cdot x}} - 1\right) \cdot \color{blue}{\frac{{\left(\frac{2}{1 + e^{-2 \cdot x}}\right)}^{3} - {1}^{3}}{\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)}}\right) \cdot \frac{\frac{2}{1 + e^{-2 \cdot x}} \cdot \frac{2}{1 + e^{-2 \cdot x}} - 1 \cdot 1}{\frac{2}{1 + e^{-2 \cdot x}} + 1}}\]
    7. Applied flip3--0.2

      \[\leadsto \sqrt[3]{\left(\color{blue}{\frac{{\left(\frac{2}{1 + e^{-2 \cdot x}}\right)}^{3} - {1}^{3}}{\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)}} \cdot \frac{{\left(\frac{2}{1 + e^{-2 \cdot x}}\right)}^{3} - {1}^{3}}{\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)}\right) \cdot \frac{\frac{2}{1 + e^{-2 \cdot x}} \cdot \frac{2}{1 + e^{-2 \cdot x}} - 1 \cdot 1}{\frac{2}{1 + e^{-2 \cdot x}} + 1}}\]
    8. Applied frac-times0.2

      \[\leadsto \sqrt[3]{\color{blue}{\frac{\left({\left(\frac{2}{1 + e^{-2 \cdot x}}\right)}^{3} - {1}^{3}\right) \cdot \left({\left(\frac{2}{1 + e^{-2 \cdot x}}\right)}^{3} - {1}^{3}\right)}{\left(\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)\right) \cdot \left(\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)\right)}} \cdot \frac{\frac{2}{1 + e^{-2 \cdot x}} \cdot \frac{2}{1 + e^{-2 \cdot x}} - 1 \cdot 1}{\frac{2}{1 + e^{-2 \cdot x}} + 1}}\]
    9. Applied frac-times0.2

      \[\leadsto \sqrt[3]{\color{blue}{\frac{\left(\left({\left(\frac{2}{1 + e^{-2 \cdot x}}\right)}^{3} - {1}^{3}\right) \cdot \left({\left(\frac{2}{1 + e^{-2 \cdot x}}\right)}^{3} - {1}^{3}\right)\right) \cdot \left(\frac{2}{1 + e^{-2 \cdot x}} \cdot \frac{2}{1 + e^{-2 \cdot x}} - 1 \cdot 1\right)}{\left(\left(\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)\right) \cdot \left(\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)\right)\right) \cdot \left(\frac{2}{1 + e^{-2 \cdot x}} + 1\right)}}}\]
    10. Applied cbrt-div0.2

      \[\leadsto \color{blue}{\frac{\sqrt[3]{\left(\left({\left(\frac{2}{1 + e^{-2 \cdot x}}\right)}^{3} - {1}^{3}\right) \cdot \left({\left(\frac{2}{1 + e^{-2 \cdot x}}\right)}^{3} - {1}^{3}\right)\right) \cdot \left(\frac{2}{1 + e^{-2 \cdot x}} \cdot \frac{2}{1 + e^{-2 \cdot x}} - 1 \cdot 1\right)}}{\sqrt[3]{\left(\left(\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)\right) \cdot \left(\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)\right)\right) \cdot \left(\frac{2}{1 + e^{-2 \cdot x}} + 1\right)}}}\]
    11. Simplified0.2

      \[\leadsto \frac{\color{blue}{\sqrt[3]{\mathsf{fma}\left(\left(\left(\frac{2}{1 + e^{-2 \cdot x}} \cdot \frac{2}{1 + e^{-2 \cdot x}}\right) \cdot \frac{2}{1 + e^{-2 \cdot x}} - \left(1 \cdot 1\right) \cdot 1\right) \cdot \left(\left(\frac{2}{1 + e^{-2 \cdot x}} \cdot \frac{2}{1 + e^{-2 \cdot x}}\right) \cdot \frac{2}{1 + e^{-2 \cdot x}} - \left(1 \cdot 1\right) \cdot 1\right), \frac{2}{1 + e^{-2 \cdot x}} \cdot \frac{2}{1 + e^{-2 \cdot x}}, -\left(\left(\left(\frac{2}{1 + e^{-2 \cdot x}} \cdot \frac{2}{1 + e^{-2 \cdot x}}\right) \cdot \frac{2}{1 + e^{-2 \cdot x}} - \left(1 \cdot 1\right) \cdot 1\right) \cdot \left(\left(\frac{2}{1 + e^{-2 \cdot x}} \cdot \frac{2}{1 + e^{-2 \cdot x}}\right) \cdot \frac{2}{1 + e^{-2 \cdot x}} - \left(1 \cdot 1\right) \cdot 1\right)\right) \cdot \left(1 \cdot 1\right)\right)}}}{\sqrt[3]{\left(\left(\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)\right) \cdot \left(\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)\right)\right) \cdot \left(\frac{2}{1 + e^{-2 \cdot x}} + 1\right)}}\]
    12. Simplified0.2

      \[\leadsto \frac{\sqrt[3]{\mathsf{fma}\left(\left(\left(\frac{2}{1 + e^{-2 \cdot x}} \cdot \frac{2}{1 + e^{-2 \cdot x}}\right) \cdot \frac{2}{1 + e^{-2 \cdot x}} - \left(1 \cdot 1\right) \cdot 1\right) \cdot \left(\left(\frac{2}{1 + e^{-2 \cdot x}} \cdot \frac{2}{1 + e^{-2 \cdot x}}\right) \cdot \frac{2}{1 + e^{-2 \cdot x}} - \left(1 \cdot 1\right) \cdot 1\right), \frac{2}{1 + e^{-2 \cdot x}} \cdot \frac{2}{1 + e^{-2 \cdot x}}, -\left(\left(\left(\frac{2}{1 + e^{-2 \cdot x}} \cdot \frac{2}{1 + e^{-2 \cdot x}}\right) \cdot \frac{2}{1 + e^{-2 \cdot x}} - \left(1 \cdot 1\right) \cdot 1\right) \cdot \left(\left(\frac{2}{1 + e^{-2 \cdot x}} \cdot \frac{2}{1 + e^{-2 \cdot x}}\right) \cdot \frac{2}{1 + e^{-2 \cdot x}} - \left(1 \cdot 1\right) \cdot 1\right)\right) \cdot \left(1 \cdot 1\right)\right)}}{\color{blue}{\sqrt[3]{\mathsf{fma}\left(1, \frac{2}{1 + e^{-2 \cdot x}} + 1, \frac{2}{1 + e^{-2 \cdot x}} \cdot \frac{2}{1 + e^{-2 \cdot x}}\right) \cdot \left(\mathsf{fma}\left(1, \frac{2}{1 + e^{-2 \cdot x}} + 1, \frac{2}{1 + e^{-2 \cdot x}} \cdot \frac{2}{1 + e^{-2 \cdot x}}\right) \cdot \left(\frac{2}{1 + e^{-2 \cdot x}} + 1\right)\right)}}}\]
    13. Using strategy rm
    14. Applied log1p-expm1-u0.2

      \[\leadsto \frac{\sqrt[3]{\mathsf{fma}\left(\left(\left(\frac{2}{1 + e^{-2 \cdot x}} \cdot \frac{2}{1 + e^{-2 \cdot x}}\right) \cdot \frac{2}{1 + e^{-2 \cdot x}} - \left(1 \cdot 1\right) \cdot 1\right) \cdot \left(\left(\frac{2}{1 + e^{-2 \cdot x}} \cdot \frac{2}{1 + e^{-2 \cdot x}}\right) \cdot \frac{2}{1 + e^{-2 \cdot x}} - \left(1 \cdot 1\right) \cdot 1\right), \frac{2}{1 + e^{-2 \cdot x}} \cdot \frac{2}{1 + e^{-2 \cdot x}}, -\left(\color{blue}{\mathsf{log1p}\left(\mathsf{expm1}\left(\left(\frac{2}{1 + e^{-2 \cdot x}} \cdot \frac{2}{1 + e^{-2 \cdot x}}\right) \cdot \frac{2}{1 + e^{-2 \cdot x}} - \left(1 \cdot 1\right) \cdot 1\right)\right)} \cdot \left(\left(\frac{2}{1 + e^{-2 \cdot x}} \cdot \frac{2}{1 + e^{-2 \cdot x}}\right) \cdot \frac{2}{1 + e^{-2 \cdot x}} - \left(1 \cdot 1\right) \cdot 1\right)\right) \cdot \left(1 \cdot 1\right)\right)}}{\sqrt[3]{\mathsf{fma}\left(1, \frac{2}{1 + e^{-2 \cdot x}} + 1, \frac{2}{1 + e^{-2 \cdot x}} \cdot \frac{2}{1 + e^{-2 \cdot x}}\right) \cdot \left(\mathsf{fma}\left(1, \frac{2}{1 + e^{-2 \cdot x}} + 1, \frac{2}{1 + e^{-2 \cdot x}} \cdot \frac{2}{1 + e^{-2 \cdot x}}\right) \cdot \left(\frac{2}{1 + e^{-2 \cdot x}} + 1\right)\right)}}\]

    if -0.1837147540782742 < (* -2.0 x) < 1.0424924237606502e-10

    1. Initial program 59.4

      \[\frac{2}{1 + e^{-2 \cdot x}} - 1\]
    2. Taylor expanded around 0 0.1

      \[\leadsto \color{blue}{1 \cdot x - \left(5.5511151231257827021181583404541015625 \cdot 10^{-17} \cdot {x}^{4} + 0.3333333333333333703407674875052180141211 \cdot {x}^{3}\right)}\]
    3. Simplified0.1

      \[\leadsto \color{blue}{x \cdot \left(1 - \left(x \cdot x\right) \cdot 0.3333333333333333703407674875052180141211\right) - 5.5511151231257827021181583404541015625 \cdot 10^{-17} \cdot \left(\left(x \cdot x\right) \cdot \left(x \cdot x\right)\right)}\]
  3. Recombined 2 regimes into one program.
  4. Final simplification0.2

    \[\leadsto \begin{array}{l} \mathbf{if}\;x \cdot -2 \le -0.1837147540782742005660566064761951565742:\\ \;\;\;\;\frac{\sqrt[3]{\mathsf{fma}\left(\left(\frac{2}{e^{x \cdot -2} + 1} \cdot \left(\frac{2}{e^{x \cdot -2} + 1} \cdot \frac{2}{e^{x \cdot -2} + 1}\right) - \left(1 \cdot 1\right) \cdot 1\right) \cdot \left(\frac{2}{e^{x \cdot -2} + 1} \cdot \left(\frac{2}{e^{x \cdot -2} + 1} \cdot \frac{2}{e^{x \cdot -2} + 1}\right) - \left(1 \cdot 1\right) \cdot 1\right), \frac{2}{e^{x \cdot -2} + 1} \cdot \frac{2}{e^{x \cdot -2} + 1}, \left(-1 \cdot 1\right) \cdot \left(\left(\frac{2}{e^{x \cdot -2} + 1} \cdot \left(\frac{2}{e^{x \cdot -2} + 1} \cdot \frac{2}{e^{x \cdot -2} + 1}\right) - \left(1 \cdot 1\right) \cdot 1\right) \cdot \mathsf{log1p}\left(\mathsf{expm1}\left(\frac{2}{e^{x \cdot -2} + 1} \cdot \left(\frac{2}{e^{x \cdot -2} + 1} \cdot \frac{2}{e^{x \cdot -2} + 1}\right) - \left(1 \cdot 1\right) \cdot 1\right)\right)\right)\right)}}{\sqrt[3]{\mathsf{fma}\left(1, 1 + \frac{2}{e^{x \cdot -2} + 1}, \frac{2}{e^{x \cdot -2} + 1} \cdot \frac{2}{e^{x \cdot -2} + 1}\right) \cdot \left(\mathsf{fma}\left(1, 1 + \frac{2}{e^{x \cdot -2} + 1}, \frac{2}{e^{x \cdot -2} + 1} \cdot \frac{2}{e^{x \cdot -2} + 1}\right) \cdot \left(1 + \frac{2}{e^{x \cdot -2} + 1}\right)\right)}}\\ \mathbf{elif}\;x \cdot -2 \le 1.042492423760650159831312601586774009566 \cdot 10^{-10}:\\ \;\;\;\;x \cdot \left(1 - 0.3333333333333333703407674875052180141211 \cdot \left(x \cdot x\right)\right) - \left(\left(x \cdot x\right) \cdot \left(x \cdot x\right)\right) \cdot 5.5511151231257827021181583404541015625 \cdot 10^{-17}\\ \mathbf{else}:\\ \;\;\;\;\frac{\sqrt[3]{\mathsf{fma}\left(\left(\frac{2}{e^{x \cdot -2} + 1} \cdot \left(\frac{2}{e^{x \cdot -2} + 1} \cdot \frac{2}{e^{x \cdot -2} + 1}\right) - \left(1 \cdot 1\right) \cdot 1\right) \cdot \left(\frac{2}{e^{x \cdot -2} + 1} \cdot \left(\frac{2}{e^{x \cdot -2} + 1} \cdot \frac{2}{e^{x \cdot -2} + 1}\right) - \left(1 \cdot 1\right) \cdot 1\right), \frac{2}{e^{x \cdot -2} + 1} \cdot \frac{2}{e^{x \cdot -2} + 1}, \left(-1 \cdot 1\right) \cdot \left(\left(\frac{2}{e^{x \cdot -2} + 1} \cdot \left(\frac{2}{e^{x \cdot -2} + 1} \cdot \frac{2}{e^{x \cdot -2} + 1}\right) - \left(1 \cdot 1\right) \cdot 1\right) \cdot \mathsf{log1p}\left(\mathsf{expm1}\left(\frac{2}{e^{x \cdot -2} + 1} \cdot \left(\frac{2}{e^{x \cdot -2} + 1} \cdot \frac{2}{e^{x \cdot -2} + 1}\right) - \left(1 \cdot 1\right) \cdot 1\right)\right)\right)\right)}}{\sqrt[3]{\mathsf{fma}\left(1, 1 + \frac{2}{e^{x \cdot -2} + 1}, \frac{2}{e^{x \cdot -2} + 1} \cdot \frac{2}{e^{x \cdot -2} + 1}\right) \cdot \left(\mathsf{fma}\left(1, 1 + \frac{2}{e^{x \cdot -2} + 1}, \frac{2}{e^{x \cdot -2} + 1} \cdot \frac{2}{e^{x \cdot -2} + 1}\right) \cdot \left(1 + \frac{2}{e^{x \cdot -2} + 1}\right)\right)}}\\ \end{array}\]

Reproduce

herbie shell --seed 2019200 +o rules:numerics
(FPCore (x y)
  :name "Logistic function from Lakshay Garg"
  (- (/ 2.0 (+ 1.0 (exp (* -2.0 x)))) 1.0))