- Split input into 3 regimes
if (+ eps (+ (* (pow eps 3) (pow x 2)) (* (pow eps 2) x))) < -7.377007838795717e-15
Initial program 36.1
\[\tan \left(x + \varepsilon\right) - \tan x\]
- Using strategy
rm Applied tan-sum10.1
\[\leadsto \color{blue}{\frac{\tan x + \tan \varepsilon}{1 - \tan x \cdot \tan \varepsilon}} - \tan x\]
- Using strategy
rm Applied add-log-exp10.2
\[\leadsto \frac{\tan x + \tan \varepsilon}{1 - \color{blue}{\log \left(e^{\tan x \cdot \tan \varepsilon}\right)}} - \tan x\]
if -7.377007838795717e-15 < (+ eps (+ (* (pow eps 3) (pow x 2)) (* (pow eps 2) x))) < 5.060445514815462e-26
Initial program 38.7
\[\tan \left(x + \varepsilon\right) - \tan x\]
Taylor expanded around 0 15.5
\[\leadsto \color{blue}{\varepsilon + \left({\varepsilon}^{3} \cdot {x}^{2} + {\varepsilon}^{2} \cdot x\right)}\]
if 5.060445514815462e-26 < (+ eps (+ (* (pow eps 3) (pow x 2)) (* (pow eps 2) x)))
Initial program 35.1
\[\tan \left(x + \varepsilon\right) - \tan x\]
- Using strategy
rm Applied tan-sum14.1
\[\leadsto \color{blue}{\frac{\tan x + \tan \varepsilon}{1 - \tan x \cdot \tan \varepsilon}} - \tan x\]
- Using strategy
rm Applied flip3--14.1
\[\leadsto \frac{\tan x + \tan \varepsilon}{\color{blue}{\frac{{1}^{3} - {\left(\tan x \cdot \tan \varepsilon\right)}^{3}}{1 \cdot 1 + \left(\left(\tan x \cdot \tan \varepsilon\right) \cdot \left(\tan x \cdot \tan \varepsilon\right) + 1 \cdot \left(\tan x \cdot \tan \varepsilon\right)\right)}}} - \tan x\]
Applied associate-/r/14.1
\[\leadsto \color{blue}{\frac{\tan x + \tan \varepsilon}{{1}^{3} - {\left(\tan x \cdot \tan \varepsilon\right)}^{3}} \cdot \left(1 \cdot 1 + \left(\left(\tan x \cdot \tan \varepsilon\right) \cdot \left(\tan x \cdot \tan \varepsilon\right) + 1 \cdot \left(\tan x \cdot \tan \varepsilon\right)\right)\right)} - \tan x\]
Applied simplify14.1
\[\leadsto \color{blue}{\frac{\tan \varepsilon + \tan x}{1 - {\left(\tan \varepsilon \cdot \tan x\right)}^{3}}} \cdot \left(1 \cdot 1 + \left(\left(\tan x \cdot \tan \varepsilon\right) \cdot \left(\tan x \cdot \tan \varepsilon\right) + 1 \cdot \left(\tan x \cdot \tan \varepsilon\right)\right)\right) - \tan x\]
- Recombined 3 regimes into one program.
Applied simplify13.8
\[\leadsto \color{blue}{\begin{array}{l}
\mathbf{if}\;\left(x \cdot {\varepsilon}^{2} + {\varepsilon}^{3} \cdot {x}^{2}\right) + \varepsilon \le -7.377007838795717 \cdot 10^{-15}:\\
\;\;\;\;\frac{\tan \varepsilon + \tan x}{1 - \log \left(e^{\tan x \cdot \tan \varepsilon}\right)} - \tan x\\
\mathbf{if}\;\left(x \cdot {\varepsilon}^{2} + {\varepsilon}^{3} \cdot {x}^{2}\right) + \varepsilon \le 5.060445514815462 \cdot 10^{-26}:\\
\;\;\;\;\left(x \cdot {\varepsilon}^{2} + {\varepsilon}^{3} \cdot {x}^{2}\right) + \varepsilon\\
\mathbf{else}:\\
\;\;\;\;\frac{\tan \varepsilon + \tan x}{1 - {\left(\tan x \cdot \tan \varepsilon\right)}^{3}} \cdot \left(\left(\left(\tan x \cdot \tan \varepsilon\right) \cdot \left(\tan x \cdot \tan \varepsilon\right) + \tan x \cdot \tan \varepsilon\right) + 1\right) - \tan x\\
\end{array}}\]