?

Average Error: 36.7 → 14.4
Time: 40.3s
Precision: binary64
Cost: 268744

?

\[\tan \left(x + \varepsilon\right) - \tan x \]
\[\begin{array}{l} t_0 := \frac{{\sin x}^{2}}{{\cos x}^{2}}\\ t_1 := t_0 - -1\\ t_2 := 0.16666666666666666 \cdot t_0 + \left(0.16666666666666666 + t_1 \cdot \left(-0.5 + \left(-t_0\right)\right)\right)\\ t_3 := \frac{\sin \varepsilon}{\cos \varepsilon}\\ \mathbf{if}\;\varepsilon \leq -0.23:\\ \;\;\;\;1 + \left(t_3 - 1\right)\\ \mathbf{elif}\;\varepsilon \leq 0.021:\\ \;\;\;\;t_1 \cdot \left(\varepsilon + \frac{\sin x}{\cos x} \cdot {\varepsilon}^{2}\right) + \left(-\left({\varepsilon}^{3} \cdot t_2 + \left(\sin x \cdot \frac{t_2}{\cos x} + \left(\sin x \cdot \frac{t_1}{\cos x}\right) \cdot -0.3333333333333333\right) \cdot {\varepsilon}^{4}\right)\right)\\ \mathbf{else}:\\ \;\;\;\;t_3 - \tan x\\ \end{array} \]
(FPCore (x eps) :precision binary64 (- (tan (+ x eps)) (tan x)))
(FPCore (x eps)
 :precision binary64
 (let* ((t_0 (/ (pow (sin x) 2.0) (pow (cos x) 2.0)))
        (t_1 (- t_0 -1.0))
        (t_2
         (+
          (* 0.16666666666666666 t_0)
          (+ 0.16666666666666666 (* t_1 (+ -0.5 (- t_0))))))
        (t_3 (/ (sin eps) (cos eps))))
   (if (<= eps -0.23)
     (+ 1.0 (- t_3 1.0))
     (if (<= eps 0.021)
       (+
        (* t_1 (+ eps (* (/ (sin x) (cos x)) (pow eps 2.0))))
        (-
         (+
          (* (pow eps 3.0) t_2)
          (*
           (+
            (* (sin x) (/ t_2 (cos x)))
            (* (* (sin x) (/ t_1 (cos x))) -0.3333333333333333))
           (pow eps 4.0)))))
       (- t_3 (tan x))))))
double code(double x, double eps) {
	return tan((x + eps)) - tan(x);
}
double code(double x, double eps) {
	double t_0 = pow(sin(x), 2.0) / pow(cos(x), 2.0);
	double t_1 = t_0 - -1.0;
	double t_2 = (0.16666666666666666 * t_0) + (0.16666666666666666 + (t_1 * (-0.5 + -t_0)));
	double t_3 = sin(eps) / cos(eps);
	double tmp;
	if (eps <= -0.23) {
		tmp = 1.0 + (t_3 - 1.0);
	} else if (eps <= 0.021) {
		tmp = (t_1 * (eps + ((sin(x) / cos(x)) * pow(eps, 2.0)))) + -((pow(eps, 3.0) * t_2) + (((sin(x) * (t_2 / cos(x))) + ((sin(x) * (t_1 / cos(x))) * -0.3333333333333333)) * pow(eps, 4.0)));
	} else {
		tmp = t_3 - tan(x);
	}
	return tmp;
}
real(8) function code(x, eps)
    real(8), intent (in) :: x
    real(8), intent (in) :: eps
    code = tan((x + eps)) - tan(x)
end function
real(8) function code(x, eps)
    real(8), intent (in) :: x
    real(8), intent (in) :: eps
    real(8) :: t_0
    real(8) :: t_1
    real(8) :: t_2
    real(8) :: t_3
    real(8) :: tmp
    t_0 = (sin(x) ** 2.0d0) / (cos(x) ** 2.0d0)
    t_1 = t_0 - (-1.0d0)
    t_2 = (0.16666666666666666d0 * t_0) + (0.16666666666666666d0 + (t_1 * ((-0.5d0) + -t_0)))
    t_3 = sin(eps) / cos(eps)
    if (eps <= (-0.23d0)) then
        tmp = 1.0d0 + (t_3 - 1.0d0)
    else if (eps <= 0.021d0) then
        tmp = (t_1 * (eps + ((sin(x) / cos(x)) * (eps ** 2.0d0)))) + -(((eps ** 3.0d0) * t_2) + (((sin(x) * (t_2 / cos(x))) + ((sin(x) * (t_1 / cos(x))) * (-0.3333333333333333d0))) * (eps ** 4.0d0)))
    else
        tmp = t_3 - tan(x)
    end if
    code = tmp
