Average Error: 47.4 → 6.9
Time: 34.4s
Precision: binary64
Cost: 21148
\[\frac{2}{\left(\left(\frac{{t}^{3}}{\ell \cdot \ell} \cdot \sin k\right) \cdot \tan k\right) \cdot \left(\left(1 + {\left(\frac{k}{t}\right)}^{2}\right) - 1\right)} \]
\[\begin{array}{l} t_1 := {\sin k}^{2}\\ t_2 := \cos k \cdot {\sin k}^{-2}\\ \mathbf{if}\;\ell \leq -1 \cdot 10^{+204}:\\ \;\;\;\;\ell \cdot \left(2 \cdot \frac{\frac{\ell}{k} \cdot \frac{\cos k}{t \cdot \left(0.5 + \cos \left(k + k\right) \cdot -0.5\right)}}{k}\right)\\ \mathbf{elif}\;\ell \leq -1 \cdot 10^{-70}:\\ \;\;\;\;\frac{\left(\ell \cdot 2\right) \cdot \frac{\ell}{k}}{\left(t \cdot t_1\right) \cdot \frac{k}{\cos k}}\\ \mathbf{elif}\;\ell \leq -6.2120009789235366 \cdot 10^{-164}:\\ \;\;\;\;\frac{\left(\ell \cdot 2\right) \cdot t_2}{k \cdot \left(k \cdot \frac{t}{\ell}\right)}\\ \mathbf{elif}\;\ell \leq -1.2702272780502075 \cdot 10^{-242}:\\ \;\;\;\;\ell \cdot \left(2 \cdot \frac{\frac{\ell}{k} \cdot \frac{\cos k}{k \cdot \left(t \cdot k\right)}}{k}\right)\\ \mathbf{elif}\;\ell \leq -1.1647704497195727 \cdot 10^{-268}:\\ \;\;\;\;\frac{\ell \cdot \frac{2}{t}}{k \cdot k} \cdot \frac{\ell}{k \cdot k}\\ \mathbf{elif}\;\ell \leq 3.135246037673392 \cdot 10^{-306}:\\ \;\;\;\;\frac{\left(\ell \cdot 2\right) \cdot \left(\frac{\frac{\ell}{k}}{t_1} \cdot \frac{\cos k}{t}\right)}{k}\\ \mathbf{elif}\;\ell \leq 1.3180425805095456 \cdot 10^{-230}:\\ \;\;\;\;2 \cdot \frac{{\left(\frac{\sqrt{\ell}}{k}\right)}^{4}}{t}\\ \mathbf{else}:\\ \;\;\;\;\ell \cdot \left(2 \cdot \frac{t_2}{\frac{k}{\frac{\frac{\ell}{k}}{t}}}\right)\\ \end{array} \]
(FPCore (t l k)
 :precision binary64
 (/
  2.0
  (*
   (* (* (/ (pow t 3.0) (* l l)) (sin k)) (tan k))
   (- (+ 1.0 (pow (/ k t) 2.0)) 1.0))))
(FPCore (t l k)
 :precision binary64
 (let* ((t_1 (pow (sin k) 2.0)) (t_2 (* (cos k) (pow (sin k) -2.0))))
   (if (<= l -1e+204)
     (*
      l
      (*
       2.0
       (/ (* (/ l k) (/ (cos k) (* t (+ 0.5 (* (cos (+ k k)) -0.5))))) k)))
     (if (<= l -1e-70)
       (/ (* (* l 2.0) (/ l k)) (* (* t t_1) (/ k (cos k))))
       (if (<= l -6.2120009789235366e-164)
         (/ (* (* l 2.0) t_2) (* k (* k (/ t l))))
         (if (<= l -1.2702272780502075e-242)
           (* l (* 2.0 (/ (* (/ l k) (/ (cos k) (* k (* t k)))) k)))
           (if (<= l -1.1647704497195727e-268)
             (* (/ (* l (/ 2.0 t)) (* k k)) (/ l (* k k)))
             (if (<= l 3.135246037673392e-306)
               (/ (* (* l 2.0) (* (/ (/ l k) t_1) (/ (cos k) t))) k)
               (if (<= l 1.3180425805095456e-230)
                 (* 2.0 (/ (pow (/ (sqrt l) k) 4.0) t))
                 (* l (* 2.0 (/ t_2 (/ k (/ (/ l k) t))))))))))))))
double code(double t, double l, double k) {
	return 2.0 / ((((pow(t, 3.0) / (l * l)) * sin(k)) * tan(k)) * ((1.0 + pow((k / t), 2.0)) - 1.0));
}
double code(double t, double l, double k) {
	double t_1 = pow(sin(k), 2.0);
	double t_2 = cos(k) * pow(sin(k), -2.0);
	double tmp;
	if (l <= -1e+204) {
		tmp = l * (2.0 * (((l / k) * (cos(k) / (t * (0.5 + (cos((k + k)) * -0.5))))) / k));
	} else if (l <= -1e-70) {
		tmp = ((l * 2.0) * (l / k)) / ((t * t_1) * (k / cos(k)));
	} else if (l <= -6.2120009789235366e-164) {
		tmp = ((l * 2.0) * t_2) / (k * (k * (t / l)));
	} else if (l <= -1.2702272780502075e-242) {
		tmp = l * (2.0 * (((l / k) * (cos(k) / (k * (t * k)))) / k));
	} else if (l <= -1.1647704497195727e-268) {
		tmp = ((l * (2.0 / t)) / (k * k)) * (l / (k * k));
	} else if (l <= 3.135246037673392e-306) {
		tmp = ((l * 2.0) * (((l / k) / t_1) * (cos(k) / t))) / k;
	} else if (l <= 1.3180425805095456e-230) {
		tmp = 2.0 * (pow((sqrt(l) / k), 4.0) / t);
	} else {
		tmp = l * (2.0 * (t_2 / (k / ((l / k) / t))));
	}
	return tmp;
}
real(8) function code(t, l, k)
    real(8), intent (in) :: t
    real(8), intent (in) :: l
    real(8), intent (in) :: k
    code = 2.0d0 / (((((t ** 3.0d0) / (l * l)) * sin(k)) * tan(k)) * ((1.0d0 + ((k / t) ** 2.0d0)) - 1.0d0))
