Toniolo and Linder, Equation (10-)

Percentage Accurate: 36.3% → 86.3%
Time: 18.3s
Alternatives: 14
Speedup: 2.0×

Specification

?
\[\begin{array}{l} \\ \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)} \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))))
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));
}
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
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));
}
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))
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 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
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]
\begin{array}{l}

\\
\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)}
\end{array}

Sampling outcomes in binary64 precision:

Local Percentage Accuracy vs ?

The average percentage accuracy by input value. Horizontal axis shows value of an input variable; the variable is choosen in the title. Vertical axis is accuracy; higher is better. Red represent the original program, while blue represents Herbie's suggestion. These can be toggled with buttons below the plot. The line is an average while dots represent individual samples.

Accuracy vs Speed?

Herbie found 14 alternatives:

AlternativeAccuracySpeedup
The accuracy (vertical axis) and speed (horizontal axis) of each alternatives. Up and to the right is better. The red square shows the initial program, and each blue circle shows an alternative.The line shows the best available speed-accuracy tradeoffs.

Initial Program: 36.3% accurate, 1.0× speedup?

\[\begin{array}{l} \\ \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)} \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))))
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));
}
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
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));
}
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))
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 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
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]
\begin{array}{l}

\\
\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)}
\end{array}

Alternative 1: 86.3% accurate, 0.8× speedup?

\[\begin{array}{l} t_m = \left|t\right| \\ t_s = \mathsf{copysign}\left(1, t\right) \\ \begin{array}{l} t_2 := \frac{\sqrt{2}}{\sin k}\\ t_s \cdot \begin{array}{l} \mathbf{if}\;\ell \cdot \ell \leq 2 \cdot 10^{-277}:\\ \;\;\;\;{\left(\left(\frac{\ell}{k} \cdot t_2\right) \cdot \sqrt{\frac{1}{t_m}}\right)}^{2}\\ \mathbf{elif}\;\ell \cdot \ell \leq 2 \cdot 10^{+243}:\\ \;\;\;\;\frac{\frac{2}{{k}^{2} \cdot {\ell}^{-2}}}{\frac{t_m}{\cos k \cdot {\sin k}^{-2}}}\\ \mathbf{else}:\\ \;\;\;\;{\left(\frac{\ell}{k} \cdot \left(t_2 \cdot \sqrt{\frac{\cos k}{t_m}}\right)\right)}^{2}\\ \end{array} \end{array} \end{array} \]
t_m = (fabs.f64 t)
t_s = (copysign.f64 1 t)
(FPCore (t_s t_m l k)
 :precision binary64
 (let* ((t_2 (/ (sqrt 2.0) (sin k))))
   (*
    t_s
    (if (<= (* l l) 2e-277)
      (pow (* (* (/ l k) t_2) (sqrt (/ 1.0 t_m))) 2.0)
      (if (<= (* l l) 2e+243)
        (/
         (/ 2.0 (* (pow k 2.0) (pow l -2.0)))
         (/ t_m (* (cos k) (pow (sin k) -2.0))))
        (pow (* (/ l k) (* t_2 (sqrt (/ (cos k) t_m)))) 2.0))))))
t_m = fabs(t);
t_s = copysign(1.0, t);
double code(double t_s, double t_m, double l, double k) {
	double t_2 = sqrt(2.0) / sin(k);
	double tmp;
	if ((l * l) <= 2e-277) {
		tmp = pow((((l / k) * t_2) * sqrt((1.0 / t_m))), 2.0);
	} else if ((l * l) <= 2e+243) {
		tmp = (2.0 / (pow(k, 2.0) * pow(l, -2.0))) / (t_m / (cos(k) * pow(sin(k), -2.0)));
	} else {
		tmp = pow(((l / k) * (t_2 * sqrt((cos(k) / t_m)))), 2.0);
	}
	return t_s * tmp;
}
t_m = abs(t)
t_s = copysign(1.0d0, t)
real(8) function code(t_s, t_m, l, k)
    real(8), intent (in) :: t_s
    real(8), intent (in) :: t_m
    real(8), intent (in) :: l
    real(8), intent (in) :: k
    real(8) :: t_2
    real(8) :: tmp
    t_2 = sqrt(2.0d0) / sin(k)
    if ((l * l) <= 2d-277) then
        tmp = (((l / k) * t_2) * sqrt((1.0d0 / t_m))) ** 2.0d0
    else if ((l * l) <= 2d+243) then
        tmp = (2.0d0 / ((k ** 2.0d0) * (l ** (-2.0d0)))) / (t_m / (cos(k) * (sin(k) ** (-2.0d0))))
    else
        tmp = ((l / k) * (t_2 * sqrt((cos(k) / t_m)))) ** 2.0d0
    end if
    code = t_s * tmp
end function
t_m = Math.abs(t);
t_s = Math.copySign(1.0, t);
public static double code(double t_s, double t_m, double l, double k) {
	double t_2 = Math.sqrt(2.0) / Math.sin(k);
	double tmp;
	if ((l * l) <= 2e-277) {
		tmp = Math.pow((((l / k) * t_2) * Math.sqrt((1.0 / t_m))), 2.0);
	} else if ((l * l) <= 2e+243) {
		tmp = (2.0 / (Math.pow(k, 2.0) * Math.pow(l, -2.0))) / (t_m / (Math.cos(k) * Math.pow(Math.sin(k), -2.0)));
	} else {
		tmp = Math.pow(((l / k) * (t_2 * Math.sqrt((Math.cos(k) / t_m)))), 2.0);
	}
	return t_s * tmp;
}
t_m = math.fabs(t)
t_s = math.copysign(1.0, t)
def code(t_s, t_m, l, k):
	t_2 = math.sqrt(2.0) / math.sin(k)
	tmp = 0
	if (l * l) <= 2e-277:
		tmp = math.pow((((l / k) * t_2) * math.sqrt((1.0 / t_m))), 2.0)
	elif (l * l) <= 2e+243:
		tmp = (2.0 / (math.pow(k, 2.0) * math.pow(l, -2.0))) / (t_m / (math.cos(k) * math.pow(math.sin(k), -2.0)))
	else:
		tmp = math.pow(((l / k) * (t_2 * math.sqrt((math.cos(k) / t_m)))), 2.0)
	return t_s * tmp
t_m = abs(t)
t_s = copysign(1.0, t)
function code(t_s, t_m, l, k)
	t_2 = Float64(sqrt(2.0) / sin(k))
	tmp = 0.0
	if (Float64(l * l) <= 2e-277)
		tmp = Float64(Float64(Float64(l / k) * t_2) * sqrt(Float64(1.0 / t_m))) ^ 2.0;
	elseif (Float64(l * l) <= 2e+243)
		tmp = Float64(Float64(2.0 / Float64((k ^ 2.0) * (l ^ -2.0))) / Float64(t_m / Float64(cos(k) * (sin(k) ^ -2.0))));
	else
		tmp = Float64(Float64(l / k) * Float64(t_2 * sqrt(Float64(cos(k) / t_m)))) ^ 2.0;
	end
	return Float64(t_s * tmp)
end
t_m = abs(t);
t_s = sign(t) * abs(1.0);
function tmp_2 = code(t_s, t_m, l, k)
	t_2 = sqrt(2.0) / sin(k);
	tmp = 0.0;
	if ((l * l) <= 2e-277)
		tmp = (((l / k) * t_2) * sqrt((1.0 / t_m))) ^ 2.0;
	elseif ((l * l) <= 2e+243)
		tmp = (2.0 / ((k ^ 2.0) * (l ^ -2.0))) / (t_m / (cos(k) * (sin(k) ^ -2.0)));
	else
		tmp = ((l / k) * (t_2 * sqrt((cos(k) / t_m)))) ^ 2.0;
	end
	tmp_2 = t_s * tmp;