end function
public static double code(double x, double eps) {
	return Math.tan((x + eps)) - Math.tan(x);
}
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);
	double t_1 = t_0 - -1.0;
	double t_2 = (0.16666666666666666 * t_0) + (0.16666666666666666 + (t_1 * (-0.5 + -t_0)));
	double t_3 = Math.sin(eps) / Math.cos(eps);
	double tmp;
	if (eps <= -0.23) {
		tmp = 1.0 + (t_3 - 1.0);
	} else if (eps <= 0.021) {
		tmp = (t_1 * (eps + ((Math.sin(x) / Math.cos(x)) * Math.pow(eps, 2.0)))) + -((Math.pow(eps, 3.0) * t_2) + (((Math.sin(x) * (t_2 / Math.cos(x))) + ((Math.sin(x) * (t_1 / Math.cos(x))) * -0.3333333333333333)) * Math.pow(eps, 4.0)));
	} else {
		tmp = t_3 - Math.tan(x);
	}
	return tmp;
}
def code(x, eps):
	return math.tan((x + eps)) - math.tan(x)
def code(x, eps):
	t_0 = math.pow(math.sin(x), 2.0) / math.pow(math.cos(x), 2.0)
	t_1 = t_0 - -1.0
	t_2 = (0.16666666666666666 * t_0) + (0.16666666666666666 + (t_1 * (-0.5 + -t_0)))
	t_3 = math.sin(eps) / math.cos(eps)
	tmp = 0
	if eps <= -0.23:
		tmp = 1.0 + (t_3 - 1.0)
	elif eps <= 0.021:
		tmp = (t_1 * (eps + ((math.sin(x) / math.cos(x)) * math.pow(eps, 2.0)))) + -((math.pow(eps, 3.0) * t_2) + (((math.sin(x) * (t_2 / math.cos(x))) + ((math.sin(x) * (t_1 / math.cos(x))) * -0.3333333333333333)) * math.pow(eps, 4.0)))
	else:
		tmp = t_3 - math.tan(x)
	return tmp
function code(x, eps)
	return Float64(tan(Float64(x + eps)) - tan(x))
end
function code(x, eps)
	t_0 = Float64((sin(x) ^ 2.0) / (cos(x) ^ 2.0))
	t_1 = Float64(t_0 - -1.0)
	t_2 = Float64(Float64(0.16666666666666666 * t_0) + Float64(0.16666666666666666 + Float64(t_1 * Float64(-0.5 + Float64(-t_0)))))
	t_3 = Float64(sin(eps) / cos(eps))
	tmp = 0.0
	if (eps <= -0.23)
		tmp = Float64(1.0 + Float64(t_3 - 1.0));
	elseif (eps <= 0.021)
		tmp = Float64(Float64(t_1 * Float64(eps + Float64(Float64(sin(x) / cos(x)) * (eps ^ 2.0)))) + Float64(-Float64(Float64((eps ^ 3.0) * t_2) + Float64(Float64(Float64(sin(x) * Float64(t_2 / cos(x))) + Float64(Float64(sin(x) * Float64(t_1 / cos(x))) * -0.3333333333333333)) * (eps ^ 4.0)))));
	else
		tmp = Float64(t_3 - tan(x));
	end
	return tmp
end
function tmp = code(x, eps)
	tmp = tan((x + eps)) - tan(x);