end function
real(8) function code(t, l, k)
    real(8), intent (in) :: t
    real(8), intent (in) :: l
    real(8), intent (in) :: k
    real(8) :: t_1
    real(8) :: t_2
    real(8) :: tmp
    t_1 = sin(k) ** 2.0d0
    t_2 = cos(k) * (sin(k) ** (-2.0d0))
    if (l <= (-1d+204)) then
        tmp = l * (2.0d0 * (((l / k) * (cos(k) / (t * (0.5d0 + (cos((k + k)) * (-0.5d0)))))) / k))
    else if (l <= (-1d-70)) then
        tmp = ((l * 2.0d0) * (l / k)) / ((t * t_1) * (k / cos(k)))
    else if (l <= (-6.2120009789235366d-164)) then
        tmp = ((l * 2.0d0) * t_2) / (k * (k * (t / l)))
    else if (l <= (-1.2702272780502075d-242)) then
        tmp = l * (2.0d0 * (((l / k) * (cos(k) / (k * (t * k)))) / k))
    else if (l <= (-1.1647704497195727d-268)) then
        tmp = ((l * (2.0d0 / t)) / (k * k)) * (l / (k * k))
    else if (l <= 3.135246037673392d-306) then
        tmp = ((l * 2.0d0) * (((l / k) / t_1) * (cos(k) / t))) / k
    else if (l <= 1.3180425805095456d-230) then
        tmp = 2.0d0 * (((sqrt(l) / k) ** 4.0d0) / t)
    else
        tmp = l * (2.0d0 * (t_2 / (k / ((l / k) / t))))
    end if
    code = tmp
end function
public static double code(double t, double l, double k) {
	return 2.0 / ((((Math.pow(t, 3.0) / (l * l)) * Math.sin(k)) * Math.tan(k)) * ((1.0 + Math.pow((k / t), 2.0)) - 1.0));
}
public static double code(double t, double l, double k) {
	double t_1 = Math.pow(Math.sin(k), 2.0);
	double t_2 = Math.cos(k) * Math.pow(Math.sin(k), -2.0);
	double tmp;
	if (l <= -1e+204) {
		tmp = l * (2.0 * (((l / k) * (Math.cos(k) / (t * (0.5 + (Math.cos((k + k)) * -0.5))))) / k));
	} else if (l <= -1e-70) {
		tmp = ((l * 2.0) * (l / k)) / ((t * t_1) * (k / Math.cos(k)));
	} else if (l <= -6.2120009789235366e-164) {
		tmp = ((l * 2.0) * t_2) / (k * (k * (t / l)));
	} else if (l <= -1.2702272780502075e-242) {
		tmp = l * (2.0 * (((l / k) * (Math.cos(k) / (k * (t * k)))) / k));
	} else if (l <= -1.1647704497195727e-268) {
		tmp = ((l * (2.0 / t)) / (k * k)) * (l / (k * k));
	} else if (l <= 3.135246037673392e-306) {
		tmp = ((l * 2.0) * (((l / k) / t_1) * (Math.cos(k) / t))) / k;
	} else if (l <= 1.3180425805095456e-230) {
		tmp = 2.0 * (Math.pow((Math.sqrt(l) / k), 4.0) / t);
	} else {
		tmp = l * (2.0 * (t_2 / (k / ((l / k) / t))));
	}
	return tmp;
}
def code(t, l, k):
	return 2.0 / ((((math.pow(t, 3.0) / (l * l)) * math.sin(k)) * math.tan(k)) * ((1.0 + math.pow((k / t), 2.0)) - 1.0))
def code(t, l, k):
	t_1 = math.pow(math.sin(k), 2.0)
	t_2 = math.cos(k) * math.pow(math.sin(k), -2.0)
	tmp = 0
	if l <= -1e+204:
		tmp = l * (2.0 * (((l / k) * (math.cos(k) / (t * (0.5 + (math.cos((k + k)) * -0.5))))) / k))
	elif l <= -1e-70:
		tmp = ((l * 2.0) * (l / k)) / ((t * t_1) * (k / math.cos(k)))
	elif l <= -6.2120009789235366e-164:
		tmp = ((l * 2.0) * t_2) / (k * (k * (t / l)))
	elif l <= -1.2702272780502075e-242:
		tmp = l * (2.0 * (((l / k) * (math.cos(k) / (k * (t * k)))) / k))
	elif l <= -1.1647704497195727e-268:
		tmp = ((l * (2.0 / t)) / (k * k)) * (l / (k * k))
	elif l <= 3.135246037673392e-306:
		tmp = ((l * 2.0) * (((l / k) / t_1) * (math.cos(k) / t))) / k
	elif l <= 1.3180425805095456e-230:
		tmp = 2.0 * (math.pow((math.sqrt(l) / k), 4.0) / t)
	else:
		tmp = l * (2.0 * (t_2 / (k / ((l / k) / t))))
	return tmp
function code(t, l, k)
	return Float64(2.0 / Float64(Float64(Float64(Float64((t ^ 3.0) / Float64(l * l)) * sin(k)) * tan(k)) * Float64(Float64(1.0 + (Float64(k / t) ^ 2.0)) - 1.0)))
