Initial program 0.0
\[\Re(\left(\frac{e^{x} + e^{-x}}{2} \cdot \cos y + \frac{e^{x} - e^{-x}}{2} \cdot \sin y i\right))\]
- Using strategy
rm Applied expm1-log1p-u0.3
\[\leadsto \Re(\left(\color{blue}{\mathsf{expm1}\left(\mathsf{log1p}\left(\frac{e^{x} + e^{-x}}{2} \cdot \cos y\right)\right)} + \frac{e^{x} - e^{-x}}{2} \cdot \sin y i\right))\]
Taylor expanded around inf 0.7
\[\leadsto \Re(\left(\mathsf{expm1}\left(\color{blue}{\log \left(0.5 \cdot \left(\cos y \cdot e^{x}\right) + \left(0.5 \cdot \left(\cos y \cdot e^{-x}\right) + 1\right)\right)}\right) + \frac{e^{x} - e^{-x}}{2} \cdot \sin y i\right))\]
Simplified0.3
\[\leadsto \Re(\left(\mathsf{expm1}\left(\color{blue}{\mathsf{log1p}\left(\mathsf{fma}\left(0.5, \cos y \cdot e^{x}, 0.5 \cdot \left(\cos y \cdot e^{-x}\right)\right)\right)}\right) + \frac{e^{x} - e^{-x}}{2} \cdot \sin y i\right))\]
Final simplification0.3
\[\leadsto \Re(\left(\mathsf{expm1}\left(\mathsf{log1p}\left(\mathsf{fma}\left(0.5, \cos y \cdot e^{x}, 0.5 \cdot \left(\cos y \cdot e^{-x}\right)\right)\right)\right) + \frac{e^{x} - e^{-x}}{2} \cdot \sin y i\right))\]