- Split input into 2 regimes
if x < -2.4836564107365167 or 2.4173513547348295 < x
Initial program 0.0
\[\frac{x - \sin x}{x - \tan x}\]
- Using strategy
rm Applied log1p-expm1-u0.0
\[\leadsto \color{blue}{\log_* (1 + (e^{\frac{x - \sin x}{x - \tan x}} - 1)^*)}\]
Taylor expanded around -inf 0.4
\[\leadsto \log_* (1 + (e^{\color{blue}{\left(1 + \left(\frac{{\left(\sin x\right)}^{2}}{{\left(\cos x\right)}^{2} \cdot {x}^{2}} + \frac{\sin x}{\cos x \cdot x}\right)\right) - \left(\frac{\sin x}{x} + \frac{{\left(\sin x\right)}^{2}}{\cos x \cdot {x}^{2}}\right)}} - 1)^*)\]
Simplified0.4
\[\leadsto \log_* (1 + (e^{\color{blue}{(\left(\frac{\frac{\sin x}{\cos x}}{x}\right) \cdot \left(\frac{\frac{\sin x}{\cos x}}{x}\right) + \left(\left(1 + \frac{\frac{\sin x}{\cos x}}{x}\right) - \left(1 + \frac{\frac{\sin x}{\cos x}}{x}\right) \cdot \frac{\sin x}{x}\right))_*}} - 1)^*)\]
if -2.4836564107365167 < x < 2.4173513547348295
Initial program 62.5
\[\frac{x - \sin x}{x - \tan x}\]
- Using strategy
rm Applied log1p-expm1-u62.5
\[\leadsto \color{blue}{\log_* (1 + (e^{\frac{x - \sin x}{x - \tan x}} - 1)^*)}\]
Taylor expanded around 0 0.2
\[\leadsto \log_* (1 + \color{blue}{\left(\left(\frac{9}{40} \cdot \left({x}^{2} \cdot e^{\frac{-1}{2}}\right) + \left(e^{\frac{-1}{2}} + \frac{351}{22400} \cdot \left({x}^{4} \cdot e^{\frac{-1}{2}}\right)\right)\right) - 1\right)})\]
Simplified0.2
\[\leadsto \log_* (1 + \color{blue}{(\left((\frac{351}{22400} \cdot \left({x}^{4}\right) + \left((\left(x \cdot x\right) \cdot \frac{9}{40} + 1)_*\right))_*\right) \cdot \left(e^{\frac{-1}{2}}\right) + -1)_*})\]
Taylor expanded around 0 0.2
\[\leadsto \color{blue}{\frac{9}{40} \cdot {x}^{2} - \left(\frac{27}{2800} \cdot {x}^{4} + \frac{1}{2}\right)}\]
Simplified0.2
\[\leadsto \color{blue}{(\left({x}^{4}\right) \cdot \frac{-27}{2800} + \left((\left(\frac{9}{40} \cdot x\right) \cdot x + \frac{-1}{2})_*\right))_*}\]
- Recombined 2 regimes into one program.
Final simplification0.3
\[\leadsto \begin{array}{l}
\mathbf{if}\;x \le -2.4836564107365167:\\
\;\;\;\;\log_* (1 + (e^{(\left(\frac{\frac{\sin x}{\cos x}}{x}\right) \cdot \left(\frac{\frac{\sin x}{\cos x}}{x}\right) + \left(\left(1 + \frac{\frac{\sin x}{\cos x}}{x}\right) - \frac{\sin x}{x} \cdot \left(1 + \frac{\frac{\sin x}{\cos x}}{x}\right)\right))_*} - 1)^*)\\
\mathbf{elif}\;x \le 2.4173513547348295:\\
\;\;\;\;(\left({x}^{4}\right) \cdot \frac{-27}{2800} + \left((\left(x \cdot \frac{9}{40}\right) \cdot x + \frac{-1}{2})_*\right))_*\\
\mathbf{else}:\\
\;\;\;\;\log_* (1 + (e^{(\left(\frac{\frac{\sin x}{\cos x}}{x}\right) \cdot \left(\frac{\frac{\sin x}{\cos x}}{x}\right) + \left(\left(1 + \frac{\frac{\sin x}{\cos x}}{x}\right) - \frac{\sin x}{x} \cdot \left(1 + \frac{\frac{\sin x}{\cos x}}{x}\right)\right))_*} - 1)^*)\\
\end{array}\]