Average Error: 37.7 → 0.4
Time: 1.7m
Precision: 64
Internal Precision: 2368
$\frac{\left(\left(\tan \left(x + \varepsilon\right) - \tan x\right) \cdot \cos x\right) \cdot \cos \varepsilon}{\sin \varepsilon}$
$\frac{\sin \varepsilon \cdot \left(\frac{\sin x}{\cos \varepsilon} \cdot \frac{\sin x}{\cos x} + \frac{\cos x}{\cos \varepsilon}\right)}{\left(1 - \tan x \cdot \tan \varepsilon\right) \cdot \frac{\sin \varepsilon}{\cos \varepsilon}}$

# Try it out

Results

 In Out
Enter valid numbers for all inputs

# Derivation

1. Initial program 37.7

$\frac{\left(\left(\tan \left(x + \varepsilon\right) - \tan x\right) \cdot \cos x\right) \cdot \cos \varepsilon}{\sin \varepsilon}$
2. Using strategy rm
3. Applied tan-quot37.7

$\leadsto \frac{\left(\left(\tan \left(x + \varepsilon\right) - \color{blue}{\frac{\sin x}{\cos x}}\right) \cdot \cos x\right) \cdot \cos \varepsilon}{\sin \varepsilon}$
4. Applied tan-sum22.9

$\leadsto \frac{\left(\left(\color{blue}{\frac{\tan x + \tan \varepsilon}{1 - \tan x \cdot \tan \varepsilon}} - \frac{\sin x}{\cos x}\right) \cdot \cos x\right) \cdot \cos \varepsilon}{\sin \varepsilon}$
5. Applied frac-sub23.0

$\leadsto \frac{\left(\color{blue}{\frac{\left(\tan x + \tan \varepsilon\right) \cdot \cos x - \left(1 - \tan x \cdot \tan \varepsilon\right) \cdot \sin x}{\left(1 - \tan x \cdot \tan \varepsilon\right) \cdot \cos x}} \cdot \cos x\right) \cdot \cos \varepsilon}{\sin \varepsilon}$
6. Applied associate-*l/22.9

$\leadsto \frac{\color{blue}{\frac{\left(\left(\tan x + \tan \varepsilon\right) \cdot \cos x - \left(1 - \tan x \cdot \tan \varepsilon\right) \cdot \sin x\right) \cdot \cos x}{\left(1 - \tan x \cdot \tan \varepsilon\right) \cdot \cos x}} \cdot \cos \varepsilon}{\sin \varepsilon}$
7. Taylor expanded around inf 0.4

$\leadsto \frac{\frac{\color{blue}{\left(\frac{{\left(\sin x\right)}^{2} \cdot \sin \varepsilon}{\cos \varepsilon \cdot \cos x} + \frac{\cos x \cdot \sin \varepsilon}{\cos \varepsilon}\right)} \cdot \cos x}{\left(1 - \tan x \cdot \tan \varepsilon\right) \cdot \cos x} \cdot \cos \varepsilon}{\sin \varepsilon}$
8. Applied simplify0.4

$\leadsto \color{blue}{\frac{\sin \varepsilon \cdot \left(\frac{\sin x}{\cos \varepsilon} \cdot \frac{\sin x}{\cos x} + \frac{\cos x}{\cos \varepsilon}\right)}{\left(1 - \tan x \cdot \tan \varepsilon\right) \cdot \frac{\sin \varepsilon}{\cos \varepsilon}}}$

# Runtime

Time bar (total: 1.7m)Debug log

herbie shell --seed '#(2775764126 3555076145 3898259844 1891440260 2599947619 1948460636)'
(FPCore (x eps)
:name "(tan(x+eps)-tan(x))*cos(x)*cos(eps)/sin(eps)"
(/ (* (* (- (tan (+ x eps)) (tan x)) (cos x)) (cos eps)) (sin eps)))