end
t_m = N[Abs[t], $MachinePrecision]
t_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[t]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[t$95$s_, t$95$m_, l_, k_] := Block[{t$95$2 = N[(N[Sqrt[2.0], $MachinePrecision] / N[Sin[k], $MachinePrecision]), $MachinePrecision]}, N[(t$95$s * If[LessEqual[N[(l * l), $MachinePrecision], 2e-277], N[Power[N[(N[(N[(l / k), $MachinePrecision] * t$95$2), $MachinePrecision] * N[Sqrt[N[(1.0 / t$95$m), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision], If[LessEqual[N[(l * l), $MachinePrecision], 2e+243], N[(N[(2.0 / N[(N[Power[k, 2.0], $MachinePrecision] * N[Power[l, -2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(t$95$m / N[(N[Cos[k], $MachinePrecision] * N[Power[N[Sin[k], $MachinePrecision], -2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[Power[N[(N[(l / k), $MachinePrecision] * N[(t$95$2 * N[Sqrt[N[(N[Cos[k], $MachinePrecision] / t$95$m), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision]]]), $MachinePrecision]]
\begin{array}{l}
t_m = \left|t\right|
\\
t_s = \mathsf{copysign}\left(1, t\right)

\\
\begin{array}{l}
t_2 := \frac{\sqrt{2}}{\sin k}\\
t_s \cdot \begin{array}{l}
\mathbf{if}\;\ell \cdot \ell \leq 2 \cdot 10^{-277}:\\
\;\;\;\;{\left(\left(\frac{\ell}{k} \cdot t_2\right) \cdot \sqrt{\frac{1}{t_m}}\right)}^{2}\\

\mathbf{elif}\;\ell \cdot \ell \leq 2 \cdot 10^{+243}:\\
\;\;\;\;\frac{\frac{2}{{k}^{2} \cdot {\ell}^{-2}}}{\frac{t_m}{\cos k \cdot {\sin k}^{-2}}}\\

\mathbf{else}:\\
\;\;\;\;{\left(\frac{\ell}{k} \cdot \left(t_2 \cdot \sqrt{\frac{\cos k}{t_m}}\right)\right)}^{2}\\


\end{array}
\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if (*.f64 l l) < 1.99999999999999994e-277

    1. Initial program 31.5%

      \[\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. Step-by-step derivation
      1. associate-/r*31.5%

        \[\leadsto \color{blue}{\frac{\frac{2}{\left(\frac{{t}^{3}}{\ell \cdot \ell} \cdot \sin k\right) \cdot \tan k}}{\left(1 + {\left(\frac{k}{t}\right)}^{2}\right) - 1}} \]
      2. *-commutative31.5%

        \[\leadsto \frac{\frac{2}{\color{blue}{\left(\sin k \cdot \frac{{t}^{3}}{\ell \cdot \ell}\right)} \cdot \tan k}}{\left(1 + {\left(\frac{k}{t}\right)}^{2}\right) - 1} \]
      3. associate-*l*31.5%

        \[\leadsto \frac{\frac{2}{\color{blue}{\sin k \cdot \left(\frac{{t}^{3}}{\ell \cdot \ell} \cdot \tan k\right)}}}{\left(1 + {\left(\frac{k}{t}\right)}^{2}\right) - 1} \]
      4. associate-*l/31.5%

        \[\leadsto \frac{\frac{2}{\sin k \cdot \color{blue}{\frac{{t}^{3} \cdot \tan k}{\ell \cdot \ell}}}}{\left(1 + {\left(\frac{k}{t}\right)}^{2}\right) - 1} \]
      5. +-commutative31.5%

        \[\leadsto \frac{\frac{2}{\sin k \cdot \frac{{t}^{3} \cdot \tan k}{\ell \cdot \ell}}}{\color{blue}{\left({\left(\frac{k}{t}\right)}^{2} + 1\right)} - 1} \]
      6. unpow231.5%

        \[\leadsto \frac{\frac{2}{\sin k \cdot \frac{{t}^{3} \cdot \tan k}{\ell \cdot \ell}}}{\left(\color{blue}{\frac{k}{t} \cdot \frac{k}{t}} + 1\right) - 1} \]
      7. sqr-neg31.5%

        \[\leadsto \frac{\frac{2}{\sin k \cdot \frac{{t}^{3} \cdot \tan k}{\ell \cdot \ell}}}{\left(\color{blue}{\left(-\frac{k}{t}\right) \cdot \left(-\frac{k}{t}\right)} + 1\right) - 1} \]
      8. distribute-frac-neg31.5%

        \[\leadsto \frac{\frac{2}{\sin k \cdot \frac{{t}^{3} \cdot \tan k}{\ell \cdot \ell}}}{\left(\color{blue}{\frac{-k}{t}} \cdot \left(-\frac{k}{t}\right) + 1\right) - 1} \]
      9. distribute-frac-neg31.5%

        \[\leadsto \frac{\frac{2}{\sin k \cdot \frac{{t}^{3} \cdot \tan k}{\ell \cdot \ell}}}{\left(\frac{-k}{t} \cdot \color{blue}{\frac{-k}{t}} + 1\right) - 1} \]
      10. unpow231.5%

        \[\leadsto \frac{\frac{2}{\sin k \cdot \frac{{t}^{3} \cdot \tan k}{\ell \cdot \ell}}}{\left(\color{blue}{{\left(\frac{-k}{t}\right)}^{2}} + 1\right) - 1} \]
      11. associate--l+44.7%

        \[\leadsto \frac{\frac{2}{\sin k \cdot \frac{{t}^{3} \cdot \tan k}{\ell \cdot \ell}}}{\color{blue}{{\left(\frac{-k}{t}\right)}^{2} + \left(1 - 1\right)}} \]
      12. metadata-eval44.7%

        \[\leadsto \frac{\frac{2}{\sin k \cdot \frac{{t}^{3} \cdot \tan k}{\ell \cdot \ell}}}{{\left(\frac{-k}{t}\right)}^{2} + \color{blue}{0}} \]
      13. +-rgt-identity44.7%

        \[\leadsto \frac{\frac{2}{\sin k \cdot \frac{{t}^{3} \cdot \tan k}{\ell \cdot \ell}}}{\color{blue}{{\left(\frac{-k}{t}\right)}^{2}}} \]
      14. unpow244.7%

        \[\leadsto \frac{\frac{2}{\sin k \cdot \frac{{t}^{3} \cdot \tan k}{\ell \cdot \ell}}}{\color{blue}{\frac{-k}{t} \cdot \frac{-k}{t}}} \]
      15. distribute-frac-neg44.7%

        \[\leadsto \frac{\frac{2}{\sin k \cdot \frac{{t}^{3} \cdot \tan k}{\ell \cdot \ell}}}{\color{blue}{\left(-\frac{k}{t}\right)} \cdot \frac{-k}{t}} \]
      16. distribute-frac-neg44.7%

        \[\leadsto \frac{\frac{2}{\sin k \cdot \frac{{t}^{3} \cdot \tan k}{\ell \cdot \ell}}}{\left(-\frac{k}{t}\right) \cdot \color{blue}{\left(-\frac{k}{t}\right)}} \]
    3. Simplified44.7%

      \[\leadsto \color{blue}{\frac{\frac{2}{\sin k \cdot \frac{{t}^{3} \cdot \tan k}{\ell \cdot \ell}}}{{\left(\frac{k}{t}\right)}^{2}}} \]
    4. Applied egg-rr31.4%

      \[\leadsto \color{blue}{{\left(\frac{\frac{\sqrt{2}}{\frac{k}{t}}}{\sqrt{\sin k \cdot \tan k} \cdot \frac{{t}^{1.5}}{\ell}}\right)}^{2}} \]
    5. Taylor expanded in k around inf 54.0%

      \[\leadsto {\color{blue}{\left(\frac{\ell \cdot \sqrt{2}}{k \cdot \sin k} \cdot \sqrt{\frac{\cos k}{t}}\right)}}^{2} \]
    6. Step-by-step derivation
      1. times-frac55.1%

        \[\leadsto {\left(\color{blue}{\left(\frac{\ell}{k} \cdot \frac{\sqrt{2}}{\sin k}\right)} \cdot \sqrt{\frac{\cos k}{t}}\right)}^{2} \]
    7. Simplified55.1%

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

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

    if 1.99999999999999994e-277 < (*.f64 l l) < 2.0000000000000001e243

    1. Initial program 31.8%

      \[\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. Taylor expanded in t around 0 89.4%

      \[\leadsto \frac{2}{\color{blue}{\frac{{k}^{2} \cdot \left(t \cdot {\sin k}^{2}\right)}{{\ell}^{2} \cdot \cos k}}} \]
    3. Step-by-step derivation
      1. times-frac91.0%

        \[\leadsto \frac{2}{\color{blue}{\frac{{k}^{2}}{{\ell}^{2}} \cdot \frac{t \cdot {\sin k}^{2}}{\cos k}}} \]
      2. associate-/l*91.0%

        \[\leadsto \frac{2}{\frac{{k}^{2}}{{\ell}^{2}} \cdot \color{blue}{\frac{t}{\frac{\cos k}{{\sin k}^{2}}}}} \]
    4. Simplified91.0%

      \[\leadsto \frac{2}{\color{blue}{\frac{{k}^{2}}{{\ell}^{2}} \cdot \frac{t}{\frac{\cos k}{{\sin k}^{2}}}}} \]
    5. Step-by-step derivation
      1. frac-times88.8%

        \[\leadsto \frac{2}{\color{blue}{\frac{{k}^{2} \cdot t}{{\ell}^{2} \cdot \frac{\cos k}{{\sin k}^{2}}}}} \]
      2. div-inv88.8%

        \[\leadsto \frac{2}{\frac{{k}^{2} \cdot t}{{\ell}^{2} \cdot \color{blue}{\left(\cos k \cdot \frac{1}{{\sin k}^{2}}\right)}}} \]
      3. pow-flip88.8%

        \[\leadsto \frac{2}{\frac{{k}^{2} \cdot t}{{\ell}^{2} \cdot \left(\cos k \cdot \color{blue}{{\sin k}^{\left(-2\right)}}\right)}} \]
      4. metadata-eval88.8%

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

      \[\leadsto \frac{2}{\color{blue}{\frac{{k}^{2} \cdot t}{{\ell}^{2} \cdot \left(\cos k \cdot {\sin k}^{-2}\right)}}} \]
    7. Step-by-step derivation
      1. times-frac90.9%

        \[\leadsto \frac{2}{\color{blue}{\frac{{k}^{2}}{{\ell}^{2}} \cdot \frac{t}{\cos k \cdot {\sin k}^{-2}}}} \]
    8. Simplified90.9%

      \[\leadsto \frac{2}{\color{blue}{\frac{{k}^{2}}{{\ell}^{2}} \cdot \frac{t}{\cos k \cdot {\sin k}^{-2}}}} \]
    9. Step-by-step derivation
      1. expm1-log1p-u65.5%

        \[\leadsto \color{blue}{\mathsf{expm1}\left(\mathsf{log1p}\left(\frac{2}{\frac{{k}^{2}}{{\ell}^{2}} \cdot \frac{t}{\cos k \cdot {\sin k}^{-2}}}\right)\right)} \]
      2. expm1-udef52.8%

        \[\leadsto \color{blue}{e^{\mathsf{log1p}\left(\frac{2}{\frac{{k}^{2}}{{\ell}^{2}} \cdot \frac{t}{\cos k \cdot {\sin k}^{-2}}}\right)} - 1} \]
      3. div-inv52.8%

        \[\leadsto e^{\mathsf{log1p}\left(\frac{2}{\color{blue}{\left({k}^{2} \cdot \frac{1}{{\ell}^{2}}\right)} \cdot \frac{t}{\cos k \cdot {\sin k}^{-2}}}\right)} - 1 \]
      4. pow-flip52.8%

        \[\leadsto e^{\mathsf{log1p}\left(\frac{2}{\left({k}^{2} \cdot \color{blue}{{\ell}^{\left(-2\right)}}\right) \cdot \frac{t}{\cos k \cdot {\sin k}^{-2}}}\right)} - 1 \]
      5. metadata-eval52.8%

        \[\leadsto e^{\mathsf{log1p}\left(\frac{2}{\left({k}^{2} \cdot {\ell}^{\color{blue}{-2}}\right) \cdot \frac{t}{\cos k \cdot {\sin k}^{-2}}}\right)} - 1 \]
    10. Applied egg-rr52.8%

      \[\leadsto \color{blue}{e^{\mathsf{log1p}\left(\frac{2}{\left({k}^{2} \cdot {\ell}^{-2}\right) \cdot \frac{t}{\cos k \cdot {\sin k}^{-2}}}\right)} - 1} \]
    11. Step-by-step derivation
      1. expm1-def65.5%

        \[\leadsto \color{blue}{\mathsf{expm1}\left(\mathsf{log1p}\left(\frac{2}{\left({k}^{2} \cdot {\ell}^{-2}\right) \cdot \frac{t}{\cos k \cdot {\sin k}^{-2}}}\right)\right)} \]
      2. expm1-log1p90.9%

        \[\leadsto \color{blue}{\frac{2}{\left({k}^{2} \cdot {\ell}^{-2}\right) \cdot \frac{t}{\cos k \cdot {\sin k}^{-2}}}} \]
      3. associate-/r*91.1%

        \[\leadsto \color{blue}{\frac{\frac{2}{{k}^{2} \cdot {\ell}^{-2}}}{\frac{t}{\cos k \cdot {\sin k}^{-2}}}} \]
    12. Simplified91.1%

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

    if 2.0000000000000001e243 < (*.f64 l l)

    1. Initial program 39.5%

      \[\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. Step-by-step derivation
      1. associate-/r*39.5%

        \[\leadsto \color{blue}{\frac{\frac{2}{\left(\frac{{t}^{3}}{\ell \cdot \ell} \cdot \sin k\right) \cdot \tan k}}{\left(1 + {\left(\frac{k}{t}\right)}^{2}\right) - 1}} \]
      2. *-commutative39.5%

        \[\leadsto \frac{\frac{2}{\color{blue}{\left(\sin k \cdot \frac{{t}^{3}}{\ell \cdot \ell}\right)} \cdot \tan k}}{\left(1 + {\left(\frac{k}{t}\right)}^{2}\right) - 1} \]
      3. associate-*l*39.5%

        \[\leadsto \frac{\frac{2}{\color{blue}{\sin k \cdot \left(\frac{{t}^{3}}{\ell \cdot \ell} \cdot \tan k\right)}}}{\left(1 + {\left(\frac{k}{t}\right)}^{2}\right) - 1} \]
      4. associate-*l/39.5%

        \[\leadsto \frac{\frac{2}{\sin k \cdot \color{blue}{\frac{{t}^{3} \cdot \tan k}{\ell \cdot \ell}}}}{\left(1 + {\left(\frac{k}{t}\right)}^{2}\right) - 1} \]
      5. +-commutative39.5%

        \[\leadsto \frac{\frac{2}{\sin k \cdot \frac{{t}^{3} \cdot \tan k}{\ell \cdot \ell}}}{\color{blue}{\left({\left(\frac{k}{t}\right)}^{2} + 1\right)} - 1} \]
      6. unpow239.5%

        \[\leadsto \frac{\frac{2}{\sin k \cdot \frac{{t}^{3} \cdot \tan k}{\ell \cdot \ell}}}{\left(\color{blue}{\frac{k}{t} \cdot \frac{k}{t}} + 1\right) - 1} \]
      7. sqr-neg39.5%

        \[\leadsto \frac{\frac{2}{\sin k \cdot \frac{{t}^{3} \cdot \tan k}{\ell \cdot \ell}}}{\left(\color{blue}{\left(-\frac{k}{t}\right) \cdot \left(-\frac{k}{t}\right)} + 1\right) - 1} \]
      8. distribute-frac-neg39.5%

        \[\leadsto \frac{\frac{2}{\sin k \cdot \frac{{t}^{3} \cdot \tan k}{\ell \cdot \ell}}}{\left(\color{blue}{\frac{-k}{t}} \cdot \left(-\frac{k}{t}\right) + 1\right) - 1} \]
      9. distribute-frac-neg39.5%

        \[\leadsto \frac{\frac{2}{\sin k \cdot \frac{{t}^{3} \cdot \tan k}{\ell \cdot \ell}}}{\left(\frac{-k}{t} \cdot \color{blue}{\frac{-k}{t}} + 1\right) - 1} \]
      10. unpow239.5%

        \[\leadsto \frac{\frac{2}{\sin k \cdot \frac{{t}^{3} \cdot \tan k}{\ell \cdot \ell}}}{\left(\color{blue}{{\left(\frac{-k}{t}\right)}^{2}} + 1\right) - 1} \]
      11. associate--l+39.5%

        \[\leadsto \frac{\frac{2}{\sin k \cdot \frac{{t}^{3} \cdot \tan k}{\ell \cdot \ell}}}{\color{blue}{{\left(\frac{-k}{t}\right)}^{2} + \left(1 - 1\right)}} \]
      12. metadata-eval39.5%

        \[\leadsto \frac{\frac{2}{\sin k \cdot \frac{{t}^{3} \cdot \tan k}{\ell \cdot \ell}}}{{\left(\frac{-k}{t}\right)}^{2} + \color{blue}{0}} \]
      13. +-rgt-identity39.5%

        \[\leadsto \frac{\frac{2}{\sin k \cdot \frac{{t}^{3} \cdot \tan k}{\ell \cdot \ell}}}{\color{blue}{{\left(\frac{-k}{t}\right)}^{2}}} \]
      14. unpow239.5%

        \[\leadsto \frac{\frac{2}{\sin k \cdot \frac{{t}^{3} \cdot \tan k}{\ell \cdot \ell}}}{\color{blue}{\frac{-k}{t} \cdot \frac{-k}{t}}} \]
      15. distribute-frac-neg39.5%

        \[\leadsto \frac{\frac{2}{\sin k \cdot \frac{{t}^{3} \cdot \tan k}{\ell \cdot \ell}}}{\color{blue}{\left(-\frac{k}{t}\right)} \cdot \frac{-k}{t}} \]
      16. distribute-frac-neg39.5%

        \[\leadsto \frac{\frac{2}{\sin k \cdot \frac{{t}^{3} \cdot \tan k}{\ell \cdot \ell}}}{\left(-\frac{k}{t}\right) \cdot \color{blue}{\left(-\frac{k}{t}\right)}} \]
    3. Simplified39.5%

      \[\leadsto \color{blue}{\frac{\frac{2}{\sin k \cdot \frac{{t}^{3} \cdot \tan k}{\ell \cdot \ell}}}{{\left(\frac{k}{t}\right)}^{2}}} \]
    4. Applied egg-rr21.9%

      \[\leadsto \color{blue}{{\left(\frac{\frac{\sqrt{2}}{\frac{k}{t}}}{\sqrt{\sin k \cdot \tan k} \cdot \frac{{t}^{1.5}}{\ell}}\right)}^{2}} \]
    5. Taylor expanded in k around inf 36.0%

      \[\leadsto {\color{blue}{\left(\frac{\ell \cdot \sqrt{2}}{k \cdot \sin k} \cdot \sqrt{\frac{\cos k}{t}}\right)}}^{2} \]
    6. Step-by-step derivation
      1. times-frac36.0%

        \[\leadsto {\left(\color{blue}{\left(\frac{\ell}{k} \cdot \frac{\sqrt{2}}{\sin k}\right)} \cdot \sqrt{\frac{\cos k}{t}}\right)}^{2} \]
    7. Simplified36.0%

      \[\leadsto {\color{blue}{\left(\left(\frac{\ell}{k} \cdot \frac{\sqrt{2}}{\sin k}\right) \cdot \sqrt{\frac{\cos k}{t}}\right)}}^{2} \]
    8. Step-by-step derivation
      1. pow136.0%

        \[\leadsto {\color{blue}{\left({\left(\left(\frac{\ell}{k} \cdot \frac{\sqrt{2}}{\sin k}\right) \cdot \sqrt{\frac{\cos k}{t}}\right)}^{1}\right)}}^{2} \]
      2. associate-*l*36.1%

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

      \[\leadsto {\color{blue}{\left({\left(\frac{\ell}{k} \cdot \left(\frac{\sqrt{2}}{\sin k} \cdot \sqrt{\frac{\cos k}{t}}\right)\right)}^{1}\right)}}^{2} \]
  3. Recombined 3 regimes into one program.
  4. Final simplification61.1%

    \[\leadsto \begin{array}{l} \mathbf{if}\;\ell \cdot \ell \leq 2 \cdot 10^{-277}:\\ \;\;\;\;{\left(\left(\frac{\ell}{k} \cdot \frac{\sqrt{2}}{\sin k}\right) \cdot \sqrt{\frac{1}{t}}\right)}^{2}\\ \mathbf{elif}\;\ell \cdot \ell \leq 2 \cdot 10^{+243}:\\ \;\;\;\;\frac{\frac{2}{{k}^{2} \cdot {\ell}^{-2}}}{\frac{t}{\cos k \cdot {\sin k}^{-2}}}\\ \mathbf{else}:\\ \;\;\;\;{\left(\frac{\ell}{k} \cdot \left(\frac{\sqrt{2}}{\sin k} \cdot \sqrt{\frac{\cos k}{t}}\right)\right)}^{2}\\ \end{array} \]

Alternative 2: 79.6% accurate, 0.5× speedup?

\[\begin{array}{l} t_m = \left|t\right| \\ t_s = \mathsf{copysign}\left(1, t\right) \\ t_s \cdot \begin{array}{l} \mathbf{if}\;\left(\left(\sin k \cdot \frac{{t_m}^{3}}{\ell \cdot \ell}\right) \cdot \tan k\right) \cdot \left(\left(1 + {\left(\frac{k}{t_m}\right)}^{2}\right) + -1\right) \leq \infty:\\ \;\;\;\;\frac{\frac{2}{\sin k}}{\frac{\frac{{t_m}^{3}}{\ell}}{\frac{\ell}{\tan k}}} \cdot {\left(\frac{k}{t_m}\right)}^{-2}\\ \mathbf{else}:\\ \;\;\;\;{\left(\left(\frac{\ell}{k} \cdot \frac{\sqrt{2}}{\sin k}\right) \cdot \sqrt{\frac{1}{t_m}}\right)}^{2}\\ \end{array} \end{array} \]
t_m = (fabs.f64 t)
t_s = (copysign.f64 1 t)
(FPCore (t_s t_m l k)
 :precision binary64
 (*
  t_s
  (if (<=
       (*
        (* (* (sin k) (/ (pow t_m 3.0) (* l l))) (tan k))
        (+ (+ 1.0 (pow (/ k t_m) 2.0)) -1.0))
       INFINITY)
    (*
     (/ (/ 2.0 (sin k)) (/ (/ (pow t_m 3.0) l) (/ l (tan k))))
     (pow (/ k t_m) -2.0))
    (pow (* (* (/ l k) (/ (sqrt 2.0) (sin k))) (sqrt (/ 1.0 t_m))) 2.0))))
t_m = fabs(t);
t_s = copysign(1.0, t);
double code(double t_s, double t_m, double l, double k) {
	double tmp;
	if ((((sin(k) * (pow(t_m, 3.0) / (l * l))) * tan(k)) * ((1.0 + pow((k / t_m), 2.0)) + -1.0)) <= ((double) INFINITY)) {
		tmp = ((2.0 / sin(k)) / ((pow(t_m, 3.0) / l) / (l / tan(k)))) * pow((k / t_m), -2.0);
	} else {
		tmp = pow((((l / k) * (sqrt(2.0) / sin(k))) * sqrt((1.0 / t_m))), 2.0);
	}
	return t_s * tmp;
}
t_m = Math.abs(t);
t_s = Math.copySign(1.0, t);
public static double code(double t_s, double t_m, double l, double k) {
	double tmp;
	if ((((Math.sin(k) * (Math.pow(t_m, 3.0) / (l * l))) * Math.tan(k)) * ((1.0 + Math.pow((k / t_m), 2.0)) + -1.0)) <= Double.POSITIVE_INFINITY) {
		tmp = ((2.0 / Math.sin(k)) / ((Math.pow(t_m, 3.0) / l) / (l / Math.tan(k)))) * Math.pow((k / t_m), -2.0);
	} else {
		tmp = Math.pow((((l / k) * (Math.sqrt(2.0) / Math.sin(k))) * Math.sqrt((1.0 / t_m))), 2.0);
	}
	return t_s * tmp;
}
t_m = math.fabs(t)
t_s = math.copysign(1.0, t)
def code(t_s, t_m, l, k):
	tmp = 0
	if (((math.sin(k) * (math.pow(t_m, 3.0) / (l * l))) * math.tan(k)) * ((1.0 + math.pow((k / t_m), 2.0)) + -1.0)) <= math.inf:
		tmp = ((2.0 / math.sin(k)) / ((math.pow(t_m, 3.0) / l) / (l / math.tan(k)))) * math.pow((k / t_m), -2.0)
	else:
		tmp = math.pow((((l / k) * (math.sqrt(2.0) / math.sin(k))) * math.sqrt((1.0 / t_m))), 2.0)
	return t_s * tmp
t_m = abs(t)
t_s = copysign(1.0, t)
function code(t_s, t_m, l, k)
	tmp = 0.0
	if (Float64(Float64(Float64(sin(k) * Float64((t_m ^ 3.0) / Float64(l * l))) * tan(k)) * Float64(Float64(1.0 + (Float64(k / t_m) ^ 2.0)) + -1.0)) <= Inf)
		tmp = Float64(Float64(Float64(2.0 / sin(k)) / Float64(Float64((t_m ^ 3.0) / l) / Float64(l / tan(k)))) * (Float64(k / t_m) ^ -2.0));
	else
		tmp = Float64(Float64(Float64(l / k) * Float64(sqrt(2.0) / sin(k))) * sqrt(Float64(1.0 / t_m))) ^ 2.0;
	end
	return Float64(t_s * tmp)
end
t_m = abs(t);
t_s = sign(t) * abs(1.0);
function tmp_2 = code(t_s, t_m, l, k)
	tmp = 0.0;
	if ((((sin(k) * ((t_m ^ 3.0) / (l * l))) * tan(k)) * ((1.0 + ((k / t_m) ^ 2.0)) + -1.0)) <= Inf)
		tmp = ((2.0 / sin(k)) / (((t_m ^ 3.0) / l) / (l / tan(k)))) * ((k / t_m) ^ -2.0);
	else
		tmp = (((l / k) * (sqrt(2.0) / sin(k))) * sqrt((1.0 / t_m))) ^ 2.0;
	end
	tmp_2 = t_s * tmp;
end
t_m = N[Abs[t], $MachinePrecision]
t_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[t]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[t$95$s_, t$95$m_, l_, k_] := N[(t$95$s * If[LessEqual[N[(N[(N[(N[Sin[k], $MachinePrecision] * N[(N[Power[t$95$m, 3.0], $MachinePrecision] / N[(l * l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[Tan[k], $MachinePrecision]), $MachinePrecision] * N[(N[(1.0 + N[Power[N[(k / t$95$m), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision] + -1.0), $MachinePrecision]), $MachinePrecision], Infinity], N[(N[(N[(2.0 / N[Sin[k], $MachinePrecision]), $MachinePrecision] / N[(N[(N[Power[t$95$m, 3.0], $MachinePrecision] / l), $MachinePrecision] / N[(l / N[Tan[k], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[Power[N[(k / t$95$m), $MachinePrecision], -2.0], $MachinePrecision]), $MachinePrecision], N[Power[N[(N[(N[(l / k), $MachinePrecision] * N[(N[Sqrt[2.0], $MachinePrecision] / N[Sin[k], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[Sqrt[N[(1.0 / t$95$m), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision]]), $MachinePrecision]
\begin{array}{l}
t_m = \left|t\right|
\\
t_s = \mathsf{copysign}\left(1, t\right)

\\
t_s \cdot \begin{array}{l}
\mathbf{if}\;\left(\left(\sin k \cdot \frac{{t_m}^{3}}{\ell \cdot \ell}\right) \cdot \tan k\right) \cdot \left(\left(1 + {\left(\frac{k}{t_m}\right)}^{2}\right) + -1\right) \leq \infty:\\
\;\;\;\;\frac{\frac{2}{\sin k}}{\frac{\frac{{t_m}^{3}}{\ell}}{\frac{\ell}{\tan k}}} \cdot {\left(\frac{k}{t_m}\right)}^{-2}\\

\mathbf{else}:\\
\;\;\;\;{\left(\left(\frac{\ell}{k} \cdot \frac{\sqrt{2}}{\sin k}\right) \cdot \sqrt{\frac{1}{t_m}}\right)}^{2}\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if (*.f64 (*.f64 (*.f64 (/.f64 (pow.f64 t 3) (*.f64 l l)) (sin.f64 k)) (tan.f64 k)) (-.f64 (+.f64 1 (pow.f64 (/.f64 k t) 2)) 1)) < +inf.0

    1. Initial program 87.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. Step-by-step derivation
      1. associate-/r*87.5%

        \[\leadsto \color{blue}{\frac{\frac{2}{\left(\frac{{t}^{3}}{\ell \cdot \ell} \cdot \sin k\right) \cdot \tan k}}{\left(1 + {\left(\frac{k}{t}\right)}^{2}\right) - 1}} \]
      2. *-commutative87.5%

        \[\leadsto \frac{\frac{2}{\color{blue}{\left(\sin k \cdot \frac{{t}^{3}}{\ell \cdot \ell}\right)} \cdot \tan k}}{\left(1 + {\left(\frac{k}{t}\right)}^{2}\right) - 1} \]
      3. associate-*l*87.5%

        \[\leadsto \frac{\frac{2}{\color{blue}{\sin k \cdot \left(\frac{{t}^{3}}{\ell \cdot \ell} \cdot \tan k\right)}}}{\left(1 + {\left(\frac{k}{t}\right)}^{2}\right) - 1} \]
      4. associate-*l/87.5%

        \[\leadsto \frac{\frac{2}{\sin k \cdot \color{blue}{\frac{{t}^{3} \cdot \tan k}{\ell \cdot \ell}}}}{\left(1 + {\left(\frac{k}{t}\right)}^{2}\right) - 1} \]
      5. +-commutative87.5%

        \[\leadsto \frac{\frac{2}{\sin k \cdot \frac{{t}^{3} \cdot \tan k}{\ell \cdot \ell}}}{\color{blue}{\left({\left(\frac{k}{t}\right)}^{2} + 1\right)} - 1} \]
      6. unpow287.5%

        \[\leadsto \frac{\frac{2}{\sin k \cdot \frac{{t}^{3} \cdot \tan k}{\ell \cdot \ell}}}{\left(\color{blue}{\frac{k}{t} \cdot \frac{k}{t}} + 1\right) - 1} \]
      7. sqr-neg87.5%

        \[\leadsto \frac{\frac{2}{\sin k \cdot \frac{{t}^{3} \cdot \tan k}{\ell \cdot \ell}}}{\left(\color{blue}{\left(-\frac{k}{t}\right) \cdot \left(-\frac{k}{t}\right)} + 1\right) - 1} \]
      8. distribute-frac-neg87.5%

        \[\leadsto \frac{\frac{2}{\sin k \cdot \frac{{t}^{3} \cdot \tan k}{\ell \cdot \ell}}}{\left(\color{blue}{\frac{-k}{t}} \cdot \left(-\frac{k}{t}\right) + 1\right) - 1} \]
      9. distribute-frac-neg87.5%

        \[\leadsto \frac{\frac{2}{\sin k \cdot \frac{{t}^{3} \cdot \tan k}{\ell \cdot \ell}}}{\left(\frac{-k}{t} \cdot \color{blue}{\frac{-k}{t}} + 1\right) - 1} \]
      10. unpow287.5%

        \[\leadsto \frac{\frac{2}{\sin k \cdot \frac{{t}^{3} \cdot \tan k}{\ell \cdot \ell}}}{\left(\color{blue}{{\left(\frac{-k}{t}\right)}^{2}} + 1\right) - 1} \]
      11. associate--l+91.3%

        \[\leadsto \frac{\frac{2}{\sin k \cdot \frac{{t}^{3} \cdot \tan k}{\ell \cdot \ell}}}{\color{blue}{{\left(\frac{-k}{t}\right)}^{2} + \left(1 - 1\right)}} \]
      12. metadata-eval91.3%

        \[\leadsto \frac{\frac{2}{\sin k \cdot \frac{{t}^{3} \cdot \tan k}{\ell \cdot \ell}}}{{\left(\frac{-k}{t}\right)}^{2} + \color{blue}{0}} \]
      13. +-rgt-identity91.3%

        \[\leadsto \frac{\frac{2}{\sin k \cdot \frac{{t}^{3} \cdot \tan k}{\ell \cdot \ell}}}{\color{blue}{{\left(\frac{-k}{t}\right)}^{2}}} \]
      14. unpow291.3%

        \[\leadsto \frac{\frac{2}{\sin k \cdot \frac{{t}^{3} \cdot \tan k}{\ell \cdot \ell}}}{\color{blue}{\frac{-k}{t} \cdot \frac{-k}{t}}} \]
      15. distribute-frac-neg91.3%

        \[\leadsto \frac{\frac{2}{\sin k \cdot \frac{{t}^{3} \cdot \tan k}{\ell \cdot \ell}}}{\color{blue}{\left(-\frac{k}{t}\right)} \cdot \frac{-k}{t}} \]
      16. distribute-frac-neg91.3%

        \[\leadsto \frac{\frac{2}{\sin k \cdot \frac{{t}^{3} \cdot \tan k}{\ell \cdot \ell}}}{\left(-\frac{k}{t}\right) \cdot \color{blue}{\left(-\frac{k}{t}\right)}} \]
    3. Simplified91.3%

      \[\leadsto \color{blue}{\frac{\frac{2}{\sin k \cdot \frac{{t}^{3} \cdot \tan k}{\ell \cdot \ell}}}{{\left(\frac{k}{t}\right)}^{2}}} \]
    4. Step-by-step derivation
      1. times-frac95.1%

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

      \[\leadsto \frac{\frac{2}{\sin k \cdot \color{blue}{\left(\frac{{t}^{3}}{\ell} \cdot \frac{\tan k}{\ell}\right)}}}{{\left(\frac{k}{t}\right)}^{2}} \]
    6. Step-by-step derivation
      1. associate-*r/95.1%

        \[\leadsto \frac{\frac{2}{\sin k \cdot \color{blue}{\frac{\frac{{t}^{3}}{\ell} \cdot \tan k}{\ell}}}}{{\left(\frac{k}{t}\right)}^{2}} \]
    7. Applied egg-rr95.1%

      \[\leadsto \frac{\frac{2}{\sin k \cdot \color{blue}{\frac{\frac{{t}^{3}}{\ell} \cdot \tan k}{\ell}}}}{{\left(\frac{k}{t}\right)}^{2}} \]
    8. Step-by-step derivation
      1. pow295.1%

        \[\leadsto \frac{\frac{2}{\sin k \cdot \frac{\frac{{t}^{3}}{\ell} \cdot \tan k}{\ell}}}{\color{blue}{\frac{k}{t} \cdot \frac{k}{t}}} \]
      2. div-inv95.1%

        \[\leadsto \color{blue}{\frac{2}{\sin k \cdot \frac{\frac{{t}^{3}}{\ell} \cdot \tan k}{\ell}} \cdot \frac{1}{\frac{k}{t} \cdot \frac{k}{t}}} \]
      3. associate-/r*95.1%

        \[\leadsto \color{blue}{\frac{\frac{2}{\sin k}}{\frac{\frac{{t}^{3}}{\ell} \cdot \tan k}{\ell}}} \cdot \frac{1}{\frac{k}{t} \cdot \frac{k}{t}} \]
      4. associate-/l*95.1%

        \[\leadsto \frac{\frac{2}{\sin k}}{\color{blue}{\frac{\frac{{t}^{3}}{\ell}}{\frac{\ell}{\tan k}}}} \cdot \frac{1}{\frac{k}{t} \cdot \frac{k}{t}} \]
      5. pow295.1%

        \[\leadsto \frac{\frac{2}{\sin k}}{\frac{\frac{{t}^{3}}{\ell}}{\frac{\ell}{\tan k}}} \cdot \frac{1}{\color{blue}{{\left(\frac{k}{t}\right)}^{2}}} \]
      6. pow-flip96.5%

        \[\leadsto \frac{\frac{2}{\sin k}}{\frac{\frac{{t}^{3}}{\ell}}{\frac{\ell}{\tan k}}} \cdot \color{blue}{{\left(\frac{k}{t}\right)}^{\left(-2\right)}} \]
      7. metadata-eval96.5%

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

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

    if +inf.0 < (*.f64 (*.f64 (*.f64 (/.f64 (pow.f64 t 3) (*.f64 l l)) (sin.f64 k)) (tan.f64 k)) (-.f64 (+.f64 1 (pow.f64 (/.f64 k t) 2)) 1))

    1. Initial program 0.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. Step-by-step derivation
      1. associate-/r*0.0%

        \[\leadsto \color{blue}{\frac{\frac{2}{\left(\frac{{t}^{3}}{\ell \cdot \ell} \cdot \sin k\right) \cdot \tan k}}{\left(1 + {\left(\frac{k}{t}\right)}^{2}\right) - 1}} \]
      2. *-commutative0.0%

        \[\leadsto \frac{\frac{2}{\color{blue}{\left(\sin k \cdot \frac{{t}^{3}}{\ell \cdot \ell}\right)} \cdot \tan k}}{\left(1 + {\left(\frac{k}{t}\right)}^{2}\right) - 1} \]
      3. associate-*l*0.0%

        \[\leadsto \frac{\frac{2}{\color{blue}{\sin k \cdot \left(\frac{{t}^{3}}{\ell \cdot \ell} \cdot \tan k\right)}}}{\left(1 + {\left(\frac{k}{t}\right)}^{2}\right) - 1} \]
      4. associate-*l/0.0%

        \[\leadsto \frac{\frac{2}{\sin k \cdot \color{blue}{\frac{{t}^{3} \cdot \tan k}{\ell \cdot \ell}}}}{\left(1 + {\left(\frac{k}{t}\right)}^{2}\right) - 1} \]
      5. +-commutative0.0%

        \[\leadsto \frac{\frac{2}{\sin k \cdot \frac{{t}^{3} \cdot \tan k}{\ell \cdot \ell}}}{\color{blue}{\left({\left(\frac{k}{t}\right)}^{2} + 1\right)} - 1} \]
      6. unpow20.0%

        \[\leadsto \frac{\frac{2}{\sin k \cdot \frac{{t}^{3} \cdot \tan k}{\ell \cdot \ell}}}{\left(\color{blue}{\frac{k}{t} \cdot \frac{k}{t}} + 1\right) - 1} \]
      7. sqr-neg0.0%

        \[\leadsto \frac{\frac{2}{\sin k \cdot \frac{{t}^{3} \cdot \tan k}{\ell \cdot \ell}}}{\left(\color{blue}{\left(-\frac{k}{t}\right) \cdot \left(-\frac{k}{t}\right)} + 1\right) - 1} \]
      8. distribute-frac-neg0.0%

        \[\leadsto \frac{\frac{2}{\sin k \cdot \frac{{t}^{3} \cdot \tan k}{\ell \cdot \ell}}}{\left(\color{blue}{\frac{-k}{t}} \cdot \left(-\frac{k}{t}\right) + 1\right) - 1} \]
      9. distribute-frac-neg0.0%

        \[\leadsto \frac{\frac{2}{\sin k \cdot \frac{{t}^{3} \cdot \tan k}{\ell \cdot \ell}}}{\left(\frac{-k}{t} \cdot \color{blue}{\frac{-k}{t}} + 1\right) - 1} \]
      10. unpow20.0%

        \[\leadsto \frac{\frac{2}{\sin k \cdot \frac{{t}^{3} \cdot \tan k}{\ell \cdot \ell}}}{\left(\color{blue}{{\left(\frac{-k}{t}\right)}^{2}} + 1\right) - 1} \]
      11. associate--l+13.2%

        \[\leadsto \frac{\frac{2}{\sin k \cdot \frac{{t}^{3} \cdot \tan k}{\ell \cdot \ell}}}{\color{blue}{{\left(\frac{-k}{t}\right)}^{2} + \left(1 - 1\right)}} \]
      12. metadata-eval13.2%

        \[\leadsto \frac{\frac{2}{\sin k \cdot \frac{{t}^{3} \cdot \tan k}{\ell \cdot \ell}}}{{\left(\frac{-k}{t}\right)}^{2} + \color{blue}{0}} \]
      13. +-rgt-identity13.2%

        \[\leadsto \frac{\frac{2}{\sin k \cdot \frac{{t}^{3} \cdot \tan k}{\ell \cdot \ell}}}{\color{blue}{{\left(\frac{-k}{t}\right)}^{2}}} \]
      14. unpow213.2%

        \[\leadsto \frac{\frac{2}{\sin k \cdot \frac{{t}^{3} \cdot \tan k}{\ell \cdot \ell}}}{\color{blue}{\frac{-k}{t} \cdot \frac{-k}{t}}} \]
      15. distribute-frac-neg13.2%

        \[\leadsto \frac{\frac{2}{\sin k \cdot \frac{{t}^{3} \cdot \tan k}{\ell \cdot \ell}}}{\color{blue}{\left(-\frac{k}{t}\right)} \cdot \frac{-k}{t}} \]
      16. distribute-frac-neg13.2%

        \[\leadsto \frac{\frac{2}{\sin k \cdot \frac{{t}^{3} \cdot \tan k}{\ell \cdot \ell}}}{\left(-\frac{k}{t}\right) \cdot \color{blue}{\left(-\frac{k}{t}\right)}} \]
    3. Simplified13.2%

      \[\leadsto \color{blue}{\frac{\frac{2}{\sin k \cdot \frac{{t}^{3} \cdot \tan k}{\ell \cdot \ell}}}{{\left(\frac{k}{t}\right)}^{2}}} \]
    4. Applied egg-rr20.0%

      \[\leadsto \color{blue}{{\left(\frac{\frac{\sqrt{2}}{\frac{k}{t}}}{\sqrt{\sin k \cdot \tan k} \cdot \frac{{t}^{1.5}}{\ell}}\right)}^{2}} \]
    5. Taylor expanded in k around inf 48.1%

      \[\leadsto {\color{blue}{\left(\frac{\ell \cdot \sqrt{2}}{k \cdot \sin k} \cdot \sqrt{\frac{\cos k}{t}}\right)}}^{2} \]
    6. Step-by-step derivation
      1. times-frac48.7%

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

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

      \[\leadsto {\left(\left(\frac{\ell}{k} \cdot \frac{\sqrt{2}}{\sin k}\right) \cdot \color{blue}{\sqrt{\frac{1}{t}}}\right)}^{2} \]
  3. Recombined 2 regimes into one program.
  4. Final simplification56.4%

    \[\leadsto \begin{array}{l} \mathbf{if}\;\left(\left(\sin k \cdot \frac{{t}^{3}}{\ell \cdot \ell}\right) \cdot \tan k\right) \cdot \left(\left(1 + {\left(\frac{k}{t}\right)}^{2}\right) + -1\right) \leq \infty:\\ \;\;\;\;\frac{\frac{2}{\sin k}}{\frac{\frac{{t}^{3}}{\ell}}{\frac{\ell}{\tan k}}} \cdot {\left(\frac{k}{t}\right)}^{-2}\\ \mathbf{else}:\\ \;\;\;\;{\left(\left(\frac{\ell}{k} \cdot \frac{\sqrt{2}}{\sin k}\right) \cdot \sqrt{\frac{1}{t}}\right)}^{2}\\ \end{array} \]

Alternative 3: 86.3% accurate, 0.8× speedup?

\[\begin{array}{l} t_m = \left|t\right| \\ t_s = \mathsf{copysign}\left(1, t\right) \\ t_s \cdot \begin{array}{l} \mathbf{if}\;\ell \cdot \ell \leq 2 \cdot 10^{-277}:\\ \;\;\;\;{\left(\left(\frac{\ell}{k} \cdot \frac{\sqrt{2}}{\sin k}\right) \cdot \sqrt{\frac{1}{t_m}}\right)}^{2}\\ \mathbf{elif}\;\ell \cdot \ell \leq 5 \cdot 10^{+231}:\\ \;\;\;\;2 \cdot \left(\frac{{\ell}^{2}}{{k}^{2}} \cdot \frac{\cos k}{t_m \cdot {\sin k}^{2}}\right)\\ \mathbf{else}:\\ \;\;\;\;{\left(\sqrt{\frac{\cos k}{t_m}} \cdot \frac{\ell \cdot \sqrt{2}}{k \cdot \sin k}\right)}^{2}\\ \end{array} \end{array} \]
t_m = (fabs.f64 t)
t_s = (copysign.f64 1 t)
(FPCore (t_s t_m l k)
 :precision binary64
 (*
  t_s
  (if (<= (* l l) 2e-277)
    (pow (* (* (/ l k) (/ (sqrt 2.0) (sin k))) (sqrt (/ 1.0 t_m))) 2.0)
    (if (<= (* l l) 5e+231)
      (*
       2.0
       (* (/ (pow l 2.0) (pow k 2.0)) (/ (cos k) (* t_m (pow (sin k) 2.0)))))
      (pow
       (* (sqrt (/ (cos k) t_m)) (/ (* l (sqrt 2.0)) (* k (sin k))))
       2.0)))))
t_m = fabs(t);
t_s = copysign(1.0, t);
double code(double t_s, double t_m, double l, double k) {
	double tmp;
	if ((l * l) <= 2e-277) {
		tmp = pow((((l / k) * (sqrt(2.0) / sin(k))) * sqrt((1.0 / t_m))), 2.0);
	} else if ((l * l) <= 5e+231) {
		tmp = 2.0 * ((pow(l, 2.0) / pow(k, 2.0)) * (cos(k) / (t_m * pow(sin(k), 2.0))));
	} else {
		tmp = pow((sqrt((cos(k) / t_m)) * ((l * sqrt(2.0)) / (k * sin(k)))), 2.0);
	}
	return t_s * tmp;
}
t_m = abs(t)
t_s = copysign(1.0d0, t)
real(8) function code(t_s, t_m, l, k)
    real(8), intent (in) :: t_s
    real(8), intent (in) :: t_m
    real(8), intent (in) :: l
    real(8), intent (in) :: k
    real(8) :: tmp
    if ((l * l) <= 2d-277) then
        tmp = (((l / k) * (sqrt(2.0d0) / sin(k))) * sqrt((1.0d0 / t_m))) ** 2.0d0
    else if ((l * l) <= 5d+231) then
        tmp = 2.0d0 * (((l ** 2.0d0) / (k ** 2.0d0)) * (cos(k) / (t_m * (sin(k) ** 2.0d0))))
    else
        tmp = (sqrt((cos(k) / t_m)) * ((l * sqrt(2.0d0)) / (k * sin(k)))) ** 2.0d0
    end if
    code = t_s * tmp
end function
t_m = Math.abs(t);
t_s = Math.copySign(1.0, t);
public static double code(double t_s, double t_m, double l, double k) {
	double tmp;
	if ((l * l) <= 2e-277) {
		tmp = Math.pow((((l / k) * (Math.sqrt(2.0) / Math.sin(k))) * Math.sqrt((1.0 / t_m))), 2.0);
	} else if ((l * l) <= 5e+231) {
		tmp = 2.0 * ((Math.pow(l, 2.0) / Math.pow(k, 2.0)) * (Math.cos(k) / (t_m * Math.pow(Math.sin(k), 2.0))));
	} else {
		tmp = Math.pow((Math.sqrt((Math.cos(k) / t_m)) * ((l * Math.sqrt(2.0)) / (k * Math.sin(k)))), 2.0);
	}
	return t_s * tmp;
}
t_m = math.fabs(t)
t_s = math.copysign(1.0, t)
def code(t_s, t_m, l, k):
	tmp = 0
	if (l * l) <= 2e-277:
		tmp = math.pow((((l / k) * (math.sqrt(2.0) / math.sin(k))) * math.sqrt((1.0 / t_m))), 2.0)
	elif (l * l) <= 5e+231:
		tmp = 2.0 * ((math.pow(l, 2.0) / math.pow(k, 2.0)) * (math.cos(k) / (t_m * math.pow(math.sin(k), 2.0))))
	else:
		tmp = math.pow((math.sqrt((math.cos(k) / t_m)) * ((l * math.sqrt(2.0)) / (k * math.sin(k)))), 2.0)
	return t_s * tmp
t_m = abs(t)
t_s = copysign(1.0, t)
function code(t_s, t_m, l, k)
	tmp = 0.0
	if (Float64(l * l) <= 2e-277)
		tmp = Float64(Float64(Float64(l / k) * Float64(sqrt(2.0) / sin(k))) * sqrt(Float64(1.0 / t_m))) ^ 2.0;
	elseif (Float64(l * l) <= 5e+231)
		tmp = Float64(2.0 * Float64(Float64((l ^ 2.0) / (k ^ 2.0)) * Float64(cos(k) / Float64(t_m * (sin(k) ^ 2.0)))));
	else
		tmp = Float64(sqrt(Float64(cos(k) / t_m)) * Float64(Float64(l * sqrt(2.0)) / Float64(k * sin(k)))) ^ 2.0;
	end
	return Float64(t_s * tmp)
end
t_m = abs(t);
t_s = sign(t) * abs(1.0);
function tmp_2 = code(t_s, t_m, l, k)
	tmp = 0.0;
	if ((l * l) <= 2e-277)
		tmp = (((l / k) * (sqrt(2.0) / sin(k))) * sqrt((1.0 / t_m))) ^ 2.0;
	elseif ((l * l) <= 5e+231)
		tmp = 2.0 * (((l ^ 2.0) / (k ^ 2.0)) * (cos(k) / (t_m * (sin(k) ^ 2.0))));
	else
		tmp = (sqrt((cos(k) / t_m)) * ((l * sqrt(2.0)) / (k * sin(k)))) ^ 2.0;
	end
	tmp_2 = t_s * tmp;
end
t_m = N[Abs[t], $MachinePrecision]
t_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[t]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[t$95$s_, t$95$m_, l_, k_] := N[(t$95$s * If[LessEqual[N[(l * l), $MachinePrecision], 2e-277], N[Power[N[(N[(N[(l / k), $MachinePrecision] * N[(N[Sqrt[2.0], $MachinePrecision] / N[Sin[k], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[Sqrt[N[(1.0 / t$95$m), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision], If[LessEqual[N[(l * l), $MachinePrecision], 5e+231], N[(2.0 * N[(N[(N[Power[l, 2.0], $MachinePrecision] / N[Power[k, 2.0], $MachinePrecision]), $MachinePrecision] * N[(N[Cos[k], $MachinePrecision] / N[(t$95$m * N[Power[N[Sin[k], $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[Power[N[(N[Sqrt[N[(N[Cos[k], $MachinePrecision] / t$95$m), $MachinePrecision]], $MachinePrecision] * N[(N[(l * N[Sqrt[2.0], $MachinePrecision]), $MachinePrecision] / N[(k * N[Sin[k], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision]]]), $MachinePrecision]
\begin{array}{l}
t_m = \left|t\right|
\\
t_s = \mathsf{copysign}\left(1, t\right)

\\
t_s \cdot \begin{array}{l}
\mathbf{if}\;\ell \cdot \ell \leq 2 \cdot 10^{-277}:\\
\;\;\;\;{\left(\left(\frac{\ell}{k} \cdot \frac{\sqrt{2}}{\sin k}\right) \cdot \sqrt{\frac{1}{t_m}}\right)}^{2}\\

\mathbf{elif}\;\ell \cdot \ell \leq 5 \cdot 10^{+231}:\\
\;\;\;\;2 \cdot \left(\frac{{\ell}^{2}}{{k}^{2}} \cdot \frac{\cos k}{t_m \cdot {\sin k}^{2}}\right)\\

\mathbf{else}:\\
\;\;\;\;{\left(\sqrt{\frac{\cos k}{t_m}} \cdot \frac{\ell \cdot \sqrt{2}}{k \cdot \sin k}\right)}^{2}\\


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if (*.f64 l l) < 1.99999999999999994e-277

    1. Initial program 31.5%

      \[\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. Step-by-step derivation
      1. associate-/r*31.5%

        \[\leadsto \color{blue}{\frac{\frac{2}{\left(\frac{{t}^{3}}{\ell \cdot \ell} \cdot \sin k\right) \cdot \tan k}}{\left(1 + {\left(\frac{k}{t}\right)}^{2}\right) - 1}} \]
      2. *-commutative31.5%

        \[\leadsto \frac{\frac{2}{\color{blue}{\left(\sin k \cdot \frac{{t}^{3}}{\ell \cdot \ell}\right)} \cdot \tan k}}{\left(1 + {\left(\frac{k}{t}\right)}^{2}\right) - 1} \]
      3. associate-*l*31.5%

        \[\leadsto \frac{\frac{2}{\color{blue}{\sin k \cdot \left(\frac{{t}^{3}}{\ell \cdot \ell} \cdot \tan k\right)}}}{\left(1 + {\left(\frac{k}{t}\right)}^{2}\right) - 1} \]
      4. associate-*l/31.5%

        \[\leadsto \frac{\frac{2}{\sin k \cdot \color{blue}{\frac{{t}^{3} \cdot \tan k}{\ell \cdot \ell}}}}{\left(1 + {\left(\frac{k}{t}\right)}^{2}\right) - 1} \]
      5. +-commutative31.5%

        \[\leadsto \frac{\frac{2}{\sin k \cdot \frac{{t}^{3} \cdot \tan k}{\ell \cdot \ell}}}{\color{blue}{\left({\left(\frac{k}{t}\right)}^{2} + 1\right)} - 1} \]
      6. unpow231.5%

        \[\leadsto \frac{\frac{2}{\sin k \cdot \frac{{t}^{3} \cdot \tan k}{\ell \cdot \ell}}}{\left(\color{blue}{\frac{k}{t} \cdot \frac{k}{t}} + 1\right) - 1} \]
      7. sqr-neg31.5%

        \[\leadsto \frac{\frac{2}{\sin k \cdot \frac{{t}^{3} \cdot \tan k}{\ell \cdot \ell}}}{\left(\color{blue}{\left(-\frac{k}{t}\right) \cdot \left(-\frac{k}{t}\right)} + 1\right) - 1} \]
      8. distribute-frac-neg31.5%

        \[\leadsto \frac{\frac{2}{\sin k \cdot \frac{{t}^{3} \cdot \tan k}{\ell \cdot \ell}}}{\left(\color{blue}{\frac{-k}{t}} \cdot \left(-\frac{k}{t}\right) + 1\right) - 1} \]
      9. distribute-frac-neg31.5%

        \[\leadsto \frac{\frac{2}{\sin k \cdot \frac{{t}^{3} \cdot \tan k}{\ell \cdot \ell}}}{\left(\frac{-k}{t} \cdot \color{blue}{\frac{-k}{t}} + 1\right) - 1} \]
      10. unpow231.5%

        \[\leadsto \frac{\frac{2}{\sin k \cdot \frac{{t}^{3} \cdot \tan k}{\ell \cdot \ell}}}{\left(\color{blue}{{\left(\frac{-k}{t}\right)}^{2}} + 1\right) - 1} \]
      11. associate--l+44.7%

        \[\leadsto \frac{\frac{2}{\sin k \cdot \frac{{t}^{3} \cdot \tan k}{\ell \cdot \ell}}}{\color{blue}{{\left(\frac{-k}{t}\right)}^{2} + \left(1 - 1\right)}} \]
      12. metadata-eval44.7%

        \[\leadsto \frac{\frac{2}{\sin k \cdot \frac{{t}^{3} \cdot \tan k}{\ell \cdot \ell}}}{{\left(\frac{-k}{t}\right)}^{2} + \color{blue}{0}} \]
      13. +-rgt-identity44.7%

        \[\leadsto \frac{\frac{2}{\sin k \cdot \frac{{t}^{3} \cdot \tan k}{\ell \cdot \ell}}}{\color{blue}{{\left(\frac{-k}{t}\right)}^{2}}} \]
      14. unpow244.7%

        \[\leadsto \frac{\frac{2}{\sin k \cdot \frac{{t}^{3} \cdot \tan k}{\ell \cdot \ell}}}{\color{blue}{\frac{-k}{t} \cdot \frac{-k}{t}}} \]
      15. distribute-frac-neg44.7%

        \[\leadsto \frac{\frac{2}{\sin k \cdot \frac{{t}^{3} \cdot \tan k}{\ell \cdot \ell}}}{\color{blue}{\left(-\frac{k}{t}\right)} \cdot \frac{-k}{t}} \]
      16. distribute-frac-neg44.7%

        \[\leadsto \frac{\frac{2}{\sin k \cdot \frac{{t}^{3} \cdot \tan k}{\ell \cdot \ell}}}{\left(-\frac{k}{t}\right) \cdot \color{blue}{\left(-\frac{k}{t}\right)}} \]
    3. Simplified44.7%

      \[\leadsto \color{blue}{\frac{\frac{2}{\sin k \cdot \frac{{t}^{3} \cdot \tan k}{\ell \cdot \ell}}}{{\left(\frac{k}{t}\right)}^{2}}} \]
    4. Applied egg-rr31.4%

      \[\leadsto \color{blue}{{\left(\frac{\frac{\sqrt{2}}{\frac{k}{t}}}{\sqrt{\sin k \cdot \tan k} \cdot \frac{{t}^{1.5}}{\ell}}\right)}^{2}} \]
    5. Taylor expanded in k around inf 54.0%

      \[\leadsto {\color{blue}{\left(\frac{\ell \cdot \sqrt{2}}{k \cdot \sin k} \cdot \sqrt{\frac{\cos k}{t}}\right)}}^{2} \]
    6. Step-by-step derivation
      1. times-frac55.1%

        \[\leadsto {\left(\color{blue}{\left(\frac{\ell}{k} \cdot \frac{\sqrt{2}}{\sin k}\right)} \cdot \sqrt{\frac{\cos k}{t}}\right)}^{2} \]
    7. Simplified55.1%

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

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

    if 1.99999999999999994e-277 < (*.f64 l l) < 5.00000000000000028e231

    1. Initial program 32.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. Step-by-step derivation
      1. associate-/r*32.3%

        \[\leadsto \color{blue}{\frac{\frac{2}{\left(\frac{{t}^{3}}{\ell \cdot \ell} \cdot \sin k\right) \cdot \tan k}}{\left(1 + {\left(\frac{k}{t}\right)}^{2}\right) - 1}} \]
      2. *-commutative32.3%

        \[\leadsto \frac{\frac{2}{\color{blue}{\left(\sin k \cdot \frac{{t}^{3}}{\ell \cdot \ell}\right)} \cdot \tan k}}{\left(1 + {\left(\frac{k}{t}\right)}^{2}\right) - 1} \]
      3. associate-*l*32.3%

        \[\leadsto \frac{\frac{2}{\color{blue}{\sin k \cdot \left(\frac{{t}^{3}}{\ell \cdot \ell} \cdot \tan k\right)}}}{\left(1 + {\left(\frac{k}{t}\right)}^{2}\right) - 1} \]
      4. associate-*l/32.3%

        \[\leadsto \frac{\frac{2}{\sin k \cdot \color{blue}{\frac{{t}^{3} \cdot \tan k}{\ell \cdot \ell}}}}{\left(1 + {\left(\frac{k}{t}\right)}^{2}\right) - 1} \]
      5. +-commutative32.3%

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

        \[\leadsto \frac{\frac{2}{\sin k \cdot \frac{{t}^{3} \cdot \tan k}{\ell \cdot \ell}}}{\left(\color{blue}{\frac{k}{t} \cdot \frac{k}{t}} + 1\right) - 1} \]
      7. sqr-neg32.3%

        \[\leadsto \frac{\frac{2}{\sin k \cdot \frac{{t}^{3} \cdot \tan k}{\ell \cdot \ell}}}{\left(\color{blue}{\left(-\frac{k}{t}\right) \cdot \left(-\frac{k}{t}\right)} + 1\right) - 1} \]
      8. distribute-frac-neg32.3%

        \[\leadsto \frac{\frac{2}{\sin k \cdot \frac{{t}^{3} \cdot \tan k}{\ell \cdot \ell}}}{\left(\color{blue}{\frac{-k}{t}} \cdot \left(-\frac{k}{t}\right) + 1\right) - 1} \]
      9. distribute-frac-neg32.3%

        \[\leadsto \frac{\frac{2}{\sin k \cdot \frac{{t}^{3} \cdot \tan k}{\ell \cdot \ell}}}{\left(\frac{-k}{t} \cdot \color{blue}{\frac{-k}{t}} + 1\right) - 1} \]
      10. unpow232.3%

        \[\leadsto \frac{\frac{2}{\sin k \cdot \frac{{t}^{3} \cdot \tan k}{\ell \cdot \ell}}}{\left(\color{blue}{{\left(\frac{-k}{t}\right)}^{2}} + 1\right) - 1} \]
      11. associate--l+45.4%

        \[\leadsto \frac{\frac{2}{\sin k \cdot \frac{{t}^{3} \cdot \tan k}{\ell \cdot \ell}}}{\color{blue}{{\left(\frac{-k}{t}\right)}^{2} + \left(1 - 1\right)}} \]
      12. metadata-eval45.4%

        \[\leadsto \frac{\frac{2}{\sin k \cdot \frac{{t}^{3} \cdot \tan k}{\ell \cdot \ell}}}{{\left(\frac{-k}{t}\right)}^{2} + \color{blue}{0}} \]
      13. +-rgt-identity45.4%

        \[\leadsto \frac{\frac{2}{\sin k \cdot \frac{{t}^{3} \cdot \tan k}{\ell \cdot \ell}}}{\color{blue}{{\left(\frac{-k}{t}\right)}^{2}}} \]
      14. unpow245.4%

        \[\leadsto \frac{\frac{2}{\sin k \cdot \frac{{t}^{3} \cdot \tan k}{\ell \cdot \ell}}}{\color{blue}{\frac{-k}{t} \cdot \frac{-k}{t}}} \]
      15. distribute-frac-neg45.4%

        \[\leadsto \frac{\frac{2}{\sin k \cdot \frac{{t}^{3} \cdot \tan k}{\ell \cdot \ell}}}{\color{blue}{\left(-\frac{k}{t}\right)} \cdot \frac{-k}{t}} \]
      16. distribute-frac-neg45.4%

        \[\leadsto \frac{\frac{2}{\sin k \cdot \frac{{t}^{3} \cdot \tan k}{\ell \cdot \ell}}}{\left(-\frac{k}{t}\right) \cdot \color{blue}{\left(-\frac{k}{t}\right)}} \]
    3. Simplified45.4%

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

      \[\leadsto \color{blue}{2 \cdot \frac{{\ell}^{2} \cdot \cos k}{{k}^{2} \cdot \left(t \cdot {\sin k}^{2}\right)}} \]
    5. Step-by-step derivation
      1. times-frac91.0%

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

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

    if 5.00000000000000028e231 < (*.f64 l l)

    1. Initial program 38.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. Step-by-step derivation
      1. associate-/r*38.9%

        \[\leadsto \color{blue}{\frac{\frac{2}{\left(\frac{{t}^{3}}{\ell \cdot \ell} \cdot \sin k\right) \cdot \tan k}}{\left(1 + {\left(\frac{k}{t}\right)}^{2}\right) - 1}} \]
      2. *-commutative38.9%

        \[\leadsto \frac{\frac{2}{\color{blue}{\left(\sin k \cdot \frac{{t}^{3}}{\ell \cdot \ell}\right)} \cdot \tan k}}{\left(1 + {\left(\frac{k}{t}\right)}^{2}\right) - 1} \]
      3. associate-*l*38.9%

        \[\leadsto \frac{\frac{2}{\color{blue}{\sin k \cdot \left(\frac{{t}^{3}}{\ell \cdot \ell} \cdot \tan k\right)}}}{\left(1 + {\left(\frac{k}{t}\right)}^{2}\right) - 1} \]
      4. associate-*l/38.9%

        \[\leadsto \frac{\frac{2}{\sin k \cdot \color{blue}{\frac{{t}^{3} \cdot \tan k}{\ell \cdot \ell}}}}{\left(1 + {\left(\frac{k}{t}\right)}^{2}\right) - 1} \]
      5. +-commutative38.9%

        \[\leadsto \frac{\frac{2}{\sin k \cdot \frac{{t}^{3} \cdot \tan k}{\ell \cdot \ell}}}{\color{blue}{\left({\left(\frac{k}{t}\right)}^{2} + 1\right)} - 1} \]
      6. unpow238.9%

        \[\leadsto \frac{\frac{2}{\sin k \cdot \frac{{t}^{3} \cdot \tan k}{\ell \cdot \ell}}}{\left(\color{blue}{\frac{k}{t} \cdot \frac{k}{t}} + 1\right) - 1} \]
      7. sqr-neg38.9%

        \[\leadsto \frac{\frac{2}{\sin k \cdot \frac{{t}^{3} \cdot \tan k}{\ell \cdot \ell}}}{\left(\color{blue}{\left(-\frac{k}{t}\right) \cdot \left(-\frac{k}{t}\right)} + 1\right) - 1} \]
      8. distribute-frac-neg38.9%

        \[\leadsto \frac{\frac{2}{\sin k \cdot \frac{{t}^{3} \cdot \tan k}{\ell \cdot \ell}}}{\left(\color{blue}{\frac{-k}{t}} \cdot \left(-\frac{k}{t}\right) + 1\right) - 1} \]
      9. distribute-frac-neg38.9%

        \[\leadsto \frac{\frac{2}{\sin k \cdot \frac{{t}^{3} \cdot \tan k}{\ell \cdot \ell}}}{\left(\frac{-k}{t} \cdot \color{blue}{\frac{-k}{t}} + 1\right) - 1} \]
      10. unpow238.9%

        \[\leadsto \frac{\frac{2}{\sin k \cdot \frac{{t}^{3} \cdot \tan k}{\ell \cdot \ell}}}{\left(\color{blue}{{\left(\frac{-k}{t}\right)}^{2}} + 1\right) - 1} \]
      11. associate--l+38.9%

        \[\leadsto \frac{\frac{2}{\sin k \cdot \frac{{t}^{3} \cdot \tan k}{\ell \cdot \ell}}}{\color{blue}{{\left(\frac{-k}{t}\right)}^{2} + \left(1 - 1\right)}} \]
      12. metadata-eval38.9%

        \[\leadsto \frac{\frac{2}{\sin k \cdot \frac{{t}^{3} \cdot \tan k}{\ell \cdot \ell}}}{{\left(\frac{-k}{t}\right)}^{2} + \color{blue}{0}} \]
      13. +-rgt-identity38.9%

        \[\leadsto \frac{\frac{2}{\sin k \cdot \frac{{t}^{3} \cdot \tan k}{\ell \cdot \ell}}}{\color{blue}{{\left(\frac{-k}{t}\right)}^{2}}} \]
      14. unpow238.9%

        \[\leadsto \frac{\frac{2}{\sin k \cdot \frac{{t}^{3} \cdot \tan k}{\ell \cdot \ell}}}{\color{blue}{\frac{-k}{t} \cdot \frac{-k}{t}}} \]
      15. distribute-frac-neg38.9%

        \[\leadsto \frac{\frac{2}{\sin k \cdot \frac{{t}^{3} \cdot \tan k}{\ell \cdot \ell}}}{\color{blue}{\left(-\frac{k}{t}\right)} \cdot \frac{-k}{t}} \]
      16. distribute-frac-neg38.9%

        \[\leadsto \frac{\frac{2}{\sin k \cdot \frac{{t}^{3} \cdot \tan k}{\ell \cdot \ell}}}{\left(-\frac{k}{t}\right) \cdot \color{blue}{\left(-\frac{k}{t}\right)}} \]
    3. Simplified38.9%

      \[\leadsto \color{blue}{\frac{\frac{2}{\sin k \cdot \frac{{t}^{3} \cdot \tan k}{\ell \cdot \ell}}}{{\left(\frac{k}{t}\right)}^{2}}} \]
    4. Applied egg-rr21.6%

      \[\leadsto \color{blue}{{\left(\frac{\frac{\sqrt{2}}{\frac{k}{t}}}{\sqrt{\sin k \cdot \tan k} \cdot \frac{{t}^{1.5}}{\ell}}\right)}^{2}} \]
    5. Taylor expanded in k around inf 36.9%

      \[\leadsto {\color{blue}{\left(\frac{\ell \cdot \sqrt{2}}{k \cdot \sin k} \cdot \sqrt{\frac{\cos k}{t}}\right)}}^{2} \]
  3. Recombined 3 regimes into one program.
  4. Final simplification61.1%

    \[\leadsto \begin{array}{l} \mathbf{if}\;\ell \cdot \ell \leq 2 \cdot 10^{-277}:\\ \;\;\;\;{\left(\left(\frac{\ell}{k} \cdot \frac{\sqrt{2}}{\sin k}\right) \cdot \sqrt{\frac{1}{t}}\right)}^{2}\\ \mathbf{elif}\;\ell \cdot \ell \leq 5 \cdot 10^{+231}:\\ \;\;\;\;2 \cdot \left(\frac{{\ell}^{2}}{{k}^{2}} \cdot \frac{\cos k}{t \cdot {\sin k}^{2}}\right)\\ \mathbf{else}:\\ \;\;\;\;{\left(\sqrt{\frac{\cos k}{t}} \cdot \frac{\ell \cdot \sqrt{2}}{k \cdot \sin k}\right)}^{2}\\ \end{array} \]

Alternative 4: 86.3% accurate, 0.8× speedup?

\[\begin{array}{l} t_m = \left|t\right| \\ t_s = \mathsf{copysign}\left(1, t\right) \\ t_s \cdot \begin{array}{l} \mathbf{if}\;\ell \cdot \ell \leq 2 \cdot 10^{-277}:\\ \;\;\;\;{\left(\left(\frac{\ell}{k} \cdot \frac{\sqrt{2}}{\sin k}\right) \cdot \sqrt{\frac{1}{t_m}}\right)}^{2}\\ \mathbf{elif}\;\ell \cdot \ell \leq 2 \cdot 10^{+243}:\\ \;\;\;\;\frac{\frac{2}{{k}^{2} \cdot {\ell}^{-2}}}{\frac{t_m}{\cos k \cdot {\sin k}^{-2}}}\\ \mathbf{else}:\\ \;\;\;\;{\left(\sqrt{\frac{\cos k}{t_m}} \cdot \frac{\ell \cdot \sqrt{2}}{k \cdot \sin k}\right)}^{2}\\ \end{array} \end{array} \]
t_m = (fabs.f64 t)
t_s = (copysign.f64 1 t)
(FPCore (t_s t_m l k)
 :precision binary64
 (*
  t_s
  (if (<= (* l l) 2e-277)
    (pow (* (* (/ l k) (/ (sqrt 2.0) (sin k))) (sqrt (/ 1.0 t_m))) 2.0)
    (if (<= (* l l) 2e+243)
      (/
       (/ 2.0 (* (pow k 2.0) (pow l -2.0)))
       (/ t_m (* (cos k) (pow (sin k) -2.0))))
      (pow
       (* (sqrt (/ (cos k) t_m)) (/ (* l (sqrt 2.0)) (* k (sin k))))
       2.0)))))
t_m = fabs(t);
t_s = copysign(1.0, t);
double code(double t_s, double t_m, double l, double k) {
	double tmp;
	if ((l * l) <= 2e-277) {
		tmp = pow((((l / k) * (sqrt(2.0) / sin(k))) * sqrt((1.0 / t_m))), 2.0);
	} else if ((l * l) <= 2e+243) {
		tmp = (2.0 / (pow(k, 2.0) * pow(l, -2.0))) / (t_m / (cos(k) * pow(sin(k), -2.0)));
	} else {
		tmp = pow((sqrt((cos(k) / t_m)) * ((l * sqrt(2.0)) / (k * sin(k)))), 2.0);
	}
	return t_s * tmp;
}
t_m = abs(t)
t_s = copysign(1.0d0, t)
real(8) function code(t_s, t_m, l, k)
    real(8), intent (in) :: t_s
    real(8), intent (in) :: t_m
    real(8), intent (in) :: l
    real(8), intent (in) :: k
    real(8) :: tmp
    if ((l * l) <= 2d-277) then
        tmp = (((l / k) * (sqrt(2.0d0) / sin(k))) * sqrt((1.0d0 / t_m))) ** 2.0d0
    else if ((l * l) <= 2d+243) then
        tmp = (2.0d0 / ((k ** 2.0d0) * (l ** (-2.0d0)))) / (t_m / (cos(k) * (sin(k) ** (-2.0d0))))
    else
        tmp = (sqrt((cos(k) / t_m)) * ((l * sqrt(2.0d0)) / (k * sin(k)))) ** 2.0d0
    end if
    code = t_s * tmp
end function
t_m = Math.abs(t);
t_s = Math.copySign(1.0, t);
public static double code(double t_s, double t_m, double l, double k) {
	double tmp;
	if ((l * l) <= 2e-277) {
		tmp = Math.pow((((l / k) * (Math.sqrt(2.0) / Math.sin(k))) * Math.sqrt((1.0 / t_m))), 2.0);
	} else if ((l * l) <= 2e+243) {
		tmp = (2.0 / (Math.pow(k, 2.0) * Math.pow(l, -2.0))) / (t_m / (Math.cos(k) * Math.pow(Math.sin(k), -2.0)));
	} else {
		tmp = Math.pow((Math.sqrt((Math.cos(k) / t_m)) * ((l * Math.sqrt(2.0)) / (k * Math.sin(k)))), 2.0);
	}
	return t_s * tmp;
}
t_m = math.fabs(t)
t_s = math.copysign(1.0, t)
def code(t_s, t_m, l, k):
	tmp = 0
	if (l * l) <= 2e-277:
		tmp = math.pow((((l / k) * (math.sqrt(2.0) / math.sin(k))) * math.sqrt((1.0 / t_m))), 2.0)
	elif (l * l) <= 2e+243:
		tmp = (2.0 / (math.pow(k, 2.0) * math.pow(l, -2.0))) / (t_m / (math.cos(k) * math.pow(math.sin(k), -2.0)))
	else:
		tmp = math.pow((math.sqrt((math.cos(k) / t_m)) * ((l * math.sqrt(2.0)) / (k * math.sin(k)))), 2.0)
	return t_s * tmp
t_m = abs(t)
t_s = copysign(1.0, t)
function code(t_s, t_m, l, k)
	tmp = 0.0
	if (Float64(l * l) <= 2e-277)
		tmp = Float64(Float64(Float64(l / k) * Float64(sqrt(2.0) / sin(k))) * sqrt(Float64(1.0 / t_m))) ^ 2.0;
	elseif (Float64(l * l) <= 2e+243)
		tmp = Float64(Float64(2.0 / Float64((k ^ 2.0) * (l ^ -2.0))) / Float64(t_m / Float64(cos(k) * (sin(k) ^ -2.0))));
	else
		tmp = Float64(sqrt(Float64(cos(k) / t_m)) * Float64(Float64(l * sqrt(2.0)) / Float64(k * sin(k)))) ^ 2.0;
	end
	return Float64(t_s * tmp)
end
t_m = abs(t);
t_s = sign(t) * abs(1.0);
function tmp_2 = code(t_s, t_m, l, k)
	tmp = 0.0;
	if ((l * l) <= 2e-277)
		tmp = (((l / k) * (sqrt(2.0) / sin(k))) * sqrt((1.0 / t_m))) ^ 2.0;
	elseif ((l * l) <= 2e+243)
		tmp = (2.0 / ((k ^ 2.0) * (l ^ -2.0))) / (t_m / (cos(k) * (sin(k) ^ -2.0)));
	else
		tmp = (sqrt((cos(k) / t_m)) * ((l * sqrt(2.0)) / (k * sin(k)))) ^ 2.0;
	end
	tmp_2 = t_s * tmp;
end
t_m = N[Abs[t], $MachinePrecision]
t_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[t]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[t$95$s_, t$95$m_, l_, k_] := N[(t$95$s * If[LessEqual[N[(l * l), $MachinePrecision], 2e-277], N[Power[N[(N[(N[(l / k), $MachinePrecision] * N[(N[Sqrt[2.0], $MachinePrecision] / N[Sin[k], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[Sqrt[N[(1.0 / t$95$m), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision], If[LessEqual[N[(l * l), $MachinePrecision], 2e+243], N[(N[(2.0 / N[(N[Power[k, 2.0], $MachinePrecision] * N[Power[l, -2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(t$95$m / N[(N[Cos[k], $MachinePrecision] * N[Power[N[Sin[k], $MachinePrecision], -2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[Power[N[(N[Sqrt[N[(N[Cos[k], $MachinePrecision] / t$95$m), $MachinePrecision]], $MachinePrecision] * N[(N[(l * N[Sqrt[2.0], $MachinePrecision]), $MachinePrecision] / N[(k * N[Sin[k], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision]]]), $MachinePrecision]
\begin{array}{l}
t_m = \left|t\right|
\\
t_s = \mathsf{copysign}\left(1, t\right)

\\
t_s \cdot \begin{array}{l}
\mathbf{if}\;\ell \cdot \ell \leq 2 \cdot 10^{-277}:\\
\;\;\;\;{\left(\left(\frac{\ell}{k} \cdot \frac{\sqrt{2}}{\sin k}\right) \cdot \sqrt{\frac{1}{t_m}}\right)}^{2}\\

\mathbf{elif}\;\ell \cdot \ell \leq 2 \cdot 10^{+243}:\\
\;\;\;\;\frac{\frac{2}{{k}^{2} \cdot {\ell}^{-2}}}{\frac{t_m}{\cos k \cdot {\sin k}^{-2}}}\\

\mathbf{else}:\\
\;\;\;\;{\left(\sqrt{\frac{\cos k}{t_m}} \cdot \frac{\ell \cdot \sqrt{2}}{k \cdot \sin k}\right)}^{2}\\


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if (*.f64 l l) < 1.99999999999999994e-277

    1. Initial program 31.5%

      \[\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. Step-by-step derivation
      1. associate-/r*31.5%

        \[\leadsto \color{blue}{\frac{\frac{2}{\left(\frac{{t}^{3}}{\ell \cdot \ell} \cdot \sin k\right) \cdot \tan k}}{\left(1 + {\left(\frac{k}{t}\right)}^{2}\right) - 1}} \]
      2. *-commutative31.5%

        \[\leadsto \frac{\frac{2}{\color{blue}{\left(\sin k \cdot \frac{{t}^{3}}{\ell \cdot \ell}\right)} \cdot \tan k}}{\left(1 + {\left(\frac{k}{t}\right)}^{2}\right) - 1} \]
      3. associate-*l*31.5%

        \[\leadsto \frac{\frac{2}{\color{blue}{\sin k \cdot \left(\frac{{t}^{3}}{\ell \cdot \ell} \cdot \tan k\right)}}}{\left(1 + {\left(\frac{k}{t}\right)}^{2}\right) - 1} \]
      4. associate-*l/31.5%

        \[\leadsto \frac{\frac{2}{\sin k \cdot \color{blue}{\frac{{t}^{3} \cdot \tan k}{\ell \cdot \ell}}}}{\left(1 + {\left(\frac{k}{t}\right)}^{2}\right) - 1} \]
      5. +-commutative31.5%

        \[\leadsto \frac{\frac{2}{\sin k \cdot \frac{{t}^{3} \cdot \tan k}{\ell \cdot \ell}}}{\color{blue}{\left({\left(\frac{k}{t}\right)}^{2} + 1\right)} - 1} \]
      6. unpow231.5%

        \[\leadsto \frac{\frac{2}{\sin k \cdot \frac{{t}^{3} \cdot \tan k}{\ell \cdot \ell}}}{\left(\color{blue}{\frac{k}{t} \cdot \frac{k}{t}} + 1\right) - 1} \]
      7. sqr-neg31.5%

        \[\leadsto \frac{\frac{2}{\sin k \cdot \frac{{t}^{3} \cdot \tan k}{\ell \cdot \ell}}}{\left(\color{blue}{\left(-\frac{k}{t}\right) \cdot \left(-\frac{k}{t}\right)} + 1\right) - 1} \]
      8. distribute-frac-neg31.5%

        \[\leadsto \frac{\frac{2}{\sin k \cdot \frac{{t}^{3} \cdot \tan k}{\ell \cdot \ell}}}{\left(\color{blue}{\frac{-k}{t}} \cdot \left(-\frac{k}{t}\right) + 1\right) - 1} \]
      9. distribute-frac-neg31.5%

        \[\leadsto \frac{\frac{2}{\sin k \cdot \frac{{t}^{3} \cdot \tan k}{\ell \cdot \ell}}}{\left(\frac{-k}{t} \cdot \color{blue}{\frac{-k}{t}} + 1\right) - 1} \]
      10. unpow231.5%

        \[\leadsto \frac{\frac{2}{\sin k \cdot \frac{{t}^{3} \cdot \tan k}{\ell \cdot \ell}}}{\left(\color{blue}{{\left(\frac{-k}{t}\right)}^{2}} + 1\right) - 1} \]
      11. associate--l+44.7%

        \[\leadsto \frac{\frac{2}{\sin k \cdot \frac{{t}^{3} \cdot \tan k}{\ell \cdot \ell}}}{\color{blue}{{\left(\frac{-k}{t}\right)}^{2} + \left(1 - 1\right)}} \]
      12. metadata-eval44.7%

        \[\leadsto \frac{\frac{2}{\sin k \cdot \frac{{t}^{3} \cdot \tan k}{\ell \cdot \ell}}}{{\left(\frac{-k}{t}\right)}^{2} + \color{blue}{0}} \]
      13. +-rgt-identity44.7%

        \[\leadsto \frac{\frac{2}{\sin k \cdot \frac{{t}^{3} \cdot \tan k}{\ell \cdot \ell}}}{\color{blue}{{\left(\frac{-k}{t}\right)}^{2}}} \]
      14. unpow244.7%

        \[\leadsto \frac{\frac{2}{\sin k \cdot \frac{{t}^{3} \cdot \tan k}{\ell \cdot \ell}}}{\color{blue}{\frac{-k}{t} \cdot \frac{-k}{t}}} \]
      15. distribute-frac-neg44.7%

        \[\leadsto \frac{\frac{2}{\sin k \cdot \frac{{t}^{3} \cdot \tan k}{\ell \cdot \ell}}}{\color{blue}{\left(-\frac{k}{t}\right)} \cdot \frac{-k}{t}} \]
      16. distribute-frac-neg44.7%

        \[\leadsto \frac{\frac{2}{\sin k \cdot \frac{{t}^{3} \cdot \tan k}{\ell \cdot \ell}}}{\left(-\frac{k}{t}\right) \cdot \color{blue}{\left(-\frac{k}{t}\right)}} \]
    3. Simplified44.7%

      \[\leadsto \color{blue}{\frac{\frac{2}{\sin k \cdot \frac{{t}^{3} \cdot \tan k}{\ell \cdot \ell}}}{{\left(\frac{k}{t}\right)}^{2}}} \]
    4. Applied egg-rr31.4%

      \[\leadsto \color{blue}{{\left(\frac{\frac{\sqrt{2}}{\frac{k}{t}}}{\sqrt{\sin k \cdot \tan k} \cdot \frac{{t}^{1.5}}{\ell}}\right)}^{2}} \]
    5. Taylor expanded in k around inf 54.0%

      \[\leadsto {\color{blue}{\left(\frac{\ell \cdot \sqrt{2}}{k \cdot \sin k} \cdot \sqrt{\frac{\cos k}{t}}\right)}}^{2} \]
    6. Step-by-step derivation
      1. times-frac55.1%

        \[\leadsto {\left(\color{blue}{\left(\frac{\ell}{k} \cdot \frac{\sqrt{2}}{\sin k}\right)} \cdot \sqrt{\frac{\cos k}{t}}\right)}^{2} \]
    7. Simplified55.1%

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

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

    if 1.99999999999999994e-277 < (*.f64 l l) < 2.0000000000000001e243

    1. Initial program 31.8%

      \[\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. Taylor expanded in t around 0 89.4%

      \[\leadsto \frac{2}{\color{blue}{\frac{{k}^{2} \cdot \left(t \cdot {\sin k}^{2}\right)}{{\ell}^{2} \cdot \cos k}}} \]
    3. Step-by-step derivation
      1. times-frac91.0%

        \[\leadsto \frac{2}{\color{blue}{\frac{{k}^{2}}{{\ell}^{2}} \cdot \frac{t \cdot {\sin k}^{2}}{\cos k}}} \]
      2. associate-/l*91.0%

        \[\leadsto \frac{2}{\frac{{k}^{2}}{{\ell}^{2}} \cdot \color{blue}{\frac{t}{\frac{\cos k}{{\sin k}^{2}}}}} \]
    4. Simplified91.0%

      \[\leadsto \frac{2}{\color{blue}{\frac{{k}^{2}}{{\ell}^{2}} \cdot \frac{t}{\frac{\cos k}{{\sin k}^{2}}}}} \]
    5. Step-by-step derivation
      1. frac-times88.8%

        \[\leadsto \frac{2}{\color{blue}{\frac{{k}^{2} \cdot t}{{\ell}^{2} \cdot \frac{\cos k}{{\sin k}^{2}}}}} \]
      2. div-inv88.8%

        \[\leadsto \frac{2}{\frac{{k}^{2} \cdot t}{{\ell}^{2} \cdot \color{blue}{\left(\cos k \cdot \frac{1}{{\sin k}^{2}}\right)}}} \]
      3. pow-flip88.8%

        \[\leadsto \frac{2}{\frac{{k}^{2} \cdot t}{{\ell}^{2} \cdot \left(\cos k \cdot \color{blue}{{\sin k}^{\left(-2\right)}}\right)}} \]
      4. metadata-eval88.8%

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

      \[\leadsto \frac{2}{\color{blue}{\frac{{k}^{2} \cdot t}{{\ell}^{2} \cdot \left(\cos k \cdot {\sin k}^{-2}\right)}}} \]
    7. Step-by-step derivation
      1. times-frac90.9%

        \[\leadsto \frac{2}{\color{blue}{\frac{{k}^{2}}{{\ell}^{2}} \cdot \frac{t}{\cos k \cdot {\sin k}^{-2}}}} \]
    8. Simplified90.9%

      \[\leadsto \frac{2}{\color{blue}{\frac{{k}^{2}}{{\ell}^{2}} \cdot \frac{t}{\cos k \cdot {\sin k}^{-2}}}} \]
    9. Step-by-step derivation
      1. expm1-log1p-u65.5%

        \[\leadsto \color{blue}{\mathsf{expm1}\left(\mathsf{log1p}\left(\frac{2}{\frac{{k}^{2}}{{\ell}^{2}} \cdot \frac{t}{\cos k \cdot {\sin k}^{-2}}}\right)\right)} \]
      2. expm1-udef52.8%

        \[\leadsto \color{blue}{e^{\mathsf{log1p}\left(\frac{2}{\frac{{k}^{2}}{{\ell}^{2}} \cdot \frac{t}{\cos k \cdot {\sin k}^{-2}}}\right)} - 1} \]
      3. div-inv52.8%

        \[\leadsto e^{\mathsf{log1p}\left(\frac{2}{\color{blue}{\left({k}^{2} \cdot \frac{1}{{\ell}^{2}}\right)} \cdot \frac{t}{\cos k \cdot {\sin k}^{-2}}}\right)} - 1 \]
      4. pow-flip52.8%

        \[\leadsto e^{\mathsf{log1p}\left(\frac{2}{\left({k}^{2} \cdot \color{blue}{{\ell}^{\left(-2\right)}}\right) \cdot \frac{t}{\cos k \cdot {\sin k}^{-2}}}\right)} - 1 \]
      5. metadata-eval52.8%

        \[\leadsto e^{\mathsf{log1p}\left(\frac{2}{\left({k}^{2} \cdot {\ell}^{\color{blue}{-2}}\right) \cdot \frac{t}{\cos k \cdot {\sin k}^{-2}}}\right)} - 1 \]
    10. Applied egg-rr52.8%

      \[\leadsto \color{blue}{e^{\mathsf{log1p}\left(\frac{2}{\left({k}^{2} \cdot {\ell}^{-2}\right) \cdot \frac{t}{\cos k \cdot {\sin k}^{-2}}}\right)} - 1} \]
    11. Step-by-step derivation
      1. expm1-def65.5%

        \[\leadsto \color{blue}{\mathsf{expm1}\left(\mathsf{log1p}\left(\frac{2}{\left({k}^{2} \cdot {\ell}^{-2}\right) \cdot \frac{t}{\cos k \cdot {\sin k}^{-2}}}\right)\right)} \]
      2. expm1-log1p90.9%

        \[\leadsto \color{blue}{\frac{2}{\left({k}^{2} \cdot {\ell}^{-2}\right) \cdot \frac{t}{\cos k \cdot {\sin k}^{-2}}}} \]
      3. associate-/r*91.1%

        \[\leadsto \color{blue}{\frac{\frac{2}{{k}^{2} \cdot {\ell}^{-2}}}{\frac{t}{\cos k \cdot {\sin k}^{-2}}}} \]
    12. Simplified91.1%

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

    if 2.0000000000000001e243 < (*.f64 l l)

    1. Initial program 39.5%

      \[\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. Step-by-step derivation
      1. associate-/r*39.5%

        \[\leadsto \color{blue}{\frac{\frac{2}{\left(\frac{{t}^{3}}{\ell \cdot \ell} \cdot \sin k\right) \cdot \tan k}}{\left(1 + {\left(\frac{k}{t}\right)}^{2}\right) - 1}} \]
      2. *-commutative39.5%

        \[\leadsto \frac{\frac{2}{\color{blue}{\left(\sin k \cdot \frac{{t}^{3}}{\ell \cdot \ell}\right)} \cdot \tan k}}{\left(1 + {\left(\frac{k}{t}\right)}^{2}\right) - 1} \]
      3. associate-*l*39.5%

        \[\leadsto \frac{\frac{2}{\color{blue}{\sin k \cdot \left(\frac{{t}^{3}}{\ell \cdot \ell} \cdot \tan k\right)}}}{\left(1 + {\left(\frac{k}{t}\right)}^{2}\right) - 1} \]
      4. associate-*l/39.5%

        \[\leadsto \frac{\frac{2}{\sin k \cdot \color{blue}{\frac{{t}^{3} \cdot \tan k}{\ell \cdot \ell}}}}{\left(1 + {\left(\frac{k}{t}\right)}^{2}\right) - 1} \]
      5. +-commutative39.5%

        \[\leadsto \frac{\frac{2}{\sin k \cdot \frac{{t}^{3} \cdot \tan k}{\ell \cdot \ell}}}{\color{blue}{\left({\left(\frac{k}{t}\right)}^{2} + 1\right)} - 1} \]
      6. unpow239.5%

        \[\leadsto \frac{\frac{2}{\sin k \cdot \frac{{t}^{3} \cdot \tan k}{\ell \cdot \ell}}}{\left(\color{blue}{\frac{k}{t} \cdot \frac{k}{t}} + 1\right) - 1} \]
      7. sqr-neg39.5%

        \[\leadsto \frac{\frac{2}{\sin k \cdot \frac{{t}^{3} \cdot \tan k}{\ell \cdot \ell}}}{\left(\color{blue}{\left(-\frac{k}{t}\right) \cdot \left(-\frac{k}{t}\right)} + 1\right) - 1} \]
      8. distribute-frac-neg39.5%

        \[\leadsto \frac{\frac{2}{\sin k \cdot \frac{{t}^{3} \cdot \tan k}{\ell \cdot \ell}}}{\left(\color{blue}{\frac{-k}{t}} \cdot \left(-\frac{k}{t}\right) + 1\right) - 1} \]
      9. distribute-frac-neg39.5%

        \[\leadsto \frac{\frac{2}{\sin k \cdot \frac{{t}^{3} \cdot \tan k}{\ell \cdot \ell}}}{\left(\frac{-k}{t} \cdot \color{blue}{\frac{-k}{t}} + 1\right) - 1} \]
      10. unpow239.5%

        \[\leadsto \frac{\frac{2}{\sin k \cdot \frac{{t}^{3} \cdot \tan k}{\ell \cdot \ell}}}{\left(\color{blue}{{\left(\frac{-k}{t}\right)}^{2}} + 1\right) - 1} \]
      11. associate--l+39.5%

        \[\leadsto \frac{\frac{2}{\sin k \cdot \frac{{t}^{3} \cdot \tan k}{\ell \cdot \ell}}}{\color{blue}{{\left(\frac{-k}{t}\right)}^{2} + \left(1 - 1\right)}} \]
      12. metadata-eval39.5%

        \[\leadsto \frac{\frac{2}{\sin k \cdot \frac{{t}^{3} \cdot \tan k}{\ell \cdot \ell}}}{{\left(\frac{-k}{t}\right)}^{2} + \color{blue}{0}} \]
      13. +-rgt-identity39.5%

        \[\leadsto \frac{\frac{2}{\sin k \cdot \frac{{t}^{3} \cdot \tan k}{\ell \cdot \ell}}}{\color{blue}{{\left(\frac{-k}{t}\right)}^{2}}} \]
      14. unpow239.5%

        \[\leadsto \frac{\frac{2}{\sin k \cdot \frac{{t}^{3} \cdot \tan k}{\ell \cdot \ell}}}{\color{blue}{\frac{-k}{t} \cdot \frac{-k}{t}}} \]
      15. distribute-frac-neg39.5%

        \[\leadsto \frac{\frac{2}{\sin k \cdot \frac{{t}^{3} \cdot \tan k}{\ell \cdot \ell}}}{\color{blue}{\left(-\frac{k}{t}\right)} \cdot \frac{-k}{t}} \]
      16. distribute-frac-neg39.5%

        \[\leadsto \frac{\frac{2}{\sin k \cdot \frac{{t}^{3} \cdot \tan k}{\ell \cdot \ell}}}{\left(-\frac{k}{t}\right) \cdot \color{blue}{\left(-\frac{k}{t}\right)}} \]
    3. Simplified39.5%

      \[\leadsto \color{blue}{\frac{\frac{2}{\sin k \cdot \frac{{t}^{3} \cdot \tan k}{\ell \cdot \ell}}}{{\left(\frac{k}{t}\right)}^{2}}} \]
    4. Applied egg-rr21.9%

      \[\leadsto \color{blue}{{\left(\frac{\frac{\sqrt{2}}{\frac{k}{t}}}{\sqrt{\sin k \cdot \tan k} \cdot \frac{{t}^{1.5}}{\ell}}\right)}^{2}} \]
    5. Taylor expanded in k around inf 36.0%

      \[\leadsto {\color{blue}{\left(\frac{\ell \cdot \sqrt{2}}{k \cdot \sin k} \cdot \sqrt{\frac{\cos k}{t}}\right)}}^{2} \]
  3. Recombined 3 regimes into one program.
  4. Final simplification61.1%

    \[\leadsto \begin{array}{l} \mathbf{if}\;\ell \cdot \ell \leq 2 \cdot 10^{-277}:\\ \;\;\;\;{\left(\left(\frac{\ell}{k} \cdot \frac{\sqrt{2}}{\sin k}\right) \cdot \sqrt{\frac{1}{t}}\right)}^{2}\\ \mathbf{elif}\;\ell \cdot \ell \leq 2 \cdot 10^{+243}:\\ \;\;\;\;\frac{\frac{2}{{k}^{2} \cdot {\ell}^{-2}}}{\frac{t}{\cos k \cdot {\sin k}^{-2}}}\\ \mathbf{else}:\\ \;\;\;\;{\left(\sqrt{\frac{\cos k}{t}} \cdot \frac{\ell \cdot \sqrt{2}}{k \cdot \sin k}\right)}^{2}\\ \end{array} \]

Alternative 5: 81.0% accurate, 0.8× speedup?

\[\begin{array}{l} t_m = \left|t\right| \\ t_s = \mathsf{copysign}\left(1, t\right) \\ \begin{array}{l} t_2 := \frac{\ell}{k} \cdot \frac{\sqrt{2}}{\sin k}\\ t_s \cdot \begin{array}{l} \mathbf{if}\;\ell \cdot \ell \leq 2 \cdot 10^{-12}:\\ \;\;\;\;{\left(t_2 \cdot \sqrt{\frac{1}{t_m}}\right)}^{2}\\ \mathbf{else}:\\ \;\;\;\;{\left(t_2 \cdot \sqrt{\frac{\cos k}{t_m}}\right)}^{2}\\ \end{array} \end{array} \end{array} \]
t_m = (fabs.f64 t)
t_s = (copysign.f64 1 t)
(FPCore (t_s t_m l k)
 :precision binary64
 (let* ((t_2 (* (/ l k) (/ (sqrt 2.0) (sin k)))))
   (*
    t_s
    (if (<= (* l l) 2e-12)
      (pow (* t_2 (sqrt (/ 1.0 t_m))) 2.0)
      (pow (* t_2 (sqrt (/ (cos k) t_m))) 2.0)))))
t_m = fabs(t);
t_s = copysign(1.0, t);
double code(double t_s, double t_m, double l, double k) {
	double t_2 = (l / k) * (sqrt(2.0) / sin(k));
	double tmp;
	if ((l * l) <= 2e-12) {
		tmp = pow((t_2 * sqrt((1.0 / t_m))), 2.0);
	} else {
		tmp = pow((t_2 * sqrt((cos(k) / t_m))), 2.0);
	}
	return t_s * tmp;
}
t_m = abs(t)
t_s = copysign(1.0d0, t)
real(8) function code(t_s, t_m, l, k)
    real(8), intent (in) :: t_s
    real(8), intent (in) :: t_m
    real(8), intent (in) :: l
    real(8), intent (in) :: k
    real(8) :: t_2
    real(8) :: tmp
    t_2 = (l / k) * (sqrt(2.0d0) / sin(k))
    if ((l * l) <= 2d-12) then
        tmp = (t_2 * sqrt((1.0d0 / t_m))) ** 2.0d0
    else
        tmp = (t_2 * sqrt((cos(k) / t_m))) ** 2.0d0
    end if
    code = t_s * tmp
end function
t_m = Math.abs(t);
t_s = Math.copySign(1.0, t);
public static double code(double t_s, double t_m, double l, double k) {
	double t_2 = (l / k) * (Math.sqrt(2.0) / Math.sin(k));
	double tmp;
	if ((l * l) <= 2e-12) {
		tmp = Math.pow((t_2 * Math.sqrt((1.0 / t_m))), 2.0);
	} else {
		tmp = Math.pow((t_2 * Math.sqrt((Math.cos(k) / t_m))), 2.0);
	}
	return t_s * tmp;
}
t_m = math.fabs(t)
t_s = math.copysign(1.0, t)
def code(t_s, t_m, l, k):
	t_2 = (l / k) * (math.sqrt(2.0) / math.sin(k))
	tmp = 0
	if (l * l) <= 2e-12:
		tmp = math.pow((t_2 * math.sqrt((1.0 / t_m))), 2.0)
	else:
		tmp = math.pow((t_2 * math.sqrt((math.cos(k) / t_m))), 2.0)
	return t_s * tmp
t_m = abs(t)
t_s = copysign(1.0, t)
function code(t_s, t_m, l, k)
	t_2 = Float64(Float64(l / k) * Float64(sqrt(2.0) / sin(k)))
	tmp = 0.0
	if (Float64(l * l) <= 2e-12)
		tmp = Float64(t_2 * sqrt(Float64(1.0 / t_m))) ^ 2.0;
	else
		tmp = Float64(t_2 * sqrt(Float64(cos(k) / t_m))) ^ 2.0;
	end
	return Float64(t_s * tmp)
end
t_m = abs(t);
t_s = sign(t) * abs(1.0);
function tmp_2 = code(t_s, t_m, l, k)
	t_2 = (l / k) * (sqrt(2.0) / sin(k));
	tmp = 0.0;
	if ((l * l) <= 2e-12)
		tmp = (t_2 * sqrt((1.0 / t_m))) ^ 2.0;
	else
		tmp = (t_2 * sqrt((cos(k) / t_m))) ^ 2.0;
	end
	tmp_2 = t_s * tmp;
end
t_m = N[Abs[t], $MachinePrecision]
t_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[t]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[t$95$s_, t$95$m_, l_, k_] := Block[{t$95$2 = N[(N[(l / k), $MachinePrecision] * N[(N[Sqrt[2.0], $MachinePrecision] / N[Sin[k], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, N[(t$95$s * If[LessEqual[N[(l * l), $MachinePrecision], 2e-12], N[Power[N[(t$95$2 * N[Sqrt[N[(1.0 / t$95$m), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision], N[Power[N[(t$95$2 * N[Sqrt[N[(N[Cos[k], $MachinePrecision] / t$95$m), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision]]), $MachinePrecision]]
\begin{array}{l}
t_m = \left|t\right|
\\
t_s = \mathsf{copysign}\left(1, t\right)

\\
\begin{array}{l}
t_2 := \frac{\ell}{k} \cdot \frac{\sqrt{2}}{\sin k}\\
t_s \cdot \begin{array}{l}
\mathbf{if}\;\ell \cdot \ell \leq 2 \cdot 10^{-12}:\\
\;\;\;\;{\left(t_2 \cdot \sqrt{\frac{1}{t_m}}\right)}^{2}\\

\mathbf{else}:\\
\;\;\;\;{\left(t_2 \cdot \sqrt{\frac{\cos k}{t_m}}\right)}^{2}\\


\end{array}
\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if (*.f64 l l) < 1.99999999999999996e-12

    1. Initial program 32.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. Step-by-step derivation
      1. associate-/r*32.4%

        \[\leadsto \color{blue}{\frac{\frac{2}{\left(\frac{{t}^{3}}{\ell \cdot \ell} \cdot \sin k\right) \cdot \tan k}}{\left(1 + {\left(\frac{k}{t}\right)}^{2}\right) - 1}} \]
      2. *-commutative32.4%

        \[\leadsto \frac{\frac{2}{\color{blue}{\left(\sin k \cdot \frac{{t}^{3}}{\ell \cdot \ell}\right)} \cdot \tan k}}{\left(1 + {\left(\frac{k}{t}\right)}^{2}\right) - 1} \]
      3. associate-*l*32.4%

        \[\leadsto \frac{\frac{2}{\color{blue}{\sin k \cdot \left(\frac{{t}^{3}}{\ell \cdot \ell} \cdot \tan k\right)}}}{\left(1 + {\left(\frac{k}{t}\right)}^{2}\right) - 1} \]
      4. associate-*l/32.4%

        \[\leadsto \frac{\frac{2}{\sin k \cdot \color{blue}{\frac{{t}^{3} \cdot \tan k}{\ell \cdot \ell}}}}{\left(1 + {\left(\frac{k}{t}\right)}^{2}\right) - 1} \]
      5. +-commutative32.4%

        \[\leadsto \frac{\frac{2}{\sin k \cdot \frac{{t}^{3} \cdot \tan k}{\ell \cdot \ell}}}{\color{blue}{\left({\left(\frac{k}{t}\right)}^{2} + 1\right)} - 1} \]
      6. unpow232.4%

        \[\leadsto \frac{\frac{2}{\sin k \cdot \frac{{t}^{3} \cdot \tan k}{\ell \cdot \ell}}}{\left(\color{blue}{\frac{k}{t} \cdot \frac{k}{t}} + 1\right) - 1} \]
      7. sqr-neg32.4%

        \[\leadsto \frac{\frac{2}{\sin k \cdot \frac{{t}^{3} \cdot \tan k}{\ell \cdot \ell}}}{\left(\color{blue}{\left(-\frac{k}{t}\right) \cdot \left(-\frac{k}{t}\right)} + 1\right) - 1} \]
      8. distribute-frac-neg32.4%

        \[\leadsto \frac{\frac{2}{\sin k \cdot \frac{{t}^{3} \cdot \tan k}{\ell \cdot \ell}}}{\left(\color{blue}{\frac{-k}{t}} \cdot \left(-\frac{k}{t}\right) + 1\right) - 1} \]
      9. distribute-frac-neg32.4%

        \[\leadsto \frac{\frac{2}{\sin k \cdot \frac{{t}^{3} \cdot \tan k}{\ell \cdot \ell}}}{\left(\frac{-k}{t} \cdot \color{blue}{\frac{-k}{t}} + 1\right) - 1} \]
      10. unpow232.4%

        \[\leadsto \frac{\frac{2}{\sin k \cdot \frac{{t}^{3} \cdot \tan k}{\ell \cdot \ell}}}{\left(\color{blue}{{\left(\frac{-k}{t}\right)}^{2}} + 1\right) - 1} \]
      11. associate--l+45.4%

        \[\leadsto \frac{\frac{2}{\sin k \cdot \frac{{t}^{3} \cdot \tan k}{\ell \cdot \ell}}}{\color{blue}{{\left(\frac{-k}{t}\right)}^{2} + \left(1 - 1\right)}} \]
      12. metadata-eval45.4%

        \[\leadsto \frac{\frac{2}{\sin k \cdot \frac{{t}^{3} \cdot \tan k}{\ell \cdot \ell}}}{{\left(\frac{-k}{t}\right)}^{2} + \color{blue}{0}} \]
      13. +-rgt-identity45.4%

        \[\leadsto \frac{\frac{2}{\sin k \cdot \frac{{t}^{3} \cdot \tan k}{\ell \cdot \ell}}}{\color{blue}{{\left(\frac{-k}{t}\right)}^{2}}} \]
      14. unpow245.4%

        \[\leadsto \frac{\frac{2}{\sin k \cdot \frac{{t}^{3} \cdot \tan k}{\ell \cdot \ell}}}{\color{blue}{\frac{-k}{t} \cdot \frac{-k}{t}}} \]
      15. distribute-frac-neg45.4%

        \[\leadsto \frac{\frac{2}{\sin k \cdot \frac{{t}^{3} \cdot \tan k}{\ell \cdot \ell}}}{\color{blue}{\left(-\frac{k}{t}\right)} \cdot \frac{-k}{t}} \]
      16. distribute-frac-neg45.4%

        \[\leadsto \frac{\frac{2}{\sin k \cdot \frac{{t}^{3} \cdot \tan k}{\ell \cdot \ell}}}{\left(-\frac{k}{t}\right) \cdot \color{blue}{\left(-\frac{k}{t}\right)}} \]
    3. Simplified45.4%

      \[\leadsto \color{blue}{\frac{\frac{2}{\sin k \cdot \frac{{t}^{3} \cdot \tan k}{\ell \cdot \ell}}}{{\left(\frac{k}{t}\right)}^{2}}} \]
    4. Applied egg-rr27.1%

      \[\leadsto \color{blue}{{\left(\frac{\frac{\sqrt{2}}{\frac{k}{t}}}{\sqrt{\sin k \cdot \tan k} \cdot \frac{{t}^{1.5}}{\ell}}\right)}^{2}} \]
    5. Taylor expanded in k around inf 50.6%

      \[\leadsto {\color{blue}{\left(\frac{\ell \cdot \sqrt{2}}{k \cdot \sin k} \cdot \sqrt{\frac{\cos k}{t}}\right)}}^{2} \]
    6. Step-by-step derivation
      1. times-frac51.3%

        \[\leadsto {\left(\color{blue}{\left(\frac{\ell}{k} \cdot \frac{\sqrt{2}}{\sin k}\right)} \cdot \sqrt{\frac{\cos k}{t}}\right)}^{2} \]
    7. Simplified51.3%

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

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

    if 1.99999999999999996e-12 < (*.f64 l l)

    1. Initial program 35.2%

      \[\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. Step-by-step derivation
      1. associate-/r*35.3%

        \[\leadsto \color{blue}{\frac{\frac{2}{\left(\frac{{t}^{3}}{\ell \cdot \ell} \cdot \sin k\right) \cdot \tan k}}{\left(1 + {\left(\frac{k}{t}\right)}^{2}\right) - 1}} \]
      2. *-commutative35.3%

        \[\leadsto \frac{\frac{2}{\color{blue}{\left(\sin k \cdot \frac{{t}^{3}}{\ell \cdot \ell}\right)} \cdot \tan k}}{\left(1 + {\left(\frac{k}{t}\right)}^{2}\right) - 1} \]
      3. associate-*l*35.3%

        \[\leadsto \frac{\frac{2}{\color{blue}{\sin k \cdot \left(\frac{{t}^{3}}{\ell \cdot \ell} \cdot \tan k\right)}}}{\left(1 + {\left(\frac{k}{t}\right)}^{2}\right) - 1} \]
      4. associate-*l/35.3%

        \[\leadsto \frac{\frac{2}{\sin k \cdot \color{blue}{\frac{{t}^{3} \cdot \tan k}{\ell \cdot \ell}}}}{\left(1 + {\left(\frac{k}{t}\right)}^{2}\right) - 1} \]
      5. +-commutative35.3%

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

        \[\leadsto \frac{\frac{2}{\sin k \cdot \frac{{t}^{3} \cdot \tan k}{\ell \cdot \ell}}}{\left(\color{blue}{\frac{k}{t} \cdot \frac{k}{t}} + 1\right) - 1} \]
      7. sqr-neg35.3%

        \[\leadsto \frac{\frac{2}{\sin k \cdot \frac{{t}^{3} \cdot \tan k}{\ell \cdot \ell}}}{\left(\color{blue}{\left(-\frac{k}{t}\right) \cdot \left(-\frac{k}{t}\right)} + 1\right) - 1} \]
      8. distribute-frac-neg35.3%

        \[\leadsto \frac{\frac{2}{\sin k \cdot \frac{{t}^{3} \cdot \tan k}{\ell \cdot \ell}}}{\left(\color{blue}{\frac{-k}{t}} \cdot \left(-\frac{k}{t}\right) + 1\right) - 1} \]
      9. distribute-frac-neg35.3%

        \[\leadsto \frac{\frac{2}{\sin k \cdot \frac{{t}^{3} \cdot \tan k}{\ell \cdot \ell}}}{\left(\frac{-k}{t} \cdot \color{blue}{\frac{-k}{t}} + 1\right) - 1} \]
      10. unpow235.3%

        \[\leadsto \frac{\frac{2}{\sin k \cdot \frac{{t}^{3} \cdot \tan k}{\ell \cdot \ell}}}{\left(\color{blue}{{\left(\frac{-k}{t}\right)}^{2}} + 1\right) - 1} \]
      11. associate--l+41.3%

        \[\leadsto \frac{\frac{2}{\sin k \cdot \frac{{t}^{3} \cdot \tan k}{\ell \cdot \ell}}}{\color{blue}{{\left(\frac{-k}{t}\right)}^{2} + \left(1 - 1\right)}} \]
      12. metadata-eval41.3%

        \[\leadsto \frac{\frac{2}{\sin k \cdot \frac{{t}^{3} \cdot \tan k}{\ell \cdot \ell}}}{{\left(\frac{-k}{t}\right)}^{2} + \color{blue}{0}} \]
      13. +-rgt-identity41.3%

        \[\leadsto \frac{\frac{2}{\sin k \cdot \frac{{t}^{3} \cdot \tan k}{\ell \cdot \ell}}}{\color{blue}{{\left(\frac{-k}{t}\right)}^{2}}} \]
      14. unpow241.3%

        \[\leadsto \frac{\frac{2}{\sin k \cdot \frac{{t}^{3} \cdot \tan k}{\ell \cdot \ell}}}{\color{blue}{\frac{-k}{t} \cdot \frac{-k}{t}}} \]
      15. distribute-frac-neg41.3%

        \[\leadsto \frac{\frac{2}{\sin k \cdot \frac{{t}^{3} \cdot \tan k}{\ell \cdot \ell}}}{\color{blue}{\left(-\frac{k}{t}\right)} \cdot \frac{-k}{t}} \]
      16. distribute-frac-neg41.3%

        \[\leadsto \frac{\frac{2}{\sin k \cdot \frac{{t}^{3} \cdot \tan k}{\ell \cdot \ell}}}{\left(-\frac{k}{t}\right) \cdot \color{blue}{\left(-\frac{k}{t}\right)}} \]
    3. Simplified41.3%

      \[\leadsto \color{blue}{\frac{\frac{2}{\sin k \cdot \frac{{t}^{3} \cdot \tan k}{\ell \cdot \ell}}}{{\left(\frac{k}{t}\right)}^{2}}} \]
    4. Applied egg-rr26.2%

      \[\leadsto \color{blue}{{\left(\frac{\frac{\sqrt{2}}{\frac{k}{t}}}{\sqrt{\sin k \cdot \tan k} \cdot \frac{{t}^{1.5}}{\ell}}\right)}^{2}} \]
    5. Taylor expanded in k around inf 44.0%

      \[\leadsto {\color{blue}{\left(\frac{\ell \cdot \sqrt{2}}{k \cdot \sin k} \cdot \sqrt{\frac{\cos k}{t}}\right)}}^{2} \]
    6. Step-by-step derivation
      1. times-frac44.0%

        \[\leadsto {\left(\color{blue}{\left(\frac{\ell}{k} \cdot \frac{\sqrt{2}}{\sin k}\right)} \cdot \sqrt{\frac{\cos k}{t}}\right)}^{2} \]
    7. Simplified44.0%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;\ell \cdot \ell \leq 2 \cdot 10^{-12}:\\ \;\;\;\;{\left(\left(\frac{\ell}{k} \cdot \frac{\sqrt{2}}{\sin k}\right) \cdot \sqrt{\frac{1}{t}}\right)}^{2}\\ \mathbf{else}:\\ \;\;\;\;{\left(\left(\frac{\ell}{k} \cdot \frac{\sqrt{2}}{\sin k}\right) \cdot \sqrt{\frac{\cos k}{t}}\right)}^{2}\\ \end{array} \]

Alternative 6: 81.0% accurate, 0.8× speedup?

\[\begin{array}{l} t_m = \left|t\right| \\ t_s = \mathsf{copysign}\left(1, t\right) \\ t_s \cdot \begin{array}{l} \mathbf{if}\;\ell \cdot \ell \leq 2 \cdot 10^{-12}:\\ \;\;\;\;{\left(\left(\frac{\ell}{k} \cdot \frac{\sqrt{2}}{\sin k}\right) \cdot \sqrt{\frac{1}{t_m}}\right)}^{2}\\ \mathbf{else}:\\ \;\;\;\;{\left(\sqrt{\frac{\cos k}{t_m}} \cdot \frac{\ell \cdot \sqrt{2}}{k \cdot \sin k}\right)}^{2}\\ \end{array} \end{array} \]
t_m = (fabs.f64 t)
t_s = (copysign.f64 1 t)
(FPCore (t_s t_m l k)
 :precision binary64
 (*
  t_s
  (if (<= (* l l) 2e-12)
    (pow (* (* (/ l k) (/ (sqrt 2.0) (sin k))) (sqrt (/ 1.0 t_m))) 2.0)
    (pow (* (sqrt (/ (cos k) t_m)) (/ (* l (sqrt 2.0)) (* k (sin k)))) 2.0))))
t_m = fabs(t);
t_s = copysign(1.0, t);
double code(double t_s, double t_m, double l, double k) {
	double tmp;
	if ((l * l) <= 2e-12) {
		tmp = pow((((l / k) * (sqrt(2.0) / sin(k))) * sqrt((1.0 / t_m))), 2.0);
	} else {
		tmp = pow((sqrt((cos(k) / t_m)) * ((l * sqrt(2.0)) / (k * sin(k)))), 2.0);
	}
	return t_s * tmp;
}
t_m = abs(t)
t_s = copysign(1.0d0, t)
real(8) function code(t_s, t_m, l, k)
    real(8), intent (in) :: t_s
    real(8), intent (in) :: t_m
    real(8), intent (in) :: l
    real(8), intent (in) :: k
    real(8) :: tmp
    if ((l * l) <= 2d-12) then
        tmp = (((l / k) * (sqrt(2.0d0) / sin(k))) * sqrt((1.0d0 / t_m))) ** 2.0d0
    else
        tmp = (sqrt((cos(k) / t_m)) * ((l * sqrt(2.0d0)) / (k * sin(k)))) ** 2.0d0
    end if
    code = t_s * tmp
end function
t_m = Math.abs(t);
t_s = Math.copySign(1.0, t);
public static double code(double t_s, double t_m, double l, double k) {
	double tmp;
	if ((l * l) <= 2e-12) {
		tmp = Math.pow((((l / k) * (Math.sqrt(2.0) / Math.sin(k))) * Math.sqrt((1.0 / t_m))), 2.0);
	} else {
		tmp = Math.pow((Math.sqrt((Math.cos(k) / t_m)) * ((l * Math.sqrt(2.0)) / (k * Math.sin(k)))), 2.0);
	}
	return t_s * tmp;
}
t_m = math.fabs(t)
t_s = math.copysign(1.0, t)
def code(t_s, t_m, l, k):
	tmp = 0
	if (l * l) <= 2e-12:
		tmp = math.pow((((l / k) * (math.sqrt(2.0) / math.sin(k))) * math.sqrt((1.0 / t_m))), 2.0)
	else:
		tmp = math.pow((math.sqrt((math.cos(k) / t_m)) * ((l * math.sqrt(2.0)) / (k * math.sin(k)))), 2.0)
	return t_s * tmp
t_m = abs(t)
t_s = copysign(1.0, t)
function code(t_s, t_m, l, k)
	tmp = 0.0
	if (Float64(l * l) <= 2e-12)
		tmp = Float64(Float64(Float64(l / k) * Float64(sqrt(2.0) / sin(k))) * sqrt(Float64(1.0 / t_m))) ^ 2.0;
	else
		tmp = Float64(sqrt(Float64(cos(k) / t_m)) * Float64(Float64(l * sqrt(2.0)) / Float64(k * sin(k)))) ^ 2.0;
	end
	return Float64(t_s * tmp)
end
t_m = abs(t);
t_s = sign(t) * abs(1.0);
function tmp_2 = code(t_s, t_m, l, k)
	tmp = 0.0;
	if ((l * l) <= 2e-12)
		tmp = (((l / k) * (sqrt(2.0) / sin(k))) * sqrt((1.0 / t_m))) ^ 2.0;
	else
		tmp = (sqrt((cos(k) / t_m)) * ((l * sqrt(2.0)) / (k * sin(k)))) ^ 2.0;
	end
	tmp_2 = t_s * tmp;
end
t_m = N[Abs[t], $MachinePrecision]
t_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[t]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[t$95$s_, t$95$m_, l_, k_] := N[(t$95$s * If[LessEqual[N[(l * l), $MachinePrecision], 2e-12], N[Power[N[(N[(N[(l / k), $MachinePrecision] * N[(N[Sqrt[2.0], $MachinePrecision] / N[Sin[k], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[Sqrt[N[(1.0 / t$95$m), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision], N[Power[N[(N[Sqrt[N[(N[Cos[k], $MachinePrecision] / t$95$m), $MachinePrecision]], $MachinePrecision] * N[(N[(l * N[Sqrt[2.0], $MachinePrecision]), $MachinePrecision] / N[(k * N[Sin[k], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision]]), $MachinePrecision]
\begin{array}{l}
t_m = \left|t\right|
\\
t_s = \mathsf{copysign}\left(1, t\right)

\\
t_s \cdot \begin{array}{l}
\mathbf{if}\;\ell \cdot \ell \leq 2 \cdot 10^{-12}:\\
\;\;\;\;{\left(\left(\frac{\ell}{k} \cdot \frac{\sqrt{2}}{\sin k}\right) \cdot \sqrt{\frac{1}{t_m}}\right)}^{2}\\

\mathbf{else}:\\
\;\;\;\;{\left(\sqrt{\frac{\cos k}{t_m}} \cdot \frac{\ell \cdot \sqrt{2}}{k \cdot \sin k}\right)}^{2}\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if (*.f64 l l) < 1.99999999999999996e-12

    1. Initial program 32.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. Step-by-step derivation
      1. associate-/r*32.4%

        \[\leadsto \color{blue}{\frac{\frac{2}{\left(\frac{{t}^{3}}{\ell \cdot \ell} \cdot \sin k\right) \cdot \tan k}}{\left(1 + {\left(\frac{k}{t}\right)}^{2}\right) - 1}} \]
      2. *-commutative32.4%

        \[\leadsto \frac{\frac{2}{\color{blue}{\left(\sin k \cdot \frac{{t}^{3}}{\ell \cdot \ell}\right)} \cdot \tan k}}{\left(1 + {\left(\frac{k}{t}\right)}^{2}\right) - 1} \]
      3. associate-*l*32.4%

        \[\leadsto \frac{\frac{2}{\color{blue}{\sin k \cdot \left(\frac{{t}^{3}}{\ell \cdot \ell} \cdot \tan k\right)}}}{\left(1 + {\left(\frac{k}{t}\right)}^{2}\right) - 1} \]
      4. associate-*l/32.4%

        \[\leadsto \frac{\frac{2}{\sin k \cdot \color{blue}{\frac{{t}^{3} \cdot \tan k}{\ell \cdot \ell}}}}{\left(1 + {\left(\frac{k}{t}\right)}^{2}\right) - 1} \]
      5. +-commutative32.4%

        \[\leadsto \frac{\frac{2}{\sin k \cdot \frac{{t}^{3} \cdot \tan k}{\ell \cdot \ell}}}{\color{blue}{\left({\left(\frac{k}{t}\right)}^{2} + 1\right)} - 1} \]
      6. unpow232.4%

        \[\leadsto \frac{\frac{2}{\sin k \cdot \frac{{t}^{3} \cdot \tan k}{\ell \cdot \ell}}}{\left(\color{blue}{\frac{k}{t} \cdot \frac{k}{t}} + 1\right) - 1} \]
      7. sqr-neg32.4%

        \[\leadsto \frac{\frac{2}{\sin k \cdot \frac{{t}^{3} \cdot \tan k}{\ell \cdot \ell}}}{\left(\color{blue}{\left(-\frac{k}{t}\right) \cdot \left(-\frac{k}{t}\right)} + 1\right) - 1} \]
      8. distribute-frac-neg32.4%

        \[\leadsto \frac{\frac{2}{\sin k \cdot \frac{{t}^{3} \cdot \tan k}{\ell \cdot \ell}}}{\left(\color{blue}{\frac{-k}{t}} \cdot \left(-\frac{k}{t}\right) + 1\right) - 1} \]
      9. distribute-frac-neg32.4%

        \[\leadsto \frac{\frac{2}{\sin k \cdot \frac{{t}^{3} \cdot \tan k}{\ell \cdot \ell}}}{\left(\frac{-k}{t} \cdot \color{blue}{\frac{-k}{t}} + 1\right) - 1} \]
      10. unpow232.4%

        \[\leadsto \frac{\frac{2}{\sin k \cdot \frac{{t}^{3} \cdot \tan k}{\ell \cdot \ell}}}{\left(\color{blue}{{\left(\frac{-k}{t}\right)}^{2}} + 1\right) - 1} \]
      11. associate--l+45.4%

        \[\leadsto \frac{\frac{2}{\sin k \cdot \frac{{t}^{3} \cdot \tan k}{\ell \cdot \ell}}}{\color{blue}{{\left(\frac{-k}{t}\right)}^{2} + \left(1 - 1\right)}} \]
      12. metadata-eval45.4%

        \[\leadsto \frac{\frac{2}{\sin k \cdot \frac{{t}^{3} \cdot \tan k}{\ell \cdot \ell}}}{{\left(\frac{-k}{t}\right)}^{2} + \color{blue}{0}} \]
      13. +-rgt-identity45.4%

        \[\leadsto \frac{\frac{2}{\sin k \cdot \frac{{t}^{3} \cdot \tan k}{\ell \cdot \ell}}}{\color{blue}{{\left(\frac{-k}{t}\right)}^{2}}} \]
      14. unpow245.4%

        \[\leadsto \frac{\frac{2}{\sin k \cdot \frac{{t}^{3} \cdot \tan k}{\ell \cdot \ell}}}{\color{blue}{\frac{-k}{t} \cdot \frac{-k}{t}}} \]
      15. distribute-frac-neg45.4%

        \[\leadsto \frac{\frac{2}{\sin k \cdot \frac{{t}^{3} \cdot \tan k}{\ell \cdot \ell}}}{\color{blue}{\left(-\frac{k}{t}\right)} \cdot \frac{-k}{t}} \]
      16. distribute-frac-neg45.4%

        \[\leadsto \frac{\frac{2}{\sin k \cdot \frac{{t}^{3} \cdot \tan k}{\ell \cdot \ell}}}{\left(-\frac{k}{t}\right) \cdot \color{blue}{\left(-\frac{k}{t}\right)}} \]
    3. Simplified45.4%

      \[\leadsto \color{blue}{\frac{\frac{2}{\sin k \cdot \frac{{t}^{3} \cdot \tan k}{\ell \cdot \ell}}}{{\left(\frac{k}{t}\right)}^{2}}} \]
    4. Applied egg-rr27.1%

      \[\leadsto \color{blue}{{\left(\frac{\frac{\sqrt{2}}{\frac{k}{t}}}{\sqrt{\sin k \cdot \tan k} \cdot \frac{{t}^{1.5}}{\ell}}\right)}^{2}} \]
    5. Taylor expanded in k around inf 50.6%

      \[\leadsto {\color{blue}{\left(\frac{\ell \cdot \sqrt{2}}{k \cdot \sin k} \cdot \sqrt{\frac{\cos k}{t}}\right)}}^{2} \]
    6. Step-by-step derivation
      1. times-frac51.3%

        \[\leadsto {\left(\color{blue}{\left(\frac{\ell}{k} \cdot \frac{\sqrt{2}}{\sin k}\right)} \cdot \sqrt{\frac{\cos k}{t}}\right)}^{2} \]
    7. Simplified51.3%

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

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

    if 1.99999999999999996e-12 < (*.f64 l l)

    1. Initial program 35.2%

      \[\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. Step-by-step derivation
      1. associate-/r*35.3%

        \[\leadsto \color{blue}{\frac{\frac{2}{\left(\frac{{t}^{3}}{\ell \cdot \ell} \cdot \sin k\right) \cdot \tan k}}{\left(1 + {\left(\frac{k}{t}\right)}^{2}\right) - 1}} \]
      2. *-commutative35.3%

        \[\leadsto \frac{\frac{2}{\color{blue}{\left(\sin k \cdot \frac{{t}^{3}}{\ell \cdot \ell}\right)} \cdot \tan k}}{\left(1 + {\left(\frac{k}{t}\right)}^{2}\right) - 1} \]
      3. associate-*l*35.3%

        \[\leadsto \frac{\frac{2}{\color{blue}{\sin k \cdot \left(\frac{{t}^{3}}{\ell \cdot \ell} \cdot \tan k\right)}}}{\left(1 + {\left(\frac{k}{t}\right)}^{2}\right) - 1} \]
      4. associate-*l/35.3%

        \[\leadsto \frac{\frac{2}{\sin k \cdot \color{blue}{\frac{{t}^{3} \cdot \tan k}{\ell \cdot \ell}}}}{\left(1 + {\left(\frac{k}{t}\right)}^{2}\right) - 1} \]
      5. +-commutative35.3%

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

        \[\leadsto \frac{\frac{2}{\sin k \cdot \frac{{t}^{3} \cdot \tan k}{\ell \cdot \ell}}}{\left(\color{blue}{\frac{k}{t} \cdot \frac{k}{t}} + 1\right) - 1} \]
      7. sqr-neg35.3%

        \[\leadsto \frac{\frac{2}{\sin k \cdot \frac{{t}^{3} \cdot \tan k}{\ell \cdot \ell}}}{\left(\color{blue}{\left(-\frac{k}{t}\right) \cdot \left(-\frac{k}{t}\right)} + 1\right) - 1} \]
      8. distribute-frac-neg35.3%

        \[\leadsto \frac{\frac{2}{\sin k \cdot \frac{{t}^{3} \cdot \tan k}{\ell \cdot \ell}}}{\left(\color{blue}{\frac{-k}{t}} \cdot \left(-\frac{k}{t}\right) + 1\right) - 1} \]
      9. distribute-frac-neg35.3%

        \[\leadsto \frac{\frac{2}{\sin k \cdot \frac{{t}^{3} \cdot \tan k}{\ell \cdot \ell}}}{\left(\frac{-k}{t} \cdot \color{blue}{\frac{-k}{t}} + 1\right) - 1} \]
      10. unpow235.3%

        \[\leadsto \frac{\frac{2}{\sin k \cdot \frac{{t}^{3} \cdot \tan k}{\ell \cdot \ell}}}{\left(\color{blue}{{\left(\frac{-k}{t}\right)}^{2}} + 1\right) - 1} \]
      11. associate--l+41.3%

        \[\leadsto \frac{\frac{2}{\sin k \cdot \frac{{t}^{3} \cdot \tan k}{\ell \cdot \ell}}}{\color{blue}{{\left(\frac{-k}{t}\right)}^{2} + \left(1 - 1\right)}} \]
      12. metadata-eval41.3%

        \[\leadsto \frac{\frac{2}{\sin k \cdot \frac{{t}^{3} \cdot \tan k}{\ell \cdot \ell}}}{{\left(\frac{-k}{t}\right)}^{2} + \color{blue}{0}} \]
      13. +-rgt-identity41.3%

        \[\leadsto \frac{\frac{2}{\sin k \cdot \frac{{t}^{3} \cdot \tan k}{\ell \cdot \ell}}}{\color{blue}{{\left(\frac{-k}{t}\right)}^{2}}} \]
      14. unpow241.3%

        \[\leadsto \frac{\frac{2}{\sin k \cdot \frac{{t}^{3} \cdot \tan k}{\ell \cdot \ell}}}{\color{blue}{\frac{-k}{t} \cdot \frac{-k}{t}}} \]
      15. distribute-frac-neg41.3%

        \[\leadsto \frac{\frac{2}{\sin k \cdot \frac{{t}^{3} \cdot \tan k}{\ell \cdot \ell}}}{\color{blue}{\left(-\frac{k}{t}\right)} \cdot \frac{-k}{t}} \]
      16. distribute-frac-neg41.3%

        \[\leadsto \frac{\frac{2}{\sin k \cdot \frac{{t}^{3} \cdot \tan k}{\ell \cdot \ell}}}{\left(-\frac{k}{t}\right) \cdot \color{blue}{\left(-\frac{k}{t}\right)}} \]
    3. Simplified41.3%

      \[\leadsto \color{blue}{\frac{\frac{2}{\sin k \cdot \frac{{t}^{3} \cdot \tan k}{\ell \cdot \ell}}}{{\left(\frac{k}{t}\right)}^{2}}} \]
    4. Applied egg-rr26.2%

      \[\leadsto \color{blue}{{\left(\frac{\frac{\sqrt{2}}{\frac{k}{t}}}{\sqrt{\sin k \cdot \tan k} \cdot \frac{{t}^{1.5}}{\ell}}\right)}^{2}} \]
    5. Taylor expanded in k around inf 44.0%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;\ell \cdot \ell \leq 2 \cdot 10^{-12}:\\ \;\;\;\;{\left(\left(\frac{\ell}{k} \cdot \frac{\sqrt{2}}{\sin k}\right) \cdot \sqrt{\frac{1}{t}}\right)}^{2}\\ \mathbf{else}:\\ \;\;\;\;{\left(\sqrt{\frac{\cos k}{t}} \cdot \frac{\ell \cdot \sqrt{2}}{k \cdot \sin k}\right)}^{2}\\ \end{array} \]

Alternative 7: 76.3% accurate, 1.0× speedup?

\[\begin{array}{l} t_m = \left|t\right| \\ t_s = \mathsf{copysign}\left(1, t\right) \\ t_s \cdot {\left(\left(\frac{\ell}{k} \cdot \frac{\sqrt{2}}{\sin k}\right) \cdot \sqrt{\frac{1}{t_m}}\right)}^{2} \end{array} \]
t_m = (fabs.f64 t)
t_s = (copysign.f64 1 t)
(FPCore (t_s t_m l k)
 :precision binary64
 (* t_s (pow (* (* (/ l k) (/ (sqrt 2.0) (sin k))) (sqrt (/ 1.0 t_m))) 2.0)))
t_m = fabs(t);
t_s = copysign(1.0, t);
double code(double t_s, double t_m, double l, double k) {
	return t_s * pow((((l / k) * (sqrt(2.0) / sin(k))) * sqrt((1.0 / t_m))), 2.0);
}
t_m = abs(t)
t_s = copysign(1.0d0, t)
real(8) function code(t_s, t_m, l, k)
    real(8), intent (in) :: t_s
    real(8), intent (in) :: t_m
    real(8), intent (in) :: l
    real(8), intent (in) :: k
    code = t_s * ((((l / k) * (sqrt(2.0d0) / sin(k))) * sqrt((1.0d0 / t_m))) ** 2.0d0)
end function
t_m = Math.abs(t);
t_s = Math.copySign(1.0, t);
public static double code(double t_s, double t_m, double l, double k) {
	return t_s * Math.pow((((l / k) * (Math.sqrt(2.0) / Math.sin(k))) * Math.sqrt((1.0 / t_m))), 2.0);
}
t_m = math.fabs(t)
t_s = math.copysign(1.0, t)
def code(t_s, t_m, l, k):
	return t_s * math.pow((((l / k) * (math.sqrt(2.0) / math.sin(k))) * math.sqrt((1.0 / t_m))), 2.0)
t_m = abs(t)
t_s = copysign(1.0, t)
function code(t_s, t_m, l, k)
	return Float64(t_s * (Float64(Float64(Float64(l / k) * Float64(sqrt(2.0) / sin(k))) * sqrt(Float64(1.0 / t_m))) ^ 2.0))
end
t_m = abs(t);
t_s = sign(t) * abs(1.0);
function tmp = code(t_s, t_m, l, k)
	tmp = t_s * ((((l / k) * (sqrt(2.0) / sin(k))) * sqrt((1.0 / t_m))) ^ 2.0);
end
t_m = N[Abs[t], $MachinePrecision]
t_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[t]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[t$95$s_, t$95$m_, l_, k_] := N[(t$95$s * N[Power[N[(N[(N[(l / k), $MachinePrecision] * N[(N[Sqrt[2.0], $MachinePrecision] / N[Sin[k], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[Sqrt[N[(1.0 / t$95$m), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
t_m = \left|t\right|
\\
t_s = \mathsf{copysign}\left(1, t\right)

\\
t_s \cdot {\left(\left(\frac{\ell}{k} \cdot \frac{\sqrt{2}}{\sin k}\right) \cdot \sqrt{\frac{1}{t_m}}\right)}^{2}
\end{array}
Derivation
  1. Initial program 33.8%

    \[\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. Step-by-step derivation
    1. associate-/r*33.8%

      \[\leadsto \color{blue}{\frac{\frac{2}{\left(\frac{{t}^{3}}{\ell \cdot \ell} \cdot \sin k\right) \cdot \tan k}}{\left(1 + {\left(\frac{k}{t}\right)}^{2}\right) - 1}} \]
    2. *-commutative33.8%

      \[\leadsto \frac{\frac{2}{\color{blue}{\left(\sin k \cdot \frac{{t}^{3}}{\ell \cdot \ell}\right)} \cdot \tan k}}{\left(1 + {\left(\frac{k}{t}\right)}^{2}\right) - 1} \]
    3. associate-*l*33.8%

      \[\leadsto \frac{\frac{2}{\color{blue}{\sin k \cdot \left(\frac{{t}^{3}}{\ell \cdot \ell} \cdot \tan k\right)}}}{\left(1 + {\left(\frac{k}{t}\right)}^{2}\right) - 1} \]
    4. associate-*l/33.8%

      \[\leadsto \frac{\frac{2}{\sin k \cdot \color{blue}{\frac{{t}^{3} \cdot \tan k}{\ell \cdot \ell}}}}{\left(1 + {\left(\frac{k}{t}\right)}^{2}\right) - 1} \]
    5. +-commutative33.8%

      \[\leadsto \frac{\frac{2}{\sin k \cdot \frac{{t}^{3} \cdot \tan k}{\ell \cdot \ell}}}{\color{blue}{\left({\left(\frac{k}{t}\right)}^{2} + 1\right)} - 1} \]
    6. unpow233.8%

      \[\leadsto \frac{\frac{2}{\sin k \cdot \frac{{t}^{3} \cdot \tan k}{\ell \cdot \ell}}}{\left(\color{blue}{\frac{k}{t} \cdot \frac{k}{t}} + 1\right) - 1} \]
    7. sqr-neg33.8%

      \[\leadsto \frac{\frac{2}{\sin k \cdot \frac{{t}^{3} \cdot \tan k}{\ell \cdot \ell}}}{\left(\color{blue}{\left(-\frac{k}{t}\right) \cdot \left(-\frac{k}{t}\right)} + 1\right) - 1} \]
    8. distribute-frac-neg33.8%

      \[\leadsto \frac{\frac{2}{\sin k \cdot \frac{{t}^{3} \cdot \tan k}{\ell \cdot \ell}}}{\left(\color{blue}{\frac{-k}{t}} \cdot \left(-\frac{k}{t}\right) + 1\right) - 1} \]
    9. distribute-frac-neg33.8%

      \[\leadsto \frac{\frac{2}{\sin k \cdot \frac{{t}^{3} \cdot \tan k}{\ell \cdot \ell}}}{\left(\frac{-k}{t} \cdot \color{blue}{\frac{-k}{t}} + 1\right) - 1} \]
    10. unpow233.8%

      \[\leadsto \frac{\frac{2}{\sin k \cdot \frac{{t}^{3} \cdot \tan k}{\ell \cdot \ell}}}{\left(\color{blue}{{\left(\frac{-k}{t}\right)}^{2}} + 1\right) - 1} \]
    11. associate--l+43.4%

      \[\leadsto \frac{\frac{2}{\sin k \cdot \frac{{t}^{3} \cdot \tan k}{\ell \cdot \ell}}}{\color{blue}{{\left(\frac{-k}{t}\right)}^{2} + \left(1 - 1\right)}} \]
    12. metadata-eval43.4%

      \[\leadsto \frac{\frac{2}{\sin k \cdot \frac{{t}^{3} \cdot \tan k}{\ell \cdot \ell}}}{{\left(\frac{-k}{t}\right)}^{2} + \color{blue}{0}} \]
    13. +-rgt-identity43.4%

      \[\leadsto \frac{\frac{2}{\sin k \cdot \frac{{t}^{3} \cdot \tan k}{\ell \cdot \ell}}}{\color{blue}{{\left(\frac{-k}{t}\right)}^{2}}} \]
    14. unpow243.4%

      \[\leadsto \frac{\frac{2}{\sin k \cdot \frac{{t}^{3} \cdot \tan k}{\ell \cdot \ell}}}{\color{blue}{\frac{-k}{t} \cdot \frac{-k}{t}}} \]
    15. distribute-frac-neg43.4%

      \[\leadsto \frac{\frac{2}{\sin k \cdot \frac{{t}^{3} \cdot \tan k}{\ell \cdot \ell}}}{\color{blue}{\left(-\frac{k}{t}\right)} \cdot \frac{-k}{t}} \]
    16. distribute-frac-neg43.4%

      \[\leadsto \frac{\frac{2}{\sin k \cdot \frac{{t}^{3} \cdot \tan k}{\ell \cdot \ell}}}{\left(-\frac{k}{t}\right) \cdot \color{blue}{\left(-\frac{k}{t}\right)}} \]
  3. Simplified43.4%

    \[\leadsto \color{blue}{\frac{\frac{2}{\sin k \cdot \frac{{t}^{3} \cdot \tan k}{\ell \cdot \ell}}}{{\left(\frac{k}{t}\right)}^{2}}} \]
  4. Applied egg-rr26.7%

    \[\leadsto \color{blue}{{\left(\frac{\frac{\sqrt{2}}{\frac{k}{t}}}{\sqrt{\sin k \cdot \tan k} \cdot \frac{{t}^{1.5}}{\ell}}\right)}^{2}} \]
  5. Taylor expanded in k around inf 47.4%

    \[\leadsto {\color{blue}{\left(\frac{\ell \cdot \sqrt{2}}{k \cdot \sin k} \cdot \sqrt{\frac{\cos k}{t}}\right)}}^{2} \]
  6. Step-by-step derivation
    1. times-frac47.7%

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

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

    \[\leadsto {\left(\left(\frac{\ell}{k} \cdot \frac{\sqrt{2}}{\sin k}\right) \cdot \color{blue}{\sqrt{\frac{1}{t}}}\right)}^{2} \]
  9. Final simplification34.3%

    \[\leadsto {\left(\left(\frac{\ell}{k} \cdot \frac{\sqrt{2}}{\sin k}\right) \cdot \sqrt{\frac{1}{t}}\right)}^{2} \]

Alternative 8: 71.9% accurate, 1.0× speedup?

\[\begin{array}{l} t_m = \left|t\right| \\ t_s = \mathsf{copysign}\left(1, t\right) \\ t_s \cdot {\left(\sqrt{\frac{1}{t_m}} \cdot \frac{\ell}{\frac{{k}^{2}}{\sqrt{2}}}\right)}^{2} \end{array} \]
t_m = (fabs.f64 t)
t_s = (copysign.f64 1 t)
(FPCore (t_s t_m l k)
 :precision binary64
 (* t_s (pow (* (sqrt (/ 1.0 t_m)) (/ l (/ (pow k 2.0) (sqrt 2.0)))) 2.0)))
t_m = fabs(t);
t_s = copysign(1.0, t);
double code(double t_s, double t_m, double l, double k) {
	return t_s * pow((sqrt((1.0 / t_m)) * (l / (pow(k, 2.0) / sqrt(2.0)))), 2.0);
}
t_m = abs(t)
t_s = copysign(1.0d0, t)
real(8) function code(t_s, t_m, l, k)
    real(8), intent (in) :: t_s
    real(8), intent (in) :: t_m
    real(8), intent (in) :: l
    real(8), intent (in) :: k
    code = t_s * ((sqrt((1.0d0 / t_m)) * (l / ((k ** 2.0d0) / sqrt(2.0d0)))) ** 2.0d0)
end function
t_m = Math.abs(t);
t_s = Math.copySign(1.0, t);
public static double code(double t_s, double t_m, double l, double k) {
	return t_s * Math.pow((Math.sqrt((1.0 / t_m)) * (l / (Math.pow(k, 2.0) / Math.sqrt(2.0)))), 2.0);
}
t_m = math.fabs(t)
t_s = math.copysign(1.0, t)
def code(t_s, t_m, l, k):
	return t_s * math.pow((math.sqrt((1.0 / t_m)) * (l / (math.pow(k, 2.0) / math.sqrt(2.0)))), 2.0)
t_m = abs(t)
t_s = copysign(1.0, t)
function code(t_s, t_m, l, k)
	return Float64(t_s * (Float64(sqrt(Float64(1.0 / t_m)) * Float64(l / Float64((k ^ 2.0) / sqrt(2.0)))) ^ 2.0))
end
t_m = abs(t);
t_s = sign(t) * abs(1.0);
function tmp = code(t_s, t_m, l, k)
	tmp = t_s * ((sqrt((1.0 / t_m)) * (l / ((k ^ 2.0) / sqrt(2.0)))) ^ 2.0);
end
t_m = N[Abs[t], $MachinePrecision]
t_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[t]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[t$95$s_, t$95$m_, l_, k_] := N[(t$95$s * N[Power[N[(N[Sqrt[N[(1.0 / t$95$m), $MachinePrecision]], $MachinePrecision] * N[(l / N[(N[Power[k, 2.0], $MachinePrecision] / N[Sqrt[2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
t_m = \left|t\right|
\\
t_s = \mathsf{copysign}\left(1, t\right)

\\
t_s \cdot {\left(\sqrt{\frac{1}{t_m}} \cdot \frac{\ell}{\frac{{k}^{2}}{\sqrt{2}}}\right)}^{2}
\end{array}
Derivation
  1. Initial program 33.8%

    \[\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. Step-by-step derivation
    1. associate-/r*33.8%

      \[\leadsto \color{blue}{\frac{\frac{2}{\left(\frac{{t}^{3}}{\ell \cdot \ell} \cdot \sin k\right) \cdot \tan k}}{\left(1 + {\left(\frac{k}{t}\right)}^{2}\right) - 1}} \]
    2. *-commutative33.8%

      \[\leadsto \frac{\frac{2}{\color{blue}{\left(\sin k \cdot \frac{{t}^{3}}{\ell \cdot \ell}\right)} \cdot \tan k}}{\left(1 + {\left(\frac{k}{t}\right)}^{2}\right) - 1} \]
    3. associate-*l*33.8%

      \[\leadsto \frac{\frac{2}{\color{blue}{\sin k \cdot \left(\frac{{t}^{3}}{\ell \cdot \ell} \cdot \tan k\right)}}}{\left(1 + {\left(\frac{k}{t}\right)}^{2}\right) - 1} \]
    4. associate-*l/33.8%

      \[\leadsto \frac{\frac{2}{\sin k \cdot \color{blue}{\frac{{t}^{3} \cdot \tan k}{\ell \cdot \ell}}}}{\left(1 + {\left(\frac{k}{t}\right)}^{2}\right) - 1} \]
    5. +-commutative33.8%

      \[\leadsto \frac{\frac{2}{\sin k \cdot \frac{{t}^{3} \cdot \tan k}{\ell \cdot \ell}}}{\color{blue}{\left({\left(\frac{k}{t}\right)}^{2} + 1\right)} - 1} \]
    6. unpow233.8%

      \[\leadsto \frac{\frac{2}{\sin k \cdot \frac{{t}^{3} \cdot \tan k}{\ell \cdot \ell}}}{\left(\color{blue}{\frac{k}{t} \cdot \frac{k}{t}} + 1\right) - 1} \]
    7. sqr-neg33.8%

      \[\leadsto \frac{\frac{2}{\sin k \cdot \frac{{t}^{3} \cdot \tan k}{\ell \cdot \ell}}}{\left(\color{blue}{\left(-\frac{k}{t}\right) \cdot \left(-\frac{k}{t}\right)} + 1\right) - 1} \]
    8. distribute-frac-neg33.8%

      \[\leadsto \frac{\frac{2}{\sin k \cdot \frac{{t}^{3} \cdot \tan k}{\ell \cdot \ell}}}{\left(\color{blue}{\frac{-k}{t}} \cdot \left(-\frac{k}{t}\right) + 1\right) - 1} \]
    9. distribute-frac-neg33.8%

      \[\leadsto \frac{\frac{2}{\sin k \cdot \frac{{t}^{3} \cdot \tan k}{\ell \cdot \ell}}}{\left(\frac{-k}{t} \cdot \color{blue}{\frac{-k}{t}} + 1\right) - 1} \]
    10. unpow233.8%

      \[\leadsto \frac{\frac{2}{\sin k \cdot \frac{{t}^{3} \cdot \tan k}{\ell \cdot \ell}}}{\left(\color{blue}{{\left(\frac{-k}{t}\right)}^{2}} + 1\right) - 1} \]
    11. associate--l+43.4%

      \[\leadsto \frac{\frac{2}{\sin k \cdot \frac{{t}^{3} \cdot \tan k}{\ell \cdot \ell}}}{\color{blue}{{\left(\frac{-k}{t}\right)}^{2} + \left(1 - 1\right)}} \]
    12. metadata-eval43.4%

      \[\leadsto \frac{\frac{2}{\sin k \cdot \frac{{t}^{3} \cdot \tan k}{\ell \cdot \ell}}}{{\left(\frac{-k}{t}\right)}^{2} + \color{blue}{0}} \]
    13. +-rgt-identity43.4%

      \[\leadsto \frac{\frac{2}{\sin k \cdot \frac{{t}^{3} \cdot \tan k}{\ell \cdot \ell}}}{\color{blue}{{\left(\frac{-k}{t}\right)}^{2}}} \]
    14. unpow243.4%

      \[\leadsto \frac{\frac{2}{\sin k \cdot \frac{{t}^{3} \cdot \tan k}{\ell \cdot \ell}}}{\color{blue}{\frac{-k}{t} \cdot \frac{-k}{t}}} \]
    15. distribute-frac-neg43.4%

      \[\leadsto \frac{\frac{2}{\sin k \cdot \frac{{t}^{3} \cdot \tan k}{\ell \cdot \ell}}}{\color{blue}{\left(-\frac{k}{t}\right)} \cdot \frac{-k}{t}} \]
    16. distribute-frac-neg43.4%

      \[\leadsto \frac{\frac{2}{\sin k \cdot \frac{{t}^{3} \cdot \tan k}{\ell \cdot \ell}}}{\left(-\frac{k}{t}\right) \cdot \color{blue}{\left(-\frac{k}{t}\right)}} \]
  3. Simplified43.4%

    \[\leadsto \color{blue}{\frac{\frac{2}{\sin k \cdot \frac{{t}^{3} \cdot \tan k}{\ell \cdot \ell}}}{{\left(\frac{k}{t}\right)}^{2}}} \]
  4. Applied egg-rr26.7%

    \[\leadsto \color{blue}{{\left(\frac{\frac{\sqrt{2}}{\frac{k}{t}}}{\sqrt{\sin k \cdot \tan k} \cdot \frac{{t}^{1.5}}{\ell}}\right)}^{2}} \]
  5. Taylor expanded in k around 0 33.1%

    \[\leadsto {\color{blue}{\left(\frac{\ell \cdot \sqrt{2}}{{k}^{2}} \cdot \sqrt{\frac{1}{t}}\right)}}^{2} \]
  6. Step-by-step derivation
    1. associate-/l*33.1%

      \[\leadsto {\left(\color{blue}{\frac{\ell}{\frac{{k}^{2}}{\sqrt{2}}}} \cdot \sqrt{\frac{1}{t}}\right)}^{2} \]
  7. Simplified33.1%

    \[\leadsto {\color{blue}{\left(\frac{\ell}{\frac{{k}^{2}}{\sqrt{2}}} \cdot \sqrt{\frac{1}{t}}\right)}}^{2} \]
  8. Final simplification33.1%

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

Alternative 9: 71.9% accurate, 1.0× speedup?

\[\begin{array}{l} t_m = \left|t\right| \\ t_s = \mathsf{copysign}\left(1, t\right) \\ t_s \cdot {\left(\sqrt{\frac{1}{t_m}} \cdot \frac{\ell \cdot \sqrt{2}}{{k}^{2}}\right)}^{2} \end{array} \]
t_m = (fabs.f64 t)
t_s = (copysign.f64 1 t)
(FPCore (t_s t_m l k)
 :precision binary64
 (* t_s (pow (* (sqrt (/ 1.0 t_m)) (/ (* l (sqrt 2.0)) (pow k 2.0))) 2.0)))
t_m = fabs(t);
t_s = copysign(1.0, t);
double code(double t_s, double t_m, double l, double k) {
	return t_s * pow((sqrt((1.0 / t_m)) * ((l * sqrt(2.0)) / pow(k, 2.0))), 2.0);
}
t_m = abs(t)
t_s = copysign(1.0d0, t)
real(8) function code(t_s, t_m, l, k)
    real(8), intent (in) :: t_s
    real(8), intent (in) :: t_m
    real(8), intent (in) :: l
    real(8), intent (in) :: k
    code = t_s * ((sqrt((1.0d0 / t_m)) * ((l * sqrt(2.0d0)) / (k ** 2.0d0))) ** 2.0d0)
end function
t_m = Math.abs(t);
t_s = Math.copySign(1.0, t);
public static double code(double t_s, double t_m, double l, double k) {
	return t_s * Math.pow((Math.sqrt((1.0 / t_m)) * ((l * Math.sqrt(2.0)) / Math.pow(k, 2.0))), 2.0);
}
t_m = math.fabs(t)
t_s = math.copysign(1.0, t)
def code(t_s, t_m, l, k):
	return t_s * math.pow((math.sqrt((1.0 / t_m)) * ((l * math.sqrt(2.0)) / math.pow(k, 2.0))), 2.0)
t_m = abs(t)
t_s = copysign(1.0, t)
function code(t_s, t_m, l, k)
	return Float64(t_s * (Float64(sqrt(Float64(1.0 / t_m)) * Float64(Float64(l * sqrt(2.0)) / (k ^ 2.0))) ^ 2.0))
end
t_m = abs(t);
t_s = sign(t) * abs(1.0);
function tmp = code(t_s, t_m, l, k)
	tmp = t_s * ((sqrt((1.0 / t_m)) * ((l * sqrt(2.0)) / (k ^ 2.0))) ^ 2.0);
end
t_m = N[Abs[t], $MachinePrecision]
t_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[t]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[t$95$s_, t$95$m_, l_, k_] := N[(t$95$s * N[Power[N[(N[Sqrt[N[(1.0 / t$95$m), $MachinePrecision]], $MachinePrecision] * N[(N[(l * N[Sqrt[2.0], $MachinePrecision]), $MachinePrecision] / N[Power[k, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
t_m = \left|t\right|
\\
t_s = \mathsf{copysign}\left(1, t\right)

\\
t_s \cdot {\left(\sqrt{\frac{1}{t_m}} \cdot \frac{\ell \cdot \sqrt{2}}{{k}^{2}}\right)}^{2}
\end{array}
Derivation
  1. Initial program 33.8%

    \[\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. Step-by-step derivation
    1. associate-/r*33.8%

      \[\leadsto \color{blue}{\frac{\frac{2}{\left(\frac{{t}^{3}}{\ell \cdot \ell} \cdot \sin k\right) \cdot \tan k}}{\left(1 + {\left(\frac{k}{t}\right)}^{2}\right) - 1}} \]
    2. *-commutative33.8%

      \[\leadsto \frac{\frac{2}{\color{blue}{\left(\sin k \cdot \frac{{t}^{3}}{\ell \cdot \ell}\right)} \cdot \tan k}}{\left(1 + {\left(\frac{k}{t}\right)}^{2}\right) - 1} \]
    3. associate-*l*33.8%

      \[\leadsto \frac{\frac{2}{\color{blue}{\sin k \cdot \left(\frac{{t}^{3}}{\ell \cdot \ell} \cdot \tan k\right)}}}{\left(1 + {\left(\frac{k}{t}\right)}^{2}\right) - 1} \]
    4. associate-*l/33.8%

      \[\leadsto \frac{\frac{2}{\sin k \cdot \color{blue}{\frac{{t}^{3} \cdot \tan k}{\ell \cdot \ell}}}}{\left(1 + {\left(\frac{k}{t}\right)}^{2}\right) - 1} \]
    5. +-commutative33.8%

      \[\leadsto \frac{\frac{2}{\sin k \cdot \frac{{t}^{3} \cdot \tan k}{\ell \cdot \ell}}}{\color{blue}{\left({\left(\frac{k}{t}\right)}^{2} + 1\right)} - 1} \]
    6. unpow233.8%

      \[\leadsto \frac{\frac{2}{\sin k \cdot \frac{{t}^{3} \cdot \tan k}{\ell \cdot \ell}}}{\left(\color{blue}{\frac{k}{t} \cdot \frac{k}{t}} + 1\right) - 1} \]
    7. sqr-neg33.8%

      \[\leadsto \frac{\frac{2}{\sin k \cdot \frac{{t}^{3} \cdot \tan k}{\ell \cdot \ell}}}{\left(\color{blue}{\left(-\frac{k}{t}\right) \cdot \left(-\frac{k}{t}\right)} + 1\right) - 1} \]
    8. distribute-frac-neg33.8%

      \[\leadsto \frac{\frac{2}{\sin k \cdot \frac{{t}^{3} \cdot \tan k}{\ell \cdot \ell}}}{\left(\color{blue}{\frac{-k}{t}} \cdot \left(-\frac{k}{t}\right) + 1\right) - 1} \]
    9. distribute-frac-neg33.8%

      \[\leadsto \frac{\frac{2}{\sin k \cdot \frac{{t}^{3} \cdot \tan k}{\ell \cdot \ell}}}{\left(\frac{-k}{t} \cdot \color{blue}{\frac{-k}{t}} + 1\right) - 1} \]
    10. unpow233.8%

      \[\leadsto \frac{\frac{2}{\sin k \cdot \frac{{t}^{3} \cdot \tan k}{\ell \cdot \ell}}}{\left(\color{blue}{{\left(\frac{-k}{t}\right)}^{2}} + 1\right) - 1} \]
    11. associate--l+43.4%

      \[\leadsto \frac{\frac{2}{\sin k \cdot \frac{{t}^{3} \cdot \tan k}{\ell \cdot \ell}}}{\color{blue}{{\left(\frac{-k}{t}\right)}^{2} + \left(1 - 1\right)}} \]
    12. metadata-eval43.4%

      \[\leadsto \frac{\frac{2}{\sin k \cdot \frac{{t}^{3} \cdot \tan k}{\ell \cdot \ell}}}{{\left(\frac{-k}{t}\right)}^{2} + \color{blue}{0}} \]
    13. +-rgt-identity43.4%

      \[\leadsto \frac{\frac{2}{\sin k \cdot \frac{{t}^{3} \cdot \tan k}{\ell \cdot \ell}}}{\color{blue}{{\left(\frac{-k}{t}\right)}^{2}}} \]
    14. unpow243.4%

      \[\leadsto \frac{\frac{2}{\sin k \cdot \frac{{t}^{3} \cdot \tan k}{\ell \cdot \ell}}}{\color{blue}{\frac{-k}{t} \cdot \frac{-k}{t}}} \]
    15. distribute-frac-neg43.4%

      \[\leadsto \frac{\frac{2}{\sin k \cdot \frac{{t}^{3} \cdot \tan k}{\ell \cdot \ell}}}{\color{blue}{\left(-\frac{k}{t}\right)} \cdot \frac{-k}{t}} \]
    16. distribute-frac-neg43.4%

      \[\leadsto \frac{\frac{2}{\sin k \cdot \frac{{t}^{3} \cdot \tan k}{\ell \cdot \ell}}}{\left(-\frac{k}{t}\right) \cdot \color{blue}{\left(-\frac{k}{t}\right)}} \]
  3. Simplified43.4%

    \[\leadsto \color{blue}{\frac{\frac{2}{\sin k \cdot \frac{{t}^{3} \cdot \tan k}{\ell \cdot \ell}}}{{\left(\frac{k}{t}\right)}^{2}}} \]
  4. Applied egg-rr26.7%

    \[\leadsto \color{blue}{{\left(\frac{\frac{\sqrt{2}}{\frac{k}{t}}}{\sqrt{\sin k \cdot \tan k} \cdot \frac{{t}^{1.5}}{\ell}}\right)}^{2}} \]
  5. Taylor expanded in k around 0 33.1%

    \[\leadsto {\color{blue}{\left(\frac{\ell \cdot \sqrt{2}}{{k}^{2}} \cdot \sqrt{\frac{1}{t}}\right)}}^{2} \]
  6. Final simplification33.1%

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

Alternative 10: 68.3% accurate, 1.3× speedup?

\[\begin{array}{l} t_m = \left|t\right| \\ t_s = \mathsf{copysign}\left(1, t\right) \\ t_s \cdot \begin{array}{l} \mathbf{if}\;t_m \leq 8.8 \cdot 10^{-212}:\\ \;\;\;\;2 \cdot \frac{{\ell}^{2} \cdot {k}^{-4}}{t_m}\\ \mathbf{elif}\;t_m \leq 0.002:\\ \;\;\;\;{\left(\frac{\frac{\sqrt{2}}{\frac{k}{t_m}}}{k \cdot \frac{{t_m}^{1.5}}{\ell}}\right)}^{2}\\ \mathbf{elif}\;t_m \leq 5.5 \cdot 10^{+102}:\\ \;\;\;\;\frac{2}{\left(\tan k \cdot \left(\sin k \cdot \frac{\frac{{t_m}^{3}}{\ell}}{\ell}\right)\right) \cdot \left(\frac{k}{t_m} \cdot \frac{k}{t_m}\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{2}{\frac{{k}^{2}}{{\ell}^{2}} \cdot \left(t_m \cdot {k}^{2}\right)}\\ \end{array} \end{array} \]
t_m = (fabs.f64 t)
t_s = (copysign.f64 1 t)
(FPCore (t_s t_m l k)
 :precision binary64
 (*
  t_s
  (if (<= t_m 8.8e-212)
    (* 2.0 (/ (* (pow l 2.0) (pow k -4.0)) t_m))
    (if (<= t_m 0.002)
      (pow (/ (/ (sqrt 2.0) (/ k t_m)) (* k (/ (pow t_m 1.5) l))) 2.0)
      (if (<= t_m 5.5e+102)
        (/
         2.0
         (*
          (* (tan k) (* (sin k) (/ (/ (pow t_m 3.0) l) l)))
          (* (/ k t_m) (/ k t_m))))
        (/ 2.0 (* (/ (pow k 2.0) (pow l 2.0)) (* t_m (pow k 2.0)))))))))
t_m = fabs(t);
t_s = copysign(1.0, t);
double code(double t_s, double t_m, double l, double k) {
	double tmp;
	if (t_m <= 8.8e-212) {
		tmp = 2.0 * ((pow(l, 2.0) * pow(k, -4.0)) / t_m);
	} else if (t_m <= 0.002) {
		tmp = pow(((sqrt(2.0) / (k / t_m)) / (k * (pow(t_m, 1.5) / l))), 2.0);
	} else if (t_m <= 5.5e+102) {
		tmp = 2.0 / ((tan(k) * (sin(k) * ((pow(t_m, 3.0) / l) / l))) * ((k / t_m) * (k / t_m)));
	} else {
		tmp = 2.0 / ((pow(k, 2.0) / pow(l, 2.0)) * (t_m * pow(k, 2.0)));
	}
	return t_s * tmp;
}
t_m = abs(t)
t_s = copysign(1.0d0, t)
real(8) function code(t_s, t_m, l, k)
    real(8), intent (in) :: t_s
    real(8), intent (in) :: t_m
    real(8), intent (in) :: l
    real(8), intent (in) :: k
    real(8) :: tmp
    if (t_m <= 8.8d-212) then
        tmp = 2.0d0 * (((l ** 2.0d0) * (k ** (-4.0d0))) / t_m)
    else if (t_m <= 0.002d0) then
        tmp = ((sqrt(2.0d0) / (k / t_m)) / (k * ((t_m ** 1.5d0) / l))) ** 2.0d0
    else if (t_m <= 5.5d+102) then
        tmp = 2.0d0 / ((tan(k) * (sin(k) * (((t_m ** 3.0d0) / l) / l))) * ((k / t_m) * (k / t_m)))
    else
        tmp = 2.0d0 / (((k ** 2.0d0) / (l ** 2.0d0)) * (t_m * (k ** 2.0d0)))
    end if
    code = t_s * tmp
end function
t_m = Math.abs(t);
t_s = Math.copySign(1.0, t);
public static double code(double t_s, double t_m, double l, double k) {
	double tmp;
	if (t_m <= 8.8e-212) {
		tmp = 2.0 * ((Math.pow(l, 2.0) * Math.pow(k, -4.0)) / t_m);
	} else if (t_m <= 0.002) {
		tmp = Math.pow(((Math.sqrt(2.0) / (k / t_m)) / (k * (Math.pow(t_m, 1.5) / l))), 2.0);
	} else if (t_m <= 5.5e+102) {
		tmp = 2.0 / ((Math.tan(k) * (Math.sin(k) * ((Math.pow(t_m, 3.0) / l) / l))) * ((k / t_m) * (k / t_m)));
	} else {
		tmp = 2.0 / ((Math.pow(k, 2.0) / Math.pow(l, 2.0)) * (t_m * Math.pow(k, 2.0)));
	}
	return t_s * tmp;
}
t_m = math.fabs(t)
t_s = math.copysign(1.0, t)
def code(t_s, t_m, l, k):
	tmp = 0
	if t_m <= 8.8e-212:
		tmp = 2.0 * ((math.pow(l, 2.0) * math.pow(k, -4.0)) / t_m)
	elif t_m <= 0.002:
		tmp = math.pow(((math.sqrt(2.0) / (k / t_m)) / (k * (math.pow(t_m, 1.5) / l))), 2.0)
	elif t_m <= 5.5e+102:
		tmp = 2.0 / ((math.tan(k) * (math.sin(k) * ((math.pow(t_m, 3.0) / l) / l))) * ((k / t_m) * (k / t_m)))
	else:
		tmp = 2.0 / ((math.pow(k, 2.0) / math.pow(l, 2.0)) * (t_m * math.pow(k, 2.0)))
	return t_s * tmp
t_m = abs(t)
t_s = copysign(1.0, t)
function code(t_s, t_m, l, k)
	tmp = 0.0
	if (t_m <= 8.8e-212)
		tmp = Float64(2.0 * Float64(Float64((l ^ 2.0) * (k ^ -4.0)) / t_m));
	elseif (t_m <= 0.002)
		tmp = Float64(Float64(sqrt(2.0) / Float64(k / t_m)) / Float64(k * Float64((t_m ^ 1.5) / l))) ^ 2.0;
	elseif (t_m <= 5.5e+102)
		tmp = Float64(2.0 / Float64(Float64(tan(k) * Float64(sin(k) * Float64(Float64((t_m ^ 3.0) / l) / l))) * Float64(Float64(k / t_m) * Float64(k / t_m))));
	else
		tmp = Float64(2.0 / Float64(Float64((k ^ 2.0) / (l ^ 2.0)) * Float64(t_m * (k ^ 2.0))));
	end
	return Float64(t_s * tmp)
end
t_m = abs(t);
t_s = sign(t) * abs(1.0);
function tmp_2 = code(t_s, t_m, l, k)
	tmp = 0.0;
	if (t_m <= 8.8e-212)
		tmp = 2.0 * (((l ^ 2.0) * (k ^ -4.0)) / t_m);
	elseif (t_m <= 0.002)
		tmp = ((sqrt(2.0) / (k / t_m)) / (k * ((t_m ^ 1.5) / l))) ^ 2.0;
	elseif (t_m <= 5.5e+102)
		tmp = 2.0 / ((tan(k) * (sin(k) * (((t_m ^ 3.0) / l) / l))) * ((k / t_m) * (k / t_m)));
	else
		tmp = 2.0 / (((k ^ 2.0) / (l ^ 2.0)) * (t_m * (k ^ 2.0)));
	end
	tmp_2 = t_s * tmp;
end
t_m = N[Abs[t], $MachinePrecision]
t_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[t]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[t$95$s_, t$95$m_, l_, k_] := N[(t$95$s * If[LessEqual[t$95$m, 8.8e-212], N[(2.0 * N[(N[(N[Power[l, 2.0], $MachinePrecision] * N[Power[k, -4.0], $MachinePrecision]), $MachinePrecision] / t$95$m), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$m, 0.002], N[Power[N[(N[(N[Sqrt[2.0], $MachinePrecision] / N[(k / t$95$m), $MachinePrecision]), $MachinePrecision] / N[(k * N[(N[Power[t$95$m, 1.5], $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision], If[LessEqual[t$95$m, 5.5e+102], N[(2.0 / N[(N[(N[Tan[k], $MachinePrecision] * N[(N[Sin[k], $MachinePrecision] * N[(N[(N[Power[t$95$m, 3.0], $MachinePrecision] / l), $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(N[(k / t$95$m), $MachinePrecision] * N[(k / t$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(2.0 / N[(N[(N[Power[k, 2.0], $MachinePrecision] / N[Power[l, 2.0], $MachinePrecision]), $MachinePrecision] * N[(t$95$m * N[Power[k, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]), $MachinePrecision]
\begin{array}{l}
t_m = \left|t\right|
\\
t_s = \mathsf{copysign}\left(1, t\right)

\\
t_s \cdot \begin{array}{l}
\mathbf{if}\;t_m \leq 8.8 \cdot 10^{-212}:\\
\;\;\;\;2 \cdot \frac{{\ell}^{2} \cdot {k}^{-4}}{t_m}\\

\mathbf{elif}\;t_m \leq 0.002:\\
\;\;\;\;{\left(\frac{\frac{\sqrt{2}}{\frac{k}{t_m}}}{k \cdot \frac{{t_m}^{1.5}}{\ell}}\right)}^{2}\\

\mathbf{elif}\;t_m \leq 5.5 \cdot 10^{+102}:\\
\;\;\;\;\frac{2}{\left(\tan k \cdot \left(\sin k \cdot \frac{\frac{{t_m}^{3}}{\ell}}{\ell}\right)\right) \cdot \left(\frac{k}{t_m} \cdot \frac{k}{t_m}\right)}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if t < 8.80000000000000012e-212

    1. Initial program 32.8%

      \[\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. Step-by-step derivation
      1. associate-/r*32.8%

        \[\leadsto \color{blue}{\frac{\frac{2}{\left(\frac{{t}^{3}}{\ell \cdot \ell} \cdot \sin k\right) \cdot \tan k}}{\left(1 + {\left(\frac{k}{t}\right)}^{2}\right) - 1}} \]
      2. *-commutative32.8%

        \[\leadsto \frac{\frac{2}{\color{blue}{\left(\sin k \cdot \frac{{t}^{3}}{\ell \cdot \ell}\right)} \cdot \tan k}}{\left(1 + {\left(\frac{k}{t}\right)}^{2}\right) - 1} \]
      3. associate-*l*32.8%

        \[\leadsto \frac{\frac{2}{\color{blue}{\sin k \cdot \left(\frac{{t}^{3}}{\ell \cdot \ell} \cdot \tan k\right)}}}{\left(1 + {\left(\frac{k}{t}\right)}^{2}\right) - 1} \]
      4. associate-*l/32.8%

        \[\leadsto \frac{\frac{2}{\sin k \cdot \color{blue}{\frac{{t}^{3} \cdot \tan k}{\ell \cdot \ell}}}}{\left(1 + {\left(\frac{k}{t}\right)}^{2}\right) - 1} \]
      5. +-commutative32.8%

        \[\leadsto \frac{\frac{2}{\sin k \cdot \frac{{t}^{3} \cdot \tan k}{\ell \cdot \ell}}}{\color{blue}{\left({\left(\frac{k}{t}\right)}^{2} + 1\right)} - 1} \]
      6. unpow232.8%

        \[\leadsto \frac{\frac{2}{\sin k \cdot \frac{{t}^{3} \cdot \tan k}{\ell \cdot \ell}}}{\left(\color{blue}{\frac{k}{t} \cdot \frac{k}{t}} + 1\right) - 1} \]
      7. sqr-neg32.8%

        \[\leadsto \frac{\frac{2}{\sin k \cdot \frac{{t}^{3} \cdot \tan k}{\ell \cdot \ell}}}{\left(\color{blue}{\left(-\frac{k}{t}\right) \cdot \left(-\frac{k}{t}\right)} + 1\right) - 1} \]
      8. distribute-frac-neg32.8%

        \[\leadsto \frac{\frac{2}{\sin k \cdot \frac{{t}^{3} \cdot \tan k}{\ell \cdot \ell}}}{\left(\color{blue}{\frac{-k}{t}} \cdot \left(-\frac{k}{t}\right) + 1\right) - 1} \]
      9. distribute-frac-neg32.8%

        \[\leadsto \frac{\frac{2}{\sin k \cdot \frac{{t}^{3} \cdot \tan k}{\ell \cdot \ell}}}{\left(\frac{-k}{t} \cdot \color{blue}{\frac{-k}{t}} + 1\right) - 1} \]
      10. unpow232.8%

        \[\leadsto \frac{\frac{2}{\sin k \cdot \frac{{t}^{3} \cdot \tan k}{\ell \cdot \ell}}}{\left(\color{blue}{{\left(\frac{-k}{t}\right)}^{2}} + 1\right) - 1} \]
      11. associate--l+39.6%

        \[\leadsto \frac{\frac{2}{\sin k \cdot \frac{{t}^{3} \cdot \tan k}{\ell \cdot \ell}}}{\color{blue}{{\left(\frac{-k}{t}\right)}^{2} + \left(1 - 1\right)}} \]
      12. metadata-eval39.6%

        \[\leadsto \frac{\frac{2}{\sin k \cdot \frac{{t}^{3} \cdot \tan k}{\ell \cdot \ell}}}{{\left(\frac{-k}{t}\right)}^{2} + \color{blue}{0}} \]
      13. +-rgt-identity39.6%

        \[\leadsto \frac{\frac{2}{\sin k \cdot \frac{{t}^{3} \cdot \tan k}{\ell \cdot \ell}}}{\color{blue}{{\left(\frac{-k}{t}\right)}^{2}}} \]
      14. unpow239.6%

        \[\leadsto \frac{\frac{2}{\sin k \cdot \frac{{t}^{3} \cdot \tan k}{\ell \cdot \ell}}}{\color{blue}{\frac{-k}{t} \cdot \frac{-k}{t}}} \]
      15. distribute-frac-neg39.6%

        \[\leadsto \frac{\frac{2}{\sin k \cdot \frac{{t}^{3} \cdot \tan k}{\ell \cdot \ell}}}{\color{blue}{\left(-\frac{k}{t}\right)} \cdot \frac{-k}{t}} \]
      16. distribute-frac-neg39.6%

        \[\leadsto \frac{\frac{2}{\sin k \cdot \frac{{t}^{3} \cdot \tan k}{\ell \cdot \ell}}}{\left(-\frac{k}{t}\right) \cdot \color{blue}{\left(-\frac{k}{t}\right)}} \]
    3. Simplified39.6%

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

      \[\leadsto \color{blue}{2 \cdot \frac{{\ell}^{2}}{{k}^{4} \cdot t}} \]
    5. Step-by-step derivation
      1. *-commutative62.0%

        \[\leadsto 2 \cdot \frac{{\ell}^{2}}{\color{blue}{t \cdot {k}^{4}}} \]
      2. associate-/r*61.2%

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

      \[\leadsto \color{blue}{2 \cdot \frac{\frac{{\ell}^{2}}{t}}{{k}^{4}}} \]
    7. Step-by-step derivation
      1. div-inv61.2%

        \[\leadsto 2 \cdot \color{blue}{\left(\frac{{\ell}^{2}}{t} \cdot \frac{1}{{k}^{4}}\right)} \]
      2. pow-flip61.8%

        \[\leadsto 2 \cdot \left(\frac{{\ell}^{2}}{t} \cdot \color{blue}{{k}^{\left(-4\right)}}\right) \]
      3. metadata-eval61.8%

        \[\leadsto 2 \cdot \left(\frac{{\ell}^{2}}{t} \cdot {k}^{\color{blue}{-4}}\right) \]
    8. Applied egg-rr61.8%

      \[\leadsto 2 \cdot \color{blue}{\left(\frac{{\ell}^{2}}{t} \cdot {k}^{-4}\right)} \]
    9. Step-by-step derivation
      1. associate-*l/62.7%

        \[\leadsto 2 \cdot \color{blue}{\frac{{\ell}^{2} \cdot {k}^{-4}}{t}} \]
    10. Applied egg-rr62.7%

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

    if 8.80000000000000012e-212 < t < 2e-3

    1. Initial program 44.2%

      \[\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. Step-by-step derivation
      1. associate-/r*44.2%

        \[\leadsto \color{blue}{\frac{\frac{2}{\left(\frac{{t}^{3}}{\ell \cdot \ell} \cdot \sin k\right) \cdot \tan k}}{\left(1 + {\left(\frac{k}{t}\right)}^{2}\right) - 1}} \]
      2. *-commutative44.2%

        \[\leadsto \frac{\frac{2}{\color{blue}{\left(\sin k \cdot \frac{{t}^{3}}{\ell \cdot \ell}\right)} \cdot \tan k}}{\left(1 + {\left(\frac{k}{t}\right)}^{2}\right) - 1} \]
      3. associate-*l*44.2%

        \[\leadsto \frac{\frac{2}{\color{blue}{\sin k \cdot \left(\frac{{t}^{3}}{\ell \cdot \ell} \cdot \tan k\right)}}}{\left(1 + {\left(\frac{k}{t}\right)}^{2}\right) - 1} \]
      4. associate-*l/44.2%

        \[\leadsto \frac{\frac{2}{\sin k \cdot \color{blue}{\frac{{t}^{3} \cdot \tan k}{\ell \cdot \ell}}}}{\left(1 + {\left(\frac{k}{t}\right)}^{2}\right) - 1} \]
      5. +-commutative44.2%

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

        \[\leadsto \frac{\frac{2}{\sin k \cdot \frac{{t}^{3} \cdot \tan k}{\ell \cdot \ell}}}{\left(\color{blue}{\frac{k}{t} \cdot \frac{k}{t}} + 1\right) - 1} \]
      7. sqr-neg44.2%

        \[\leadsto \frac{\frac{2}{\sin k \cdot \frac{{t}^{3} \cdot \tan k}{\ell \cdot \ell}}}{\left(\color{blue}{\left(-\frac{k}{t}\right) \cdot \left(-\frac{k}{t}\right)} + 1\right) - 1} \]
      8. distribute-frac-neg44.2%

        \[\leadsto \frac{\frac{2}{\sin k \cdot \frac{{t}^{3} \cdot \tan k}{\ell \cdot \ell}}}{\left(\color{blue}{\frac{-k}{t}} \cdot \left(-\frac{k}{t}\right) + 1\right) - 1} \]
      9. distribute-frac-neg44.2%

        \[\leadsto \frac{\frac{2}{\sin k \cdot \frac{{t}^{3} \cdot \tan k}{\ell \cdot \ell}}}{\left(\frac{-k}{t} \cdot \color{blue}{\frac{-k}{t}} + 1\right) - 1} \]
      10. unpow244.2%

        \[\leadsto \frac{\frac{2}{\sin k \cdot \frac{{t}^{3} \cdot \tan k}{\ell \cdot \ell}}}{\left(\color{blue}{{\left(\frac{-k}{t}\right)}^{2}} + 1\right) - 1} \]
      11. associate--l+48.3%

        \[\leadsto \frac{\frac{2}{\sin k \cdot \frac{{t}^{3} \cdot \tan k}{\ell \cdot \ell}}}{\color{blue}{{\left(\frac{-k}{t}\right)}^{2} + \left(1 - 1\right)}} \]
      12. metadata-eval48.3%

        \[\leadsto \frac{\frac{2}{\sin k \cdot \frac{{t}^{3} \cdot \tan k}{\ell \cdot \ell}}}{{\left(\frac{-k}{t}\right)}^{2} + \color{blue}{0}} \]
      13. +-rgt-identity48.3%

        \[\leadsto \frac{\frac{2}{\sin k \cdot \frac{{t}^{3} \cdot \tan k}{\ell \cdot \ell}}}{\color{blue}{{\left(\frac{-k}{t}\right)}^{2}}} \]
      14. unpow248.3%

        \[\leadsto \frac{\frac{2}{\sin k \cdot \frac{{t}^{3} \cdot \tan k}{\ell \cdot \ell}}}{\color{blue}{\frac{-k}{t} \cdot \frac{-k}{t}}} \]
      15. distribute-frac-neg48.3%

        \[\leadsto \frac{\frac{2}{\sin k \cdot \frac{{t}^{3} \cdot \tan k}{\ell \cdot \ell}}}{\color{blue}{\left(-\frac{k}{t}\right)} \cdot \frac{-k}{t}} \]
      16. distribute-frac-neg48.3%

        \[\leadsto \frac{\frac{2}{\sin k \cdot \frac{{t}^{3} \cdot \tan k}{\ell \cdot \ell}}}{\left(-\frac{k}{t}\right) \cdot \color{blue}{\left(-\frac{k}{t}\right)}} \]
    3. Simplified48.3%

      \[\leadsto \color{blue}{\frac{\frac{2}{\sin k \cdot \frac{{t}^{3} \cdot \tan k}{\ell \cdot \ell}}}{{\left(\frac{k}{t}\right)}^{2}}} \]
    4. Applied egg-rr68.9%

      \[\leadsto \color{blue}{{\left(\frac{\frac{\sqrt{2}}{\frac{k}{t}}}{\sqrt{\sin k \cdot \tan k} \cdot \frac{{t}^{1.5}}{\ell}}\right)}^{2}} \]
    5. Taylor expanded in k around 0 77.6%

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

    if 2e-3 < t < 5.49999999999999981e102

    1. Initial program 50.5%

      \[\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. Step-by-step derivation
      1. associate-/r*57.4%

        \[\leadsto \frac{2}{\left(\left(\color{blue}{\frac{\frac{{t}^{3}}{\ell}}{\ell}} \cdot \sin k\right) \cdot \tan k\right) \cdot \left(\left(1 + {\left(\frac{k}{t}\right)}^{2}\right) - 1\right)} \]
      2. div-inv57.3%

        \[\leadsto \frac{2}{\left(\left(\color{blue}{\left(\frac{{t}^{3}}{\ell} \cdot \frac{1}{\ell}\right)} \cdot \sin k\right) \cdot \tan k\right) \cdot \left(\left(1 + {\left(\frac{k}{t}\right)}^{2}\right) - 1\right)} \]
    3. Applied egg-rr57.3%

      \[\leadsto \frac{2}{\left(\left(\color{blue}{\left(\frac{{t}^{3}}{\ell} \cdot \frac{1}{\ell}\right)} \cdot \sin k\right) \cdot \tan k\right) \cdot \left(\left(1 + {\left(\frac{k}{t}\right)}^{2}\right) - 1\right)} \]
    4. Step-by-step derivation
      1. +-commutative57.3%

        \[\leadsto \frac{2}{\left(\left(\left(\frac{{t}^{3}}{\ell} \cdot \frac{1}{\ell}\right) \cdot \sin k\right) \cdot \tan k\right) \cdot \left(\color{blue}{\left({\left(\frac{k}{t}\right)}^{2} + 1\right)} - 1\right)} \]
      2. associate--l+84.2%

        \[\leadsto \frac{2}{\left(\left(\left(\frac{{t}^{3}}{\ell} \cdot \frac{1}{\ell}\right) \cdot \sin k\right) \cdot \tan k\right) \cdot \color{blue}{\left({\left(\frac{k}{t}\right)}^{2} + \left(1 - 1\right)\right)}} \]
      3. metadata-eval84.2%

        \[\leadsto \frac{2}{\left(\left(\left(\frac{{t}^{3}}{\ell} \cdot \frac{1}{\ell}\right) \cdot \sin k\right) \cdot \tan k\right) \cdot \left({\left(\frac{k}{t}\right)}^{2} + \color{blue}{0}\right)} \]
      4. +-rgt-identity84.2%

        \[\leadsto \frac{2}{\left(\left(\left(\frac{{t}^{3}}{\ell} \cdot \frac{1}{\ell}\right) \cdot \sin k\right) \cdot \tan k\right) \cdot \color{blue}{{\left(\frac{k}{t}\right)}^{2}}} \]
      5. unpow284.2%

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

      \[\leadsto \frac{2}{\left(\left(\left(\frac{{t}^{3}}{\ell} \cdot \frac{1}{\ell}\right) \cdot \sin k\right) \cdot \tan k\right) \cdot \color{blue}{\left(\frac{k}{t} \cdot \frac{k}{t}\right)}} \]
    6. Step-by-step derivation
      1. un-div-inv84.5%

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

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

    if 5.49999999999999981e102 < t

    1. Initial program 18.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. Taylor expanded in t around 0 76.6%

      \[\leadsto \frac{2}{\color{blue}{\frac{{k}^{2} \cdot \left(t \cdot {\sin k}^{2}\right)}{{\ell}^{2} \cdot \cos k}}} \]
    3. Step-by-step derivation
      1. times-frac82.8%

        \[\leadsto \frac{2}{\color{blue}{\frac{{k}^{2}}{{\ell}^{2}} \cdot \frac{t \cdot {\sin k}^{2}}{\cos k}}} \]
      2. associate-/l*82.8%

        \[\leadsto \frac{2}{\frac{{k}^{2}}{{\ell}^{2}} \cdot \color{blue}{\frac{t}{\frac{\cos k}{{\sin k}^{2}}}}} \]
    4. Simplified82.8%

      \[\leadsto \frac{2}{\color{blue}{\frac{{k}^{2}}{{\ell}^{2}} \cdot \frac{t}{\frac{\cos k}{{\sin k}^{2}}}}} \]
    5. Step-by-step derivation
      1. frac-times74.3%

        \[\leadsto \frac{2}{\color{blue}{\frac{{k}^{2} \cdot t}{{\ell}^{2} \cdot \frac{\cos k}{{\sin k}^{2}}}}} \]
      2. div-inv74.3%

        \[\leadsto \frac{2}{\frac{{k}^{2} \cdot t}{{\ell}^{2} \cdot \color{blue}{\left(\cos k \cdot \frac{1}{{\sin k}^{2}}\right)}}} \]
      3. pow-flip74.3%

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

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

      \[\leadsto \frac{2}{\color{blue}{\frac{{k}^{2} \cdot t}{{\ell}^{2} \cdot \left(\cos k \cdot {\sin k}^{-2}\right)}}} \]
    7. Step-by-step derivation
      1. times-frac82.8%

        \[\leadsto \frac{2}{\color{blue}{\frac{{k}^{2}}{{\ell}^{2}} \cdot \frac{t}{\cos k \cdot {\sin k}^{-2}}}} \]
    8. Simplified82.8%

      \[\leadsto \frac{2}{\color{blue}{\frac{{k}^{2}}{{\ell}^{2}} \cdot \frac{t}{\cos k \cdot {\sin k}^{-2}}}} \]
    9. Taylor expanded in k around 0 75.1%

      \[\leadsto \frac{2}{\frac{{k}^{2}}{{\ell}^{2}} \cdot \color{blue}{\left({k}^{2} \cdot t\right)}} \]
  3. Recombined 4 regimes into one program.
  4. Final simplification68.6%

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq 8.8 \cdot 10^{-212}:\\ \;\;\;\;2 \cdot \frac{{\ell}^{2} \cdot {k}^{-4}}{t}\\ \mathbf{elif}\;t \leq 0.002:\\ \;\;\;\;{\left(\frac{\frac{\sqrt{2}}{\frac{k}{t}}}{k \cdot \frac{{t}^{1.5}}{\ell}}\right)}^{2}\\ \mathbf{elif}\;t \leq 5.5 \cdot 10^{+102}:\\ \;\;\;\;\frac{2}{\left(\tan k \cdot \left(\sin k \cdot \frac{\frac{{t}^{3}}{\ell}}{\ell}\right)\right) \cdot \left(\frac{k}{t} \cdot \frac{k}{t}\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{2}{\frac{{k}^{2}}{{\ell}^{2}} \cdot \left(t \cdot {k}^{2}\right)}\\ \end{array} \]

Alternative 11: 67.0% accurate, 1.3× speedup?

\[\begin{array}{l} t_m = \left|t\right| \\ t_s = \mathsf{copysign}\left(1, t\right) \\ t_s \cdot \begin{array}{l} \mathbf{if}\;t_m \leq 2.8 \cdot 10^{-212}:\\ \;\;\;\;2 \cdot \frac{{\ell}^{2} \cdot {k}^{-4}}{t_m}\\ \mathbf{elif}\;t_m \leq 1.9 \cdot 10^{+183}:\\ \;\;\;\;{\left(\frac{\frac{\sqrt{2}}{\frac{k}{t_m}}}{k \cdot \frac{{t_m}^{1.5}}{\ell}}\right)}^{2}\\ \mathbf{else}:\\ \;\;\;\;\frac{2}{\frac{{k}^{2}}{{\ell}^{2}} \cdot \left(t_m \cdot {k}^{2}\right)}\\ \end{array} \end{array} \]
t_m = (fabs.f64 t)
t_s = (copysign.f64 1 t)
(FPCore (t_s t_m l k)
 :precision binary64
 (*
  t_s
  (if (<= t_m 2.8e-212)
    (* 2.0 (/ (* (pow l 2.0) (pow k -4.0)) t_m))
    (if (<= t_m 1.9e+183)
      (pow (/ (/ (sqrt 2.0) (/ k t_m)) (* k (/ (pow t_m 1.5) l))) 2.0)
      (/ 2.0 (* (/ (pow k 2.0) (pow l 2.0)) (* t_m (pow k 2.0))))))))
t_m = fabs(t);
t_s = copysign(1.0, t);
double code(double t_s, double t_m, double l, double k) {
	double tmp;
	if (t_m <= 2.8e-212) {
		tmp = 2.0 * ((pow(l, 2.0) * pow(k, -4.0)) / t_m);
	} else if (t_m <= 1.9e+183) {
		tmp = pow(((sqrt(2.0) / (k / t_m)) / (k * (pow(t_m, 1.5) / l))), 2.0);
	} else {
		tmp = 2.0 / ((pow(k, 2.0) / pow(l, 2.0)) * (t_m * pow(k, 2.0)));
	}
	return t_s * tmp;
}
t_m = abs(t)
t_s = copysign(1.0d0, t)
real(8) function code(t_s, t_m, l, k)
    real(8), intent (in) :: t_s
    real(8), intent (in) :: t_m
    real(8), intent (in) :: l
    real(8), intent (in) :: k
    real(8) :: tmp
    if (t_m <= 2.8d-212) then
        tmp = 2.0d0 * (((l ** 2.0d0) * (k ** (-4.0d0))) / t_m)
    else if (t_m <= 1.9d+183) then
        tmp = ((sqrt(2.0d0) / (k / t_m)) / (k * ((t_m ** 1.5d0) / l))) ** 2.0d0
    else
        tmp = 2.0d0 / (((k ** 2.0d0) / (l ** 2.0d0)) * (t_m * (k ** 2.0d0)))
    end if
    code = t_s * tmp
end function
t_m = Math.abs(t);
t_s = Math.copySign(1.0, t);
public static double code(double t_s, double t_m, double l, double k) {
	double tmp;
	if (t_m <= 2.8e-212) {
		tmp = 2.0 * ((Math.pow(l, 2.0) * Math.pow(k, -4.0)) / t_m);
	} else if (t_m <= 1.9e+183) {
		tmp = Math.pow(((Math.sqrt(2.0) / (k / t_m)) / (k * (Math.pow(t_m, 1.5) / l))), 2.0);
	} else {
		tmp = 2.0 / ((Math.pow(k, 2.0) / Math.pow(l, 2.0)) * (t_m * Math.pow(k, 2.0)));
	}
	return t_s * tmp;
}
t_m = math.fabs(t)
t_s = math.copysign(1.0, t)
def code(t_s, t_m, l, k):
	tmp = 0
	if t_m <= 2.8e-212:
		tmp = 2.0 * ((math.pow(l, 2.0) * math.pow(k, -4.0)) / t_m)
	elif t_m <= 1.9e+183:
		tmp = math.pow(((math.sqrt(2.0) / (k / t_m)) / (k * (math.pow(t_m, 1.5) / l))), 2.0)
	else:
		tmp = 2.0 / ((math.pow(k, 2.0) / math.pow(l, 2.0)) * (t_m * math.pow(k, 2.0)))
	return t_s * tmp
t_m = abs(t)
t_s = copysign(1.0, t)
function code(t_s, t_m, l, k)
	tmp = 0.0
	if (t_m <= 2.8e-212)
		tmp = Float64(2.0 * Float64(Float64((l ^ 2.0) * (k ^ -4.0)) / t_m));
	elseif (t_m <= 1.9e+183)
		tmp = Float64(Float64(sqrt(2.0) / Float64(k / t_m)) / Float64(k * Float64((t_m ^ 1.5) / l))) ^ 2.0;
	else
		tmp = Float64(2.0 / Float64(Float64((k ^ 2.0) / (l ^ 2.0)) * Float64(t_m * (k ^ 2.0))));
	end
	return Float64(t_s * tmp)
end
t_m = abs(t);
t_s = sign(t) * abs(1.0);
function tmp_2 = code(t_s, t_m, l, k)
	tmp = 0.0;
	if (t_m <= 2.8e-212)
		tmp = 2.0 * (((l ^ 2.0) * (k ^ -4.0)) / t_m);
	elseif (t_m <= 1.9e+183)
		tmp = ((sqrt(2.0) / (k / t_m)) / (k * ((t_m ^ 1.5) / l))) ^ 2.0;
	else
		tmp = 2.0 / (((k ^ 2.0) / (l ^ 2.0)) * (t_m * (k ^ 2.0)));
	end
	tmp_2 = t_s * tmp;
end
t_m = N[Abs[t], $MachinePrecision]
t_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[t]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[t$95$s_, t$95$m_, l_, k_] := N[(t$95$s * If[LessEqual[t$95$m, 2.8e-212], N[(2.0 * N[(N[(N[Power[l, 2.0], $MachinePrecision] * N[Power[k, -4.0], $MachinePrecision]), $MachinePrecision] / t$95$m), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$m, 1.9e+183], N[Power[N[(N[(N[Sqrt[2.0], $MachinePrecision] / N[(k / t$95$m), $MachinePrecision]), $MachinePrecision] / N[(k * N[(N[Power[t$95$m, 1.5], $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision], N[(2.0 / N[(N[(N[Power[k, 2.0], $MachinePrecision] / N[Power[l, 2.0], $MachinePrecision]), $MachinePrecision] * N[(t$95$m * N[Power[k, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]), $MachinePrecision]
\begin{array}{l}
t_m = \left|t\right|
\\
t_s = \mathsf{copysign}\left(1, t\right)

\\
t_s \cdot \begin{array}{l}
\mathbf{if}\;t_m \leq 2.8 \cdot 10^{-212}:\\
\;\;\;\;2 \cdot \frac{{\ell}^{2} \cdot {k}^{-4}}{t_m}\\

\mathbf{elif}\;t_m \leq 1.9 \cdot 10^{+183}:\\
\;\;\;\;{\left(\frac{\frac{\sqrt{2}}{\frac{k}{t_m}}}{k \cdot \frac{{t_m}^{1.5}}{\ell}}\right)}^{2}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if t < 2.80000000000000014e-212

    1. Initial program 32.8%

      \[\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. Step-by-step derivation
      1. associate-/r*32.8%

        \[\leadsto \color{blue}{\frac{\frac{2}{\left(\frac{{t}^{3}}{\ell \cdot \ell} \cdot \sin k\right) \cdot \tan k}}{\left(1 + {\left(\frac{k}{t}\right)}^{2}\right) - 1}} \]
      2. *-commutative32.8%

        \[\leadsto \frac{\frac{2}{\color{blue}{\left(\sin k \cdot \frac{{t}^{3}}{\ell \cdot \ell}\right)} \cdot \tan k}}{\left(1 + {\left(\frac{k}{t}\right)}^{2}\right) - 1} \]
      3. associate-*l*32.8%

        \[\leadsto \frac{\frac{2}{\color{blue}{\sin k \cdot \left(\frac{{t}^{3}}{\ell \cdot \ell} \cdot \tan k\right)}}}{\left(1 + {\left(\frac{k}{t}\right)}^{2}\right) - 1} \]
      4. associate-*l/32.8%

        \[\leadsto \frac{\frac{2}{\sin k \cdot \color{blue}{\frac{{t}^{3} \cdot \tan k}{\ell \cdot \ell}}}}{\left(1 + {\left(\frac{k}{t}\right)}^{2}\right) - 1} \]
      5. +-commutative32.8%

        \[\leadsto \frac{\frac{2}{\sin k \cdot \frac{{t}^{3} \cdot \tan k}{\ell \cdot \ell}}}{\color{blue}{\left({\left(\frac{k}{t}\right)}^{2} + 1\right)} - 1} \]
      6. unpow232.8%

        \[\leadsto \frac{\frac{2}{\sin k \cdot \frac{{t}^{3} \cdot \tan k}{\ell \cdot \ell}}}{\left(\color{blue}{\frac{k}{t} \cdot \frac{k}{t}} + 1\right) - 1} \]
      7. sqr-neg32.8%

        \[\leadsto \frac{\frac{2}{\sin k \cdot \frac{{t}^{3} \cdot \tan k}{\ell \cdot \ell}}}{\left(\color{blue}{\left(-\frac{k}{t}\right) \cdot \left(-\frac{k}{t}\right)} + 1\right) - 1} \]
      8. distribute-frac-neg32.8%

        \[\leadsto \frac{\frac{2}{\sin k \cdot \frac{{t}^{3} \cdot \tan k}{\ell \cdot \ell}}}{\left(\color{blue}{\frac{-k}{t}} \cdot \left(-\frac{k}{t}\right) + 1\right) - 1} \]
      9. distribute-frac-neg32.8%

        \[\leadsto \frac{\frac{2}{\sin k \cdot \frac{{t}^{3} \cdot \tan k}{\ell \cdot \ell}}}{\left(\frac{-k}{t} \cdot \color{blue}{\frac{-k}{t}} + 1\right) - 1} \]
      10. unpow232.8%

        \[\leadsto \frac{\frac{2}{\sin k \cdot \frac{{t}^{3} \cdot \tan k}{\ell \cdot \ell}}}{\left(\color{blue}{{\left(\frac{-k}{t}\right)}^{2}} + 1\right) - 1} \]
      11. associate--l+39.6%

        \[\leadsto \frac{\frac{2}{\sin k \cdot \frac{{t}^{3} \cdot \tan k}{\ell \cdot \ell}}}{\color{blue}{{\left(\frac{-k}{t}\right)}^{2} + \left(1 - 1\right)}} \]
      12. metadata-eval39.6%

        \[\leadsto \frac{\frac{2}{\sin k \cdot \frac{{t}^{3} \cdot \tan k}{\ell \cdot \ell}}}{{\left(\frac{-k}{t}\right)}^{2} + \color{blue}{0}} \]
      13. +-rgt-identity39.6%

        \[\leadsto \frac{\frac{2}{\sin k \cdot \frac{{t}^{3} \cdot \tan k}{\ell \cdot \ell}}}{\color{blue}{{\left(\frac{-k}{t}\right)}^{2}}} \]
      14. unpow239.6%

        \[\leadsto \frac{\frac{2}{\sin k \cdot \frac{{t}^{3} \cdot \tan k}{\ell \cdot \ell}}}{\color{blue}{\frac{-k}{t} \cdot \frac{-k}{t}}} \]
      15. distribute-frac-neg39.6%

        \[\leadsto \frac{\frac{2}{\sin k \cdot \frac{{t}^{3} \cdot \tan k}{\ell \cdot \ell}}}{\color{blue}{\left(-\frac{k}{t}\right)} \cdot \frac{-k}{t}} \]
      16. distribute-frac-neg39.6%

        \[\leadsto \frac{\frac{2}{\sin k \cdot \frac{{t}^{3} \cdot \tan k}{\ell \cdot \ell}}}{\left(-\frac{k}{t}\right) \cdot \color{blue}{\left(-\frac{k}{t}\right)}} \]
    3. Simplified39.6%

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

      \[\leadsto \color{blue}{2 \cdot \frac{{\ell}^{2}}{{k}^{4} \cdot t}} \]
    5. Step-by-step derivation
      1. *-commutative62.0%

        \[\leadsto 2 \cdot \frac{{\ell}^{2}}{\color{blue}{t \cdot {k}^{4}}} \]
      2. associate-/r*61.2%

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

      \[\leadsto \color{blue}{2 \cdot \frac{\frac{{\ell}^{2}}{t}}{{k}^{4}}} \]
    7. Step-by-step derivation
      1. div-inv61.2%

        \[\leadsto 2 \cdot \color{blue}{\left(\frac{{\ell}^{2}}{t} \cdot \frac{1}{{k}^{4}}\right)} \]
      2. pow-flip61.8%

        \[\leadsto 2 \cdot \left(\frac{{\ell}^{2}}{t} \cdot \color{blue}{{k}^{\left(-4\right)}}\right) \]
      3. metadata-eval61.8%

        \[\leadsto 2 \cdot \left(\frac{{\ell}^{2}}{t} \cdot {k}^{\color{blue}{-4}}\right) \]
    8. Applied egg-rr61.8%

      \[\leadsto 2 \cdot \color{blue}{\left(\frac{{\ell}^{2}}{t} \cdot {k}^{-4}\right)} \]
    9. Step-by-step derivation
      1. associate-*l/62.7%

        \[\leadsto 2 \cdot \color{blue}{\frac{{\ell}^{2} \cdot {k}^{-4}}{t}} \]
    10. Applied egg-rr62.7%

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

    if 2.80000000000000014e-212 < t < 1.9e183

    1. Initial program 42.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. Step-by-step derivation
      1. associate-/r*43.0%

        \[\leadsto \color{blue}{\frac{\frac{2}{\left(\frac{{t}^{3}}{\ell \cdot \ell} \cdot \sin k\right) \cdot \tan k}}{\left(1 + {\left(\frac{k}{t}\right)}^{2}\right) - 1}} \]
      2. *-commutative43.0%

        \[\leadsto \frac{\frac{2}{\color{blue}{\left(\sin k \cdot \frac{{t}^{3}}{\ell \cdot \ell}\right)} \cdot \tan k}}{\left(1 + {\left(\frac{k}{t}\right)}^{2}\right) - 1} \]
      3. associate-*l*43.0%

        \[\leadsto \frac{\frac{2}{\color{blue}{\sin k \cdot \left(\frac{{t}^{3}}{\ell \cdot \ell} \cdot \tan k\right)}}}{\left(1 + {\left(\frac{k}{t}\right)}^{2}\right) - 1} \]
      4. associate-*l/43.0%

        \[\leadsto \frac{\frac{2}{\sin k \cdot \color{blue}{\frac{{t}^{3} \cdot \tan k}{\ell \cdot \ell}}}}{\left(1 + {\left(\frac{k}{t}\right)}^{2}\right) - 1} \]
      5. +-commutative43.0%

        \[\leadsto \frac{\frac{2}{\sin k \cdot \frac{{t}^{3} \cdot \tan k}{\ell \cdot \ell}}}{\color{blue}{\left({\left(\frac{k}{t}\right)}^{2} + 1\right)} - 1} \]
      6. unpow243.0%

        \[\leadsto \frac{\frac{2}{\sin k \cdot \frac{{t}^{3} \cdot \tan k}{\ell \cdot \ell}}}{\left(\color{blue}{\frac{k}{t} \cdot \frac{k}{t}} + 1\right) - 1} \]
      7. sqr-neg43.0%

        \[\leadsto \frac{\frac{2}{\sin k \cdot \frac{{t}^{3} \cdot \tan k}{\ell \cdot \ell}}}{\left(\color{blue}{\left(-\frac{k}{t}\right) \cdot \left(-\frac{k}{t}\right)} + 1\right) - 1} \]
      8. distribute-frac-neg43.0%

        \[\leadsto \frac{\frac{2}{\sin k \cdot \frac{{t}^{3} \cdot \tan k}{\ell \cdot \ell}}}{\left(\color{blue}{\frac{-k}{t}} \cdot \left(-\frac{k}{t}\right) + 1\right) - 1} \]
      9. distribute-frac-neg43.0%

        \[\leadsto \frac{\frac{2}{\sin k \cdot \frac{{t}^{3} \cdot \tan k}{\ell \cdot \ell}}}{\left(\frac{-k}{t} \cdot \color{blue}{\frac{-k}{t}} + 1\right) - 1} \]
      10. unpow243.0%

        \[\leadsto \frac{\frac{2}{\sin k \cdot \frac{{t}^{3} \cdot \tan k}{\ell \cdot \ell}}}{\left(\color{blue}{{\left(\frac{-k}{t}\right)}^{2}} + 1\right) - 1} \]
      11. associate--l+51.6%

        \[\leadsto \frac{\frac{2}{\sin k \cdot \frac{{t}^{3} \cdot \tan k}{\ell \cdot \ell}}}{\color{blue}{{\left(\frac{-k}{t}\right)}^{2} + \left(1 - 1\right)}} \]
      12. metadata-eval51.6%

        \[\leadsto \frac{\frac{2}{\sin k \cdot \frac{{t}^{3} \cdot \tan k}{\ell \cdot \ell}}}{{\left(\frac{-k}{t}\right)}^{2} + \color{blue}{0}} \]
      13. +-rgt-identity51.6%

        \[\leadsto \frac{\frac{2}{\sin k \cdot \frac{{t}^{3} \cdot \tan k}{\ell \cdot \ell}}}{\color{blue}{{\left(\frac{-k}{t}\right)}^{2}}} \]
      14. unpow251.6%

        \[\leadsto \frac{\frac{2}{\sin k \cdot \frac{{t}^{3} \cdot \tan k}{\ell \cdot \ell}}}{\color{blue}{\frac{-k}{t} \cdot \frac{-k}{t}}} \]
      15. distribute-frac-neg51.6%

        \[\leadsto \frac{\frac{2}{\sin k \cdot \frac{{t}^{3} \cdot \tan k}{\ell \cdot \ell}}}{\color{blue}{\left(-\frac{k}{t}\right)} \cdot \frac{-k}{t}} \]
      16. distribute-frac-neg51.6%

        \[\leadsto \frac{\frac{2}{\sin k \cdot \frac{{t}^{3} \cdot \tan k}{\ell \cdot \ell}}}{\left(-\frac{k}{t}\right) \cdot \color{blue}{\left(-\frac{k}{t}\right)}} \]
    3. Simplified51.6%

      \[\leadsto \color{blue}{\frac{\frac{2}{\sin k \cdot \frac{{t}^{3} \cdot \tan k}{\ell \cdot \ell}}}{{\left(\frac{k}{t}\right)}^{2}}} \]
    4. Applied egg-rr72.4%

      \[\leadsto \color{blue}{{\left(\frac{\frac{\sqrt{2}}{\frac{k}{t}}}{\sqrt{\sin k \cdot \tan k} \cdot \frac{{t}^{1.5}}{\ell}}\right)}^{2}} \]
    5. Taylor expanded in k around 0 72.0%

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

    if 1.9e183 < t

    1. Initial program 5.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. Taylor expanded in t around 0 80.2%

      \[\leadsto \frac{2}{\color{blue}{\frac{{k}^{2} \cdot \left(t \cdot {\sin k}^{2}\right)}{{\ell}^{2} \cdot \cos k}}} \]
    3. Step-by-step derivation
      1. times-frac86.8%

        \[\leadsto \frac{2}{\color{blue}{\frac{{k}^{2}}{{\ell}^{2}} \cdot \frac{t \cdot {\sin k}^{2}}{\cos k}}} \]
      2. associate-/l*86.8%

        \[\leadsto \frac{2}{\frac{{k}^{2}}{{\ell}^{2}} \cdot \color{blue}{\frac{t}{\frac{\cos k}{{\sin k}^{2}}}}} \]
    4. Simplified86.8%

      \[\leadsto \frac{2}{\color{blue}{\frac{{k}^{2}}{{\ell}^{2}} \cdot \frac{t}{\frac{\cos k}{{\sin k}^{2}}}}} \]
    5. Step-by-step derivation
      1. frac-times75.8%

        \[\leadsto \frac{2}{\color{blue}{\frac{{k}^{2} \cdot t}{{\ell}^{2} \cdot \frac{\cos k}{{\sin k}^{2}}}}} \]
      2. div-inv75.8%

        \[\leadsto \frac{2}{\frac{{k}^{2} \cdot t}{{\ell}^{2} \cdot \color{blue}{\left(\cos k \cdot \frac{1}{{\sin k}^{2}}\right)}}} \]
      3. pow-flip75.9%

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

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

      \[\leadsto \frac{2}{\color{blue}{\frac{{k}^{2} \cdot t}{{\ell}^{2} \cdot \left(\cos k \cdot {\sin k}^{-2}\right)}}} \]
    7. Step-by-step derivation
      1. times-frac86.9%

        \[\leadsto \frac{2}{\color{blue}{\frac{{k}^{2}}{{\ell}^{2}} \cdot \frac{t}{\cos k \cdot {\sin k}^{-2}}}} \]
    8. Simplified86.9%

      \[\leadsto \frac{2}{\color{blue}{\frac{{k}^{2}}{{\ell}^{2}} \cdot \frac{t}{\cos k \cdot {\sin k}^{-2}}}} \]
    9. Taylor expanded in k around 0 77.3%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq 2.8 \cdot 10^{-212}:\\ \;\;\;\;2 \cdot \frac{{\ell}^{2} \cdot {k}^{-4}}{t}\\ \mathbf{elif}\;t \leq 1.9 \cdot 10^{+183}:\\ \;\;\;\;{\left(\frac{\frac{\sqrt{2}}{\frac{k}{t}}}{k \cdot \frac{{t}^{1.5}}{\ell}}\right)}^{2}\\ \mathbf{else}:\\ \;\;\;\;\frac{2}{\frac{{k}^{2}}{{\ell}^{2}} \cdot \left(t \cdot {k}^{2}\right)}\\ \end{array} \]

Alternative 12: 63.4% accurate, 1.3× speedup?

\[\begin{array}{l} t_m = \left|t\right| \\ t_s = \mathsf{copysign}\left(1, t\right) \\ t_s \cdot \frac{2}{\frac{{k}^{2}}{{\ell}^{2}} \cdot \left(t_m \cdot {k}^{2}\right)} \end{array} \]
t_m = (fabs.f64 t)
t_s = (copysign.f64 1 t)
(FPCore (t_s t_m l k)
 :precision binary64
 (* t_s (/ 2.0 (* (/ (pow k 2.0) (pow l 2.0)) (* t_m (pow k 2.0))))))
t_m = fabs(t);
t_s = copysign(1.0, t);
double code(double t_s, double t_m, double l, double k) {
	return t_s * (2.0 / ((pow(k, 2.0) / pow(l, 2.0)) * (t_m * pow(k, 2.0))));
}
t_m = abs(t)
t_s = copysign(1.0d0, t)
real(8) function code(t_s, t_m, l, k)
    real(8), intent (in) :: t_s
    real(8), intent (in) :: t_m
    real(8), intent (in) :: l
    real(8), intent (in) :: k
    code = t_s * (2.0d0 / (((k ** 2.0d0) / (l ** 2.0d0)) * (t_m * (k ** 2.0d0))))
end function
t_m = Math.abs(t);
t_s = Math.copySign(1.0, t);
public static double code(double t_s, double t_m, double l, double k) {
	return t_s * (2.0 / ((Math.pow(k, 2.0) / Math.pow(l, 2.0)) * (t_m * Math.pow(k, 2.0))));
}
t_m = math.fabs(t)
t_s = math.copysign(1.0, t)
def code(t_s, t_m, l, k):
	return t_s * (2.0 / ((math.pow(k, 2.0) / math.pow(l, 2.0)) * (t_m * math.pow(k, 2.0))))
t_m = abs(t)
t_s = copysign(1.0, t)
function code(t_s, t_m, l, k)
	return Float64(t_s * Float64(2.0 / Float64(Float64((k ^ 2.0) / (l ^ 2.0)) * Float64(t_m * (k ^ 2.0)))))
end
t_m = abs(t);
t_s = sign(t) * abs(1.0);
function tmp = code(t_s, t_m, l, k)
	tmp = t_s * (2.0 / (((k ^ 2.0) / (l ^ 2.0)) * (t_m * (k ^ 2.0))));
end
t_m = N[Abs[t], $MachinePrecision]
t_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[t]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[t$95$s_, t$95$m_, l_, k_] := N[(t$95$s * N[(2.0 / N[(N[(N[Power[k, 2.0], $MachinePrecision] / N[Power[l, 2.0], $MachinePrecision]), $MachinePrecision] * N[(t$95$m * N[Power[k, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
t_m = \left|t\right|
\\
t_s = \mathsf{copysign}\left(1, t\right)

\\
t_s \cdot \frac{2}{\frac{{k}^{2}}{{\ell}^{2}} \cdot \left(t_m \cdot {k}^{2}\right)}
\end{array}
Derivation
  1. Initial program 33.8%

    \[\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. Taylor expanded in t around 0 73.4%

    \[\leadsto \frac{2}{\color{blue}{\frac{{k}^{2} \cdot \left(t \cdot {\sin k}^{2}\right)}{{\ell}^{2} \cdot \cos k}}} \]
  3. Step-by-step derivation
    1. times-frac73.9%

      \[\leadsto \frac{2}{\color{blue}{\frac{{k}^{2}}{{\ell}^{2}} \cdot \frac{t \cdot {\sin k}^{2}}{\cos k}}} \]
    2. associate-/l*73.9%

      \[\leadsto \frac{2}{\frac{{k}^{2}}{{\ell}^{2}} \cdot \color{blue}{\frac{t}{\frac{\cos k}{{\sin k}^{2}}}}} \]
  4. Simplified73.9%

    \[\leadsto \frac{2}{\color{blue}{\frac{{k}^{2}}{{\ell}^{2}} \cdot \frac{t}{\frac{\cos k}{{\sin k}^{2}}}}} \]
  5. Step-by-step derivation
    1. frac-times73.2%

      \[\leadsto \frac{2}{\color{blue}{\frac{{k}^{2} \cdot t}{{\ell}^{2} \cdot \frac{\cos k}{{\sin k}^{2}}}}} \]
    2. div-inv73.2%

      \[\leadsto \frac{2}{\frac{{k}^{2} \cdot t}{{\ell}^{2} \cdot \color{blue}{\left(\cos k \cdot \frac{1}{{\sin k}^{2}}\right)}}} \]
    3. pow-flip73.2%

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

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

    \[\leadsto \frac{2}{\color{blue}{\frac{{k}^{2} \cdot t}{{\ell}^{2} \cdot \left(\cos k \cdot {\sin k}^{-2}\right)}}} \]
  7. Step-by-step derivation
    1. times-frac73.8%

      \[\leadsto \frac{2}{\color{blue}{\frac{{k}^{2}}{{\ell}^{2}} \cdot \frac{t}{\cos k \cdot {\sin k}^{-2}}}} \]
  8. Simplified73.8%

    \[\leadsto \frac{2}{\color{blue}{\frac{{k}^{2}}{{\ell}^{2}} \cdot \frac{t}{\cos k \cdot {\sin k}^{-2}}}} \]
  9. Taylor expanded in k around 0 64.4%

    \[\leadsto \frac{2}{\frac{{k}^{2}}{{\ell}^{2}} \cdot \color{blue}{\left({k}^{2} \cdot t\right)}} \]
  10. Final simplification64.4%

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

Alternative 13: 60.1% accurate, 2.0× speedup?

\[\begin{array}{l} t_m = \left|t\right| \\ t_s = \mathsf{copysign}\left(1, t\right) \\ t_s \cdot \left(2 \cdot \left({k}^{-4} \cdot \frac{{\ell}^{2}}{t_m}\right)\right) \end{array} \]
t_m = (fabs.f64 t)
t_s = (copysign.f64 1 t)
(FPCore (t_s t_m l k)
 :precision binary64
 (* t_s (* 2.0 (* (pow k -4.0) (/ (pow l 2.0) t_m)))))
t_m = fabs(t);
t_s = copysign(1.0, t);
double code(double t_s, double t_m, double l, double k) {
	return t_s * (2.0 * (pow(k, -4.0) * (pow(l, 2.0) / t_m)));
}
t_m = abs(t)
t_s = copysign(1.0d0, t)
real(8) function code(t_s, t_m, l, k)
    real(8), intent (in) :: t_s
    real(8), intent (in) :: t_m
    real(8), intent (in) :: l
    real(8), intent (in) :: k
    code = t_s * (2.0d0 * ((k ** (-4.0d0)) * ((l ** 2.0d0) / t_m)))
end function
t_m = Math.abs(t);
t_s = Math.copySign(1.0, t);
public static double code(double t_s, double t_m, double l, double k) {
	return t_s * (2.0 * (Math.pow(k, -4.0) * (Math.pow(l, 2.0) / t_m)));
}
t_m = math.fabs(t)
t_s = math.copysign(1.0, t)
def code(t_s, t_m, l, k):
	return t_s * (2.0 * (math.pow(k, -4.0) * (math.pow(l, 2.0) / t_m)))
t_m = abs(t)
t_s = copysign(1.0, t)
function code(t_s, t_m, l, k)
	return Float64(t_s * Float64(2.0 * Float64((k ^ -4.0) * Float64((l ^ 2.0) / t_m))))
end
t_m = abs(t);
t_s = sign(t) * abs(1.0);
function tmp = code(t_s, t_m, l, k)
	tmp = t_s * (2.0 * ((k ^ -4.0) * ((l ^ 2.0) / t_m)));
end
t_m = N[Abs[t], $MachinePrecision]
t_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[t]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[t$95$s_, t$95$m_, l_, k_] := N[(t$95$s * N[(2.0 * N[(N[Power[k, -4.0], $MachinePrecision] * N[(N[Power[l, 2.0], $MachinePrecision] / t$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
t_m = \left|t\right|
\\
t_s = \mathsf{copysign}\left(1, t\right)

\\
t_s \cdot \left(2 \cdot \left({k}^{-4} \cdot \frac{{\ell}^{2}}{t_m}\right)\right)
\end{array}
Derivation
  1. Initial program 33.8%

    \[\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. Step-by-step derivation
    1. associate-/r*33.8%

      \[\leadsto \color{blue}{\frac{\frac{2}{\left(\frac{{t}^{3}}{\ell \cdot \ell} \cdot \sin k\right) \cdot \tan k}}{\left(1 + {\left(\frac{k}{t}\right)}^{2}\right) - 1}} \]
    2. *-commutative33.8%

      \[\leadsto \frac{\frac{2}{\color{blue}{\left(\sin k \cdot \frac{{t}^{3}}{\ell \cdot \ell}\right)} \cdot \tan k}}{\left(1 + {\left(\frac{k}{t}\right)}^{2}\right) - 1} \]
    3. associate-*l*33.8%

      \[\leadsto \frac{\frac{2}{\color{blue}{\sin k \cdot \left(\frac{{t}^{3}}{\ell \cdot \ell} \cdot \tan k\right)}}}{\left(1 + {\left(\frac{k}{t}\right)}^{2}\right) - 1} \]
    4. associate-*l/33.8%

      \[\leadsto \frac{\frac{2}{\sin k \cdot \color{blue}{\frac{{t}^{3} \cdot \tan k}{\ell \cdot \ell}}}}{\left(1 + {\left(\frac{k}{t}\right)}^{2}\right) - 1} \]
    5. +-commutative33.8%

      \[\leadsto \frac{\frac{2}{\sin k \cdot \frac{{t}^{3} \cdot \tan k}{\ell \cdot \ell}}}{\color{blue}{\left({\left(\frac{k}{t}\right)}^{2} + 1\right)} - 1} \]
    6. unpow233.8%

      \[\leadsto \frac{\frac{2}{\sin k \cdot \frac{{t}^{3} \cdot \tan k}{\ell \cdot \ell}}}{\left(\color{blue}{\frac{k}{t} \cdot \frac{k}{t}} + 1\right) - 1} \]
    7. sqr-neg33.8%

      \[\leadsto \frac{\frac{2}{\sin k \cdot \frac{{t}^{3} \cdot \tan k}{\ell \cdot \ell}}}{\left(\color{blue}{\left(-\frac{k}{t}\right) \cdot \left(-\frac{k}{t}\right)} + 1\right) - 1} \]
    8. distribute-frac-neg33.8%

      \[\leadsto \frac{\frac{2}{\sin k \cdot \frac{{t}^{3} \cdot \tan k}{\ell \cdot \ell}}}{\left(\color{blue}{\frac{-k}{t}} \cdot \left(-\frac{k}{t}\right) + 1\right) - 1} \]
    9. distribute-frac-neg33.8%

      \[\leadsto \frac{\frac{2}{\sin k \cdot \frac{{t}^{3} \cdot \tan k}{\ell \cdot \ell}}}{\left(\frac{-k}{t} \cdot \color{blue}{\frac{-k}{t}} + 1\right) - 1} \]
    10. unpow233.8%

      \[\leadsto \frac{\frac{2}{\sin k \cdot \frac{{t}^{3} \cdot \tan k}{\ell \cdot \ell}}}{\left(\color{blue}{{\left(\frac{-k}{t}\right)}^{2}} + 1\right) - 1} \]
    11. associate--l+43.4%

      \[\leadsto \frac{\frac{2}{\sin k \cdot \frac{{t}^{3} \cdot \tan k}{\ell \cdot \ell}}}{\color{blue}{{\left(\frac{-k}{t}\right)}^{2} + \left(1 - 1\right)}} \]
    12. metadata-eval43.4%

      \[\leadsto \frac{\frac{2}{\sin k \cdot \frac{{t}^{3} \cdot \tan k}{\ell \cdot \ell}}}{{\left(\frac{-k}{t}\right)}^{2} + \color{blue}{0}} \]
    13. +-rgt-identity43.4%

      \[\leadsto \frac{\frac{2}{\sin k \cdot \frac{{t}^{3} \cdot \tan k}{\ell \cdot \ell}}}{\color{blue}{{\left(\frac{-k}{t}\right)}^{2}}} \]
    14. unpow243.4%

      \[\leadsto \frac{\frac{2}{\sin k \cdot \frac{{t}^{3} \cdot \tan k}{\ell \cdot \ell}}}{\color{blue}{\frac{-k}{t} \cdot \frac{-k}{t}}} \]
    15. distribute-frac-neg43.4%

      \[\leadsto \frac{\frac{2}{\sin k \cdot \frac{{t}^{3} \cdot \tan k}{\ell \cdot \ell}}}{\color{blue}{\left(-\frac{k}{t}\right)} \cdot \frac{-k}{t}} \]
    16. distribute-frac-neg43.4%

      \[\leadsto \frac{\frac{2}{\sin k \cdot \frac{{t}^{3} \cdot \tan k}{\ell \cdot \ell}}}{\left(-\frac{k}{t}\right) \cdot \color{blue}{\left(-\frac{k}{t}\right)}} \]
  3. Simplified43.4%

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

    \[\leadsto \color{blue}{2 \cdot \frac{{\ell}^{2}}{{k}^{4} \cdot t}} \]
  5. Step-by-step derivation
    1. *-commutative62.2%

      \[\leadsto 2 \cdot \frac{{\ell}^{2}}{\color{blue}{t \cdot {k}^{4}}} \]
    2. associate-/r*60.2%

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

    \[\leadsto \color{blue}{2 \cdot \frac{\frac{{\ell}^{2}}{t}}{{k}^{4}}} \]
  7. Step-by-step derivation
    1. div-inv60.2%

      \[\leadsto 2 \cdot \color{blue}{\left(\frac{{\ell}^{2}}{t} \cdot \frac{1}{{k}^{4}}\right)} \]
    2. pow-flip60.6%

      \[\leadsto 2 \cdot \left(\frac{{\ell}^{2}}{t} \cdot \color{blue}{{k}^{\left(-4\right)}}\right) \]
    3. metadata-eval60.6%

      \[\leadsto 2 \cdot \left(\frac{{\ell}^{2}}{t} \cdot {k}^{\color{blue}{-4}}\right) \]
  8. Applied egg-rr60.6%

    \[\leadsto 2 \cdot \color{blue}{\left(\frac{{\ell}^{2}}{t} \cdot {k}^{-4}\right)} \]
  9. Final simplification60.6%

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

Alternative 14: 61.0% accurate, 2.0× speedup?

\[\begin{array}{l} t_m = \left|t\right| \\ t_s = \mathsf{copysign}\left(1, t\right) \\ t_s \cdot \left(2 \cdot \frac{{\ell}^{2} \cdot {k}^{-4}}{t_m}\right) \end{array} \]
t_m = (fabs.f64 t)
t_s = (copysign.f64 1 t)
(FPCore (t_s t_m l k)
 :precision binary64
 (* t_s (* 2.0 (/ (* (pow l 2.0) (pow k -4.0)) t_m))))
t_m = fabs(t);
t_s = copysign(1.0, t);
double code(double t_s, double t_m, double l, double k) {
	return t_s * (2.0 * ((pow(l, 2.0) * pow(k, -4.0)) / t_m));
}
t_m = abs(t)
t_s = copysign(1.0d0, t)
real(8) function code(t_s, t_m, l, k)
    real(8), intent (in) :: t_s
    real(8), intent (in) :: t_m
    real(8), intent (in) :: l
    real(8), intent (in) :: k
    code = t_s * (2.0d0 * (((l ** 2.0d0) * (k ** (-4.0d0))) / t_m))
end function
t_m = Math.abs(t);
t_s = Math.copySign(1.0, t);
public static double code(double t_s, double t_m, double l, double k) {
	return t_s * (2.0 * ((Math.pow(l, 2.0) * Math.pow(k, -4.0)) / t_m));
}
t_m = math.fabs(t)
t_s = math.copysign(1.0, t)
def code(t_s, t_m, l, k):
	return t_s * (2.0 * ((math.pow(l, 2.0) * math.pow(k, -4.0)) / t_m))
t_m = abs(t)
t_s = copysign(1.0, t)
function code(t_s, t_m, l, k)
	return Float64(t_s * Float64(2.0 * Float64(Float64((l ^ 2.0) * (k ^ -4.0)) / t_m)))
end
t_m = abs(t);
t_s = sign(t) * abs(1.0);
function tmp = code(t_s, t_m, l, k)
	tmp = t_s * (2.0 * (((l ^ 2.0) * (k ^ -4.0)) / t_m));
end
t_m = N[Abs[t], $MachinePrecision]
t_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[t]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[t$95$s_, t$95$m_, l_, k_] := N[(t$95$s * N[(2.0 * N[(N[(N[Power[l, 2.0], $MachinePrecision] * N[Power[k, -4.0], $MachinePrecision]), $MachinePrecision] / t$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
t_m = \left|t\right|
\\
t_s = \mathsf{copysign}\left(1, t\right)

\\
t_s \cdot \left(2 \cdot \frac{{\ell}^{2} \cdot {k}^{-4}}{t_m}\right)
\end{array}
Derivation
  1. Initial program 33.8%

    \[\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. Step-by-step derivation
    1. associate-/r*33.8%

      \[\leadsto \color{blue}{\frac{\frac{2}{\left(\frac{{t}^{3}}{\ell \cdot \ell} \cdot \sin k\right) \cdot \tan k}}{\left(1 + {\left(\frac{k}{t}\right)}^{2}\right) - 1}} \]
    2. *-commutative33.8%

      \[\leadsto \frac{\frac{2}{\color{blue}{\left(\sin k \cdot \frac{{t}^{3}}{\ell \cdot \ell}\right)} \cdot \tan k}}{\left(1 + {\left(\frac{k}{t}\right)}^{2}\right) - 1} \]
    3. associate-*l*33.8%

      \[\leadsto \frac{\frac{2}{\color{blue}{\sin k \cdot \left(\frac{{t}^{3}}{\ell \cdot \ell} \cdot \tan k\right)}}}{\left(1 + {\left(\frac{k}{t}\right)}^{2}\right) - 1} \]
    4. associate-*l/33.8%

      \[\leadsto \frac{\frac{2}{\sin k \cdot \color{blue}{\frac{{t}^{3} \cdot \tan k}{\ell \cdot \ell}}}}{\left(1 + {\left(\frac{k}{t}\right)}^{2}\right) - 1} \]
    5. +-commutative33.8%

      \[\leadsto \frac{\frac{2}{\sin k \cdot \frac{{t}^{3} \cdot \tan k}{\ell \cdot \ell}}}{\color{blue}{\left({\left(\frac{k}{t}\right)}^{2} + 1\right)} - 1} \]
    6. unpow233.8%

      \[\leadsto \frac{\frac{2}{\sin k \cdot \frac{{t}^{3} \cdot \tan k}{\ell \cdot \ell}}}{\left(\color{blue}{\frac{k}{t} \cdot \frac{k}{t}} + 1\right) - 1} \]
    7. sqr-neg33.8%

      \[\leadsto \frac{\frac{2}{\sin k \cdot \frac{{t}^{3} \cdot \tan k}{\ell \cdot \ell}}}{\left(\color{blue}{\left(-\frac{k}{t}\right) \cdot \left(-\frac{k}{t}\right)} + 1\right) - 1} \]
    8. distribute-frac-neg33.8%

      \[\leadsto \frac{\frac{2}{\sin k \cdot \frac{{t}^{3} \cdot \tan k}{\ell \cdot \ell}}}{\left(\color{blue}{\frac{-k}{t}} \cdot \left(-\frac{k}{t}\right) + 1\right) - 1} \]
    9. distribute-frac-neg33.8%

      \[\leadsto \frac{\frac{2}{\sin k \cdot \frac{{t}^{3} \cdot \tan k}{\ell \cdot \ell}}}{\left(\frac{-k}{t} \cdot \color{blue}{\frac{-k}{t}} + 1\right) - 1} \]
    10. unpow233.8%

      \[\leadsto \frac{\frac{2}{\sin k \cdot \frac{{t}^{3} \cdot \tan k}{\ell \cdot \ell}}}{\left(\color{blue}{{\left(\frac{-k}{t}\right)}^{2}} + 1\right) - 1} \]
    11. associate--l+43.4%

      \[\leadsto \frac{\frac{2}{\sin k \cdot \frac{{t}^{3} \cdot \tan k}{\ell \cdot \ell}}}{\color{blue}{{\left(\frac{-k}{t}\right)}^{2} + \left(1 - 1\right)}} \]
    12. metadata-eval43.4%

      \[\leadsto \frac{\frac{2}{\sin k \cdot \frac{{t}^{3} \cdot \tan k}{\ell \cdot \ell}}}{{\left(\frac{-k}{t}\right)}^{2} + \color{blue}{0}} \]
    13. +-rgt-identity43.4%

      \[\leadsto \frac{\frac{2}{\sin k \cdot \frac{{t}^{3} \cdot \tan k}{\ell \cdot \ell}}}{\color{blue}{{\left(\frac{-k}{t}\right)}^{2}}} \]
    14. unpow243.4%

      \[\leadsto \frac{\frac{2}{\sin k \cdot \frac{{t}^{3} \cdot \tan k}{\ell \cdot \ell}}}{\color{blue}{\frac{-k}{t} \cdot \frac{-k}{t}}} \]
    15. distribute-frac-neg43.4%

      \[\leadsto \frac{\frac{2}{\sin k \cdot \frac{{t}^{3} \cdot \tan k}{\ell \cdot \ell}}}{\color{blue}{\left(-\frac{k}{t}\right)} \cdot \frac{-k}{t}} \]
    16. distribute-frac-neg43.4%

      \[\leadsto \frac{\frac{2}{\sin k \cdot \frac{{t}^{3} \cdot \tan k}{\ell \cdot \ell}}}{\left(-\frac{k}{t}\right) \cdot \color{blue}{\left(-\frac{k}{t}\right)}} \]
  3. Simplified43.4%

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

    \[\leadsto \color{blue}{2 \cdot \frac{{\ell}^{2}}{{k}^{4} \cdot t}} \]
  5. Step-by-step derivation
    1. *-commutative62.2%

      \[\leadsto 2 \cdot \frac{{\ell}^{2}}{\color{blue}{t \cdot {k}^{4}}} \]
    2. associate-/r*60.2%

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

    \[\leadsto \color{blue}{2 \cdot \frac{\frac{{\ell}^{2}}{t}}{{k}^{4}}} \]
  7. Step-by-step derivation
    1. div-inv60.2%

      \[\leadsto 2 \cdot \color{blue}{\left(\frac{{\ell}^{2}}{t} \cdot \frac{1}{{k}^{4}}\right)} \]
    2. pow-flip60.6%

      \[\leadsto 2 \cdot \left(\frac{{\ell}^{2}}{t} \cdot \color{blue}{{k}^{\left(-4\right)}}\right) \]
    3. metadata-eval60.6%

      \[\leadsto 2 \cdot \left(\frac{{\ell}^{2}}{t} \cdot {k}^{\color{blue}{-4}}\right) \]
  8. Applied egg-rr60.6%

    \[\leadsto 2 \cdot \color{blue}{\left(\frac{{\ell}^{2}}{t} \cdot {k}^{-4}\right)} \]
  9. Step-by-step derivation
    1. associate-*l/62.7%

      \[\leadsto 2 \cdot \color{blue}{\frac{{\ell}^{2} \cdot {k}^{-4}}{t}} \]
  10. Applied egg-rr62.7%

    \[\leadsto 2 \cdot \color{blue}{\frac{{\ell}^{2} \cdot {k}^{-4}}{t}} \]
  11. Final simplification62.7%

    \[\leadsto 2 \cdot \frac{{\ell}^{2} \cdot {k}^{-4}}{t} \]

Reproduce

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