- Split input into 2 regimes
if (fma (* x 2) (- wj) (fma wj wj x)) < 8.663567874309644e-19
Initial program 18.2
\[wj - \frac{wj \cdot e^{wj} - x}{e^{wj} + wj \cdot e^{wj}}\]
Initial simplification18.2
\[\leadsto wj - \frac{(\left(e^{wj}\right) \cdot wj + \left(-x\right))_*}{(wj \cdot \left(e^{wj}\right) + \left(e^{wj}\right))_*}\]
Taylor expanded around 0 0.9
\[\leadsto \color{blue}{\left({wj}^{2} + x\right) - 2 \cdot \left(wj \cdot x\right)}\]
Simplified0.9
\[\leadsto \color{blue}{(\left(x \cdot 2\right) \cdot \left(-wj\right) + \left((wj \cdot wj + x)_*\right))_*}\]
if 8.663567874309644e-19 < (fma (* x 2) (- wj) (fma wj wj x))
Initial program 2.2
\[wj - \frac{wj \cdot e^{wj} - x}{e^{wj} + wj \cdot e^{wj}}\]
Initial simplification2.1
\[\leadsto wj - \frac{(\left(e^{wj}\right) \cdot wj + \left(-x\right))_*}{(wj \cdot \left(e^{wj}\right) + \left(e^{wj}\right))_*}\]
- Using strategy
rm Applied clear-num2.3
\[\leadsto wj - \color{blue}{\frac{1}{\frac{(wj \cdot \left(e^{wj}\right) + \left(e^{wj}\right))_*}{(\left(e^{wj}\right) \cdot wj + \left(-x\right))_*}}}\]
- Using strategy
rm Applied div-inv2.3
\[\leadsto wj - \frac{1}{\color{blue}{(wj \cdot \left(e^{wj}\right) + \left(e^{wj}\right))_* \cdot \frac{1}{(\left(e^{wj}\right) \cdot wj + \left(-x\right))_*}}}\]
- Recombined 2 regimes into one program.
Final simplification1.3
\[\leadsto \begin{array}{l}
\mathbf{if}\;(\left(2 \cdot x\right) \cdot \left(-wj\right) + \left((wj \cdot wj + x)_*\right))_* \le 8.663567874309644 \cdot 10^{-19}:\\
\;\;\;\;(\left(2 \cdot x\right) \cdot \left(-wj\right) + \left((wj \cdot wj + x)_*\right))_*\\
\mathbf{else}:\\
\;\;\;\;wj - \frac{1}{\frac{1}{(\left(e^{wj}\right) \cdot wj + \left(-x\right))_*} \cdot (wj \cdot \left(e^{wj}\right) + \left(e^{wj}\right))_*}\\
\end{array}\]