- Split input into 2 regimes
if (* a a) < 2141226.142085088
Initial program 0.1
\[\left({\left(a \cdot a + b \cdot b\right)}^{2} + 4 \cdot \left(b \cdot b\right)\right) - 1\]
Initial simplification0.1
\[\leadsto (\left((b \cdot b + \left(a \cdot a\right))_*\right) \cdot \left((b \cdot b + \left(a \cdot a\right))_*\right) + \left((\left(4 \cdot b\right) \cdot b + -1)_*\right))_*\]
- Using strategy
rm Applied expm1-log1p-u1.2
\[\leadsto \color{blue}{(e^{\log_* (1 + (\left((b \cdot b + \left(a \cdot a\right))_*\right) \cdot \left((b \cdot b + \left(a \cdot a\right))_*\right) + \left((\left(4 \cdot b\right) \cdot b + -1)_*\right))_*)} - 1)^*}\]
if 2141226.142085088 < (* a a)
Initial program 0.5
\[\left({\left(a \cdot a + b \cdot b\right)}^{2} + 4 \cdot \left(b \cdot b\right)\right) - 1\]
Initial simplification0.5
\[\leadsto (\left((b \cdot b + \left(a \cdot a\right))_*\right) \cdot \left((b \cdot b + \left(a \cdot a\right))_*\right) + \left((\left(4 \cdot b\right) \cdot b + -1)_*\right))_*\]
Taylor expanded around inf 0.1
\[\leadsto \color{blue}{{b}^{4} + \left(2 \cdot \left({a}^{2} \cdot {b}^{2}\right) + {a}^{4}\right)}\]
Simplified0.1
\[\leadsto \color{blue}{(2 \cdot \left(\left(a \cdot b\right) \cdot \left(a \cdot b\right)\right) + \left({a}^{4} + {b}^{4}\right))_*}\]
- Recombined 2 regimes into one program.
Final simplification1.0
\[\leadsto \begin{array}{l}
\mathbf{if}\;a \cdot a \le 2141226.142085088:\\
\;\;\;\;(e^{\log_* (1 + (\left((b \cdot b + \left(a \cdot a\right))_*\right) \cdot \left((b \cdot b + \left(a \cdot a\right))_*\right) + \left((\left(4 \cdot b\right) \cdot b + -1)_*\right))_*)} - 1)^*\\
\mathbf{else}:\\
\;\;\;\;(2 \cdot \left(\left(b \cdot a\right) \cdot \left(b \cdot a\right)\right) + \left({b}^{4} + {a}^{4}\right))_*\\
\end{array}\]