end
function tmp_2 = code(x, eps)
	t_0 = (sin(x) ^ 2.0) / (cos(x) ^ 2.0);
	t_1 = t_0 - -1.0;
	t_2 = (0.16666666666666666 * t_0) + (0.16666666666666666 + (t_1 * (-0.5 + -t_0)));
	t_3 = sin(eps) / cos(eps);
	tmp = 0.0;
	if (eps <= -0.23)
		tmp = 1.0 + (t_3 - 1.0);
	elseif (eps <= 0.021)
		tmp = (t_1 * (eps + ((sin(x) / cos(x)) * (eps ^ 2.0)))) + -(((eps ^ 3.0) * t_2) + (((sin(x) * (t_2 / cos(x))) + ((sin(x) * (t_1 / cos(x))) * -0.3333333333333333)) * (eps ^ 4.0)));
	else
		tmp = t_3 - tan(x);
	end
	tmp_2 = 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[Power[N[Sin[x], $MachinePrecision], 2.0], $MachinePrecision] / N[Power[N[Cos[x], $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(t$95$0 - -1.0), $MachinePrecision]}, Block[{t$95$2 = N[(N[(0.16666666666666666 * t$95$0), $MachinePrecision] + N[(0.16666666666666666 + N[(t$95$1 * N[(-0.5 + (-t$95$0)), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(N[Sin[eps], $MachinePrecision] / N[Cos[eps], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[eps, -0.23], N[(1.0 + N[(t$95$3 - 1.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[eps, 0.021], N[(N[(t$95$1 * N[(eps + N[(N[(N[Sin[x], $MachinePrecision] / N[Cos[x], $MachinePrecision]), $MachinePrecision] * N[Power[eps, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + (-N[(N[(N[Power[eps, 3.0], $MachinePrecision] * t$95$2), $MachinePrecision] + N[(N[(N[(N[Sin[x], $MachinePrecision] * N[(t$95$2 / N[Cos[x], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(N[Sin[x], $MachinePrecision] * N[(t$95$1 / N[Cos[x], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * -0.3333333333333333), $MachinePrecision]), $MachinePrecision] * N[Power[eps, 4.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision])), $MachinePrecision], N[(t$95$3 - N[Tan[x], $MachinePrecision]), $MachinePrecision]]]]]]]
\tan \left(x + \varepsilon\right) - \tan x
\begin{array}{l}
t_0 := \frac{{\sin x}^{2}}{{\cos x}^{2}}\\
t_1 := t_0 - -1\\
t_2 := 0.16666666666666666 \cdot t_0 + \left(0.16666666666666666 + t_1 \cdot \left(-0.5 + \left(-t_0\right)\right)\right)\\
t_3 := \frac{\sin \varepsilon}{\cos \varepsilon}\\
\mathbf{if}\;\varepsilon \leq -0.23:\\
\;\;\;\;1 + \left(t_3 - 1\right)\\

\mathbf{elif}\;\varepsilon \leq 0.021:\\
\;\;\;\;t_1 \cdot \left(\varepsilon + \frac{\sin x}{\cos x} \cdot {\varepsilon}^{2}\right) + \left(-\left({\varepsilon}^{3} \cdot t_2 + \left(\sin x \cdot \frac{t_2}{\cos x} + \left(\sin x \cdot \frac{t_1}{\cos x}\right) \cdot -0.3333333333333333\right) \cdot {\varepsilon}^{4}\right)\right)\\

\mathbf{else}:\\
\;\;\;\;t_3 - \tan x\\


\end{array}

Error?

Try it out?

Your Program's Arguments

Results

Enter valid numbers for all inputs

Target

Original36.7
Target15.1
Herbie14.4
\[\frac{\sin \varepsilon}{\cos x \cdot \cos \left(x + \varepsilon\right)} \]

Derivation?

  1. Split input into 3 regimes
  2. if eps < -0.23000000000000001

    1. Initial program 30.2

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

      \[\leadsto \color{blue}{1 + \left(\tan \left(x + \varepsilon\right) + \left(-1 - \tan x\right)\right)} \]
    3. Taylor expanded in x around 0 28.8

      \[\leadsto 1 + \color{blue}{\left(\frac{\sin \varepsilon}{\cos \varepsilon} - 1\right)} \]

    if -0.23000000000000001 < eps < 0.0210000000000000013

    1. Initial program 43.5

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

      \[\leadsto \color{blue}{\left(\tan \left(x + \varepsilon\right) + 1\right) + \left(-1 - \tan x\right)} \]
    3. Taylor expanded in eps around 0 0.4

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

      \[\leadsto \color{blue}{\left(\frac{{\sin x}^{2}}{{\cos x}^{2}} - -1\right) \cdot \left(\varepsilon + \frac{\sin x}{\cos x} \cdot {\varepsilon}^{2}\right) + \left(-\left({\varepsilon}^{3} \cdot \left(0.16666666666666666 \cdot \frac{{\sin x}^{2}}{{\cos x}^{2}} + \left(0.16666666666666666 + \left(\frac{{\sin x}^{2}}{{\cos x}^{2}} - -1\right) \cdot \left(-0.5 + \left(-\frac{{\sin x}^{2}}{{\cos x}^{2}}\right)\right)\right)\right) + \left(\sin x \cdot \frac{0.16666666666666666 \cdot \frac{{\sin x}^{2}}{{\cos x}^{2}} + \left(0.16666666666666666 + \left(\frac{{\sin x}^{2}}{{\cos x}^{2}} - -1\right) \cdot \left(-0.5 + \left(-\frac{{\sin x}^{2}}{{\cos x}^{2}}\right)\right)\right)}{\cos x} + \left(\sin x \cdot \frac{\frac{{\sin x}^{2}}{{\cos x}^{2}} - -1}{\cos x}\right) \cdot -0.3333333333333333\right) \cdot {\varepsilon}^{4}\right)\right)} \]
      Proof

      [Start]0.4

      \[ \varepsilon \cdot \left(1 - -1 \cdot \frac{{\sin x}^{2}}{{\cos x}^{2}}\right) + \left(\frac{{\varepsilon}^{2} \cdot \left(\sin x \cdot \left(1 - -1 \cdot \frac{{\sin x}^{2}}{{\cos x}^{2}}\right)\right)}{\cos x} + \left(-1 \cdot \left(\left(-0.5 \cdot \frac{\sin x \cdot \left(1 - -1 \cdot \frac{{\sin x}^{2}}{{\cos x}^{2}}\right)}{\cos x} + \left(\frac{\left(0.16666666666666666 \cdot \frac{{\sin x}^{2}}{{\cos x}^{2}} + \left(0.16666666666666666 + \left(-1 \cdot \frac{{\sin x}^{2} \cdot \left(1 - -1 \cdot \frac{{\sin x}^{2}}{{\cos x}^{2}}\right)}{{\cos x}^{2}} + -0.5 \cdot \left(1 - -1 \cdot \frac{{\sin x}^{2}}{{\cos x}^{2}}\right)\right)\right)\right) \cdot \sin x}{\cos x} + 0.16666666666666666 \cdot \frac{\sin x \cdot \left(1 - -1 \cdot \frac{{\sin x}^{2}}{{\cos x}^{2}}\right)}{\cos x}\right)\right) \cdot {\varepsilon}^{4}\right) + -1 \cdot \left({\varepsilon}^{3} \cdot \left(0.16666666666666666 \cdot \frac{{\sin x}^{2}}{{\cos x}^{2}} + \left(0.16666666666666666 + \left(-1 \cdot \frac{{\sin x}^{2} \cdot \left(1 - -1 \cdot \frac{{\sin x}^{2}}{{\cos x}^{2}}\right)}{{\cos x}^{2}} + -0.5 \cdot \left(1 - -1 \cdot \frac{{\sin x}^{2}}{{\cos x}^{2}}\right)\right)\right)\right)\right)\right)\right) \]

    if 0.0210000000000000013 < eps

    1. Initial program 29.4

      \[\tan \left(x + \varepsilon\right) - \tan x \]
    2. Taylor expanded in x around 0 28.2

      \[\leadsto \color{blue}{\frac{\sin \varepsilon}{\cos \varepsilon}} - \tan x \]
  3. Recombined 3 regimes into one program.
  4. Final simplification14.4

    \[\leadsto \begin{array}{l} \mathbf{if}\;\varepsilon \leq -0.23:\\ \;\;\;\;1 + \left(\frac{\sin \varepsilon}{\cos \varepsilon} - 1\right)\\ \mathbf{elif}\;\varepsilon \leq 0.021:\\ \;\;\;\;\left(\frac{{\sin x}^{2}}{{\cos x}^{2}} - -1\right) \cdot \left(\varepsilon + \frac{\sin x}{\cos x} \cdot {\varepsilon}^{2}\right) + \left(-\left({\varepsilon}^{3} \cdot \left(0.16666666666666666 \cdot \frac{{\sin x}^{2}}{{\cos x}^{2}} + \left(0.16666666666666666 + \left(\frac{{\sin x}^{2}}{{\cos x}^{2}} - -1\right) \cdot \left(-0.5 + \left(-\frac{{\sin x}^{2}}{{\cos x}^{2}}\right)\right)\right)\right) + \left(\sin x \cdot \frac{0.16666666666666666 \cdot \frac{{\sin x}^{2}}{{\cos x}^{2}} + \left(0.16666666666666666 + \left(\frac{{\sin x}^{2}}{{\cos x}^{2}} - -1\right) \cdot \left(-0.5 + \left(-\frac{{\sin x}^{2}}{{\cos x}^{2}}\right)\right)\right)}{\cos x} + \left(\sin x \cdot \frac{\frac{{\sin x}^{2}}{{\cos x}^{2}} - -1}{\cos x}\right) \cdot -0.3333333333333333\right) \cdot {\varepsilon}^{4}\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\frac{\sin \varepsilon}{\cos \varepsilon} - \tan x\\ \end{array} \]

Alternatives

Alternative 1
Error14.4
Cost131272
\[\begin{array}{l} t_0 := \frac{{\sin x}^{2}}{{\cos x}^{2}}\\ t_1 := t_0 - -1\\ t_2 := \frac{\sin \varepsilon}{\cos \varepsilon}\\ \mathbf{if}\;\varepsilon \leq -0.23:\\ \;\;\;\;1 + \left(t_2 - 1\right)\\ \mathbf{elif}\;\varepsilon \leq 0.0085:\\ \;\;\;\;t_1 \cdot \left(\varepsilon + \frac{\sin x}{\cos x} \cdot {\varepsilon}^{2}\right) + \left(0.16666666666666666 \cdot t_0 + \left(0.16666666666666666 + t_1 \cdot \left(-0.5 + \left(-t_0\right)\right)\right)\right) \cdot \left(-{\varepsilon}^{3}\right)\\ \mathbf{else}:\\ \;\;\;\;t_2 - \tan x\\ \end{array} \]
Alternative 2
Error14.6
Cost72200
\[\begin{array}{l} t_0 := \frac{{\sin x}^{2}}{{\cos x}^{2}} - -1\\ t_1 := \frac{\sin \varepsilon}{\cos \varepsilon} - \tan x\\ \mathbf{if}\;\varepsilon \leq -1.9 \cdot 10^{-8}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;\varepsilon \leq 4.4 \cdot 10^{-5}:\\ \;\;\;\;\varepsilon \cdot t_0 + \frac{\sin x}{\cos x} \cdot \left(t_0 \cdot {\varepsilon}^{2}\right)\\ \mathbf{else}:\\ \;\;\;\;t_1\\ \end{array} \]
Alternative 3
Error14.6
Cost46088
\[\begin{array}{l} t_0 := \frac{\sin \varepsilon}{\cos \varepsilon} - \tan x\\ \mathbf{if}\;\varepsilon \leq -1.9 \cdot 10^{-8}:\\ \;\;\;\;t_0\\ \mathbf{elif}\;\varepsilon \leq 9.2 \cdot 10^{-5}:\\ \;\;\;\;\left(1 + \frac{{\sin x}^{2}}{{\cos x}^{2}}\right) \cdot \left(\varepsilon + {\varepsilon}^{2} \cdot \frac{\sin x}{\cos x}\right)\\ \mathbf{else}:\\ \;\;\;\;t_0\\ \end{array} \]
Alternative 4
Error14.7
Cost26440
\[\begin{array}{l} t_0 := \frac{\sin \varepsilon}{\cos \varepsilon} - \tan x\\ \mathbf{if}\;\varepsilon \leq -1.9 \cdot 10^{-8}:\\ \;\;\;\;t_0\\ \mathbf{elif}\;\varepsilon \leq 6 \cdot 10^{-5}:\\ \;\;\;\;\varepsilon \cdot \left(\frac{{\sin x}^{2}}{{\cos x}^{2}} - -1\right)\\ \mathbf{else}:\\ \;\;\;\;t_0\\ \end{array} \]
Alternative 5
Error26.9
Cost12992
\[\frac{\sin \varepsilon}{\cos \varepsilon} \]
Alternative 6
Error28.9
Cost7240
\[\begin{array}{l} t_0 := 1 + \left(\tan \left(x + \varepsilon\right) + \left(-1 - x\right)\right)\\ \mathbf{if}\;\varepsilon \leq -0.23:\\ \;\;\;\;t_0\\ \mathbf{elif}\;\varepsilon \leq 0.00136:\\ \;\;\;\;\varepsilon + 0.3333333333333333 \cdot {\varepsilon}^{3}\\ \mathbf{else}:\\ \;\;\;\;t_0\\ \end{array} \]
Alternative 7
Error41.3
Cost6592
\[\frac{\sin \varepsilon}{1} \]
Alternative 8
Error43.7
Cost64
\[\varepsilon \]

Error

Reproduce?

herbie shell --seed 2023073 
(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)))