- Split input into 3 regimes
if x < -0.027676068794790603
Initial program 0.1
\[\frac{x - \sin x}{x - \tan x}\]
- Using strategy
rm Applied log1p-expm1-u0.1
\[\leadsto \color{blue}{\log_* (1 + (e^{\frac{x - \sin x}{x - \tan x}} - 1)^*)}\]
if -0.027676068794790603 < x < 2.4173513547348295
Initial program 62.6
\[\frac{x - \sin x}{x - \tan x}\]
Taylor expanded around 0 0.1
\[\leadsto \color{blue}{\frac{9}{40} \cdot {x}^{2} - \left(\frac{27}{2800} \cdot {x}^{4} + \frac{1}{2}\right)}\]
Simplified0.1
\[\leadsto \color{blue}{(\left(x \cdot x\right) \cdot \frac{9}{40} + \left((\frac{-27}{2800} \cdot \left(\left(x \cdot x\right) \cdot \left(x \cdot x\right)\right) + \frac{-1}{2})_*\right))_*}\]
if 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.3
\[\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.3
\[\leadsto \log_* (1 + (e^{\color{blue}{\left(1 + \frac{\frac{\sin x}{\cos x}}{x}\right) + \left(\frac{\frac{\sin x}{\cos x}}{x} \cdot \left(\frac{\frac{\sin x}{\cos x}}{x} - \frac{\sin x}{x}\right) - \frac{\sin x}{x}\right)}} - 1)^*)\]
- Recombined 3 regimes into one program.
Final simplification0.2
\[\leadsto \begin{array}{l}
\mathbf{if}\;x \le -0.027676068794790603:\\
\;\;\;\;\log_* (1 + (e^{\frac{x - \sin x}{x - \tan x}} - 1)^*)\\
\mathbf{elif}\;x \le 2.4173513547348295:\\
\;\;\;\;(\left(x \cdot x\right) \cdot \frac{9}{40} + \left((\frac{-27}{2800} \cdot \left(\left(x \cdot x\right) \cdot \left(x \cdot x\right)\right) + \frac{-1}{2})_*\right))_*\\
\mathbf{else}:\\
\;\;\;\;\log_* (1 + (e^{\left(\left(\frac{\frac{\sin x}{\cos x}}{x} - \frac{\sin x}{x}\right) \cdot \frac{\frac{\sin x}{\cos x}}{x} - \frac{\sin x}{x}\right) + \left(\frac{\frac{\sin x}{\cos x}}{x} + 1\right)} - 1)^*)\\
\end{array}\]