- Split input into 3 regimes
if x < -0.004421751435964128
Initial program 0.0
\[\frac{2}{1 + e^{-2 \cdot x}} - 1\]
Initial simplification0.0
\[\leadsto \frac{2}{1 + e^{-2 \cdot x}} - 1\]
- Using strategy
rm Applied add-log-exp0.0
\[\leadsto \color{blue}{\log \left(e^{\frac{2}{1 + e^{-2 \cdot x}} - 1}\right)}\]
if -0.004421751435964128 < x < 0.0030292719297623327
Initial program 59.2
\[\frac{2}{1 + e^{-2 \cdot x}} - 1\]
Initial simplification59.2
\[\leadsto \frac{2}{1 + e^{-2 \cdot x}} - 1\]
- Using strategy
rm Applied add-exp-log59.2
\[\leadsto \color{blue}{e^{\log \left(\frac{2}{1 + e^{-2 \cdot x}}\right)}} - 1\]
Applied expm1-def59.2
\[\leadsto \color{blue}{(e^{\log \left(\frac{2}{1 + e^{-2 \cdot x}}\right)} - 1)^*}\]
Simplified59.1
\[\leadsto (e^{\color{blue}{\log 2 - \log_* (1 + e^{-2 \cdot x})}} - 1)^*\]
Taylor expanded around 0 0.0
\[\leadsto (e^{\color{blue}{\left(x + \frac{1}{12} \cdot {x}^{4}\right) - \frac{1}{2} \cdot {x}^{2}}} - 1)^*\]
Simplified0.0
\[\leadsto (e^{\color{blue}{(\left(x \cdot \frac{-1}{2}\right) \cdot x + \left((\frac{1}{12} \cdot \left({x}^{4}\right) + x)_*\right))_*}} - 1)^*\]
if 0.0030292719297623327 < x
Initial program 0.0
\[\frac{2}{1 + e^{-2 \cdot x}} - 1\]
Initial simplification0.0
\[\leadsto \frac{2}{1 + e^{-2 \cdot x}} - 1\]
- Using strategy
rm Applied add-exp-log0.0
\[\leadsto \color{blue}{e^{\log \left(\frac{2}{1 + e^{-2 \cdot x}}\right)}} - 1\]
Applied expm1-def0.0
\[\leadsto \color{blue}{(e^{\log \left(\frac{2}{1 + e^{-2 \cdot x}}\right)} - 1)^*}\]
Simplified0.0
\[\leadsto (e^{\color{blue}{\log 2 - \log_* (1 + e^{-2 \cdot x})}} - 1)^*\]
- Using strategy
rm Applied flip3--0.0
\[\leadsto (e^{\color{blue}{\frac{{\left(\log 2\right)}^{3} - {\left(\log_* (1 + e^{-2 \cdot x})\right)}^{3}}{\log 2 \cdot \log 2 + \left(\log_* (1 + e^{-2 \cdot x}) \cdot \log_* (1 + e^{-2 \cdot x}) + \log 2 \cdot \log_* (1 + e^{-2 \cdot x})\right)}}} - 1)^*\]
- Recombined 3 regimes into one program.
Final simplification0.0
\[\leadsto \begin{array}{l}
\mathbf{if}\;x \le -0.004421751435964128:\\
\;\;\;\;\log \left(e^{\frac{2}{e^{-2 \cdot x} + 1} - 1}\right)\\
\mathbf{elif}\;x \le 0.0030292719297623327:\\
\;\;\;\;(e^{(\left(\frac{-1}{2} \cdot x\right) \cdot x + \left((\frac{1}{12} \cdot \left({x}^{4}\right) + x)_*\right))_*} - 1)^*\\
\mathbf{else}:\\
\;\;\;\;(e^{\frac{{\left(\log 2\right)}^{3} - {\left(\log_* (1 + e^{-2 \cdot x})\right)}^{3}}{\left(\log_* (1 + e^{-2 \cdot x}) \cdot \log_* (1 + e^{-2 \cdot x}) + \log 2 \cdot \log_* (1 + e^{-2 \cdot x})\right) + \log 2 \cdot \log 2}} - 1)^*\\
\end{array}\]