Toniolo and Linder, Equation (10-)

Percentage Accurate: 34.2% → 86.6%
Time: 21.3s
Alternatives: 18
Speedup: 3.8×

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 18 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: 34.2% 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.6% 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^{-284}:\\ \;\;\;\;{\left(\sqrt{\frac{1}{t_m}} \cdot \left(\frac{\ell}{k} \cdot \frac{\sqrt{2}}{\sin k}\right)\right)}^{2}\\ \mathbf{elif}\;\ell \cdot \ell \leq 2 \cdot 10^{+280}:\\ \;\;\;\;{\sin k}^{-2} \cdot \left(\cos k \cdot \left(\frac{2}{t_m} \cdot \frac{{k}^{-2}}{{\ell}^{-2}}\right)\right)\\ \mathbf{else}:\\ \;\;\;\;{\left(\left(\frac{\ell}{\sin k} \cdot \frac{\sqrt{2}}{k}\right) \cdot \sqrt{\frac{1}{t_m} \cdot \cos 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-284)
    (pow (* (sqrt (/ 1.0 t_m)) (* (/ l k) (/ (sqrt 2.0) (sin k)))) 2.0)
    (if (<= (* l l) 2e+280)
      (*
       (pow (sin k) -2.0)
       (* (cos k) (* (/ 2.0 t_m) (/ (pow k -2.0) (pow l -2.0)))))
      (pow
       (* (* (/ l (sin k)) (/ (sqrt 2.0) k)) (sqrt (* (/ 1.0 t_m) (cos 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-284) {
		tmp = pow((sqrt((1.0 / t_m)) * ((l / k) * (sqrt(2.0) / sin(k)))), 2.0);
	} else if ((l * l) <= 2e+280) {
		tmp = pow(sin(k), -2.0) * (cos(k) * ((2.0 / t_m) * (pow(k, -2.0) / pow(l, -2.0))));
	} else {
		tmp = pow((((l / sin(k)) * (sqrt(2.0) / k)) * sqrt(((1.0 / t_m) * cos(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-284) then
        tmp = (sqrt((1.0d0 / t_m)) * ((l / k) * (sqrt(2.0d0) / sin(k)))) ** 2.0d0
    else if ((l * l) <= 2d+280) then
        tmp = (sin(k) ** (-2.0d0)) * (cos(k) * ((2.0d0 / t_m) * ((k ** (-2.0d0)) / (l ** (-2.0d0)))))
    else
        tmp = (((l / sin(k)) * (sqrt(2.0d0) / k)) * sqrt(((1.0d0 / t_m) * cos(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-284) {
		tmp = Math.pow((Math.sqrt((1.0 / t_m)) * ((l / k) * (Math.sqrt(2.0) / Math.sin(k)))), 2.0);
	} else if ((l * l) <= 2e+280) {
		tmp = Math.pow(Math.sin(k), -2.0) * (Math.cos(k) * ((2.0 / t_m) * (Math.pow(k, -2.0) / Math.pow(l, -2.0))));
	} else {
		tmp = Math.pow((((l / Math.sin(k)) * (Math.sqrt(2.0) / k)) * Math.sqrt(((1.0 / t_m) * Math.cos(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-284:
		tmp = math.pow((math.sqrt((1.0 / t_m)) * ((l / k) * (math.sqrt(2.0) / math.sin(k)))), 2.0)
	elif (l * l) <= 2e+280:
		tmp = math.pow(math.sin(k), -2.0) * (math.cos(k) * ((2.0 / t_m) * (math.pow(k, -2.0) / math.pow(l, -2.0))))
	else:
		tmp = math.pow((((l / math.sin(k)) * (math.sqrt(2.0) / k)) * math.sqrt(((1.0 / t_m) * math.cos(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-284)
		tmp = Float64(sqrt(Float64(1.0 / t_m)) * Float64(Float64(l / k) * Float64(sqrt(2.0) / sin(k)))) ^ 2.0;
	elseif (Float64(l * l) <= 2e+280)
		tmp = Float64((sin(k) ^ -2.0) * Float64(cos(k) * Float64(Float64(2.0 / t_m) * Float64((k ^ -2.0) / (l ^ -2.0)))));
	else
		tmp = Float64(Float64(Float64(l / sin(k)) * Float64(sqrt(2.0) / k)) * sqrt(Float64(Float64(1.0 / t_m) * cos(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-284)
		tmp = (sqrt((1.0 / t_m)) * ((l / k) * (sqrt(2.0) / sin(k)))) ^ 2.0;
	elseif ((l * l) <= 2e+280)
		tmp = (sin(k) ^ -2.0) * (cos(k) * ((2.0 / t_m) * ((k ^ -2.0) / (l ^ -2.0))));
	else
		tmp = (((l / sin(k)) * (sqrt(2.0) / k)) * sqrt(((1.0 / t_m) * cos(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-284], N[Power[N[(N[Sqrt[N[(1.0 / t$95$m), $MachinePrecision]], $MachinePrecision] * N[(N[(l / k), $MachinePrecision] * N[(N[Sqrt[2.0], $MachinePrecision] / N[Sin[k], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision], If[LessEqual[N[(l * l), $MachinePrecision], 2e+280], N[(N[Power[N[Sin[k], $MachinePrecision], -2.0], $MachinePrecision] * N[(N[Cos[k], $MachinePrecision] * N[(N[(2.0 / t$95$m), $MachinePrecision] * N[(N[Power[k, -2.0], $MachinePrecision] / N[Power[l, -2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[Power[N[(N[(N[(l / N[Sin[k], $MachinePrecision]), $MachinePrecision] * N[(N[Sqrt[2.0], $MachinePrecision] / k), $MachinePrecision]), $MachinePrecision] * N[Sqrt[N[(N[(1.0 / t$95$m), $MachinePrecision] * N[Cos[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^{-284}:\\
\;\;\;\;{\left(\sqrt{\frac{1}{t_m}} \cdot \left(\frac{\ell}{k} \cdot \frac{\sqrt{2}}{\sin k}\right)\right)}^{2}\\

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

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


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

    1. Initial program 25.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*25.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. *-commutative25.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*25.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/25.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. +-commutative25.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. unpow225.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-neg25.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-neg25.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-neg25.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. unpow225.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+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. Step-by-step derivation
      1. add-sqr-sqrt37.4%

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

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

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

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

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

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

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

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

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

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

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

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

    if 2.00000000000000007e-284 < (*.f64 l l) < 2.0000000000000001e280

    1. Initial program 46.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. Taylor expanded in t around 0 89.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-frac91.0%

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

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

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

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

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

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

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

        \[\leadsto e^{\mathsf{log1p}\left(\frac{\frac{2}{{k}^{2} \cdot {\ell}^{\color{blue}{-2}}}}{\frac{t \cdot {\sin k}^{2}}{\cos k}}\right)} - 1 \]
      7. associate-/l*54.8%

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

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

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

        \[\leadsto \color{blue}{\frac{\frac{2}{{k}^{2} \cdot {\ell}^{-2}}}{\frac{t}{\frac{\cos k}{{\sin k}^{2}}}}} \]
      3. associate-/r/91.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 2.0000000000000001e280 < (*.f64 l l)

    1. Initial program 30.7%

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

        \[\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. *-commutative30.7%

        \[\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*30.7%

        \[\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/30.7%

        \[\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. +-commutative30.7%

        \[\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. unpow230.7%

        \[\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-neg30.7%

        \[\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-neg30.7%

        \[\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-neg30.7%

        \[\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. unpow230.7%

        \[\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+30.8%

        \[\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-eval30.8%

        \[\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-identity30.8%

        \[\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. unpow230.8%

        \[\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-neg30.8%

        \[\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-neg30.8%

        \[\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. Simplified30.8%

      \[\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. add-sqr-sqrt11.4%

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

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

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

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

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

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

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

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

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

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

Alternative 2: 86.4% 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^{-284}:\\ \;\;\;\;{\left(\sqrt{\frac{1}{t_m}} \cdot \left(\frac{\ell}{k} \cdot \frac{\sqrt{2}}{\sin k}\right)\right)}^{2}\\ \mathbf{elif}\;\ell \cdot \ell \leq 2 \cdot 10^{+280}:\\ \;\;\;\;\frac{\frac{\frac{2}{{k}^{2}}}{{\ell}^{-2}}}{t_m} \cdot \frac{\cos k}{{\sin k}^{2}}\\ \mathbf{else}:\\ \;\;\;\;{\left(\frac{\sqrt{2} \cdot \frac{\ell}{\sin k}}{k} \cdot \sqrt{\frac{\cos k}{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 (<= (* l l) 2e-284)
    (pow (* (sqrt (/ 1.0 t_m)) (* (/ l k) (/ (sqrt 2.0) (sin k)))) 2.0)
    (if (<= (* l l) 2e+280)
      (*
       (/ (/ (/ 2.0 (pow k 2.0)) (pow l -2.0)) t_m)
       (/ (cos k) (pow (sin k) 2.0)))
      (pow
       (* (/ (* (sqrt 2.0) (/ l (sin k))) k) (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 tmp;
	if ((l * l) <= 2e-284) {
		tmp = pow((sqrt((1.0 / t_m)) * ((l / k) * (sqrt(2.0) / sin(k)))), 2.0);
	} else if ((l * l) <= 2e+280) {
		tmp = (((2.0 / pow(k, 2.0)) / pow(l, -2.0)) / t_m) * (cos(k) / pow(sin(k), 2.0));
	} else {
		tmp = pow((((sqrt(2.0) * (l / sin(k))) / k) * 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) :: tmp
    if ((l * l) <= 2d-284) then
        tmp = (sqrt((1.0d0 / t_m)) * ((l / k) * (sqrt(2.0d0) / sin(k)))) ** 2.0d0
    else if ((l * l) <= 2d+280) then
        tmp = (((2.0d0 / (k ** 2.0d0)) / (l ** (-2.0d0))) / t_m) * (cos(k) / (sin(k) ** 2.0d0))
    else
        tmp = (((sqrt(2.0d0) * (l / sin(k))) / k) * 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 tmp;
	if ((l * l) <= 2e-284) {
		tmp = Math.pow((Math.sqrt((1.0 / t_m)) * ((l / k) * (Math.sqrt(2.0) / Math.sin(k)))), 2.0);
	} else if ((l * l) <= 2e+280) {
		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(2.0) * (l / Math.sin(k))) / k) * 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):
	tmp = 0
	if (l * l) <= 2e-284:
		tmp = math.pow((math.sqrt((1.0 / t_m)) * ((l / k) * (math.sqrt(2.0) / math.sin(k)))), 2.0)
	elif (l * l) <= 2e+280:
		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(2.0) * (l / math.sin(k))) / k) * 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)
	tmp = 0.0
	if (Float64(l * l) <= 2e-284)
		tmp = Float64(sqrt(Float64(1.0 / t_m)) * Float64(Float64(l / k) * Float64(sqrt(2.0) / sin(k)))) ^ 2.0;
	elseif (Float64(l * l) <= 2e+280)
		tmp = Float64(Float64(Float64(Float64(2.0 / (k ^ 2.0)) / (l ^ -2.0)) / t_m) * Float64(cos(k) / (sin(k) ^ 2.0)));
	else
		tmp = Float64(Float64(Float64(sqrt(2.0) * Float64(l / sin(k))) / k) * 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)
	tmp = 0.0;
	if ((l * l) <= 2e-284)
		tmp = (sqrt((1.0 / t_m)) * ((l / k) * (sqrt(2.0) / sin(k)))) ^ 2.0;
	elseif ((l * l) <= 2e+280)
		tmp = (((2.0 / (k ^ 2.0)) / (l ^ -2.0)) / t_m) * (cos(k) / (sin(k) ^ 2.0));
	else
		tmp = (((sqrt(2.0) * (l / sin(k))) / k) * 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_] := N[(t$95$s * If[LessEqual[N[(l * l), $MachinePrecision], 2e-284], N[Power[N[(N[Sqrt[N[(1.0 / t$95$m), $MachinePrecision]], $MachinePrecision] * N[(N[(l / k), $MachinePrecision] * N[(N[Sqrt[2.0], $MachinePrecision] / N[Sin[k], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision], If[LessEqual[N[(l * l), $MachinePrecision], 2e+280], N[(N[(N[(N[(2.0 / N[Power[k, 2.0], $MachinePrecision]), $MachinePrecision] / N[Power[l, -2.0], $MachinePrecision]), $MachinePrecision] / t$95$m), $MachinePrecision] * N[(N[Cos[k], $MachinePrecision] / N[Power[N[Sin[k], $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[Power[N[(N[(N[(N[Sqrt[2.0], $MachinePrecision] * N[(l / N[Sin[k], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / k), $MachinePrecision] * 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)

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

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

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


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

    1. Initial program 25.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*25.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. *-commutative25.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*25.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/25.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. +-commutative25.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. unpow225.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-neg25.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-neg25.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-neg25.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. unpow225.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+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. Step-by-step derivation
      1. add-sqr-sqrt37.4%

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

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

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

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

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

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

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

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

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

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

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

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

    if 2.00000000000000007e-284 < (*.f64 l l) < 2.0000000000000001e280

    1. Initial program 46.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. Taylor expanded in t around 0 89.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-frac91.0%

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

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

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

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

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

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

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

        \[\leadsto e^{\mathsf{log1p}\left(\frac{\frac{2}{{k}^{2} \cdot {\ell}^{\color{blue}{-2}}}}{\frac{t \cdot {\sin k}^{2}}{\cos k}}\right)} - 1 \]
      7. associate-/l*54.8%

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

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

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

        \[\leadsto \color{blue}{\frac{\frac{2}{{k}^{2} \cdot {\ell}^{-2}}}{\frac{t}{\frac{\cos k}{{\sin k}^{2}}}}} \]
      3. associate-/r/91.3%

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

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

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

    if 2.0000000000000001e280 < (*.f64 l l)

    1. Initial program 30.7%

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

        \[\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. *-commutative30.7%

        \[\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*30.7%

        \[\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/30.7%

        \[\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. +-commutative30.7%

        \[\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. unpow230.7%

        \[\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-neg30.7%

        \[\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-neg30.7%

        \[\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-neg30.7%

        \[\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. unpow230.7%

        \[\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+30.8%

        \[\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-eval30.8%

        \[\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-identity30.8%

        \[\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. unpow230.8%

        \[\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-neg30.8%

        \[\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-neg30.8%

        \[\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. Simplified30.8%

      \[\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. add-sqr-sqrt11.4%

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

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

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

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

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

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

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

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

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

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

Alternative 3: 86.6% 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^{-284}:\\ \;\;\;\;{\left(\sqrt{\frac{1}{t_m}} \cdot \left(\frac{\ell}{k} \cdot \frac{\sqrt{2}}{\sin k}\right)\right)}^{2}\\ \mathbf{elif}\;\ell \cdot \ell \leq 2 \cdot 10^{+280}:\\ \;\;\;\;{\sin k}^{-2} \cdot \left(\cos k \cdot \left(\frac{2}{t_m} \cdot \frac{{k}^{-2}}{{\ell}^{-2}}\right)\right)\\ \mathbf{else}:\\ \;\;\;\;{\left(\frac{\sqrt{2} \cdot \frac{\ell}{\sin k}}{k} \cdot \sqrt{\frac{\cos k}{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 (<= (* l l) 2e-284)
    (pow (* (sqrt (/ 1.0 t_m)) (* (/ l k) (/ (sqrt 2.0) (sin k)))) 2.0)
    (if (<= (* l l) 2e+280)
      (*
       (pow (sin k) -2.0)
       (* (cos k) (* (/ 2.0 t_m) (/ (pow k -2.0) (pow l -2.0)))))
      (pow
       (* (/ (* (sqrt 2.0) (/ l (sin k))) k) (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 tmp;
	if ((l * l) <= 2e-284) {
		tmp = pow((sqrt((1.0 / t_m)) * ((l / k) * (sqrt(2.0) / sin(k)))), 2.0);
	} else if ((l * l) <= 2e+280) {
		tmp = pow(sin(k), -2.0) * (cos(k) * ((2.0 / t_m) * (pow(k, -2.0) / pow(l, -2.0))));
	} else {
		tmp = pow((((sqrt(2.0) * (l / sin(k))) / k) * 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) :: tmp
    if ((l * l) <= 2d-284) then
        tmp = (sqrt((1.0d0 / t_m)) * ((l / k) * (sqrt(2.0d0) / sin(k)))) ** 2.0d0
    else if ((l * l) <= 2d+280) then
        tmp = (sin(k) ** (-2.0d0)) * (cos(k) * ((2.0d0 / t_m) * ((k ** (-2.0d0)) / (l ** (-2.0d0)))))
    else
        tmp = (((sqrt(2.0d0) * (l / sin(k))) / k) * 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 tmp;
	if ((l * l) <= 2e-284) {
		tmp = Math.pow((Math.sqrt((1.0 / t_m)) * ((l / k) * (Math.sqrt(2.0) / Math.sin(k)))), 2.0);
	} else if ((l * l) <= 2e+280) {
		tmp = Math.pow(Math.sin(k), -2.0) * (Math.cos(k) * ((2.0 / t_m) * (Math.pow(k, -2.0) / Math.pow(l, -2.0))));
	} else {
		tmp = Math.pow((((Math.sqrt(2.0) * (l / Math.sin(k))) / k) * 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):
	tmp = 0
	if (l * l) <= 2e-284:
		tmp = math.pow((math.sqrt((1.0 / t_m)) * ((l / k) * (math.sqrt(2.0) / math.sin(k)))), 2.0)
	elif (l * l) <= 2e+280:
		tmp = math.pow(math.sin(k), -2.0) * (math.cos(k) * ((2.0 / t_m) * (math.pow(k, -2.0) / math.pow(l, -2.0))))
	else:
		tmp = math.pow((((math.sqrt(2.0) * (l / math.sin(k))) / k) * 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)
	tmp = 0.0
	if (Float64(l * l) <= 2e-284)
		tmp = Float64(sqrt(Float64(1.0 / t_m)) * Float64(Float64(l / k) * Float64(sqrt(2.0) / sin(k)))) ^ 2.0;
	elseif (Float64(l * l) <= 2e+280)
		tmp = Float64((sin(k) ^ -2.0) * Float64(cos(k) * Float64(Float64(2.0 / t_m) * Float64((k ^ -2.0) / (l ^ -2.0)))));
	else
		tmp = Float64(Float64(Float64(sqrt(2.0) * Float64(l / sin(k))) / k) * 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)
	tmp = 0.0;
	if ((l * l) <= 2e-284)
		tmp = (sqrt((1.0 / t_m)) * ((l / k) * (sqrt(2.0) / sin(k)))) ^ 2.0;
	elseif ((l * l) <= 2e+280)
		tmp = (sin(k) ^ -2.0) * (cos(k) * ((2.0 / t_m) * ((k ^ -2.0) / (l ^ -2.0))));
	else
		tmp = (((sqrt(2.0) * (l / sin(k))) / k) * 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_] := N[(t$95$s * If[LessEqual[N[(l * l), $MachinePrecision], 2e-284], N[Power[N[(N[Sqrt[N[(1.0 / t$95$m), $MachinePrecision]], $MachinePrecision] * N[(N[(l / k), $MachinePrecision] * N[(N[Sqrt[2.0], $MachinePrecision] / N[Sin[k], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision], If[LessEqual[N[(l * l), $MachinePrecision], 2e+280], N[(N[Power[N[Sin[k], $MachinePrecision], -2.0], $MachinePrecision] * N[(N[Cos[k], $MachinePrecision] * N[(N[(2.0 / t$95$m), $MachinePrecision] * N[(N[Power[k, -2.0], $MachinePrecision] / N[Power[l, -2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[Power[N[(N[(N[(N[Sqrt[2.0], $MachinePrecision] * N[(l / N[Sin[k], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / k), $MachinePrecision] * 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)

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

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

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


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

    1. Initial program 25.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*25.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. *-commutative25.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*25.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/25.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. +-commutative25.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. unpow225.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-neg25.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-neg25.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-neg25.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. unpow225.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+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. Step-by-step derivation
      1. add-sqr-sqrt37.4%

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

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

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

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

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

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

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

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

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

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

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

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

    if 2.00000000000000007e-284 < (*.f64 l l) < 2.0000000000000001e280

    1. Initial program 46.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. Taylor expanded in t around 0 89.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-frac91.0%

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

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

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

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

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

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

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

        \[\leadsto e^{\mathsf{log1p}\left(\frac{\frac{2}{{k}^{2} \cdot {\ell}^{\color{blue}{-2}}}}{\frac{t \cdot {\sin k}^{2}}{\cos k}}\right)} - 1 \]
      7. associate-/l*54.8%

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

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

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

        \[\leadsto \color{blue}{\frac{\frac{2}{{k}^{2} \cdot {\ell}^{-2}}}{\frac{t}{\frac{\cos k}{{\sin k}^{2}}}}} \]
      3. associate-/r/91.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 2.0000000000000001e280 < (*.f64 l l)

    1. Initial program 30.7%

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

        \[\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. *-commutative30.7%

        \[\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*30.7%

        \[\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/30.7%

        \[\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. +-commutative30.7%

        \[\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. unpow230.7%

        \[\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-neg30.7%

        \[\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-neg30.7%

        \[\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-neg30.7%

        \[\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. unpow230.7%

        \[\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+30.8%

        \[\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-eval30.8%

        \[\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-identity30.8%

        \[\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. unpow230.8%

        \[\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-neg30.8%

        \[\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-neg30.8%

        \[\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. Simplified30.8%

      \[\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. add-sqr-sqrt11.4%

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

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

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

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

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

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

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

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

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

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

Alternative 4: 86.5% 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^{-284}:\\ \;\;\;\;{\left(\sqrt{\frac{1}{t_m}} \cdot \left(\frac{\ell}{k} \cdot \frac{\sqrt{2}}{\sin k}\right)\right)}^{2}\\ \mathbf{elif}\;\ell \cdot \ell \leq 2 \cdot 10^{+280}:\\ \;\;\;\;2 \cdot \left(\frac{\ell \cdot \ell}{{k}^{2}} \cdot \frac{\cos k}{t_m \cdot {\sin k}^{2}}\right)\\ \mathbf{else}:\\ \;\;\;\;{\left(\left(\frac{\ell}{\sin k} \cdot \frac{\sqrt{2}}{k}\right) \cdot \sqrt{\frac{\cos k}{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 (<= (* l l) 2e-284)
    (pow (* (sqrt (/ 1.0 t_m)) (* (/ l k) (/ (sqrt 2.0) (sin k)))) 2.0)
    (if (<= (* l l) 2e+280)
      (* 2.0 (* (/ (* l l) (pow k 2.0)) (/ (cos k) (* t_m (pow (sin k) 2.0)))))
      (pow
       (* (* (/ l (sin k)) (/ (sqrt 2.0) k)) (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 tmp;
	if ((l * l) <= 2e-284) {
		tmp = pow((sqrt((1.0 / t_m)) * ((l / k) * (sqrt(2.0) / sin(k)))), 2.0);
	} else if ((l * l) <= 2e+280) {
		tmp = 2.0 * (((l * l) / pow(k, 2.0)) * (cos(k) / (t_m * pow(sin(k), 2.0))));
	} else {
		tmp = pow((((l / sin(k)) * (sqrt(2.0) / k)) * 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) :: tmp
    if ((l * l) <= 2d-284) then
        tmp = (sqrt((1.0d0 / t_m)) * ((l / k) * (sqrt(2.0d0) / sin(k)))) ** 2.0d0
    else if ((l * l) <= 2d+280) then
        tmp = 2.0d0 * (((l * l) / (k ** 2.0d0)) * (cos(k) / (t_m * (sin(k) ** 2.0d0))))
    else
        tmp = (((l / sin(k)) * (sqrt(2.0d0) / k)) * 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 tmp;
	if ((l * l) <= 2e-284) {
		tmp = Math.pow((Math.sqrt((1.0 / t_m)) * ((l / k) * (Math.sqrt(2.0) / Math.sin(k)))), 2.0);
	} else if ((l * l) <= 2e+280) {
		tmp = 2.0 * (((l * l) / Math.pow(k, 2.0)) * (Math.cos(k) / (t_m * Math.pow(Math.sin(k), 2.0))));
	} else {
		tmp = Math.pow((((l / Math.sin(k)) * (Math.sqrt(2.0) / k)) * 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):
	tmp = 0
	if (l * l) <= 2e-284:
		tmp = math.pow((math.sqrt((1.0 / t_m)) * ((l / k) * (math.sqrt(2.0) / math.sin(k)))), 2.0)
	elif (l * l) <= 2e+280:
		tmp = 2.0 * (((l * l) / math.pow(k, 2.0)) * (math.cos(k) / (t_m * math.pow(math.sin(k), 2.0))))
	else:
		tmp = math.pow((((l / math.sin(k)) * (math.sqrt(2.0) / k)) * 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)
	tmp = 0.0
	if (Float64(l * l) <= 2e-284)
		tmp = Float64(sqrt(Float64(1.0 / t_m)) * Float64(Float64(l / k) * Float64(sqrt(2.0) / sin(k)))) ^ 2.0;
	elseif (Float64(l * l) <= 2e+280)
		tmp = Float64(2.0 * Float64(Float64(Float64(l * l) / (k ^ 2.0)) * Float64(cos(k) / Float64(t_m * (sin(k) ^ 2.0)))));
	else
		tmp = Float64(Float64(Float64(l / sin(k)) * Float64(sqrt(2.0) / k)) * 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)
	tmp = 0.0;
	if ((l * l) <= 2e-284)
		tmp = (sqrt((1.0 / t_m)) * ((l / k) * (sqrt(2.0) / sin(k)))) ^ 2.0;
	elseif ((l * l) <= 2e+280)
		tmp = 2.0 * (((l * l) / (k ^ 2.0)) * (cos(k) / (t_m * (sin(k) ^ 2.0))));
	else
		tmp = (((l / sin(k)) * (sqrt(2.0) / k)) * 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_] := N[(t$95$s * If[LessEqual[N[(l * l), $MachinePrecision], 2e-284], N[Power[N[(N[Sqrt[N[(1.0 / t$95$m), $MachinePrecision]], $MachinePrecision] * N[(N[(l / k), $MachinePrecision] * N[(N[Sqrt[2.0], $MachinePrecision] / N[Sin[k], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision], If[LessEqual[N[(l * l), $MachinePrecision], 2e+280], N[(2.0 * N[(N[(N[(l * l), $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[(N[(l / N[Sin[k], $MachinePrecision]), $MachinePrecision] * N[(N[Sqrt[2.0], $MachinePrecision] / k), $MachinePrecision]), $MachinePrecision] * 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)

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

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

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


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

    1. Initial program 25.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*25.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. *-commutative25.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*25.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/25.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. +-commutative25.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. unpow225.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-neg25.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-neg25.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-neg25.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. unpow225.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+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. Step-by-step derivation
      1. add-sqr-sqrt37.4%

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

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

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

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

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

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

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

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

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

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

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

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

    if 2.00000000000000007e-284 < (*.f64 l l) < 2.0000000000000001e280

    1. Initial program 46.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*46.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. *-commutative46.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*46.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/46.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. +-commutative46.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. unpow246.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-neg46.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-neg46.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-neg46.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. unpow246.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+56.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-eval56.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-identity56.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. unpow256.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-neg56.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-neg56.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. Simplified56.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. Taylor expanded in k around inf 89.9%

      \[\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.2%

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

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

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

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

    if 2.0000000000000001e280 < (*.f64 l l)

    1. Initial program 30.7%

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

        \[\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. *-commutative30.7%

        \[\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*30.7%

        \[\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/30.7%

        \[\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. +-commutative30.7%

        \[\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. unpow230.7%

        \[\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-neg30.7%

        \[\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-neg30.7%

        \[\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-neg30.7%

        \[\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. unpow230.7%

        \[\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+30.8%

        \[\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-eval30.8%

        \[\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-identity30.8%

        \[\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. unpow230.8%

        \[\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-neg30.8%

        \[\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-neg30.8%

        \[\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. Simplified30.8%

      \[\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. add-sqr-sqrt11.4%

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

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

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

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

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

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

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

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

Alternative 5: 86.5% 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^{-284}:\\ \;\;\;\;{\left(\sqrt{\frac{1}{t_m}} \cdot \left(\frac{\ell}{k} \cdot \frac{\sqrt{2}}{\sin k}\right)\right)}^{2}\\ \mathbf{elif}\;\ell \cdot \ell \leq 2 \cdot 10^{+280}:\\ \;\;\;\;2 \cdot \left(\frac{\ell \cdot \ell}{{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-284)
    (pow (* (sqrt (/ 1.0 t_m)) (* (/ l k) (/ (sqrt 2.0) (sin k)))) 2.0)
    (if (<= (* l l) 2e+280)
      (* 2.0 (* (/ (* l l) (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-284) {
		tmp = pow((sqrt((1.0 / t_m)) * ((l / k) * (sqrt(2.0) / sin(k)))), 2.0);
	} else if ((l * l) <= 2e+280) {
		tmp = 2.0 * (((l * l) / 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-284) then
        tmp = (sqrt((1.0d0 / t_m)) * ((l / k) * (sqrt(2.0d0) / sin(k)))) ** 2.0d0
    else if ((l * l) <= 2d+280) then
        tmp = 2.0d0 * (((l * l) / (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-284) {
		tmp = Math.pow((Math.sqrt((1.0 / t_m)) * ((l / k) * (Math.sqrt(2.0) / Math.sin(k)))), 2.0);
	} else if ((l * l) <= 2e+280) {
		tmp = 2.0 * (((l * l) / 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-284:
		tmp = math.pow((math.sqrt((1.0 / t_m)) * ((l / k) * (math.sqrt(2.0) / math.sin(k)))), 2.0)
	elif (l * l) <= 2e+280:
		tmp = 2.0 * (((l * l) / 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-284)
		tmp = Float64(sqrt(Float64(1.0 / t_m)) * Float64(Float64(l / k) * Float64(sqrt(2.0) / sin(k)))) ^ 2.0;
	elseif (Float64(l * l) <= 2e+280)
		tmp = Float64(2.0 * Float64(Float64(Float64(l * l) / (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-284)
		tmp = (sqrt((1.0 / t_m)) * ((l / k) * (sqrt(2.0) / sin(k)))) ^ 2.0;
	elseif ((l * l) <= 2e+280)
		tmp = 2.0 * (((l * l) / (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-284], N[Power[N[(N[Sqrt[N[(1.0 / t$95$m), $MachinePrecision]], $MachinePrecision] * N[(N[(l / k), $MachinePrecision] * N[(N[Sqrt[2.0], $MachinePrecision] / N[Sin[k], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision], If[LessEqual[N[(l * l), $MachinePrecision], 2e+280], N[(2.0 * N[(N[(N[(l * l), $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^{-284}:\\
\;\;\;\;{\left(\sqrt{\frac{1}{t_m}} \cdot \left(\frac{\ell}{k} \cdot \frac{\sqrt{2}}{\sin k}\right)\right)}^{2}\\

\mathbf{elif}\;\ell \cdot \ell \leq 2 \cdot 10^{+280}:\\
\;\;\;\;2 \cdot \left(\frac{\ell \cdot \ell}{{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) < 2.00000000000000007e-284

    1. Initial program 25.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*25.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. *-commutative25.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*25.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/25.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. +-commutative25.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. unpow225.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-neg25.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-neg25.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-neg25.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. unpow225.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+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. Step-by-step derivation
      1. add-sqr-sqrt37.4%

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

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

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

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

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

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

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

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

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

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

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

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

    if 2.00000000000000007e-284 < (*.f64 l l) < 2.0000000000000001e280

    1. Initial program 46.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*46.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. *-commutative46.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*46.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/46.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. +-commutative46.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. unpow246.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-neg46.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-neg46.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-neg46.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. unpow246.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+56.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-eval56.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-identity56.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. unpow256.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-neg56.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-neg56.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. Simplified56.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. Taylor expanded in k around inf 89.9%

      \[\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.2%

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

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

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

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

    if 2.0000000000000001e280 < (*.f64 l l)

    1. Initial program 30.7%

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

        \[\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. *-commutative30.7%

        \[\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*30.7%

        \[\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/30.7%

        \[\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. +-commutative30.7%

        \[\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. unpow230.7%

        \[\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-neg30.7%

        \[\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-neg30.7%

        \[\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-neg30.7%

        \[\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. unpow230.7%

        \[\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+30.8%

        \[\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-eval30.8%

        \[\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-identity30.8%

        \[\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. unpow230.8%

        \[\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-neg30.8%

        \[\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-neg30.8%

        \[\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. Simplified30.8%

      \[\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. add-sqr-sqrt11.4%

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

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

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

      \[\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 simplification67.2%

    \[\leadsto \begin{array}{l} \mathbf{if}\;\ell \cdot \ell \leq 2 \cdot 10^{-284}:\\ \;\;\;\;{\left(\sqrt{\frac{1}{t}} \cdot \left(\frac{\ell}{k} \cdot \frac{\sqrt{2}}{\sin k}\right)\right)}^{2}\\ \mathbf{elif}\;\ell \cdot \ell \leq 2 \cdot 10^{+280}:\\ \;\;\;\;2 \cdot \left(\frac{\ell \cdot \ell}{{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 6: 86.5% 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^{-284}:\\ \;\;\;\;{\left(\sqrt{\frac{1}{t_m}} \cdot \left(\frac{\ell}{k} \cdot \frac{\sqrt{2}}{\sin k}\right)\right)}^{2}\\ \mathbf{elif}\;\ell \cdot \ell \leq 2 \cdot 10^{+280}:\\ \;\;\;\;2 \cdot \left(\frac{\ell \cdot \ell}{{k}^{2}} \cdot \frac{\cos k}{t_m \cdot {\sin k}^{2}}\right)\\ \mathbf{else}:\\ \;\;\;\;{\left(\frac{\sqrt{2} \cdot \frac{\ell}{\sin k}}{k} \cdot \sqrt{\frac{\cos k}{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 (<= (* l l) 2e-284)
    (pow (* (sqrt (/ 1.0 t_m)) (* (/ l k) (/ (sqrt 2.0) (sin k)))) 2.0)
    (if (<= (* l l) 2e+280)
      (* 2.0 (* (/ (* l l) (pow k 2.0)) (/ (cos k) (* t_m (pow (sin k) 2.0)))))
      (pow
       (* (/ (* (sqrt 2.0) (/ l (sin k))) k) (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 tmp;
	if ((l * l) <= 2e-284) {
		tmp = pow((sqrt((1.0 / t_m)) * ((l / k) * (sqrt(2.0) / sin(k)))), 2.0);
	} else if ((l * l) <= 2e+280) {
		tmp = 2.0 * (((l * l) / pow(k, 2.0)) * (cos(k) / (t_m * pow(sin(k), 2.0))));
	} else {
		tmp = pow((((sqrt(2.0) * (l / sin(k))) / k) * 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) :: tmp
    if ((l * l) <= 2d-284) then
        tmp = (sqrt((1.0d0 / t_m)) * ((l / k) * (sqrt(2.0d0) / sin(k)))) ** 2.0d0
    else if ((l * l) <= 2d+280) then
        tmp = 2.0d0 * (((l * l) / (k ** 2.0d0)) * (cos(k) / (t_m * (sin(k) ** 2.0d0))))
    else
        tmp = (((sqrt(2.0d0) * (l / sin(k))) / k) * 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 tmp;
	if ((l * l) <= 2e-284) {
		tmp = Math.pow((Math.sqrt((1.0 / t_m)) * ((l / k) * (Math.sqrt(2.0) / Math.sin(k)))), 2.0);
	} else if ((l * l) <= 2e+280) {
		tmp = 2.0 * (((l * l) / Math.pow(k, 2.0)) * (Math.cos(k) / (t_m * Math.pow(Math.sin(k), 2.0))));
	} else {
		tmp = Math.pow((((Math.sqrt(2.0) * (l / Math.sin(k))) / k) * 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):
	tmp = 0
	if (l * l) <= 2e-284:
		tmp = math.pow((math.sqrt((1.0 / t_m)) * ((l / k) * (math.sqrt(2.0) / math.sin(k)))), 2.0)
	elif (l * l) <= 2e+280:
		tmp = 2.0 * (((l * l) / math.pow(k, 2.0)) * (math.cos(k) / (t_m * math.pow(math.sin(k), 2.0))))
	else:
		tmp = math.pow((((math.sqrt(2.0) * (l / math.sin(k))) / k) * 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)
	tmp = 0.0
	if (Float64(l * l) <= 2e-284)
		tmp = Float64(sqrt(Float64(1.0 / t_m)) * Float64(Float64(l / k) * Float64(sqrt(2.0) / sin(k)))) ^ 2.0;
	elseif (Float64(l * l) <= 2e+280)
		tmp = Float64(2.0 * Float64(Float64(Float64(l * l) / (k ^ 2.0)) * Float64(cos(k) / Float64(t_m * (sin(k) ^ 2.0)))));
	else
		tmp = Float64(Float64(Float64(sqrt(2.0) * Float64(l / sin(k))) / k) * 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)
	tmp = 0.0;
	if ((l * l) <= 2e-284)
		tmp = (sqrt((1.0 / t_m)) * ((l / k) * (sqrt(2.0) / sin(k)))) ^ 2.0;
	elseif ((l * l) <= 2e+280)
		tmp = 2.0 * (((l * l) / (k ^ 2.0)) * (cos(k) / (t_m * (sin(k) ^ 2.0))));
	else
		tmp = (((sqrt(2.0) * (l / sin(k))) / k) * 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_] := N[(t$95$s * If[LessEqual[N[(l * l), $MachinePrecision], 2e-284], N[Power[N[(N[Sqrt[N[(1.0 / t$95$m), $MachinePrecision]], $MachinePrecision] * N[(N[(l / k), $MachinePrecision] * N[(N[Sqrt[2.0], $MachinePrecision] / N[Sin[k], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision], If[LessEqual[N[(l * l), $MachinePrecision], 2e+280], N[(2.0 * N[(N[(N[(l * l), $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[(N[(N[Sqrt[2.0], $MachinePrecision] * N[(l / N[Sin[k], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / k), $MachinePrecision] * 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)

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

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

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


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

    1. Initial program 25.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*25.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. *-commutative25.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*25.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/25.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. +-commutative25.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. unpow225.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-neg25.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-neg25.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-neg25.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. unpow225.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+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. Step-by-step derivation
      1. add-sqr-sqrt37.4%

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

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

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

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

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

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

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

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

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

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

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

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

    if 2.00000000000000007e-284 < (*.f64 l l) < 2.0000000000000001e280

    1. Initial program 46.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*46.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. *-commutative46.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*46.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/46.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. +-commutative46.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. unpow246.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-neg46.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-neg46.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-neg46.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. unpow246.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+56.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-eval56.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-identity56.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. unpow256.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-neg56.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-neg56.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. Simplified56.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. Taylor expanded in k around inf 89.9%

      \[\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.2%

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

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

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

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

    if 2.0000000000000001e280 < (*.f64 l l)

    1. Initial program 30.7%

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

        \[\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. *-commutative30.7%

        \[\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*30.7%

        \[\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/30.7%

        \[\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. +-commutative30.7%

        \[\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. unpow230.7%

        \[\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-neg30.7%

        \[\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-neg30.7%

        \[\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-neg30.7%

        \[\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. unpow230.7%

        \[\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+30.8%

        \[\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-eval30.8%

        \[\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-identity30.8%

        \[\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. unpow230.8%

        \[\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-neg30.8%

        \[\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-neg30.8%

        \[\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. Simplified30.8%

      \[\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. add-sqr-sqrt11.4%

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

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

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

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

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

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

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

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

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

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

Alternative 7: 78.0% accurate, 1.0× 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}\;k \leq 3.1 \cdot 10^{-23}:\\ \;\;\;\;{\left(\sqrt{\frac{1}{t_m}} \cdot \left(\frac{\ell}{k} \cdot \frac{\sqrt{2}}{k}\right)\right)}^{2}\\ \mathbf{else}:\\ \;\;\;\;2 \cdot \left(\frac{\ell \cdot \ell}{{k}^{2}} \cdot \frac{\cos k}{t_m \cdot {\sin 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 (<= k 3.1e-23)
    (pow (* (sqrt (/ 1.0 t_m)) (* (/ l k) (/ (sqrt 2.0) k))) 2.0)
    (*
     2.0
     (* (/ (* l l) (pow k 2.0)) (/ (cos k) (* t_m (pow (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 (k <= 3.1e-23) {
		tmp = pow((sqrt((1.0 / t_m)) * ((l / k) * (sqrt(2.0) / k))), 2.0);
	} else {
		tmp = 2.0 * (((l * l) / pow(k, 2.0)) * (cos(k) / (t_m * pow(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 (k <= 3.1d-23) then
        tmp = (sqrt((1.0d0 / t_m)) * ((l / k) * (sqrt(2.0d0) / k))) ** 2.0d0
    else
        tmp = 2.0d0 * (((l * l) / (k ** 2.0d0)) * (cos(k) / (t_m * (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 (k <= 3.1e-23) {
		tmp = Math.pow((Math.sqrt((1.0 / t_m)) * ((l / k) * (Math.sqrt(2.0) / k))), 2.0);
	} else {
		tmp = 2.0 * (((l * l) / Math.pow(k, 2.0)) * (Math.cos(k) / (t_m * Math.pow(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 k <= 3.1e-23:
		tmp = math.pow((math.sqrt((1.0 / t_m)) * ((l / k) * (math.sqrt(2.0) / k))), 2.0)
	else:
		tmp = 2.0 * (((l * l) / math.pow(k, 2.0)) * (math.cos(k) / (t_m * math.pow(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 (k <= 3.1e-23)
		tmp = Float64(sqrt(Float64(1.0 / t_m)) * Float64(Float64(l / k) * Float64(sqrt(2.0) / k))) ^ 2.0;
	else
		tmp = Float64(2.0 * Float64(Float64(Float64(l * l) / (k ^ 2.0)) * Float64(cos(k) / Float64(t_m * (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 (k <= 3.1e-23)
		tmp = (sqrt((1.0 / t_m)) * ((l / k) * (sqrt(2.0) / k))) ^ 2.0;
	else
		tmp = 2.0 * (((l * l) / (k ^ 2.0)) * (cos(k) / (t_m * (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[k, 3.1e-23], N[Power[N[(N[Sqrt[N[(1.0 / t$95$m), $MachinePrecision]], $MachinePrecision] * N[(N[(l / k), $MachinePrecision] * N[(N[Sqrt[2.0], $MachinePrecision] / k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision], N[(2.0 * N[(N[(N[(l * l), $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]]), $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}\;k \leq 3.1 \cdot 10^{-23}:\\
\;\;\;\;{\left(\sqrt{\frac{1}{t_m}} \cdot \left(\frac{\ell}{k} \cdot \frac{\sqrt{2}}{k}\right)\right)}^{2}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if k < 3.0999999999999999e-23

    1. Initial program 40.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*40.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. *-commutative40.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*40.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/40.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. +-commutative40.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. unpow240.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-neg40.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-neg40.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-neg40.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. unpow240.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.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-eval48.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-identity48.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. unpow248.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-neg48.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-neg48.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. Simplified48.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. Step-by-step derivation
      1. add-sqr-sqrt29.4%

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

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

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

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

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

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

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

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

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

    if 3.0999999999999999e-23 < k

    1. Initial program 29.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*29.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. *-commutative29.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*29.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/29.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. +-commutative29.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. unpow229.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-neg29.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-neg29.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-neg29.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. unpow229.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+39.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-eval39.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-identity39.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. unpow239.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-neg39.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-neg39.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. Simplified39.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. Taylor expanded in k around inf 80.0%

      \[\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-frac80.2%

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

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

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

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

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

Alternative 8: 76.0% 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 \left(\frac{\ell}{k} \cdot \frac{\sqrt{2}}{\sin k}\right)\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 k) (/ (sqrt 2.0) (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) {
	return t_s * pow((sqrt((1.0 / t_m)) * ((l / k) * (sqrt(2.0) / sin(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 * ((sqrt((1.0d0 / t_m)) * ((l / k) * (sqrt(2.0d0) / sin(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 * Math.pow((Math.sqrt((1.0 / t_m)) * ((l / k) * (Math.sqrt(2.0) / Math.sin(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 * math.pow((math.sqrt((1.0 / t_m)) * ((l / k) * (math.sqrt(2.0) / math.sin(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(sqrt(Float64(1.0 / t_m)) * Float64(Float64(l / k) * Float64(sqrt(2.0) / sin(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 * ((sqrt((1.0 / t_m)) * ((l / k) * (sqrt(2.0) / sin(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[Power[N[(N[Sqrt[N[(1.0 / t$95$m), $MachinePrecision]], $MachinePrecision] * N[(N[(l / k), $MachinePrecision] * N[(N[Sqrt[2.0], $MachinePrecision] / 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 {\left(\sqrt{\frac{1}{t_m}} \cdot \left(\frac{\ell}{k} \cdot \frac{\sqrt{2}}{\sin k}\right)\right)}^{2}
\end{array}
Derivation
  1. Initial program 36.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*36.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. *-commutative36.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*36.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/36.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. +-commutative36.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. unpow236.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-neg36.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-neg36.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-neg36.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. unpow236.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+45.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-eval45.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-identity45.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. unpow245.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-neg45.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-neg45.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. Simplified45.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. Step-by-step derivation
    1. add-sqr-sqrt32.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 9: 76.0% accurate, 1.0× speedup?

\[\begin{array}{l} t_m = \left|t\right| \\ t_s = \mathsf{copysign}\left(1, t\right) \\ t_s \cdot {\left(\frac{\ell}{\sin k} \cdot \left(\frac{\sqrt{2}}{k} \cdot {t_m}^{-0.5}\right)\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 (sin k)) (* (/ (sqrt 2.0) k) (pow t_m -0.5))) 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 / sin(k)) * ((sqrt(2.0) / k) * pow(t_m, -0.5))), 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 / sin(k)) * ((sqrt(2.0d0) / k) * (t_m ** (-0.5d0)))) ** 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 / Math.sin(k)) * ((Math.sqrt(2.0) / k) * Math.pow(t_m, -0.5))), 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 / math.sin(k)) * ((math.sqrt(2.0) / k) * math.pow(t_m, -0.5))), 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(l / sin(k)) * Float64(Float64(sqrt(2.0) / k) * (t_m ^ -0.5))) ^ 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 / sin(k)) * ((sqrt(2.0) / k) * (t_m ^ -0.5))) ^ 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[(l / N[Sin[k], $MachinePrecision]), $MachinePrecision] * N[(N[(N[Sqrt[2.0], $MachinePrecision] / k), $MachinePrecision] * N[Power[t$95$m, -0.5], $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(\frac{\ell}{\sin k} \cdot \left(\frac{\sqrt{2}}{k} \cdot {t_m}^{-0.5}\right)\right)}^{2}
\end{array}
Derivation
  1. Initial program 36.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*36.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. *-commutative36.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*36.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/36.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. +-commutative36.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. unpow236.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-neg36.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-neg36.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-neg36.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. unpow236.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+45.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-eval45.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-identity45.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. unpow245.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-neg45.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-neg45.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. Simplified45.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. Step-by-step derivation
    1. add-sqr-sqrt32.6%

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

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

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

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

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

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

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

    \[\leadsto {\left(\left(\frac{\ell}{\sin k} \cdot \frac{\sqrt{2}}{k}\right) \cdot \sqrt{\color{blue}{\frac{1}{t}}}\right)}^{2} \]
  10. Step-by-step derivation
    1. expm1-log1p-u27.5%

      \[\leadsto {\color{blue}{\left(\mathsf{expm1}\left(\mathsf{log1p}\left(\left(\frac{\ell}{\sin k} \cdot \frac{\sqrt{2}}{k}\right) \cdot \sqrt{\frac{1}{t}}\right)\right)\right)}}^{2} \]
    2. expm1-udef26.0%

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

      \[\leadsto {\left(e^{\mathsf{log1p}\left(\color{blue}{\frac{\ell}{\sin k} \cdot \left(\frac{\sqrt{2}}{k} \cdot \sqrt{\frac{1}{t}}\right)}\right)} - 1\right)}^{2} \]
    4. pow1/226.0%

      \[\leadsto {\left(e^{\mathsf{log1p}\left(\frac{\ell}{\sin k} \cdot \left(\frac{\sqrt{2}}{k} \cdot \color{blue}{{\left(\frac{1}{t}\right)}^{0.5}}\right)\right)} - 1\right)}^{2} \]
    5. inv-pow26.0%

      \[\leadsto {\left(e^{\mathsf{log1p}\left(\frac{\ell}{\sin k} \cdot \left(\frac{\sqrt{2}}{k} \cdot {\color{blue}{\left({t}^{-1}\right)}}^{0.5}\right)\right)} - 1\right)}^{2} \]
    6. pow-pow26.0%

      \[\leadsto {\left(e^{\mathsf{log1p}\left(\frac{\ell}{\sin k} \cdot \left(\frac{\sqrt{2}}{k} \cdot \color{blue}{{t}^{\left(-1 \cdot 0.5\right)}}\right)\right)} - 1\right)}^{2} \]
    7. metadata-eval26.0%

      \[\leadsto {\left(e^{\mathsf{log1p}\left(\frac{\ell}{\sin k} \cdot \left(\frac{\sqrt{2}}{k} \cdot {t}^{\color{blue}{-0.5}}\right)\right)} - 1\right)}^{2} \]
  11. Applied egg-rr26.0%

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

      \[\leadsto {\color{blue}{\left(\mathsf{expm1}\left(\mathsf{log1p}\left(\frac{\ell}{\sin k} \cdot \left(\frac{\sqrt{2}}{k} \cdot {t}^{-0.5}\right)\right)\right)\right)}}^{2} \]
    2. expm1-log1p33.7%

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

    \[\leadsto {\color{blue}{\left(\frac{\ell}{\sin k} \cdot \left(\frac{\sqrt{2}}{k} \cdot {t}^{-0.5}\right)\right)}}^{2} \]
  14. Final simplification33.7%

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

Alternative 10: 73.2% accurate, 1.3× 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 \left(\frac{\ell}{k} \cdot \frac{\sqrt{2}}{k}\right)\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 k) (/ (sqrt 2.0) 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 * pow((sqrt((1.0 / t_m)) * ((l / k) * (sqrt(2.0) / 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 * ((sqrt((1.0d0 / t_m)) * ((l / k) * (sqrt(2.0d0) / 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 * Math.pow((Math.sqrt((1.0 / t_m)) * ((l / k) * (Math.sqrt(2.0) / 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 * math.pow((math.sqrt((1.0 / t_m)) * ((l / k) * (math.sqrt(2.0) / 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(sqrt(Float64(1.0 / t_m)) * Float64(Float64(l / k) * Float64(sqrt(2.0) / 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 * ((sqrt((1.0 / t_m)) * ((l / k) * (sqrt(2.0) / 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[Power[N[(N[Sqrt[N[(1.0 / t$95$m), $MachinePrecision]], $MachinePrecision] * N[(N[(l / k), $MachinePrecision] * N[(N[Sqrt[2.0], $MachinePrecision] / k), $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 \left(\frac{\ell}{k} \cdot \frac{\sqrt{2}}{k}\right)\right)}^{2}
\end{array}
Derivation
  1. Initial program 36.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*36.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. *-commutative36.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*36.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/36.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. +-commutative36.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. unpow236.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-neg36.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-neg36.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-neg36.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. unpow236.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+45.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-eval45.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-identity45.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. unpow245.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-neg45.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-neg45.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. Simplified45.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. Step-by-step derivation
    1. add-sqr-sqrt32.6%

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

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

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

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

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

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

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

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

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

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

Alternative 11: 66.3% accurate, 1.4× speedup?

\[\begin{array}{l} t_m = \left|t\right| \\ t_s = \mathsf{copysign}\left(1, t\right) \\ t_s \cdot \left(\frac{2}{t_m} \cdot {\left(\ell \cdot \sqrt{{k}^{-4}}\right)}^{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 t_m) (pow (* l (sqrt (pow k -4.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 * ((2.0 / t_m) * pow((l * sqrt(pow(k, -4.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 * ((2.0d0 / t_m) * ((l * sqrt((k ** (-4.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 * ((2.0 / t_m) * Math.pow((l * Math.sqrt(Math.pow(k, -4.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 * ((2.0 / t_m) * math.pow((l * math.sqrt(math.pow(k, -4.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(Float64(2.0 / t_m) * (Float64(l * sqrt((k ^ -4.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 * ((2.0 / t_m) * ((l * sqrt((k ^ -4.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[(N[(2.0 / t$95$m), $MachinePrecision] * N[Power[N[(l * N[Sqrt[N[Power[k, -4.0], $MachinePrecision]], $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
t_m = \left|t\right|
\\
t_s = \mathsf{copysign}\left(1, t\right)

\\
t_s \cdot \left(\frac{2}{t_m} \cdot {\left(\ell \cdot \sqrt{{k}^{-4}}\right)}^{2}\right)
\end{array}
Derivation
  1. Initial program 36.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*36.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. *-commutative36.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*36.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/36.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. +-commutative36.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. unpow236.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-neg36.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-neg36.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-neg36.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. unpow236.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+45.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-eval45.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-identity45.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. unpow245.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-neg45.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-neg45.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. Simplified45.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 65.1%

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

      \[\leadsto \color{blue}{\frac{2 \cdot {\ell}^{2}}{{k}^{4} \cdot t}} \]
    2. *-commutative65.1%

      \[\leadsto \frac{2 \cdot {\ell}^{2}}{\color{blue}{t \cdot {k}^{4}}} \]
    3. times-frac65.1%

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

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

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

    \[\leadsto \frac{2}{t} \cdot \frac{\color{blue}{\ell \cdot \ell}}{{k}^{4}} \]
  9. Step-by-step derivation
    1. add-sqr-sqrt65.1%

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

      \[\leadsto \frac{2}{t} \cdot \color{blue}{{\left(\sqrt{\frac{\ell \cdot \ell}{{k}^{4}}}\right)}^{2}} \]
    3. div-inv65.1%

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

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

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

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

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

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

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

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

Alternative 12: 70.1% accurate, 1.4× speedup?

\[\begin{array}{l} t_m = \left|t\right| \\ t_s = \mathsf{copysign}\left(1, t\right) \\ t_s \cdot \left(\frac{2}{t_m} \cdot {\left(\ell \cdot \left|{k}^{-2}\right|\right)}^{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 t_m) (pow (* l (fabs (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 * ((2.0 / t_m) * pow((l * fabs(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 * ((2.0d0 / t_m) * ((l * abs((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 * ((2.0 / t_m) * Math.pow((l * Math.abs(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 * ((2.0 / t_m) * math.pow((l * math.fabs(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(Float64(2.0 / t_m) * (Float64(l * abs((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 * ((2.0 / t_m) * ((l * abs((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[(N[(2.0 / t$95$m), $MachinePrecision] * N[Power[N[(l * N[Abs[N[Power[k, -2.0], $MachinePrecision]], $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
t_m = \left|t\right|
\\
t_s = \mathsf{copysign}\left(1, t\right)

\\
t_s \cdot \left(\frac{2}{t_m} \cdot {\left(\ell \cdot \left|{k}^{-2}\right|\right)}^{2}\right)
\end{array}
Derivation
  1. Initial program 36.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*36.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. *-commutative36.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*36.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/36.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. +-commutative36.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. unpow236.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-neg36.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-neg36.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-neg36.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. unpow236.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+45.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-eval45.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-identity45.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. unpow245.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-neg45.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-neg45.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. Simplified45.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 65.1%

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

      \[\leadsto \color{blue}{\frac{2 \cdot {\ell}^{2}}{{k}^{4} \cdot t}} \]
    2. *-commutative65.1%

      \[\leadsto \frac{2 \cdot {\ell}^{2}}{\color{blue}{t \cdot {k}^{4}}} \]
    3. times-frac65.1%

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

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

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

    \[\leadsto \frac{2}{t} \cdot \frac{\color{blue}{\ell \cdot \ell}}{{k}^{4}} \]
  9. Step-by-step derivation
    1. add-sqr-sqrt44.6%

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

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

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

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

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

      \[\leadsto {\left(\sqrt{\frac{2}{t}} \cdot \left(\color{blue}{\left(\sqrt{\ell} \cdot \sqrt{\ell}\right)} \cdot \sqrt{\frac{1}{{k}^{4}}}\right)\right)}^{2} \]
    7. add-sqr-sqrt30.6%

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

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

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

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

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

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

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

      \[\leadsto {\left(\ell \cdot \left(\sqrt{\color{blue}{{k}^{-2} \cdot {k}^{-2}}} \cdot \sqrt{\frac{2}{t}}\right)\right)}^{2} \]
    5. rem-sqrt-square32.2%

      \[\leadsto {\left(\ell \cdot \left(\color{blue}{\left|{k}^{-2}\right|} \cdot \sqrt{\frac{2}{t}}\right)\right)}^{2} \]
  12. Simplified32.2%

    \[\leadsto \color{blue}{{\left(\ell \cdot \left(\left|{k}^{-2}\right| \cdot \sqrt{\frac{2}{t}}\right)\right)}^{2}} \]
  13. Step-by-step derivation
    1. associate-*r*32.1%

      \[\leadsto {\color{blue}{\left(\left(\ell \cdot \left|{k}^{-2}\right|\right) \cdot \sqrt{\frac{2}{t}}\right)}}^{2} \]
    2. unpow-prod-down31.4%

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

      \[\leadsto {\left(\ell \cdot \left|{k}^{-2}\right|\right)}^{2} \cdot \color{blue}{\left(\sqrt{\frac{2}{t}} \cdot \sqrt{\frac{2}{t}}\right)} \]
    4. add-sqr-sqrt73.2%

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

    \[\leadsto \color{blue}{{\left(\ell \cdot \left|{k}^{-2}\right|\right)}^{2} \cdot \frac{2}{t}} \]
  15. Final simplification73.2%

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

Alternative 13: 71.0% accurate, 1.4× speedup?

\[\begin{array}{l} t_m = \left|t\right| \\ t_s = \mathsf{copysign}\left(1, t\right) \\ t_s \cdot {\left(\ell \cdot \left({k}^{-2} \cdot \sqrt{\frac{2}{t_m}}\right)\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 (* (pow k -2.0) (sqrt (/ 2.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 * (pow(k, -2.0) * sqrt((2.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 ** (-2.0d0)) * sqrt((2.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 * (Math.pow(k, -2.0) * Math.sqrt((2.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 * (math.pow(k, -2.0) * math.sqrt((2.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(l * Float64((k ^ -2.0) * sqrt(Float64(2.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 ^ -2.0) * sqrt((2.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[(l * N[(N[Power[k, -2.0], $MachinePrecision] * N[Sqrt[N[(2.0 / 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)

\\
t_s \cdot {\left(\ell \cdot \left({k}^{-2} \cdot \sqrt{\frac{2}{t_m}}\right)\right)}^{2}
\end{array}
Derivation
  1. Initial program 36.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*36.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. *-commutative36.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*36.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/36.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. +-commutative36.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. unpow236.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-neg36.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-neg36.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-neg36.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. unpow236.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+45.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-eval45.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-identity45.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. unpow245.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-neg45.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-neg45.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. Simplified45.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 65.1%

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

      \[\leadsto \color{blue}{\frac{2 \cdot {\ell}^{2}}{{k}^{4} \cdot t}} \]
    2. *-commutative65.1%

      \[\leadsto \frac{2 \cdot {\ell}^{2}}{\color{blue}{t \cdot {k}^{4}}} \]
    3. times-frac65.1%

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

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

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

    \[\leadsto \frac{2}{t} \cdot \frac{\color{blue}{\ell \cdot \ell}}{{k}^{4}} \]
  9. Step-by-step derivation
    1. add-sqr-sqrt44.6%

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

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

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

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

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

      \[\leadsto {\left(\sqrt{\frac{2}{t}} \cdot \left(\color{blue}{\left(\sqrt{\ell} \cdot \sqrt{\ell}\right)} \cdot \sqrt{\frac{1}{{k}^{4}}}\right)\right)}^{2} \]
    7. add-sqr-sqrt30.6%

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

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

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

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

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

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

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

      \[\leadsto {\left(\ell \cdot \left(\sqrt{\color{blue}{{k}^{-2} \cdot {k}^{-2}}} \cdot \sqrt{\frac{2}{t}}\right)\right)}^{2} \]
    5. rem-sqrt-square32.2%

      \[\leadsto {\left(\ell \cdot \left(\color{blue}{\left|{k}^{-2}\right|} \cdot \sqrt{\frac{2}{t}}\right)\right)}^{2} \]
  12. Simplified32.2%

    \[\leadsto \color{blue}{{\left(\ell \cdot \left(\left|{k}^{-2}\right| \cdot \sqrt{\frac{2}{t}}\right)\right)}^{2}} \]
  13. Step-by-step derivation
    1. expm1-log1p-u26.6%

      \[\leadsto {\color{blue}{\left(\mathsf{expm1}\left(\mathsf{log1p}\left(\ell \cdot \left(\left|{k}^{-2}\right| \cdot \sqrt{\frac{2}{t}}\right)\right)\right)\right)}}^{2} \]
    2. expm1-udef25.4%

      \[\leadsto {\color{blue}{\left(e^{\mathsf{log1p}\left(\ell \cdot \left(\left|{k}^{-2}\right| \cdot \sqrt{\frac{2}{t}}\right)\right)} - 1\right)}}^{2} \]
  14. Applied egg-rr25.4%

    \[\leadsto {\color{blue}{\left(e^{\mathsf{log1p}\left(\ell \cdot \left(\left|{k}^{-2}\right| \cdot \sqrt{\frac{2}{t}}\right)\right)} - 1\right)}}^{2} \]
  15. Step-by-step derivation
    1. expm1-def26.6%

      \[\leadsto {\color{blue}{\left(\mathsf{expm1}\left(\mathsf{log1p}\left(\ell \cdot \left(\left|{k}^{-2}\right| \cdot \sqrt{\frac{2}{t}}\right)\right)\right)\right)}}^{2} \]
    2. expm1-log1p32.2%

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

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

      \[\leadsto {\left(\ell \cdot \left(\left|\color{blue}{{k}^{-1} \cdot {k}^{-1}}\right| \cdot \sqrt{\frac{2}{t}}\right)\right)}^{2} \]
    5. unpow-132.2%

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

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

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

      \[\leadsto {\left(\ell \cdot \left(\left(\color{blue}{{k}^{-1}} \cdot \frac{1}{k}\right) \cdot \sqrt{\frac{2}{t}}\right)\right)}^{2} \]
    9. unpow-132.2%

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

      \[\leadsto {\left(\ell \cdot \left(\color{blue}{{k}^{\left(2 \cdot -1\right)}} \cdot \sqrt{\frac{2}{t}}\right)\right)}^{2} \]
    11. metadata-eval32.2%

      \[\leadsto {\left(\ell \cdot \left({k}^{\color{blue}{-2}} \cdot \sqrt{\frac{2}{t}}\right)\right)}^{2} \]
  16. Simplified32.2%

    \[\leadsto {\color{blue}{\left(\ell \cdot \left({k}^{-2} \cdot \sqrt{\frac{2}{t}}\right)\right)}}^{2} \]
  17. Final simplification32.2%

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

Alternative 14: 71.6% accurate, 1.4× speedup?

\[\begin{array}{l} t_m = \left|t\right| \\ t_s = \mathsf{copysign}\left(1, t\right) \\ t_s \cdot {\left(\sqrt{\frac{2}{t_m}} \cdot \left(\ell \cdot {k}^{-2}\right)\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 (/ 2.0 t_m)) (* l (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((2.0 / t_m)) * (l * 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((2.0d0 / t_m)) * (l * (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((2.0 / t_m)) * (l * 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((2.0 / t_m)) * (l * 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(2.0 / t_m)) * Float64(l * (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((2.0 / t_m)) * (l * (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[(2.0 / t$95$m), $MachinePrecision]], $MachinePrecision] * N[(l * 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{2}{t_m}} \cdot \left(\ell \cdot {k}^{-2}\right)\right)}^{2}
\end{array}
Derivation
  1. Initial program 36.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*36.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. *-commutative36.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*36.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/36.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. +-commutative36.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. unpow236.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-neg36.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-neg36.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-neg36.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. unpow236.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+45.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-eval45.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-identity45.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. unpow245.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-neg45.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-neg45.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. Simplified45.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 65.1%

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

      \[\leadsto \color{blue}{\frac{2 \cdot {\ell}^{2}}{{k}^{4} \cdot t}} \]
    2. *-commutative65.1%

      \[\leadsto \frac{2 \cdot {\ell}^{2}}{\color{blue}{t \cdot {k}^{4}}} \]
    3. times-frac65.1%

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

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

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

    \[\leadsto \frac{2}{t} \cdot \frac{\color{blue}{\ell \cdot \ell}}{{k}^{4}} \]
  9. Step-by-step derivation
    1. add-sqr-sqrt44.6%

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

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

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

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

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

      \[\leadsto {\left(\sqrt{\frac{2}{t}} \cdot \left(\color{blue}{\left(\sqrt{\ell} \cdot \sqrt{\ell}\right)} \cdot \sqrt{\frac{1}{{k}^{4}}}\right)\right)}^{2} \]
    7. add-sqr-sqrt30.6%

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

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

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

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

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

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

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

      \[\leadsto {\left(\ell \cdot \left(\sqrt{\color{blue}{{k}^{-2} \cdot {k}^{-2}}} \cdot \sqrt{\frac{2}{t}}\right)\right)}^{2} \]
    5. rem-sqrt-square32.2%

      \[\leadsto {\left(\ell \cdot \left(\color{blue}{\left|{k}^{-2}\right|} \cdot \sqrt{\frac{2}{t}}\right)\right)}^{2} \]
  12. Simplified32.2%

    \[\leadsto \color{blue}{{\left(\ell \cdot \left(\left|{k}^{-2}\right| \cdot \sqrt{\frac{2}{t}}\right)\right)}^{2}} \]
  13. Step-by-step derivation
    1. expm1-log1p-u26.6%

      \[\leadsto {\color{blue}{\left(\mathsf{expm1}\left(\mathsf{log1p}\left(\ell \cdot \left(\left|{k}^{-2}\right| \cdot \sqrt{\frac{2}{t}}\right)\right)\right)\right)}}^{2} \]
    2. expm1-udef25.4%

      \[\leadsto {\color{blue}{\left(e^{\mathsf{log1p}\left(\ell \cdot \left(\left|{k}^{-2}\right| \cdot \sqrt{\frac{2}{t}}\right)\right)} - 1\right)}}^{2} \]
  14. Applied egg-rr25.4%

    \[\leadsto {\color{blue}{\left(e^{\mathsf{log1p}\left(\ell \cdot \left(\left|{k}^{-2}\right| \cdot \sqrt{\frac{2}{t}}\right)\right)} - 1\right)}}^{2} \]
  15. Step-by-step derivation
    1. expm1-def26.6%

      \[\leadsto {\color{blue}{\left(\mathsf{expm1}\left(\mathsf{log1p}\left(\ell \cdot \left(\left|{k}^{-2}\right| \cdot \sqrt{\frac{2}{t}}\right)\right)\right)\right)}}^{2} \]
    2. expm1-log1p32.2%

      \[\leadsto {\color{blue}{\left(\ell \cdot \left(\left|{k}^{-2}\right| \cdot \sqrt{\frac{2}{t}}\right)\right)}}^{2} \]
    3. associate-*r*32.1%

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

      \[\leadsto {\color{blue}{\left(\sqrt{\frac{2}{t}} \cdot \left(\ell \cdot \left|{k}^{-2}\right|\right)\right)}}^{2} \]
    5. metadata-eval32.1%

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

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

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

      \[\leadsto {\left(\sqrt{\frac{2}{t}} \cdot \left(\ell \cdot \left|\frac{1}{k} \cdot \color{blue}{\frac{1}{k}}\right|\right)\right)}^{2} \]
    9. fabs-sqr32.1%

      \[\leadsto {\left(\sqrt{\frac{2}{t}} \cdot \left(\ell \cdot \color{blue}{\left(\frac{1}{k} \cdot \frac{1}{k}\right)}\right)\right)}^{2} \]
    10. unpow-132.1%

      \[\leadsto {\left(\sqrt{\frac{2}{t}} \cdot \left(\ell \cdot \left(\color{blue}{{k}^{-1}} \cdot \frac{1}{k}\right)\right)\right)}^{2} \]
    11. unpow-132.1%

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

      \[\leadsto {\left(\sqrt{\frac{2}{t}} \cdot \left(\ell \cdot \color{blue}{{k}^{\left(2 \cdot -1\right)}}\right)\right)}^{2} \]
    13. metadata-eval32.1%

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

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

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

Alternative 15: 60.8% accurate, 2.0× 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}\;k \leq 11000:\\ \;\;\;\;\frac{2}{\frac{t_m \cdot {k}^{4}}{{\ell}^{2}}}\\ \mathbf{else}:\\ \;\;\;\;2 \cdot \left(\frac{\frac{{\ell}^{2}}{{k}^{2}}}{t_m} \cdot -0.16666666666666666\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 (<= k 11000.0)
    (/ 2.0 (/ (* t_m (pow k 4.0)) (pow l 2.0)))
    (* 2.0 (* (/ (/ (pow l 2.0) (pow k 2.0)) t_m) -0.16666666666666666)))))
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 (k <= 11000.0) {
		tmp = 2.0 / ((t_m * pow(k, 4.0)) / pow(l, 2.0));
	} else {
		tmp = 2.0 * (((pow(l, 2.0) / pow(k, 2.0)) / t_m) * -0.16666666666666666);
	}
	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 (k <= 11000.0d0) then
        tmp = 2.0d0 / ((t_m * (k ** 4.0d0)) / (l ** 2.0d0))
    else
        tmp = 2.0d0 * ((((l ** 2.0d0) / (k ** 2.0d0)) / t_m) * (-0.16666666666666666d0))
    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 (k <= 11000.0) {
		tmp = 2.0 / ((t_m * Math.pow(k, 4.0)) / Math.pow(l, 2.0));
	} else {
		tmp = 2.0 * (((Math.pow(l, 2.0) / Math.pow(k, 2.0)) / t_m) * -0.16666666666666666);
	}
	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 k <= 11000.0:
		tmp = 2.0 / ((t_m * math.pow(k, 4.0)) / math.pow(l, 2.0))
	else:
		tmp = 2.0 * (((math.pow(l, 2.0) / math.pow(k, 2.0)) / t_m) * -0.16666666666666666)
	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 (k <= 11000.0)
		tmp = Float64(2.0 / Float64(Float64(t_m * (k ^ 4.0)) / (l ^ 2.0)));
	else
		tmp = Float64(2.0 * Float64(Float64(Float64((l ^ 2.0) / (k ^ 2.0)) / t_m) * -0.16666666666666666));
	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 (k <= 11000.0)
		tmp = 2.0 / ((t_m * (k ^ 4.0)) / (l ^ 2.0));
	else
		tmp = 2.0 * ((((l ^ 2.0) / (k ^ 2.0)) / t_m) * -0.16666666666666666);
	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[k, 11000.0], N[(2.0 / N[(N[(t$95$m * N[Power[k, 4.0], $MachinePrecision]), $MachinePrecision] / N[Power[l, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(2.0 * N[(N[(N[(N[Power[l, 2.0], $MachinePrecision] / N[Power[k, 2.0], $MachinePrecision]), $MachinePrecision] / t$95$m), $MachinePrecision] * -0.16666666666666666), $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}\;k \leq 11000:\\
\;\;\;\;\frac{2}{\frac{t_m \cdot {k}^{4}}{{\ell}^{2}}}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if k < 11000

    1. Initial program 39.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. Taylor expanded in k around 0 66.4%

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

    if 11000 < k

    1. Initial program 31.3%

      \[\frac{2}{\left(\left(\frac{{t}^{3}}{\ell \cdot \ell} \cdot \sin k\right) \cdot \tan k\right) \cdot \left(\left(1 + {\left(\frac{k}{t}\right)}^{2}\right) - 1\right)} \]
    2. Step-by-step derivation
      1. associate-/r*31.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. *-commutative31.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*31.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/31.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. +-commutative31.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. unpow231.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-neg31.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-neg31.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-neg31.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. unpow231.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.0%

        \[\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.0%

        \[\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.0%

        \[\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.0%

        \[\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.0%

        \[\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.0%

        \[\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.0%

      \[\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 78.6%

      \[\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-frac78.8%

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

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

      \[\leadsto 2 \cdot \left(\frac{{\ell}^{2}}{{k}^{2}} \cdot \color{blue}{\left(\frac{1}{{k}^{2} \cdot t} - 0.16666666666666666 \cdot \frac{1}{t}\right)}\right) \]
    8. Step-by-step derivation
      1. associate-*r/64.4%

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

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

      \[\leadsto 2 \cdot \left(\frac{{\ell}^{2}}{{k}^{2}} \cdot \color{blue}{\left(\frac{1}{{k}^{2} \cdot t} - \frac{0.16666666666666666}{t}\right)}\right) \]
    10. Taylor expanded in k around inf 64.3%

      \[\leadsto 2 \cdot \color{blue}{\left(-0.16666666666666666 \cdot \frac{{\ell}^{2}}{{k}^{2} \cdot t}\right)} \]
    11. Step-by-step derivation
      1. *-commutative64.3%

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

        \[\leadsto 2 \cdot \left(\color{blue}{\frac{\frac{{\ell}^{2}}{{k}^{2}}}{t}} \cdot -0.16666666666666666\right) \]
    12. Simplified64.4%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;k \leq 11000:\\ \;\;\;\;\frac{2}{\frac{t \cdot {k}^{4}}{{\ell}^{2}}}\\ \mathbf{else}:\\ \;\;\;\;2 \cdot \left(\frac{\frac{{\ell}^{2}}{{k}^{2}}}{t} \cdot -0.16666666666666666\right)\\ \end{array} \]

Alternative 16: 60.4% accurate, 2.0× speedup?

\[\begin{array}{l} t_m = \left|t\right| \\ t_s = \mathsf{copysign}\left(1, t\right) \\ t_s \cdot \frac{2}{\frac{t_m \cdot {k}^{4}}{{\ell}^{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 (/ 2.0 (/ (* t_m (pow k 4.0)) (pow l 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 / ((t_m * pow(k, 4.0)) / pow(l, 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 / ((t_m * (k ** 4.0d0)) / (l ** 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 / ((t_m * Math.pow(k, 4.0)) / Math.pow(l, 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 / ((t_m * math.pow(k, 4.0)) / math.pow(l, 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(t_m * (k ^ 4.0)) / (l ^ 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 / ((t_m * (k ^ 4.0)) / (l ^ 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[(t$95$m * N[Power[k, 4.0], $MachinePrecision]), $MachinePrecision] / N[Power[l, 2.0], $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{t_m \cdot {k}^{4}}{{\ell}^{2}}}
\end{array}
Derivation
  1. Initial program 36.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. Taylor expanded in k around 0 65.1%

    \[\leadsto \frac{2}{\color{blue}{\frac{{k}^{4} \cdot t}{{\ell}^{2}}}} \]
  3. Final simplification65.1%

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

Alternative 17: 60.4% accurate, 2.0× speedup?

\[\begin{array}{l} t_m = \left|t\right| \\ t_s = \mathsf{copysign}\left(1, t\right) \\ t_s \cdot \frac{2 \cdot {\ell}^{2}}{t_m \cdot {k}^{4}} \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)) (* t_m (pow k 4.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(l, 2.0)) / (t_m * pow(k, 4.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 * (l ** 2.0d0)) / (t_m * (k ** 4.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(l, 2.0)) / (t_m * Math.pow(k, 4.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(l, 2.0)) / (t_m * math.pow(k, 4.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(2.0 * (l ^ 2.0)) / Float64(t_m * (k ^ 4.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 * (l ^ 2.0)) / (t_m * (k ^ 4.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[(N[(2.0 * N[Power[l, 2.0], $MachinePrecision]), $MachinePrecision] / N[(t$95$m * N[Power[k, 4.0], $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 \cdot {\ell}^{2}}{t_m \cdot {k}^{4}}
\end{array}
Derivation
  1. Initial program 36.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*36.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. *-commutative36.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*36.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/36.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. +-commutative36.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. unpow236.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-neg36.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-neg36.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-neg36.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. unpow236.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+45.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-eval45.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-identity45.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. unpow245.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-neg45.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-neg45.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. Simplified45.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 65.1%

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

      \[\leadsto \color{blue}{\frac{2 \cdot {\ell}^{2}}{{k}^{4} \cdot t}} \]
    2. *-commutative65.1%

      \[\leadsto \frac{2 \cdot {\ell}^{2}}{\color{blue}{t \cdot {k}^{4}}} \]
    3. times-frac65.1%

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

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

      \[\leadsto \color{blue}{\frac{2 \cdot {\ell}^{2}}{t \cdot {k}^{4}}} \]
  8. Applied egg-rr65.1%

    \[\leadsto \color{blue}{\frac{2 \cdot {\ell}^{2}}{t \cdot {k}^{4}}} \]
  9. Final simplification65.1%

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

Alternative 18: 60.3% accurate, 3.8× speedup?

\[\begin{array}{l} t_m = \left|t\right| \\ t_s = \mathsf{copysign}\left(1, t\right) \\ t_s \cdot \left(\left(\ell \cdot \ell\right) \cdot \left(\frac{2}{t_m} \cdot {k}^{-4}\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 (* (* l l) (* (/ 2.0 t_m) (pow k -4.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 * ((l * l) * ((2.0 / t_m) * pow(k, -4.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 * l) * ((2.0d0 / t_m) * (k ** (-4.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 * ((l * l) * ((2.0 / t_m) * Math.pow(k, -4.0)));
}
t_m = math.fabs(t)
t_s = math.copysign(1.0, t)
def code(t_s, t_m, l, k):
	return t_s * ((l * l) * ((2.0 / t_m) * math.pow(k, -4.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(l * l) * Float64(Float64(2.0 / t_m) * (k ^ -4.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 * l) * ((2.0 / t_m) * (k ^ -4.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[(N[(l * l), $MachinePrecision] * N[(N[(2.0 / t$95$m), $MachinePrecision] * N[Power[k, -4.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
t_m = \left|t\right|
\\
t_s = \mathsf{copysign}\left(1, t\right)

\\
t_s \cdot \left(\left(\ell \cdot \ell\right) \cdot \left(\frac{2}{t_m} \cdot {k}^{-4}\right)\right)
\end{array}
Derivation
  1. Initial program 36.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*36.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. *-commutative36.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*36.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/36.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. +-commutative36.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. unpow236.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-neg36.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-neg36.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-neg36.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. unpow236.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+45.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-eval45.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-identity45.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. unpow245.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-neg45.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-neg45.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. Simplified45.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 65.1%

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

      \[\leadsto \color{blue}{\frac{2 \cdot {\ell}^{2}}{{k}^{4} \cdot t}} \]
    2. *-commutative65.1%

      \[\leadsto \frac{2 \cdot {\ell}^{2}}{\color{blue}{t \cdot {k}^{4}}} \]
    3. times-frac65.1%

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

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

      \[\leadsto \color{blue}{\mathsf{expm1}\left(\mathsf{log1p}\left(\frac{2}{t} \cdot \frac{{\ell}^{2}}{{k}^{4}}\right)\right)} \]
    2. expm1-udef44.6%

      \[\leadsto \color{blue}{e^{\mathsf{log1p}\left(\frac{2}{t} \cdot \frac{{\ell}^{2}}{{k}^{4}}\right)} - 1} \]
    3. *-commutative44.6%

      \[\leadsto e^{\mathsf{log1p}\left(\color{blue}{\frac{{\ell}^{2}}{{k}^{4}} \cdot \frac{2}{t}}\right)} - 1 \]
    4. div-inv44.6%

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

      \[\leadsto e^{\mathsf{log1p}\left(\left({\ell}^{2} \cdot \color{blue}{{k}^{\left(-4\right)}}\right) \cdot \frac{2}{t}\right)} - 1 \]
    6. metadata-eval44.6%

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

    \[\leadsto \color{blue}{e^{\mathsf{log1p}\left(\left({\ell}^{2} \cdot {k}^{-4}\right) \cdot \frac{2}{t}\right)} - 1} \]
  9. Step-by-step derivation
    1. expm1-def44.7%

      \[\leadsto \color{blue}{\mathsf{expm1}\left(\mathsf{log1p}\left(\left({\ell}^{2} \cdot {k}^{-4}\right) \cdot \frac{2}{t}\right)\right)} \]
    2. expm1-log1p65.1%

      \[\leadsto \color{blue}{\left({\ell}^{2} \cdot {k}^{-4}\right) \cdot \frac{2}{t}} \]
    3. associate-*l*65.1%

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

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

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

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

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

Reproduce

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