end
function code(t, l, k)
	t_1 = sin(k) ^ 2.0
	t_2 = Float64(cos(k) * (sin(k) ^ -2.0))
	tmp = 0.0
	if (l <= -1e+204)
		tmp = Float64(l * Float64(2.0 * Float64(Float64(Float64(l / k) * Float64(cos(k) / Float64(t * Float64(0.5 + Float64(cos(Float64(k + k)) * -0.5))))) / k)));
	elseif (l <= -1e-70)
		tmp = Float64(Float64(Float64(l * 2.0) * Float64(l / k)) / Float64(Float64(t * t_1) * Float64(k / cos(k))));
	elseif (l <= -6.2120009789235366e-164)
		tmp = Float64(Float64(Float64(l * 2.0) * t_2) / Float64(k * Float64(k * Float64(t / l))));
	elseif (l <= -1.2702272780502075e-242)
		tmp = Float64(l * Float64(2.0 * Float64(Float64(Float64(l / k) * Float64(cos(k) / Float64(k * Float64(t * k)))) / k)));
	elseif (l <= -1.1647704497195727e-268)
		tmp = Float64(Float64(Float64(l * Float64(2.0 / t)) / Float64(k * k)) * Float64(l / Float64(k * k)));
	elseif (l <= 3.135246037673392e-306)
		tmp = Float64(Float64(Float64(l * 2.0) * Float64(Float64(Float64(l / k) / t_1) * Float64(cos(k) / t))) / k);
	elseif (l <= 1.3180425805095456e-230)
		tmp = Float64(2.0 * Float64((Float64(sqrt(l) / k) ^ 4.0) / t));
	else
		tmp = Float64(l * Float64(2.0 * Float64(t_2 / Float64(k / Float64(Float64(l / k) / t)))));
	end
	return tmp
end
function tmp = code(t, l, k)
	tmp = 2.0 / (((((t ^ 3.0) / (l * l)) * sin(k)) * tan(k)) * ((1.0 + ((k / t) ^ 2.0)) - 1.0));
end
function tmp_2 = code(t, l, k)
	t_1 = sin(k) ^ 2.0;
	t_2 = cos(k) * (sin(k) ^ -2.0);
	tmp = 0.0;
	if (l <= -1e+204)
		tmp = l * (2.0 * (((l / k) * (cos(k) / (t * (0.5 + (cos((k + k)) * -0.5))))) / k));
	elseif (l <= -1e-70)
		tmp = ((l * 2.0) * (l / k)) / ((t * t_1) * (k / cos(k)));
	elseif (l <= -6.2120009789235366e-164)
		tmp = ((l * 2.0) * t_2) / (k * (k * (t / l)));
	elseif (l <= -1.2702272780502075e-242)
		tmp = l * (2.0 * (((l / k) * (cos(k) / (k * (t * k)))) / k));
	elseif (l <= -1.1647704497195727e-268)
		tmp = ((l * (2.0 / t)) / (k * k)) * (l / (k * k));
	elseif (l <= 3.135246037673392e-306)
		tmp = ((l * 2.0) * (((l / k) / t_1) * (cos(k) / t))) / k;
	elseif (l <= 1.3180425805095456e-230)
		tmp = 2.0 * (((sqrt(l) / k) ^ 4.0) / t);
	else
		tmp = l * (2.0 * (t_2 / (k / ((l / k) / t))));
	end
	tmp_2 = tmp;
