Average Error: 37.4 → 0.4
Time: 20.9s
Precision: binary64
Cost: 39172
\[\tan \left(x + \varepsilon\right) - \tan x \]
\[\begin{array}{l} t_0 := \tan x + \tan \varepsilon\\ \mathbf{if}\;\varepsilon \leq -4.8 \cdot 10^{-7}:\\ \;\;\;\;\left(-\tan x\right) - \frac{t_0}{\mathsf{fma}\left(\tan x, \tan \varepsilon, -1\right)}\\ \mathbf{elif}\;\varepsilon \leq 3.4 \cdot 10^{-7}:\\ \;\;\;\;\frac{\sin \left(-\varepsilon\right)}{\cos x \cdot \left(\varepsilon \cdot \sin x - \cos x\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{t_0}{1 - \tan x \cdot \tan \varepsilon} - \tan x\\ \end{array} \]
(FPCore (x eps) :precision binary64 (- (tan (+ x eps)) (tan x)))
(FPCore (x eps)
 :precision binary64
 (let* ((t_0 (+ (tan x) (tan eps))))
   (if (<= eps -4.8e-7)
     (- (- (tan x)) (/ t_0 (fma (tan x) (tan eps) -1.0)))
     (if (<= eps 3.4e-7)
       (/ (sin (- eps)) (* (cos x) (- (* eps (sin x)) (cos x))))
       (- (/ t_0 (- 1.0 (* (tan x) (tan eps)))) (tan x))))))
double code(double x, double eps) {
	return tan((x + eps)) - tan(x);
}
double code(double x, double eps) {
	double t_0 = tan(x) + tan(eps);
	double tmp;
	if (eps <= -4.8e-7) {
		tmp = -tan(x) - (t_0 / fma(tan(x), tan(eps), -1.0));
	} else if (eps <= 3.4e-7) {
		tmp = sin(-eps) / (cos(x) * ((eps * sin(x)) - cos(x)));
	} else {
		tmp = (t_0 / (1.0 - (tan(x) * tan(eps)))) - tan(x);
	}
	return tmp;
}
function code(x, eps)
	return Float64(tan(Float64(x + eps)) - tan(x))
end
function code(x, eps)
	t_0 = Float64(tan(x) + tan(eps))
	tmp = 0.0
	if (eps <= -4.8e-7)
		tmp = Float64(Float64(-tan(x)) - Float64(t_0 / fma(tan(x), tan(eps), -1.0)));
	elseif (eps <= 3.4e-7)
		tmp = Float64(sin(Float64(-eps)) / Float64(cos(x) * Float64(Float64(eps * sin(x)) - cos(x))));
	else
		tmp = Float64(Float64(t_0 / Float64(1.0 - Float64(tan(x) * tan(eps)))) - tan(x));
	end
	return tmp
end
code[x_, eps_] := N[(N[Tan[N[(x + eps), $MachinePrecision]], $MachinePrecision] - N[Tan[x], $MachinePrecision]), $MachinePrecision]
code[x_, eps_] := Block[{t$95$0 = N[(N[Tan[x], $MachinePrecision] + N[Tan[eps], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[eps, -4.8e-7], N[((-N[Tan[x], $MachinePrecision]) - N[(t$95$0 / N[(N[Tan[x], $MachinePrecision] * N[Tan[eps], $MachinePrecision] + -1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[eps, 3.4e-7], N[(N[Sin[(-eps)], $MachinePrecision] / N[(N[Cos[x], $MachinePrecision] * N[(N[(eps * N[Sin[x], $MachinePrecision]), $MachinePrecision] - N[Cos[x], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(t$95$0 / N[(1.0 - N[(N[Tan[x], $MachinePrecision] * N[Tan[eps], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[Tan[x], $MachinePrecision]), $MachinePrecision]]]]
\tan \left(x + \varepsilon\right) - \tan x
\begin{array}{l}
t_0 := \tan x + \tan \varepsilon\\
\mathbf{if}\;\varepsilon \leq -4.8 \cdot 10^{-7}:\\
\;\;\;\;\left(-\tan x\right) - \frac{t_0}{\mathsf{fma}\left(\tan x, \tan \varepsilon, -1\right)}\\

\mathbf{elif}\;\varepsilon \leq 3.4 \cdot 10^{-7}:\\
\;\;\;\;\frac{\sin \left(-\varepsilon\right)}{\cos x \cdot \left(\varepsilon \cdot \sin x - \cos x\right)}\\

\mathbf{else}:\\
\;\;\;\;\frac{t_0}{1 - \tan x \cdot \tan \varepsilon} - \tan x\\


\end{array}

Error

Target

Original37.4
Target15.6
Herbie0.4
\[\frac{\sin \varepsilon}{\cos x \cdot \cos \left(x + \varepsilon\right)} \]

Derivation

  1. Split input into 3 regimes
  2. if eps < -4.79999999999999957e-7

    1. Initial program 31.1

      \[\tan \left(x + \varepsilon\right) - \tan x \]
    2. Applied egg-rr0.5

      \[\leadsto \color{blue}{\frac{1}{1 - \tan x \cdot \tan \varepsilon} \cdot \left(\tan x + \tan \varepsilon\right)} - \tan x \]
    3. Applied egg-rr0.5

      \[\leadsto \color{blue}{\frac{-1}{\frac{-1 + \tan x \cdot \tan \varepsilon}{\tan x + \tan \varepsilon}}} - \tan x \]
    4. Simplified0.4

      \[\leadsto \color{blue}{\frac{\left(-\tan x\right) - \tan \varepsilon}{\mathsf{fma}\left(\tan x, \tan \varepsilon, -1\right)}} - \tan x \]
      Proof
      (-.f64 (/.f64 (-.f64 (neg.f64 (tan.f64 x)) (tan.f64 eps)) (fma.f64 (tan.f64 x) (tan.f64 eps) -1)) (tan.f64 x)): 0 points increase in error, 0 points decrease in error
      (-.f64 (/.f64 (-.f64 (Rewrite=> neg-sub0_binary64 (-.f64 0 (tan.f64 x))) (tan.f64 eps)) (fma.f64 (tan.f64 x) (tan.f64 eps) -1)) (tan.f64 x)): 11 points increase in error, 0 points decrease in error
      (-.f64 (/.f64 (Rewrite<= associate--r+_binary64 (-.f64 0 (+.f64 (tan.f64 x) (tan.f64 eps)))) (fma.f64 (tan.f64 x) (tan.f64 eps) -1)) (tan.f64 x)): 0 points increase in error, 11 points decrease in error
      (-.f64 (/.f64 (Rewrite<= neg-sub0_binary64 (neg.f64 (+.f64 (tan.f64 x) (tan.f64 eps)))) (fma.f64 (tan.f64 x) (tan.f64 eps) -1)) (tan.f64 x)): 11 points increase in error, 0 points decrease in error
      (-.f64 (/.f64 (Rewrite<= mul-1-neg_binary64 (*.f64 -1 (+.f64 (tan.f64 x) (tan.f64 eps)))) (fma.f64 (tan.f64 x) (tan.f64 eps) -1)) (tan.f64 x)): 0 points increase in error, 11 points decrease in error
      (-.f64 (/.f64 (*.f64 -1 (+.f64 (tan.f64 x) (tan.f64 eps))) (fma.f64 (tan.f64 x) (tan.f64 eps) (Rewrite<= metadata-eval (neg.f64 1)))) (tan.f64 x)): 11 points increase in error, 0 points decrease in error
      (-.f64 (/.f64 (*.f64 -1 (+.f64 (tan.f64 x) (tan.f64 eps))) (Rewrite<= fma-neg_binary64 (-.f64 (*.f64 (tan.f64 x) (tan.f64 eps)) 1))) (tan.f64 x)): 0 points increase in error, 11 points decrease in error
      (-.f64 (/.f64 (*.f64 -1 (+.f64 (tan.f64 x) (tan.f64 eps))) (Rewrite=> sub-neg_binary64 (+.f64 (*.f64 (tan.f64 x) (tan.f64 eps)) (neg.f64 1)))) (tan.f64 x)): 11 points increase in error, 0 points decrease in error
      (-.f64 (/.f64 (*.f64 -1 (+.f64 (tan.f64 x) (tan.f64 eps))) (+.f64 (*.f64 (tan.f64 x) (tan.f64 eps)) (Rewrite=> metadata-eval -1))) (tan.f64 x)): 0 points increase in error, 11 points decrease in error
      (-.f64 (/.f64 (*.f64 -1 (+.f64 (tan.f64 x) (tan.f64 eps))) (Rewrite<= +-commutative_binary64 (+.f64 -1 (*.f64 (tan.f64 x) (tan.f64 eps))))) (tan.f64 x)): 11 points increase in error, 0 points decrease in error
      (-.f64 (Rewrite=> associate-/l*_binary64 (/.f64 -1 (/.f64 (+.f64 -1 (*.f64 (tan.f64 x) (tan.f64 eps))) (+.f64 (tan.f64 x) (tan.f64 eps))))) (tan.f64 x)): 0 points increase in error, 11 points decrease in error

    if -4.79999999999999957e-7 < eps < 3.39999999999999974e-7

    1. Initial program 44.8

      \[\tan \left(x + \varepsilon\right) - \tan x \]
    2. Applied egg-rr44.8

      \[\leadsto \color{blue}{\frac{\frac{\cos x \cdot \sin \left(x + \varepsilon\right) - \sin x \cdot \cos \left(x + \varepsilon\right)}{\cos \left(x + \varepsilon\right)}}{\cos x}} \]
    3. Applied egg-rr44.8

      \[\leadsto \frac{\frac{\color{blue}{\left(0 - \sin \left(x - \left(x + \varepsilon\right)\right)\right) \cdot 1}}{\cos \left(x + \varepsilon\right)}}{\cos x} \]
    4. Simplified0.5

      \[\leadsto \frac{\frac{\color{blue}{-\sin \left(-\varepsilon\right)}}{\cos \left(x + \varepsilon\right)}}{\cos x} \]
      Proof
      (/.f64 (/.f64 (neg.f64 (sin.f64 (neg.f64 eps))) (cos.f64 (+.f64 x eps))) (cos.f64 x)): 0 points increase in error, 0 points decrease in error
      (/.f64 (/.f64 (neg.f64 (sin.f64 (Rewrite=> neg-sub0_binary64 (-.f64 0 eps)))) (cos.f64 (+.f64 x eps))) (cos.f64 x)): 0 points increase in error, 6 points decrease in error
      (/.f64 (/.f64 (neg.f64 (sin.f64 (-.f64 (Rewrite<= +-inverses_binary64 (-.f64 x x)) eps))) (cos.f64 (+.f64 x eps))) (cos.f64 x)): 0 points increase in error, 3 points decrease in error
      (/.f64 (/.f64 (neg.f64 (sin.f64 (Rewrite<= associate--r+_binary64 (-.f64 x (+.f64 x eps))))) (cos.f64 (+.f64 x eps))) (cos.f64 x)): 3 points increase in error, 0 points decrease in error
      (/.f64 (/.f64 (Rewrite<= sub0-neg_binary64 (-.f64 0 (sin.f64 (-.f64 x (+.f64 x eps))))) (cos.f64 (+.f64 x eps))) (cos.f64 x)): 0 points increase in error, 3 points decrease in error
      (/.f64 (/.f64 (Rewrite<= *-rgt-identity_binary64 (*.f64 (-.f64 0 (sin.f64 (-.f64 x (+.f64 x eps)))) 1)) (cos.f64 (+.f64 x eps))) (cos.f64 x)): 3 points increase in error, 0 points decrease in error
    5. Taylor expanded in eps around 0 0.3

      \[\leadsto \frac{\frac{-\sin \left(-\varepsilon\right)}{\color{blue}{\cos x + -1 \cdot \left(\varepsilon \cdot \sin x\right)}}}{\cos x} \]
    6. Simplified0.3

      \[\leadsto \frac{\frac{-\sin \left(-\varepsilon\right)}{\color{blue}{\cos x - \varepsilon \cdot \sin x}}}{\cos x} \]
      Proof
      (/.f64 (/.f64 (neg.f64 (sin.f64 (neg.f64 eps))) (cos.f64 (+.f64 x eps))) (cos.f64 x)): 0 points increase in error, 0 points decrease in error
      (/.f64 (/.f64 (neg.f64 (sin.f64 (Rewrite=> neg-sub0_binary64 (-.f64 0 eps)))) (cos.f64 (+.f64 x eps))) (cos.f64 x)): 0 points increase in error, 6 points decrease in error
      (/.f64 (/.f64 (neg.f64 (sin.f64 (-.f64 (Rewrite<= +-inverses_binary64 (-.f64 x x)) eps))) (cos.f64 (+.f64 x eps))) (cos.f64 x)): 0 points increase in error, 3 points decrease in error
      (/.f64 (/.f64 (neg.f64 (sin.f64 (Rewrite<= associate--r+_binary64 (-.f64 x (+.f64 x eps))))) (cos.f64 (+.f64 x eps))) (cos.f64 x)): 3 points increase in error, 0 points decrease in error
      (/.f64 (/.f64 (Rewrite<= sub0-neg_binary64 (-.f64 0 (sin.f64 (-.f64 x (+.f64 x eps))))) (cos.f64 (+.f64 x eps))) (cos.f64 x)): 0 points increase in error, 3 points decrease in error
      (/.f64 (/.f64 (Rewrite<= *-rgt-identity_binary64 (*.f64 (-.f64 0 (sin.f64 (-.f64 x (+.f64 x eps)))) 1)) (cos.f64 (+.f64 x eps))) (cos.f64 x)): 3 points increase in error, 0 points decrease in error
    7. Applied egg-rr59.6

      \[\leadsto \color{blue}{\left(\frac{0}{\cos x \cdot \left(\cos x + \varepsilon \cdot \sin x\right)} - e^{\mathsf{log1p}\left(\frac{\sin \varepsilon}{\cos x \cdot \left(\varepsilon \cdot \sin x - \cos x\right)}\right)}\right) + 1} \]
    8. Simplified0.3

      \[\leadsto \color{blue}{\frac{\sin \left(-\varepsilon\right)}{\cos x \cdot \left(\varepsilon \cdot \sin x - \cos x\right)}} \]
      Proof
      (/.f64 (sin.f64 (neg.f64 eps)) (*.f64 (cos.f64 x) (-.f64 (*.f64 eps (sin.f64 x)) (cos.f64 x)))): 0 points increase in error, 0 points decrease in error
      (/.f64 (Rewrite=> sin-neg_binary64 (neg.f64 (sin.f64 eps))) (*.f64 (cos.f64 x) (-.f64 (*.f64 eps (sin.f64 x)) (cos.f64 x)))): 2 points increase in error, 0 points decrease in error
      (Rewrite<= distribute-neg-frac_binary64 (neg.f64 (/.f64 (sin.f64 eps) (*.f64 (cos.f64 x) (-.f64 (*.f64 eps (sin.f64 x)) (cos.f64 x)))))): 2 points increase in error, 0 points decrease in error
      (Rewrite=> neg-sub0_binary64 (-.f64 0 (/.f64 (sin.f64 eps) (*.f64 (cos.f64 x) (-.f64 (*.f64 eps (sin.f64 x)) (cos.f64 x)))))): 0 points increase in error, 2 points decrease in error
      (-.f64 (Rewrite<= div0_binary64 (/.f64 0 (*.f64 (cos.f64 x) (+.f64 (cos.f64 x) (*.f64 eps (sin.f64 x)))))) (/.f64 (sin.f64 eps) (*.f64 (cos.f64 x) (-.f64 (*.f64 eps (sin.f64 x)) (cos.f64 x))))): 2 points increase in error, 0 points decrease in error
      (-.f64 (/.f64 0 (*.f64 (cos.f64 x) (+.f64 (cos.f64 x) (*.f64 eps (sin.f64 x))))) (Rewrite<= expm1-log1p_binary64 (expm1.f64 (log1p.f64 (/.f64 (sin.f64 eps) (*.f64 (cos.f64 x) (-.f64 (*.f64 eps (sin.f64 x)) (cos.f64 x)))))))): 0 points increase in error, 2 points decrease in error
      (-.f64 (/.f64 0 (*.f64 (cos.f64 x) (+.f64 (cos.f64 x) (*.f64 eps (sin.f64 x))))) (Rewrite<= expm1-def_binary64 (-.f64 (exp.f64 (log1p.f64 (/.f64 (sin.f64 eps) (*.f64 (cos.f64 x) (-.f64 (*.f64 eps (sin.f64 x)) (cos.f64 x)))))) 1))): 6 points increase in error, 2 points decrease in error
      (Rewrite<= associate-+l-_binary64 (+.f64 (-.f64 (/.f64 0 (*.f64 (cos.f64 x) (+.f64 (cos.f64 x) (*.f64 eps (sin.f64 x))))) (exp.f64 (log1p.f64 (/.f64 (sin.f64 eps) (*.f64 (cos.f64 x) (-.f64 (*.f64 eps (sin.f64 x)) (cos.f64 x))))))) 1)): 8 points increase in error, 0 points decrease in error

    if 3.39999999999999974e-7 < eps

    1. Initial program 29.8

      \[\tan \left(x + \varepsilon\right) - \tan x \]
    2. Applied egg-rr0.4

      \[\leadsto \color{blue}{\left(\tan x + \tan \varepsilon\right) \cdot \frac{1}{1 - \tan x \cdot \tan \varepsilon}} - \tan x \]
    3. Simplified0.4

      \[\leadsto \color{blue}{\frac{\tan x + \tan \varepsilon}{1 - \tan x \cdot \tan \varepsilon}} - \tan x \]
      Proof
      (-.f64 (/.f64 (+.f64 (tan.f64 x) (tan.f64 eps)) (-.f64 1 (*.f64 (tan.f64 x) (tan.f64 eps)))) (tan.f64 x)): 0 points increase in error, 0 points decrease in error
      (-.f64 (/.f64 (Rewrite<= *-lft-identity_binary64 (*.f64 1 (+.f64 (tan.f64 x) (tan.f64 eps)))) (-.f64 1 (*.f64 (tan.f64 x) (tan.f64 eps)))) (tan.f64 x)): 4 points increase in error, 0 points decrease in error
      (-.f64 (Rewrite<= associate-*l/_binary64 (*.f64 (/.f64 1 (-.f64 1 (*.f64 (tan.f64 x) (tan.f64 eps)))) (+.f64 (tan.f64 x) (tan.f64 eps)))) (tan.f64 x)): 0 points increase in error, 4 points decrease in error
      (-.f64 (Rewrite=> *-commutative_binary64 (*.f64 (+.f64 (tan.f64 x) (tan.f64 eps)) (/.f64 1 (-.f64 1 (*.f64 (tan.f64 x) (tan.f64 eps)))))) (tan.f64 x)): 4 points increase in error, 0 points decrease in error
  3. Recombined 3 regimes into one program.
  4. Final simplification0.4

    \[\leadsto \begin{array}{l} \mathbf{if}\;\varepsilon \leq -4.8 \cdot 10^{-7}:\\ \;\;\;\;\left(-\tan x\right) - \frac{\tan x + \tan \varepsilon}{\mathsf{fma}\left(\tan x, \tan \varepsilon, -1\right)}\\ \mathbf{elif}\;\varepsilon \leq 3.4 \cdot 10^{-7}:\\ \;\;\;\;\frac{\sin \left(-\varepsilon\right)}{\cos x \cdot \left(\varepsilon \cdot \sin x - \cos x\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{\tan x + \tan \varepsilon}{1 - \tan x \cdot \tan \varepsilon} - \tan x\\ \end{array} \]

Alternatives

Alternative 1
Error0.4
Cost39104
\[\frac{\sin \varepsilon}{\cos x \cdot \left(\cos x \cdot \cos \varepsilon - \sin \varepsilon \cdot \sin x\right)} \]
Alternative 2
Error0.4
Cost33220
\[\begin{array}{l} t_0 := \tan x \cdot \tan \varepsilon\\ t_1 := \tan x + \tan \varepsilon\\ \mathbf{if}\;\varepsilon \leq -4.3 \cdot 10^{-7}:\\ \;\;\;\;t_1 \cdot \frac{1}{1 + \left(1 + \left(-1 - t_0\right)\right)} - \tan x\\ \mathbf{elif}\;\varepsilon \leq 1.55 \cdot 10^{-7}:\\ \;\;\;\;\frac{\sin \left(-\varepsilon\right)}{\cos x \cdot \left(\varepsilon \cdot \sin x - \cos x\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{t_1}{1 - t_0} - \tan x\\ \end{array} \]
Alternative 3
Error0.4
Cost33092
\[\begin{array}{l} t_0 := \tan x + \tan \varepsilon\\ \mathbf{if}\;\varepsilon \leq -2.15 \cdot 10^{-7}:\\ \;\;\;\;t_0 \cdot \frac{1}{1 - \frac{\tan \varepsilon}{\frac{1}{\tan x}}} - \tan x\\ \mathbf{elif}\;\varepsilon \leq 2.3 \cdot 10^{-7}:\\ \;\;\;\;\frac{\sin \left(-\varepsilon\right)}{\cos x \cdot \left(\varepsilon \cdot \sin x - \cos x\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{t_0}{1 - \tan x \cdot \tan \varepsilon} - \tan x\\ \end{array} \]
Alternative 4
Error0.4
Cost32969
\[\begin{array}{l} \mathbf{if}\;\varepsilon \leq -2.9 \cdot 10^{-7} \lor \neg \left(\varepsilon \leq 2.2 \cdot 10^{-7}\right):\\ \;\;\;\;\frac{\tan x + \tan \varepsilon}{1 - \tan x \cdot \tan \varepsilon} - \tan x\\ \mathbf{else}:\\ \;\;\;\;\frac{\sin \left(-\varepsilon\right)}{\cos x \cdot \left(\varepsilon \cdot \sin x - \cos x\right)}\\ \end{array} \]
Alternative 5
Error0.4
Cost32968
\[\begin{array}{l} t_0 := \tan x + \tan \varepsilon\\ t_1 := 1 - \tan x \cdot \tan \varepsilon\\ \mathbf{if}\;\varepsilon \leq -1.7 \cdot 10^{-7}:\\ \;\;\;\;t_0 \cdot \frac{1}{t_1} - \tan x\\ \mathbf{elif}\;\varepsilon \leq 2.2 \cdot 10^{-7}:\\ \;\;\;\;\frac{\sin \left(-\varepsilon\right)}{\cos x \cdot \left(\varepsilon \cdot \sin x - \cos x\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{t_0}{t_1} - \tan x\\ \end{array} \]
Alternative 6
Error14.9
Cost26176
\[\frac{-\frac{\sin \left(-\varepsilon\right)}{\cos x \cdot \cos \varepsilon}}{\cos x} \]
Alternative 7
Error15.2
Cost19904
\[\frac{\sin \varepsilon \cdot 2}{\cos \varepsilon + \cos \left(\varepsilon + \left(x + x\right)\right)} \]
Alternative 8
Error15.1
Cost19784
\[\begin{array}{l} t_0 := \frac{\sin \varepsilon}{\cos \varepsilon}\\ \mathbf{if}\;\varepsilon \leq -0.052:\\ \;\;\;\;t_0\\ \mathbf{elif}\;\varepsilon \leq 7.5 \cdot 10^{-7}:\\ \;\;\;\;\frac{\varepsilon}{{\cos x}^{2}}\\ \mathbf{else}:\\ \;\;\;\;t_0 - \tan x\\ \end{array} \]
Alternative 9
Error15.6
Cost19648
\[\frac{\sin \varepsilon}{\cos x \cdot \cos \left(\varepsilon + x\right)} \]
Alternative 10
Error15.0
Cost13321
\[\begin{array}{l} \mathbf{if}\;\varepsilon \leq -0.052 \lor \neg \left(\varepsilon \leq 1.9 \cdot 10^{-7}\right):\\ \;\;\;\;\frac{\sin \varepsilon}{\cos \varepsilon}\\ \mathbf{else}:\\ \;\;\;\;\frac{\varepsilon}{{\cos x}^{2}}\\ \end{array} \]
Alternative 11
Error27.3
Cost12992
\[\frac{\sin \varepsilon}{\cos \varepsilon} \]
Alternative 12
Error39.0
Cost6720
\[\tan \left(\varepsilon + x\right) - x \]
Alternative 13
Error61.7
Cost128
\[-x \]

Error

Reproduce

herbie shell --seed 2022343 
(FPCore (x eps)
  :name "2tan (problem 3.3.2)"
  :precision binary64

  :herbie-target
  (/ (sin eps) (* (cos x) (cos (+ x eps))))

  (- (tan (+ x eps)) (tan x)))