
(FPCore (x eps) :precision binary64 (- (tan (+ x eps)) (tan x)))
double code(double x, double eps) {
return tan((x + eps)) - tan(x);
}
real(8) function code(x, eps)
real(8), intent (in) :: x
real(8), intent (in) :: eps
code = tan((x + eps)) - tan(x)
end function
public static double code(double x, double eps) {
return Math.tan((x + eps)) - Math.tan(x);
}
def code(x, eps): return math.tan((x + eps)) - math.tan(x)
function code(x, eps) return Float64(tan(Float64(x + eps)) - tan(x)) end
function tmp = code(x, eps) tmp = tan((x + eps)) - tan(x); end
code[x_, eps_] := N[(N[Tan[N[(x + eps), $MachinePrecision]], $MachinePrecision] - N[Tan[x], $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\tan \left(x + \varepsilon\right) - \tan x
\end{array}
Sampling outcomes in binary64 precision:
Herbie found 8 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (x eps) :precision binary64 (- (tan (+ x eps)) (tan x)))
double code(double x, double eps) {
return tan((x + eps)) - tan(x);
}
real(8) function code(x, eps)
real(8), intent (in) :: x
real(8), intent (in) :: eps
code = tan((x + eps)) - tan(x)
end function
public static double code(double x, double eps) {
return Math.tan((x + eps)) - Math.tan(x);
}
def code(x, eps): return math.tan((x + eps)) - math.tan(x)
function code(x, eps) return Float64(tan(Float64(x + eps)) - tan(x)) end
function tmp = code(x, eps) tmp = tan((x + eps)) - tan(x); end
code[x_, eps_] := N[(N[Tan[N[(x + eps), $MachinePrecision]], $MachinePrecision] - N[Tan[x], $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\tan \left(x + \varepsilon\right) - \tan x
\end{array}
(FPCore (x eps)
:precision binary64
(let* ((t_0 (/ (pow (sin x) 2.0) (pow (cos x) 2.0))))
(+
(* (pow eps 2.0) (+ (tan x) (pow (tan x) 3.0)))
(+
(* eps (+ 1.0 t_0))
(*
(pow eps 3.0)
(+
0.3333333333333333
(+
t_0
(-
(/ (pow (sin x) 4.0) (pow (cos x) 4.0))
(* t_0 -0.3333333333333333)))))))))
double code(double x, double eps) {
double t_0 = pow(sin(x), 2.0) / pow(cos(x), 2.0);
return (pow(eps, 2.0) * (tan(x) + pow(tan(x), 3.0))) + ((eps * (1.0 + t_0)) + (pow(eps, 3.0) * (0.3333333333333333 + (t_0 + ((pow(sin(x), 4.0) / pow(cos(x), 4.0)) - (t_0 * -0.3333333333333333))))));
}
real(8) function code(x, eps)
real(8), intent (in) :: x
real(8), intent (in) :: eps
real(8) :: t_0
t_0 = (sin(x) ** 2.0d0) / (cos(x) ** 2.0d0)
code = ((eps ** 2.0d0) * (tan(x) + (tan(x) ** 3.0d0))) + ((eps * (1.0d0 + t_0)) + ((eps ** 3.0d0) * (0.3333333333333333d0 + (t_0 + (((sin(x) ** 4.0d0) / (cos(x) ** 4.0d0)) - (t_0 * (-0.3333333333333333d0)))))))
end function
public static double code(double x, double eps) {
double t_0 = Math.pow(Math.sin(x), 2.0) / Math.pow(Math.cos(x), 2.0);
return (Math.pow(eps, 2.0) * (Math.tan(x) + Math.pow(Math.tan(x), 3.0))) + ((eps * (1.0 + t_0)) + (Math.pow(eps, 3.0) * (0.3333333333333333 + (t_0 + ((Math.pow(Math.sin(x), 4.0) / Math.pow(Math.cos(x), 4.0)) - (t_0 * -0.3333333333333333))))));
}
def code(x, eps): t_0 = math.pow(math.sin(x), 2.0) / math.pow(math.cos(x), 2.0) return (math.pow(eps, 2.0) * (math.tan(x) + math.pow(math.tan(x), 3.0))) + ((eps * (1.0 + t_0)) + (math.pow(eps, 3.0) * (0.3333333333333333 + (t_0 + ((math.pow(math.sin(x), 4.0) / math.pow(math.cos(x), 4.0)) - (t_0 * -0.3333333333333333))))))
function code(x, eps) t_0 = Float64((sin(x) ^ 2.0) / (cos(x) ^ 2.0)) return Float64(Float64((eps ^ 2.0) * Float64(tan(x) + (tan(x) ^ 3.0))) + Float64(Float64(eps * Float64(1.0 + t_0)) + Float64((eps ^ 3.0) * Float64(0.3333333333333333 + Float64(t_0 + Float64(Float64((sin(x) ^ 4.0) / (cos(x) ^ 4.0)) - Float64(t_0 * -0.3333333333333333))))))) end
function tmp = code(x, eps) t_0 = (sin(x) ^ 2.0) / (cos(x) ^ 2.0); tmp = ((eps ^ 2.0) * (tan(x) + (tan(x) ^ 3.0))) + ((eps * (1.0 + t_0)) + ((eps ^ 3.0) * (0.3333333333333333 + (t_0 + (((sin(x) ^ 4.0) / (cos(x) ^ 4.0)) - (t_0 * -0.3333333333333333)))))); end
code[x_, eps_] := Block[{t$95$0 = N[(N[Power[N[Sin[x], $MachinePrecision], 2.0], $MachinePrecision] / N[Power[N[Cos[x], $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]}, N[(N[(N[Power[eps, 2.0], $MachinePrecision] * N[(N[Tan[x], $MachinePrecision] + N[Power[N[Tan[x], $MachinePrecision], 3.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(eps * N[(1.0 + t$95$0), $MachinePrecision]), $MachinePrecision] + N[(N[Power[eps, 3.0], $MachinePrecision] * N[(0.3333333333333333 + N[(t$95$0 + N[(N[(N[Power[N[Sin[x], $MachinePrecision], 4.0], $MachinePrecision] / N[Power[N[Cos[x], $MachinePrecision], 4.0], $MachinePrecision]), $MachinePrecision] - N[(t$95$0 * -0.3333333333333333), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{{\sin x}^{2}}{{\cos x}^{2}}\\
{\varepsilon}^{2} \cdot \left(\tan x + {\tan x}^{3}\right) + \left(\varepsilon \cdot \left(1 + t\_0\right) + {\varepsilon}^{3} \cdot \left(0.3333333333333333 + \left(t\_0 + \left(\frac{{\sin x}^{4}}{{\cos x}^{4}} - t\_0 \cdot -0.3333333333333333\right)\right)\right)\right)
\end{array}
\end{array}
Initial program 62.4%
tan-sum63.0%
div-inv63.0%
fma-neg63.0%
Applied egg-rr63.0%
Taylor expanded in eps around 0 99.2%
distribute-lft-in99.2%
tan-quot99.2%
neg-mul-199.2%
metadata-eval99.2%
add-cube-cbrt99.2%
pow399.2%
cbrt-div99.2%
unpow399.2%
add-cbrt-cube99.2%
unpow399.2%
add-cbrt-cube99.2%
tan-quot99.2%
Applied egg-rr99.2%
distribute-lft-out99.2%
cube-neg99.2%
unsub-neg99.2%
Simplified99.2%
Final simplification99.2%
(FPCore (x eps) :precision binary64 (+ (* (pow eps 2.0) (+ (tan x) (pow (tan x) 3.0))) (+ (* eps (+ 1.0 (/ (pow (sin x) 2.0) (pow (cos x) 2.0)))) (* (pow eps 3.0) 0.3333333333333333))))
double code(double x, double eps) {
return (pow(eps, 2.0) * (tan(x) + pow(tan(x), 3.0))) + ((eps * (1.0 + (pow(sin(x), 2.0) / pow(cos(x), 2.0)))) + (pow(eps, 3.0) * 0.3333333333333333));
}
real(8) function code(x, eps)
real(8), intent (in) :: x
real(8), intent (in) :: eps
code = ((eps ** 2.0d0) * (tan(x) + (tan(x) ** 3.0d0))) + ((eps * (1.0d0 + ((sin(x) ** 2.0d0) / (cos(x) ** 2.0d0)))) + ((eps ** 3.0d0) * 0.3333333333333333d0))
end function
public static double code(double x, double eps) {
return (Math.pow(eps, 2.0) * (Math.tan(x) + Math.pow(Math.tan(x), 3.0))) + ((eps * (1.0 + (Math.pow(Math.sin(x), 2.0) / Math.pow(Math.cos(x), 2.0)))) + (Math.pow(eps, 3.0) * 0.3333333333333333));
}
def code(x, eps): return (math.pow(eps, 2.0) * (math.tan(x) + math.pow(math.tan(x), 3.0))) + ((eps * (1.0 + (math.pow(math.sin(x), 2.0) / math.pow(math.cos(x), 2.0)))) + (math.pow(eps, 3.0) * 0.3333333333333333))
function code(x, eps) return Float64(Float64((eps ^ 2.0) * Float64(tan(x) + (tan(x) ^ 3.0))) + Float64(Float64(eps * Float64(1.0 + Float64((sin(x) ^ 2.0) / (cos(x) ^ 2.0)))) + Float64((eps ^ 3.0) * 0.3333333333333333))) end
function tmp = code(x, eps) tmp = ((eps ^ 2.0) * (tan(x) + (tan(x) ^ 3.0))) + ((eps * (1.0 + ((sin(x) ^ 2.0) / (cos(x) ^ 2.0)))) + ((eps ^ 3.0) * 0.3333333333333333)); end
code[x_, eps_] := N[(N[(N[Power[eps, 2.0], $MachinePrecision] * N[(N[Tan[x], $MachinePrecision] + N[Power[N[Tan[x], $MachinePrecision], 3.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(eps * N[(1.0 + N[(N[Power[N[Sin[x], $MachinePrecision], 2.0], $MachinePrecision] / N[Power[N[Cos[x], $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[Power[eps, 3.0], $MachinePrecision] * 0.3333333333333333), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
{\varepsilon}^{2} \cdot \left(\tan x + {\tan x}^{3}\right) + \left(\varepsilon \cdot \left(1 + \frac{{\sin x}^{2}}{{\cos x}^{2}}\right) + {\varepsilon}^{3} \cdot 0.3333333333333333\right)
\end{array}
Initial program 62.4%
tan-sum63.0%
div-inv63.0%
fma-neg63.0%
Applied egg-rr63.0%
Taylor expanded in eps around 0 99.2%
distribute-lft-in99.2%
tan-quot99.2%
neg-mul-199.2%
metadata-eval99.2%
add-cube-cbrt99.2%
pow399.2%
cbrt-div99.2%
unpow399.2%
add-cbrt-cube99.2%
unpow399.2%
add-cbrt-cube99.2%
tan-quot99.2%
Applied egg-rr99.2%
distribute-lft-out99.2%
cube-neg99.2%
unsub-neg99.2%
Simplified99.2%
Taylor expanded in x around 0 98.9%
Final simplification98.9%
(FPCore (x eps) :precision binary64 (let* ((t_0 (- (tan (+ eps x)) (tan x)))) (if (<= t_0 2e-14) eps (exp (log t_0)))))
double code(double x, double eps) {
double t_0 = tan((eps + x)) - tan(x);
double tmp;
if (t_0 <= 2e-14) {
tmp = eps;
} else {
tmp = exp(log(t_0));
}
return tmp;
}
real(8) function code(x, eps)
real(8), intent (in) :: x
real(8), intent (in) :: eps
real(8) :: t_0
real(8) :: tmp
t_0 = tan((eps + x)) - tan(x)
if (t_0 <= 2d-14) then
tmp = eps
else
tmp = exp(log(t_0))
end if
code = tmp
end function
public static double code(double x, double eps) {
double t_0 = Math.tan((eps + x)) - Math.tan(x);
double tmp;
if (t_0 <= 2e-14) {
tmp = eps;
} else {
tmp = Math.exp(Math.log(t_0));
}
return tmp;
}
def code(x, eps): t_0 = math.tan((eps + x)) - math.tan(x) tmp = 0 if t_0 <= 2e-14: tmp = eps else: tmp = math.exp(math.log(t_0)) return tmp
function code(x, eps) t_0 = Float64(tan(Float64(eps + x)) - tan(x)) tmp = 0.0 if (t_0 <= 2e-14) tmp = eps; else tmp = exp(log(t_0)); end return tmp end
function tmp_2 = code(x, eps) t_0 = tan((eps + x)) - tan(x); tmp = 0.0; if (t_0 <= 2e-14) tmp = eps; else tmp = exp(log(t_0)); end tmp_2 = tmp; end
code[x_, eps_] := Block[{t$95$0 = N[(N[Tan[N[(eps + x), $MachinePrecision]], $MachinePrecision] - N[Tan[x], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$0, 2e-14], eps, N[Exp[N[Log[t$95$0], $MachinePrecision]], $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \tan \left(\varepsilon + x\right) - \tan x\\
\mathbf{if}\;t\_0 \leq 2 \cdot 10^{-14}:\\
\;\;\;\;\varepsilon\\
\mathbf{else}:\\
\;\;\;\;e^{\log t\_0}\\
\end{array}
\end{array}
if (-.f64 (tan.f64 (+.f64 x eps)) (tan.f64 x)) < 2e-14Initial program 62.5%
Taylor expanded in x around 0 100.0%
Taylor expanded in eps around 0 100.0%
if 2e-14 < (-.f64 (tan.f64 (+.f64 x eps)) (tan.f64 x)) Initial program 61.8%
add-exp-log61.9%
Applied egg-rr61.9%
Final simplification97.7%
(FPCore (x eps) :precision binary64 (if (<= (- (tan (+ eps x)) (tan x)) 2e-14) eps (- (/ 1.0 (/ (cos (+ eps x)) (sin (+ eps x)))) (tan x))))
double code(double x, double eps) {
double tmp;
if ((tan((eps + x)) - tan(x)) <= 2e-14) {
tmp = eps;
} else {
tmp = (1.0 / (cos((eps + x)) / sin((eps + x)))) - tan(x);
}
return tmp;
}
real(8) function code(x, eps)
real(8), intent (in) :: x
real(8), intent (in) :: eps
real(8) :: tmp
if ((tan((eps + x)) - tan(x)) <= 2d-14) then
tmp = eps
else
tmp = (1.0d0 / (cos((eps + x)) / sin((eps + x)))) - tan(x)
end if
code = tmp
end function
public static double code(double x, double eps) {
double tmp;
if ((Math.tan((eps + x)) - Math.tan(x)) <= 2e-14) {
tmp = eps;
} else {
tmp = (1.0 / (Math.cos((eps + x)) / Math.sin((eps + x)))) - Math.tan(x);
}
return tmp;
}
def code(x, eps): tmp = 0 if (math.tan((eps + x)) - math.tan(x)) <= 2e-14: tmp = eps else: tmp = (1.0 / (math.cos((eps + x)) / math.sin((eps + x)))) - math.tan(x) return tmp
function code(x, eps) tmp = 0.0 if (Float64(tan(Float64(eps + x)) - tan(x)) <= 2e-14) tmp = eps; else tmp = Float64(Float64(1.0 / Float64(cos(Float64(eps + x)) / sin(Float64(eps + x)))) - tan(x)); end return tmp end
function tmp_2 = code(x, eps) tmp = 0.0; if ((tan((eps + x)) - tan(x)) <= 2e-14) tmp = eps; else tmp = (1.0 / (cos((eps + x)) / sin((eps + x)))) - tan(x); end tmp_2 = tmp; end
code[x_, eps_] := If[LessEqual[N[(N[Tan[N[(eps + x), $MachinePrecision]], $MachinePrecision] - N[Tan[x], $MachinePrecision]), $MachinePrecision], 2e-14], eps, N[(N[(1.0 / N[(N[Cos[N[(eps + x), $MachinePrecision]], $MachinePrecision] / N[Sin[N[(eps + x), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[Tan[x], $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;\tan \left(\varepsilon + x\right) - \tan x \leq 2 \cdot 10^{-14}:\\
\;\;\;\;\varepsilon\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\frac{\cos \left(\varepsilon + x\right)}{\sin \left(\varepsilon + x\right)}} - \tan x\\
\end{array}
\end{array}
if (-.f64 (tan.f64 (+.f64 x eps)) (tan.f64 x)) < 2e-14Initial program 62.5%
Taylor expanded in x around 0 100.0%
Taylor expanded in eps around 0 100.0%
if 2e-14 < (-.f64 (tan.f64 (+.f64 x eps)) (tan.f64 x)) Initial program 61.8%
tan-quot61.8%
clear-num61.8%
Applied egg-rr61.8%
Final simplification97.7%
(FPCore (x eps) :precision binary64 (* eps (+ 1.0 (/ (pow (sin x) 2.0) (pow (cos x) 2.0)))))
double code(double x, double eps) {
return eps * (1.0 + (pow(sin(x), 2.0) / pow(cos(x), 2.0)));
}
real(8) function code(x, eps)
real(8), intent (in) :: x
real(8), intent (in) :: eps
code = eps * (1.0d0 + ((sin(x) ** 2.0d0) / (cos(x) ** 2.0d0)))
end function
public static double code(double x, double eps) {
return eps * (1.0 + (Math.pow(Math.sin(x), 2.0) / Math.pow(Math.cos(x), 2.0)));
}
def code(x, eps): return eps * (1.0 + (math.pow(math.sin(x), 2.0) / math.pow(math.cos(x), 2.0)))
function code(x, eps) return Float64(eps * Float64(1.0 + Float64((sin(x) ^ 2.0) / (cos(x) ^ 2.0)))) end
function tmp = code(x, eps) tmp = eps * (1.0 + ((sin(x) ^ 2.0) / (cos(x) ^ 2.0))); end
code[x_, eps_] := N[(eps * N[(1.0 + N[(N[Power[N[Sin[x], $MachinePrecision], 2.0], $MachinePrecision] / N[Power[N[Cos[x], $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\varepsilon \cdot \left(1 + \frac{{\sin x}^{2}}{{\cos x}^{2}}\right)
\end{array}
Initial program 62.4%
Taylor expanded in eps around 0 97.6%
cancel-sign-sub-inv97.6%
metadata-eval97.6%
*-lft-identity97.6%
Simplified97.6%
Final simplification97.6%
(FPCore (x eps) :precision binary64 (if (<= eps 2e-14) eps (- (tan (+ eps x)) (tan x))))
double code(double x, double eps) {
double tmp;
if (eps <= 2e-14) {
tmp = eps;
} else {
tmp = tan((eps + x)) - tan(x);
}
return tmp;
}
real(8) function code(x, eps)
real(8), intent (in) :: x
real(8), intent (in) :: eps
real(8) :: tmp
if (eps <= 2d-14) then
tmp = eps
else
tmp = tan((eps + x)) - tan(x)
end if
code = tmp
end function
public static double code(double x, double eps) {
double tmp;
if (eps <= 2e-14) {
tmp = eps;
} else {
tmp = Math.tan((eps + x)) - Math.tan(x);
}
return tmp;
}
def code(x, eps): tmp = 0 if eps <= 2e-14: tmp = eps else: tmp = math.tan((eps + x)) - math.tan(x) return tmp
function code(x, eps) tmp = 0.0 if (eps <= 2e-14) tmp = eps; else tmp = Float64(tan(Float64(eps + x)) - tan(x)); end return tmp end
function tmp_2 = code(x, eps) tmp = 0.0; if (eps <= 2e-14) tmp = eps; else tmp = tan((eps + x)) - tan(x); end tmp_2 = tmp; end
code[x_, eps_] := If[LessEqual[eps, 2e-14], eps, N[(N[Tan[N[(eps + x), $MachinePrecision]], $MachinePrecision] - N[Tan[x], $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;\varepsilon \leq 2 \cdot 10^{-14}:\\
\;\;\;\;\varepsilon\\
\mathbf{else}:\\
\;\;\;\;\tan \left(\varepsilon + x\right) - \tan x\\
\end{array}
\end{array}
if eps < 2e-14Initial program 62.5%
Taylor expanded in x around 0 100.0%
Taylor expanded in eps around 0 100.0%
if 2e-14 < eps Initial program 61.8%
Final simplification97.7%
(FPCore (x eps) :precision binary64 (tan eps))
double code(double x, double eps) {
return tan(eps);
}
real(8) function code(x, eps)
real(8), intent (in) :: x
real(8), intent (in) :: eps
code = tan(eps)
end function
public static double code(double x, double eps) {
return Math.tan(eps);
}
def code(x, eps): return math.tan(eps)
function code(x, eps) return tan(eps) end
function tmp = code(x, eps) tmp = tan(eps); end
code[x_, eps_] := N[Tan[eps], $MachinePrecision]
\begin{array}{l}
\\
\tan \varepsilon
\end{array}
Initial program 62.4%
Taylor expanded in x around 0 95.8%
tan-quot95.8%
*-un-lft-identity95.8%
Applied egg-rr95.8%
*-lft-identity95.8%
Simplified95.8%
Final simplification95.8%
(FPCore (x eps) :precision binary64 eps)
double code(double x, double eps) {
return eps;
}
real(8) function code(x, eps)
real(8), intent (in) :: x
real(8), intent (in) :: eps
code = eps
end function
public static double code(double x, double eps) {
return eps;
}
def code(x, eps): return eps
function code(x, eps) return eps end
function tmp = code(x, eps) tmp = eps; end
code[x_, eps_] := eps
\begin{array}{l}
\\
\varepsilon
\end{array}
Initial program 62.4%
Taylor expanded in x around 0 95.8%
Taylor expanded in eps around 0 95.8%
Final simplification95.8%
(FPCore (x eps) :precision binary64 (/ (sin eps) (* (cos x) (cos (+ x eps)))))
double code(double x, double eps) {
return sin(eps) / (cos(x) * cos((x + eps)));
}
real(8) function code(x, eps)
real(8), intent (in) :: x
real(8), intent (in) :: eps
code = sin(eps) / (cos(x) * cos((x + eps)))
end function
public static double code(double x, double eps) {
return Math.sin(eps) / (Math.cos(x) * Math.cos((x + eps)));
}
def code(x, eps): return math.sin(eps) / (math.cos(x) * math.cos((x + eps)))
function code(x, eps) return Float64(sin(eps) / Float64(cos(x) * cos(Float64(x + eps)))) end
function tmp = code(x, eps) tmp = sin(eps) / (cos(x) * cos((x + eps))); end
code[x_, eps_] := N[(N[Sin[eps], $MachinePrecision] / N[(N[Cos[x], $MachinePrecision] * N[Cos[N[(x + eps), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{\sin \varepsilon}{\cos x \cdot \cos \left(x + \varepsilon\right)}
\end{array}
herbie shell --seed 2024053
(FPCore (x eps)
:name "2tan (problem 3.3.2)"
:precision binary64
:pre (and (and (and (<= -10000.0 x) (<= x 10000.0)) (< (* 1e-16 (fabs x)) eps)) (< eps (fabs x)))
:alt
(/ (sin eps) (* (cos x) (cos (+ x eps))))
(- (tan (+ x eps)) (tan x)))