end
code[t_, l_, k_] := N[(2.0 / N[(N[(N[(N[(N[Power[t, 3.0], $MachinePrecision] / N[(l * l), $MachinePrecision]), $MachinePrecision] * N[Sin[k], $MachinePrecision]), $MachinePrecision] * N[Tan[k], $MachinePrecision]), $MachinePrecision] * N[(N[(1.0 + N[Power[N[(k / t), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision] - 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
code[t_, l_, k_] := Block[{t$95$1 = N[Power[N[Sin[k], $MachinePrecision], 2.0], $MachinePrecision]}, Block[{t$95$2 = N[(N[Cos[k], $MachinePrecision] * N[Power[N[Sin[k], $MachinePrecision], -2.0], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[l, -1e+204], N[(l * N[(2.0 * N[(N[(N[(l / k), $MachinePrecision] * N[(N[Cos[k], $MachinePrecision] / N[(t * N[(0.5 + N[(N[Cos[N[(k + k), $MachinePrecision]], $MachinePrecision] * -0.5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[l, -1e-70], N[(N[(N[(l * 2.0), $MachinePrecision] * N[(l / k), $MachinePrecision]), $MachinePrecision] / N[(N[(t * t$95$1), $MachinePrecision] * N[(k / N[Cos[k], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[l, -6.2120009789235366e-164], N[(N[(N[(l * 2.0), $MachinePrecision] * t$95$2), $MachinePrecision] / N[(k * N[(k * N[(t / l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[l, -1.2702272780502075e-242], N[(l * N[(2.0 * N[(N[(N[(l / k), $MachinePrecision] * N[(N[Cos[k], $MachinePrecision] / N[(k * N[(t * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[l, -1.1647704497195727e-268], N[(N[(N[(l * N[(2.0 / t), $MachinePrecision]), $MachinePrecision] / N[(k * k), $MachinePrecision]), $MachinePrecision] * N[(l / N[(k * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[l, 3.135246037673392e-306], N[(N[(N[(l * 2.0), $MachinePrecision] * N[(N[(N[(l / k), $MachinePrecision] / t$95$1), $MachinePrecision] * N[(N[Cos[k], $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / k), $MachinePrecision], If[LessEqual[l, 1.3180425805095456e-230], N[(2.0 * N[(N[Power[N[(N[Sqrt[l], $MachinePrecision] / k), $MachinePrecision], 4.0], $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision], N[(l * N[(2.0 * N[(t$95$2 / N[(k / N[(N[(l / k), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]]]]]
\frac{2}{\left(\left(\frac{{t}^{3}}{\ell \cdot \ell} \cdot \sin k\right) \cdot \tan k\right) \cdot \left(\left(1 + {\left(\frac{k}{t}\right)}^{2}\right) - 1\right)}
\begin{array}{l}
t_1 := {\sin k}^{2}\\
t_2 := \cos k \cdot {\sin k}^{-2}\\
\mathbf{if}\;\ell \leq -1 \cdot 10^{+204}:\\
\;\;\;\;\ell \cdot \left(2 \cdot \frac{\frac{\ell}{k} \cdot \frac{\cos k}{t \cdot \left(0.5 + \cos \left(k + k\right) \cdot -0.5\right)}}{k}\right)\\

\mathbf{elif}\;\ell \leq -1 \cdot 10^{-70}:\\
\;\;\;\;\frac{\left(\ell \cdot 2\right) \cdot \frac{\ell}{k}}{\left(t \cdot t_1\right) \cdot \frac{k}{\cos k}}\\

\mathbf{elif}\;\ell \leq -6.2120009789235366 \cdot 10^{-164}:\\
\;\;\;\;\frac{\left(\ell \cdot 2\right) \cdot t_2}{k \cdot \left(k \cdot \frac{t}{\ell}\right)}\\

\mathbf{elif}\;\ell \leq -1.2702272780502075 \cdot 10^{-242}:\\
\;\;\;\;\ell \cdot \left(2 \cdot \frac{\frac{\ell}{k} \cdot \frac{\cos k}{k \cdot \left(t \cdot k\right)}}{k}\right)\\

\mathbf{elif}\;\ell \leq -1.1647704497195727 \cdot 10^{-268}:\\
\;\;\;\;\frac{\ell \cdot \frac{2}{t}}{k \cdot k} \cdot \frac{\ell}{k \cdot k}\\

\mathbf{elif}\;\ell \leq 3.135246037673392 \cdot 10^{-306}:\\
\;\;\;\;\frac{\left(\ell \cdot 2\right) \cdot \left(\frac{\frac{\ell}{k}}{t_1} \cdot \frac{\cos k}{t}\right)}{k}\\

\mathbf{elif}\;\ell \leq 1.3180425805095456 \cdot 10^{-230}:\\
\;\;\;\;2 \cdot \frac{{\left(\frac{\sqrt{\ell}}{k}\right)}^{4}}{t}\\

\mathbf{else}:\\
\;\;\;\;\ell \cdot \left(2 \cdot \frac{t_2}{\frac{k}{\frac{\frac{\ell}{k}}{t}}}\right)\\


\end{array}

Error

Try it out

Your Program's Arguments

Results

Enter valid numbers for all inputs

Derivation

  1. Split input into 8 regimes
  2. if l < -9.99999999999999989e203

    1. Initial program 64.0

      \[\frac{2}{\left(\left(\frac{{t}^{3}}{\ell \cdot \ell} \cdot \sin k\right) \cdot \tan k\right) \cdot \left(\left(1 + {\left(\frac{k}{t}\right)}^{2}\right) - 1\right)} \]
    2. Simplified51.6

      \[\leadsto \color{blue}{\ell \cdot \frac{\frac{2}{{\left(\frac{k}{t}\right)}^{2}}}{\tan k \cdot \left({t}^{3} \cdot \frac{\sin k}{\ell}\right)}} \]
    3. Taylor expanded in k around inf 50.0

      \[\leadsto \ell \cdot \color{blue}{\left(2 \cdot \frac{\cos k \cdot \ell}{{k}^{2} \cdot \left({\sin k}^{2} \cdot t\right)}\right)} \]
    4. Simplified39.4

      \[\leadsto \ell \cdot \color{blue}{\left(2 \cdot \left(\frac{\ell}{k \cdot k} \cdot \frac{\frac{\cos k}{{\sin k}^{2}}}{t}\right)\right)} \]
    5. Applied egg-rr11.7

      \[\leadsto \ell \cdot \left(2 \cdot \color{blue}{\frac{\frac{\ell}{k} \cdot \frac{\cos k}{{\sin k}^{2} \cdot t}}{k}}\right) \]
    6. Applied egg-rr12.2

      \[\leadsto \ell \cdot \left(2 \cdot \frac{\frac{\ell}{k} \cdot \frac{\cos k}{\color{blue}{\left(0.5 - 0.5 \cdot \cos \left(k + k\right)\right)} \cdot t}}{k}\right) \]

    if -9.99999999999999989e203 < l < -9.99999999999999996e-71

    1. Initial program 48.1

      \[\frac{2}{\left(\left(\frac{{t}^{3}}{\ell \cdot \ell} \cdot \sin k\right) \cdot \tan k\right) \cdot \left(\left(1 + {\left(\frac{k}{t}\right)}^{2}\right) - 1\right)} \]
    2. Simplified37.8

      \[\leadsto \color{blue}{\ell \cdot \frac{\frac{2}{{\left(\frac{k}{t}\right)}^{2}}}{\tan k \cdot \left({t}^{3} \cdot \frac{\sin k}{\ell}\right)}} \]
    3. Taylor expanded in k around inf 17.4

      \[\leadsto \ell \cdot \color{blue}{\left(2 \cdot \frac{\cos k \cdot \ell}{{k}^{2} \cdot \left({\sin k}^{2} \cdot t\right)}\right)} \]
    4. Simplified15.0

      \[\leadsto \ell \cdot \color{blue}{\left(2 \cdot \left(\frac{\ell}{k \cdot k} \cdot \frac{\frac{\cos k}{{\sin k}^{2}}}{t}\right)\right)} \]
    5. Applied egg-rr5.1

      \[\leadsto \ell \cdot \left(2 \cdot \color{blue}{\frac{\frac{\ell}{k} \cdot \frac{\cos k}{{\sin k}^{2} \cdot t}}{k}}\right) \]
    6. Applied egg-rr5.6

      \[\leadsto \color{blue}{\frac{\left(\ell \cdot 2\right) \cdot \frac{\ell}{k}}{\frac{k}{\cos k} \cdot \left({\sin k}^{2} \cdot t\right)}} \]

    if -9.99999999999999996e-71 < l < -6.21200097892353657e-164

    1. Initial program 40.9

      \[\frac{2}{\left(\left(\frac{{t}^{3}}{\ell \cdot \ell} \cdot \sin k\right) \cdot \tan k\right) \cdot \left(\left(1 + {\left(\frac{k}{t}\right)}^{2}\right) - 1\right)} \]
    2. Simplified29.9

      \[\leadsto \color{blue}{\ell \cdot \frac{\frac{2}{{\left(\frac{k}{t}\right)}^{2}}}{\tan k \cdot \left({t}^{3} \cdot \frac{\sin k}{\ell}\right)}} \]
    3. Taylor expanded in k around inf 7.4

      \[\leadsto \ell \cdot \color{blue}{\left(2 \cdot \frac{\cos k \cdot \ell}{{k}^{2} \cdot \left({\sin k}^{2} \cdot t\right)}\right)} \]
    4. Simplified6.1

      \[\leadsto \ell \cdot \color{blue}{\left(2 \cdot \left(\frac{\ell}{k \cdot k} \cdot \frac{\frac{\cos k}{{\sin k}^{2}}}{t}\right)\right)} \]
    5. Applied egg-rr5.9

      \[\leadsto \ell \cdot \left(2 \cdot \color{blue}{\frac{\cos k \cdot {\sin k}^{-2}}{\frac{k}{\frac{\ell}{k}} \cdot t}}\right) \]
    6. Applied egg-rr4.0

      \[\leadsto \ell \cdot \left(2 \cdot \frac{\cos k \cdot {\sin k}^{-2}}{\color{blue}{\frac{k}{\frac{\frac{\ell}{k}}{t}}}}\right) \]
    7. Applied egg-rr4.2

      \[\leadsto \color{blue}{\frac{\left(\ell \cdot 2\right) \cdot \left(\cos k \cdot {\sin k}^{-2}\right)}{k \cdot \left(\frac{t}{\ell} \cdot k\right)}} \]

    if -6.21200097892353657e-164 < l < -1.27022727805020754e-242

    1. Initial program 44.9

      \[\frac{2}{\left(\left(\frac{{t}^{3}}{\ell \cdot \ell} \cdot \sin k\right) \cdot \tan k\right) \cdot \left(\left(1 + {\left(\frac{k}{t}\right)}^{2}\right) - 1\right)} \]
    2. Simplified34.3

      \[\leadsto \color{blue}{\ell \cdot \frac{\frac{2}{{\left(\frac{k}{t}\right)}^{2}}}{\tan k \cdot \left({t}^{3} \cdot \frac{\sin k}{\ell}\right)}} \]
    3. Taylor expanded in k around inf 12.9

      \[\leadsto \ell \cdot \color{blue}{\left(2 \cdot \frac{\cos k \cdot \ell}{{k}^{2} \cdot \left({\sin k}^{2} \cdot t\right)}\right)} \]
    4. Simplified9.4

      \[\leadsto \ell \cdot \color{blue}{\left(2 \cdot \left(\frac{\ell}{k \cdot k} \cdot \frac{\frac{\cos k}{{\sin k}^{2}}}{t}\right)\right)} \]
    5. Applied egg-rr8.8

      \[\leadsto \ell \cdot \left(2 \cdot \color{blue}{\frac{\frac{\ell}{k} \cdot \frac{\cos k}{{\sin k}^{2} \cdot t}}{k}}\right) \]
    6. Taylor expanded in k around 0 11.6

      \[\leadsto \ell \cdot \left(2 \cdot \frac{\frac{\ell}{k} \cdot \frac{\cos k}{\color{blue}{{k}^{2} \cdot t}}}{k}\right) \]
    7. Simplified10.8

      \[\leadsto \ell \cdot \left(2 \cdot \frac{\frac{\ell}{k} \cdot \frac{\cos k}{\color{blue}{k \cdot \left(k \cdot t\right)}}}{k}\right) \]

    if -1.27022727805020754e-242 < l < -1.1647704497195727e-268

    1. Initial program 44.3

      \[\frac{2}{\left(\left(\frac{{t}^{3}}{\ell \cdot \ell} \cdot \sin k\right) \cdot \tan k\right) \cdot \left(\left(1 + {\left(\frac{k}{t}\right)}^{2}\right) - 1\right)} \]
    2. Simplified33.2

      \[\leadsto \color{blue}{\ell \cdot \frac{\frac{2}{{\left(\frac{k}{t}\right)}^{2}}}{\tan k \cdot \left({t}^{3} \cdot \frac{\sin k}{\ell}\right)}} \]
    3. Taylor expanded in k around 0 18.4

      \[\leadsto \color{blue}{2 \cdot \frac{{\ell}^{2}}{{k}^{4} \cdot t}} \]
    4. Simplified18.3

      \[\leadsto \color{blue}{\frac{2}{{k}^{4}} \cdot \frac{\ell \cdot \ell}{t}} \]
    5. Applied egg-rr14.4

      \[\leadsto \color{blue}{\frac{\frac{\frac{2}{\frac{\frac{t}{\ell}}{\ell}}}{k \cdot k}}{k \cdot k}} \]
    6. Applied egg-rr8.0

      \[\leadsto \color{blue}{\frac{\frac{2}{t} \cdot \ell}{k \cdot k} \cdot \frac{\ell}{k \cdot k}} \]

    if -1.1647704497195727e-268 < l < 3.135246037673392e-306

    1. Initial program 46.4

      \[\frac{2}{\left(\left(\frac{{t}^{3}}{\ell \cdot \ell} \cdot \sin k\right) \cdot \tan k\right) \cdot \left(\left(1 + {\left(\frac{k}{t}\right)}^{2}\right) - 1\right)} \]
    2. Simplified35.0

      \[\leadsto \color{blue}{\ell \cdot \frac{\frac{2}{{\left(\frac{k}{t}\right)}^{2}}}{\tan k \cdot \left({t}^{3} \cdot \frac{\sin k}{\ell}\right)}} \]
    3. Taylor expanded in k around inf 17.8

      \[\leadsto \ell \cdot \color{blue}{\left(2 \cdot \frac{\cos k \cdot \ell}{{k}^{2} \cdot \left({\sin k}^{2} \cdot t\right)}\right)} \]
    4. Simplified12.9

      \[\leadsto \ell \cdot \color{blue}{\left(2 \cdot \left(\frac{\ell}{k \cdot k} \cdot \frac{\frac{\cos k}{{\sin k}^{2}}}{t}\right)\right)} \]
    5. Applied egg-rr12.7

      \[\leadsto \ell \cdot \left(2 \cdot \color{blue}{\frac{\frac{\ell}{k} \cdot \frac{\cos k}{{\sin k}^{2} \cdot t}}{k}}\right) \]
    6. Applied egg-rr11.1

      \[\leadsto \color{blue}{\frac{\left(\ell \cdot 2\right) \cdot \left(\frac{\frac{\ell}{k}}{{\sin k}^{2}} \cdot \frac{\cos k}{t}\right)}{k}} \]

    if 3.135246037673392e-306 < l < 1.3180425805095456e-230

    1. Initial program 45.4

      \[\frac{2}{\left(\left(\frac{{t}^{3}}{\ell \cdot \ell} \cdot \sin k\right) \cdot \tan k\right) \cdot \left(\left(1 + {\left(\frac{k}{t}\right)}^{2}\right) - 1\right)} \]
    2. Simplified35.0

      \[\leadsto \color{blue}{\ell \cdot \frac{\frac{2}{{\left(\frac{k}{t}\right)}^{2}}}{\tan k \cdot \left({t}^{3} \cdot \frac{\sin k}{\ell}\right)}} \]
    3. Taylor expanded in k around 0 17.1

      \[\leadsto \color{blue}{2 \cdot \frac{{\ell}^{2}}{{k}^{4} \cdot t}} \]
    4. Simplified17.1

      \[\leadsto \color{blue}{\frac{2}{{k}^{4}} \cdot \frac{\ell \cdot \ell}{t}} \]
    5. Taylor expanded in k around 0 17.1

      \[\leadsto \color{blue}{2 \cdot \frac{{\ell}^{2}}{{k}^{4} \cdot t}} \]
    6. Simplified3.6

      \[\leadsto \color{blue}{2 \cdot \frac{{\left(\frac{\sqrt{\ell}}{k}\right)}^{4}}{t}} \]

    if 1.3180425805095456e-230 < l

    1. Initial program 47.7

      \[\frac{2}{\left(\left(\frac{{t}^{3}}{\ell \cdot \ell} \cdot \sin k\right) \cdot \tan k\right) \cdot \left(\left(1 + {\left(\frac{k}{t}\right)}^{2}\right) - 1\right)} \]
    2. Simplified37.9

      \[\leadsto \color{blue}{\ell \cdot \frac{\frac{2}{{\left(\frac{k}{t}\right)}^{2}}}{\tan k \cdot \left({t}^{3} \cdot \frac{\sin k}{\ell}\right)}} \]
    3. Taylor expanded in k around inf 18.6

      \[\leadsto \ell \cdot \color{blue}{\left(2 \cdot \frac{\cos k \cdot \ell}{{k}^{2} \cdot \left({\sin k}^{2} \cdot t\right)}\right)} \]
    4. Simplified15.3

      \[\leadsto \ell \cdot \color{blue}{\left(2 \cdot \left(\frac{\ell}{k \cdot k} \cdot \frac{\frac{\cos k}{{\sin k}^{2}}}{t}\right)\right)} \]
    5. Applied egg-rr10.4

      \[\leadsto \ell \cdot \left(2 \cdot \color{blue}{\frac{\cos k \cdot {\sin k}^{-2}}{\frac{k}{\frac{\ell}{k}} \cdot t}}\right) \]
    6. Applied egg-rr6.7

      \[\leadsto \ell \cdot \left(2 \cdot \frac{\cos k \cdot {\sin k}^{-2}}{\color{blue}{\frac{k}{\frac{\frac{\ell}{k}}{t}}}}\right) \]
  3. Recombined 8 regimes into one program.
  4. Final simplification6.9

    \[\leadsto \begin{array}{l} \mathbf{if}\;\ell \leq -1 \cdot 10^{+204}:\\ \;\;\;\;\ell \cdot \left(2 \cdot \frac{\frac{\ell}{k} \cdot \frac{\cos k}{t \cdot \left(0.5 + \cos \left(k + k\right) \cdot -0.5\right)}}{k}\right)\\ \mathbf{elif}\;\ell \leq -1 \cdot 10^{-70}:\\ \;\;\;\;\frac{\left(\ell \cdot 2\right) \cdot \frac{\ell}{k}}{\left(t \cdot {\sin k}^{2}\right) \cdot \frac{k}{\cos k}}\\ \mathbf{elif}\;\ell \leq -6.2120009789235366 \cdot 10^{-164}:\\ \;\;\;\;\frac{\left(\ell \cdot 2\right) \cdot \left(\cos k \cdot {\sin k}^{-2}\right)}{k \cdot \left(k \cdot \frac{t}{\ell}\right)}\\ \mathbf{elif}\;\ell \leq -1.2702272780502075 \cdot 10^{-242}:\\ \;\;\;\;\ell \cdot \left(2 \cdot \frac{\frac{\ell}{k} \cdot \frac{\cos k}{k \cdot \left(t \cdot k\right)}}{k}\right)\\ \mathbf{elif}\;\ell \leq -1.1647704497195727 \cdot 10^{-268}:\\ \;\;\;\;\frac{\ell \cdot \frac{2}{t}}{k \cdot k} \cdot \frac{\ell}{k \cdot k}\\ \mathbf{elif}\;\ell \leq 3.135246037673392 \cdot 10^{-306}:\\ \;\;\;\;\frac{\left(\ell \cdot 2\right) \cdot \left(\frac{\frac{\ell}{k}}{{\sin k}^{2}} \cdot \frac{\cos k}{t}\right)}{k}\\ \mathbf{elif}\;\ell \leq 1.3180425805095456 \cdot 10^{-230}:\\ \;\;\;\;2 \cdot \frac{{\left(\frac{\sqrt{\ell}}{k}\right)}^{4}}{t}\\ \mathbf{else}:\\ \;\;\;\;\ell \cdot \left(2 \cdot \frac{\cos k \cdot {\sin k}^{-2}}{\frac{k}{\frac{\frac{\ell}{k}}{t}}}\right)\\ \end{array} \]

Alternatives

Alternative 1
Error6.6
Cost21004
\[\begin{array}{l} t_1 := {\sin k}^{2}\\ t_2 := \frac{\left(\ell \cdot 2\right) \cdot \left(\frac{\frac{\ell}{k}}{t_1} \cdot \frac{\cos k}{t}\right)}{k}\\ \mathbf{if}\;\ell \cdot \ell \leq 5 \cdot 10^{-291}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;\ell \cdot \ell \leq 2 \cdot 10^{+219}:\\ \;\;\;\;\frac{\left(\ell \cdot 2\right) \cdot \frac{\ell}{k}}{\left(t \cdot t_1\right) \cdot \frac{k}{\cos k}}\\ \mathbf{elif}\;\ell \cdot \ell \leq 10^{+259}:\\ \;\;\;\;t_2\\ \mathbf{else}:\\ \;\;\;\;\ell \cdot \left(2 \cdot \frac{\frac{\ell}{k} \cdot \frac{\cos k}{t \cdot \left(0.5 + \cos \left(k + k\right) \cdot -0.5\right)}}{k}\right)\\ \end{array} \]
Alternative 2
Error6.4
Cost21004
\[\begin{array}{l} t_1 := {\sin k}^{2}\\ \mathbf{if}\;\ell \cdot \ell \leq 0:\\ \;\;\;\;\frac{\left(\ell \cdot 2\right) \cdot \left(\frac{\frac{\ell}{k}}{t_1} \cdot \frac{\cos k}{t}\right)}{k}\\ \mathbf{elif}\;\ell \cdot \ell \leq 5 \cdot 10^{+112}:\\ \;\;\;\;\frac{\ell \cdot \frac{2 \cdot \left(\ell \cdot \cos k\right)}{t_1 \cdot \left(t \cdot k\right)}}{k}\\ \mathbf{elif}\;\ell \cdot \ell \leq 10^{+259}:\\ \;\;\;\;\frac{\left(\ell \cdot 2\right) \cdot \frac{\ell}{k}}{\left(t \cdot t_1\right) \cdot \frac{k}{\cos k}}\\ \mathbf{else}:\\ \;\;\;\;\ell \cdot \left(2 \cdot \frac{\frac{\ell}{k} \cdot \frac{\cos k}{t \cdot \left(0.5 + \cos \left(k + k\right) \cdot -0.5\right)}}{k}\right)\\ \end{array} \]
Alternative 3
Error7.4
Cost20488
\[\begin{array}{l} t_1 := t \cdot \left(\sin k \cdot \tan k\right)\\ \mathbf{if}\;\ell \leq -1 \cdot 10^{+120}:\\ \;\;\;\;\ell \cdot \left(2 \cdot \frac{\frac{\ell}{k} \cdot \frac{\cos k}{t \cdot \left(0.5 + \cos \left(k + k\right) \cdot -0.5\right)}}{k}\right)\\ \mathbf{elif}\;\ell \leq 3.135246037673392 \cdot 10^{-306}:\\ \;\;\;\;\frac{\left(\ell \cdot 2\right) \cdot \left(\cos k \cdot {\sin k}^{-2}\right)}{k \cdot \left(k \cdot \frac{t}{\ell}\right)}\\ \mathbf{elif}\;\ell \leq 3.5977586417153414 \cdot 10^{-171}:\\ \;\;\;\;2 \cdot \frac{{\left(\frac{\sqrt{\ell}}{k}\right)}^{4}}{t}\\ \mathbf{elif}\;\ell \leq 10^{+210}:\\ \;\;\;\;\ell \cdot \left(2 \cdot \frac{\frac{\ell}{k}}{k \cdot t_1}\right)\\ \mathbf{else}:\\ \;\;\;\;\ell \cdot \left(2 \cdot \frac{1}{t_1 \cdot \frac{k}{\frac{\ell}{k}}}\right)\\ \end{array} \]
Alternative 4
Error7.0
Cost20488
\[\begin{array}{l} \mathbf{if}\;\ell \leq -1 \cdot 10^{+140}:\\ \;\;\;\;\ell \cdot \left(2 \cdot \frac{\frac{\ell}{k} \cdot \frac{\cos k}{t \cdot \left(0.5 + \cos \left(k + k\right) \cdot -0.5\right)}}{k}\right)\\ \mathbf{elif}\;\ell \leq 3.5977586417153414 \cdot 10^{-171}:\\ \;\;\;\;\frac{\left(\ell \cdot 2\right) \cdot \left(\frac{\frac{\ell}{k}}{{\sin k}^{2}} \cdot \frac{\cos k}{t}\right)}{k}\\ \mathbf{else}:\\ \;\;\;\;\ell \cdot \left(2 \cdot \frac{\frac{\ell}{k}}{k \cdot \left(t \cdot \left(\sin k \cdot \tan k\right)\right)}\right)\\ \end{array} \]
Alternative 5
Error6.9
Cost20488
\[\begin{array}{l} \mathbf{if}\;\ell \leq -1.487331620686038 \cdot 10^{-306}:\\ \;\;\;\;\ell \cdot \left(2 \cdot \frac{\frac{\cos k}{t \cdot {\sin k}^{2}} \cdot \frac{\ell}{k}}{k}\right)\\ \mathbf{elif}\;\ell \leq 1.3180425805095456 \cdot 10^{-230}:\\ \;\;\;\;2 \cdot \frac{{\left(\frac{\sqrt{\ell}}{k}\right)}^{4}}{t}\\ \mathbf{else}:\\ \;\;\;\;\ell \cdot \left(2 \cdot \frac{\cos k \cdot {\sin k}^{-2}}{\frac{k}{\frac{\frac{\ell}{k}}{t}}}\right)\\ \end{array} \]
Alternative 6
Error6.2
Cost20420
\[\begin{array}{l} \mathbf{if}\;t \leq -2.588703498610847 \cdot 10^{+120}:\\ \;\;\;\;\frac{\left(\frac{\cos k}{t \cdot {\sin k}^{2}} \cdot \frac{\ell}{k}\right) \cdot \left(\ell \cdot -2\right)}{-k}\\ \mathbf{else}:\\ \;\;\;\;\ell \cdot \left(2 \cdot \frac{\cos k \cdot {\sin k}^{-2}}{\frac{k}{\frac{\frac{\ell}{k}}{t}}}\right)\\ \end{array} \]
Alternative 7
Error7.9
Cost14276
\[\begin{array}{l} t_1 := t \cdot \left(\sin k \cdot \tan k\right)\\ \mathbf{if}\;\ell \leq -1 \cdot 10^{+120}:\\ \;\;\;\;\ell \cdot \left(2 \cdot \frac{\frac{\ell}{k} \cdot \frac{\cos k}{t \cdot \left(0.5 + \cos \left(k + k\right) \cdot -0.5\right)}}{k}\right)\\ \mathbf{elif}\;\ell \leq -1.487331620686038 \cdot 10^{-306}:\\ \;\;\;\;\ell \cdot \left(2 \cdot \frac{\frac{\frac{\ell}{t_1}}{k}}{k}\right)\\ \mathbf{elif}\;\ell \leq 3.5977586417153414 \cdot 10^{-171}:\\ \;\;\;\;2 \cdot \frac{{\left(\frac{\sqrt{\ell}}{k}\right)}^{4}}{t}\\ \mathbf{else}:\\ \;\;\;\;\ell \cdot \left(2 \cdot \frac{\frac{\ell}{k}}{k \cdot t_1}\right)\\ \end{array} \]
Alternative 8
Error8.0
Cost14024
\[\begin{array}{l} t_1 := \ell \cdot \left(2 \cdot \frac{\frac{\ell}{k}}{k \cdot \left(t \cdot \left(\sin k \cdot \tan k\right)\right)}\right)\\ \mathbf{if}\;\ell \leq -1.487331620686038 \cdot 10^{-306}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;\ell \leq 3.5977586417153414 \cdot 10^{-171}:\\ \;\;\;\;2 \cdot \frac{{\left(\frac{\sqrt{\ell}}{k}\right)}^{4}}{t}\\ \mathbf{else}:\\ \;\;\;\;t_1\\ \end{array} \]
Alternative 9
Error7.6
Cost14024
\[\begin{array}{l} t_1 := t \cdot \left(\sin k \cdot \tan k\right)\\ t_2 := \ell \cdot \left(2 \cdot \frac{\frac{\ell}{k}}{k \cdot t_1}\right)\\ \mathbf{if}\;k \leq -1 \cdot 10^{+81}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;k \leq 8.818561829342124 \cdot 10^{+151}:\\ \;\;\;\;\ell \cdot \left(2 \cdot \frac{\frac{\frac{\ell}{t_1}}{k}}{k}\right)\\ \mathbf{else}:\\ \;\;\;\;t_2\\ \end{array} \]
Alternative 10
Error24.4
Cost7816
\[\begin{array}{l} t_1 := k \cdot \left(t \cdot k\right)\\ \mathbf{if}\;t \leq -1.35 \cdot 10^{-49}:\\ \;\;\;\;\ell \cdot \left(2 \cdot \frac{\frac{\ell}{k} \cdot \frac{\cos k}{t_1}}{k}\right)\\ \mathbf{elif}\;t \leq 10^{-60}:\\ \;\;\;\;\frac{\frac{\ell}{k} \cdot 0.16666666666666666 - \frac{\ell}{{k}^{3}}}{\frac{k \cdot \frac{t}{\ell}}{-2}}\\ \mathbf{else}:\\ \;\;\;\;\ell \cdot \left(2 \cdot \left(\frac{\ell}{k \cdot k} \cdot \left(\frac{1}{t_1} + \frac{-0.16666666666666666}{t}\right)\right)\right)\\ \end{array} \]
Alternative 11
Error23.6
Cost7744
\[\ell \cdot \left(2 \cdot \frac{\cos k \cdot \left(\frac{1}{k \cdot k} + 0.3333333333333333\right)}{t \cdot \frac{k}{\frac{\ell}{k}}}\right) \]
Alternative 12
Error24.3
Cost7620
\[\begin{array}{l} t_1 := k \cdot \left(t \cdot k\right)\\ \mathbf{if}\;t \leq -9 \cdot 10^{-28}:\\ \;\;\;\;\ell \cdot \left(2 \cdot \frac{\frac{\ell}{k} \cdot \frac{\cos k}{t_1}}{k}\right)\\ \mathbf{elif}\;t \leq 2.6 \cdot 10^{-192}:\\ \;\;\;\;\left(\ell \cdot \frac{\frac{\ell}{t}}{k \cdot k}\right) \cdot \left(-0.3333333333333333 + \frac{2}{k \cdot k}\right)\\ \mathbf{else}:\\ \;\;\;\;\ell \cdot \left(2 \cdot \left(\frac{\ell}{k \cdot k} \cdot \left(\frac{1}{t_1} + \frac{-0.16666666666666666}{t}\right)\right)\right)\\ \end{array} \]
Alternative 13
Error25.4
Cost1344
\[\ell \cdot \left(2 \cdot \left(\frac{\ell}{k \cdot k} \cdot \left(\frac{1}{k \cdot \left(t \cdot k\right)} + \frac{-0.16666666666666666}{t}\right)\right)\right) \]
Alternative 14
Error28.4
Cost960
\[\frac{\frac{2}{k} \cdot \frac{\ell \cdot \frac{\ell}{t}}{k}}{k \cdot k} \]
Alternative 15
Error28.4
Cost960
\[\frac{\frac{\ell \cdot \left(\ell \cdot \frac{2}{t}\right)}{k \cdot k}}{k \cdot k} \]
Alternative 16
Error26.3
Cost960
\[\frac{\frac{\ell}{k} \cdot \frac{\ell \cdot \frac{2}{t}}{k}}{k \cdot k} \]
Alternative 17
Error25.9
Cost960
\[\frac{\ell \cdot \frac{2}{t}}{k \cdot k} \cdot \frac{\ell}{k \cdot k} \]
Alternative 18
Error37.4
Cost704
\[\left(1 + \left(\ell \cdot \frac{\ell}{t}\right) \cdot -0.11666666666666667\right) + -1 \]
Alternative 19
Error32.5
Cost704
\[\frac{\ell}{k} \cdot \frac{\frac{-0.3333333333333333}{\frac{t}{\ell}}}{k} \]
Alternative 20
Error46.8
Cost448
\[\frac{\ell \cdot -0.11666666666666667}{\frac{t}{\ell}} \]
Alternative 21
Error44.3
Cost448
\[\frac{-0.11666666666666667}{\frac{t}{\ell \cdot \ell}} \]

Error

Reproduce

herbie shell --seed 2022225 
(FPCore (t l k)
  :name "Toniolo and Linder, Equation (10-)"
  :precision binary64
  (/ 2.0 (* (* (* (/ (pow t 3.0) (* l l)) (sin k)) (tan k)) (- (+ 1.0 (pow (/ k t) 2.0)) 1.0))))