Toniolo and Linder, Equation (10-)

Percentage Accurate: 34.6% → 99.6%
Time: 19.4s
Alternatives: 9
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 9 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.6% 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: 99.6% accurate, 0.8× speedup?

\[\begin{array}{l} t_m = \left|t\right| \\ t_s = \mathsf{copysign}\left(1, t\right) \\ t_s \cdot \left(2 \cdot \left(\cos k \cdot \frac{\frac{\frac{\ell}{k}}{\sin k}}{\sqrt{t_m} \cdot \left(\left(\sin k \cdot \sqrt{t_m}\right) \cdot \frac{k}{\ell}\right)}\right)\right) \end{array} \]
t_m = (fabs.f64 t)
t_s = (copysign.f64 1 t)
(FPCore (t_s t_m l k)
 :precision binary64
 (*
  t_s
  (*
   2.0
   (*
    (cos k)
    (/
     (/ (/ l k) (sin k))
     (* (sqrt t_m) (* (* (sin k) (sqrt t_m)) (/ k l))))))))
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 * (cos(k) * (((l / k) / sin(k)) / (sqrt(t_m) * ((sin(k) * sqrt(t_m)) * (k / l))))));
}
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 * (cos(k) * (((l / k) / sin(k)) / (sqrt(t_m) * ((sin(k) * sqrt(t_m)) * (k / l))))))
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.cos(k) * (((l / k) / Math.sin(k)) / (Math.sqrt(t_m) * ((Math.sin(k) * Math.sqrt(t_m)) * (k / l))))));
}
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.cos(k) * (((l / k) / math.sin(k)) / (math.sqrt(t_m) * ((math.sin(k) * math.sqrt(t_m)) * (k / l))))))
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(cos(k) * Float64(Float64(Float64(l / k) / sin(k)) / Float64(sqrt(t_m) * Float64(Float64(sin(k) * sqrt(t_m)) * Float64(k / l)))))))
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 * (cos(k) * (((l / k) / sin(k)) / (sqrt(t_m) * ((sin(k) * sqrt(t_m)) * (k / l))))));
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[Cos[k], $MachinePrecision] * N[(N[(N[(l / k), $MachinePrecision] / N[Sin[k], $MachinePrecision]), $MachinePrecision] / N[(N[Sqrt[t$95$m], $MachinePrecision] * N[(N[(N[Sin[k], $MachinePrecision] * N[Sqrt[t$95$m], $MachinePrecision]), $MachinePrecision] * N[(k / l), $MachinePrecision]), $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 \left(2 \cdot \left(\cos k \cdot \frac{\frac{\frac{\ell}{k}}{\sin k}}{\sqrt{t_m} \cdot \left(\left(\sin k \cdot \sqrt{t_m}\right) \cdot \frac{k}{\ell}\right)}\right)\right)
\end{array}
Derivation
  1. Initial program 37.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*37.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. *-commutative37.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*37.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/37.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. +-commutative37.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. unpow237.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-neg37.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-neg37.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-neg37.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. unpow237.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+45.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-eval45.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-identity45.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. unpow245.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-neg45.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-neg45.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. Simplified45.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 72.8%

    \[\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. associate-/l*72.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto 2 \cdot \left(\cos k \cdot \color{blue}{\frac{1 \cdot \frac{\frac{\ell}{k}}{\sin k}}{\frac{\sin k \cdot \sqrt{t}}{\frac{\ell}{k}} \cdot \sqrt{t}}}\right) \]
    5. *-un-lft-identity40.9%

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

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

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

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

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

Alternative 2: 99.5% accurate, 1.0× speedup?

\[\begin{array}{l} t_m = \left|t\right| \\ t_s = \mathsf{copysign}\left(1, t\right) \\ t_s \cdot \left(2 \cdot \left(\cos k \cdot {\left(\frac{\frac{\ell}{k}}{\sin k \cdot \sqrt{t_m}}\right)}^{2}\right)\right) \end{array} \]
t_m = (fabs.f64 t)
t_s = (copysign.f64 1 t)
(FPCore (t_s t_m l k)
 :precision binary64
 (* t_s (* 2.0 (* (cos k) (pow (/ (/ l k) (* (sin k) (sqrt 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 * (2.0 * (cos(k) * pow(((l / k) / (sin(k) * sqrt(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 * (2.0d0 * (cos(k) * (((l / k) / (sin(k) * sqrt(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 * (2.0 * (Math.cos(k) * Math.pow(((l / k) / (Math.sin(k) * Math.sqrt(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 * (2.0 * (math.cos(k) * math.pow(((l / k) / (math.sin(k) * math.sqrt(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(2.0 * Float64(cos(k) * (Float64(Float64(l / k) / Float64(sin(k) * sqrt(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 * (2.0 * (cos(k) * (((l / k) / (sin(k) * sqrt(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[(2.0 * N[(N[Cos[k], $MachinePrecision] * N[Power[N[(N[(l / k), $MachinePrecision] / N[(N[Sin[k], $MachinePrecision] * N[Sqrt[t$95$m], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 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 \left(2 \cdot \left(\cos k \cdot {\left(\frac{\frac{\ell}{k}}{\sin k \cdot \sqrt{t_m}}\right)}^{2}\right)\right)
\end{array}
Derivation
  1. Initial program 37.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*37.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. *-commutative37.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*37.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/37.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. +-commutative37.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. unpow237.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-neg37.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-neg37.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-neg37.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. unpow237.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+45.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-eval45.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-identity45.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. unpow245.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-neg45.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-neg45.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. Simplified45.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 72.8%

    \[\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. associate-/l*72.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 3: 85.1% accurate, 1.3× speedup?

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

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

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

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


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

    1. Initial program 36.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*36.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. *-commutative36.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*36.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/35.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. +-commutative35.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. unpow235.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-neg35.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-neg35.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-neg35.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. unpow235.8%

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

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

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

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

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

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

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

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

      \[\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. associate-/l*72.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 4.6000000000000002e-23 < k < 3.0999999999999999e106

    1. Initial program 34.0%

      \[\frac{2}{\left(\left(\frac{{t}^{3}}{\ell \cdot \ell} \cdot \sin k\right) \cdot \tan k\right) \cdot \left(\left(1 + {\left(\frac{k}{t}\right)}^{2}\right) - 1\right)} \]
    2. Step-by-step derivation
      1. associate-/r*36.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. *-commutative36.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*36.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/36.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. +-commutative36.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. unpow236.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-neg36.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-neg36.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-neg36.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. unpow236.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+44.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-eval44.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-identity44.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. unpow244.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-neg44.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-neg44.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. Simplified44.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 96.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. associate-/l*96.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 3.0999999999999999e106 < k

    1. Initial program 41.5%

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \frac{\frac{2}{\sin k \cdot \frac{{t}^{3} \cdot \tan k}{\ell \cdot \ell}}}{\left(\color{blue}{{\left(\frac{-k}{t}\right)}^{2}} + 1\right) - 1} \]
      11. associate--l+50.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-eval50.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-identity50.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. unpow250.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-neg50.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-neg50.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. Simplified50.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. Taylor expanded in k around inf 62.8%

      \[\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. associate-/l*62.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto 2 \cdot \left(\cos k \cdot \color{blue}{\frac{\frac{\frac{\ell}{k}}{\sin k} \cdot \frac{\frac{\ell}{k}}{\sin k}}{\sqrt{t} \cdot \sqrt{t}}}\right) \]
      5. add-sqr-sqrt94.6%

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

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

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

Alternative 4: 81.3% accurate, 1.3× speedup?

\[\begin{array}{l} t_m = \left|t\right| \\ t_s = \mathsf{copysign}\left(1, t\right) \\ t_s \cdot \begin{array}{l} \mathbf{if}\;k \leq 1.1 \cdot 10^{-37}:\\ \;\;\;\;2 \cdot \left(\cos k \cdot {\left(\frac{\frac{\ell}{k}}{k \cdot \sqrt{t_m}}\right)}^{2}\right)\\ \mathbf{else}:\\ \;\;\;\;2 \cdot \left(\cos k \cdot \left(\frac{\ell}{{\left(k \cdot \sin k\right)}^{2}} \cdot \frac{\ell}{t_m}\right)\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 1.1e-37)
    (* 2.0 (* (cos k) (pow (/ (/ l k) (* k (sqrt t_m))) 2.0)))
    (* 2.0 (* (cos k) (* (/ l (pow (* k (sin k)) 2.0)) (/ l t_m)))))))
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 <= 1.1e-37) {
		tmp = 2.0 * (cos(k) * pow(((l / k) / (k * sqrt(t_m))), 2.0));
	} else {
		tmp = 2.0 * (cos(k) * ((l / pow((k * sin(k)), 2.0)) * (l / t_m)));
	}
	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 <= 1.1d-37) then
        tmp = 2.0d0 * (cos(k) * (((l / k) / (k * sqrt(t_m))) ** 2.0d0))
    else
        tmp = 2.0d0 * (cos(k) * ((l / ((k * sin(k)) ** 2.0d0)) * (l / t_m)))
    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 <= 1.1e-37) {
		tmp = 2.0 * (Math.cos(k) * Math.pow(((l / k) / (k * Math.sqrt(t_m))), 2.0));
	} else {
		tmp = 2.0 * (Math.cos(k) * ((l / Math.pow((k * Math.sin(k)), 2.0)) * (l / t_m)));
	}
	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 <= 1.1e-37:
		tmp = 2.0 * (math.cos(k) * math.pow(((l / k) / (k * math.sqrt(t_m))), 2.0))
	else:
		tmp = 2.0 * (math.cos(k) * ((l / math.pow((k * math.sin(k)), 2.0)) * (l / t_m)))
	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 <= 1.1e-37)
		tmp = Float64(2.0 * Float64(cos(k) * (Float64(Float64(l / k) / Float64(k * sqrt(t_m))) ^ 2.0)));
	else
		tmp = Float64(2.0 * Float64(cos(k) * Float64(Float64(l / (Float64(k * sin(k)) ^ 2.0)) * Float64(l / t_m))));
	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 <= 1.1e-37)
		tmp = 2.0 * (cos(k) * (((l / k) / (k * sqrt(t_m))) ^ 2.0));
	else
		tmp = 2.0 * (cos(k) * ((l / ((k * sin(k)) ^ 2.0)) * (l / t_m)));
	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, 1.1e-37], N[(2.0 * N[(N[Cos[k], $MachinePrecision] * N[Power[N[(N[(l / k), $MachinePrecision] / N[(k * N[Sqrt[t$95$m], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(2.0 * N[(N[Cos[k], $MachinePrecision] * N[(N[(l / N[Power[N[(k * N[Sin[k], $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision] * N[(l / t$95$m), $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 1.1 \cdot 10^{-37}:\\
\;\;\;\;2 \cdot \left(\cos k \cdot {\left(\frac{\frac{\ell}{k}}{k \cdot \sqrt{t_m}}\right)}^{2}\right)\\

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


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

    1. Initial program 37.0%

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

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

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

        \[\leadsto \frac{\frac{2}{\color{blue}{\sin k \cdot \left(\frac{{t}^{3}}{\ell \cdot \ell} \cdot \tan k\right)}}}{\left(1 + {\left(\frac{k}{t}\right)}^{2}\right) - 1} \]
      4. associate-*l/36.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. +-commutative36.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. unpow236.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-neg36.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-neg36.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-neg36.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. unpow236.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+43.3%

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

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

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

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

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

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

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

      \[\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. associate-/l*72.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 1.10000000000000001e-37 < k

    1. Initial program 37.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*38.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 5: 74.6% accurate, 1.3× speedup?

\[\begin{array}{l} t_m = \left|t\right| \\ t_s = \mathsf{copysign}\left(1, t\right) \\ t_s \cdot \left(2 \cdot \left(\cos k \cdot {\left(\frac{\frac{\ell}{k}}{k \cdot \sqrt{t_m}}\right)}^{2}\right)\right) \end{array} \]
t_m = (fabs.f64 t)
t_s = (copysign.f64 1 t)
(FPCore (t_s t_m l k)
 :precision binary64
 (* t_s (* 2.0 (* (cos k) (pow (/ (/ l k) (* k (sqrt 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 * (2.0 * (cos(k) * pow(((l / k) / (k * sqrt(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 * (2.0d0 * (cos(k) * (((l / k) / (k * sqrt(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 * (2.0 * (Math.cos(k) * Math.pow(((l / k) / (k * Math.sqrt(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 * (2.0 * (math.cos(k) * math.pow(((l / k) / (k * math.sqrt(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(2.0 * Float64(cos(k) * (Float64(Float64(l / k) / Float64(k * sqrt(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 * (2.0 * (cos(k) * (((l / k) / (k * sqrt(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[(2.0 * N[(N[Cos[k], $MachinePrecision] * N[Power[N[(N[(l / k), $MachinePrecision] / N[(k * N[Sqrt[t$95$m], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 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 \left(2 \cdot \left(\cos k \cdot {\left(\frac{\frac{\ell}{k}}{k \cdot \sqrt{t_m}}\right)}^{2}\right)\right)
\end{array}
Derivation
  1. Initial program 37.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*37.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. *-commutative37.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*37.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/37.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. +-commutative37.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. unpow237.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-neg37.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-neg37.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-neg37.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. unpow237.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+45.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-eval45.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-identity45.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. unpow245.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-neg45.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-neg45.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. Simplified45.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 72.8%

    \[\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. associate-/l*72.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 6: 71.3% 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{{k}^{2}}{\ell} \cdot \frac{t_m}{\ell \cdot {k}^{-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 (* (/ (pow k 2.0) l) (/ t_m (* l (pow k -2.0)))))))
t_m = fabs(t);
t_s = copysign(1.0, t);
double code(double t_s, double t_m, double l, double k) {
	return t_s * (2.0 / ((pow(k, 2.0) / l) * (t_m / (l * pow(k, -2.0)))));
}
t_m = abs(t)
t_s = copysign(1.0d0, t)
real(8) function code(t_s, t_m, l, k)
    real(8), intent (in) :: t_s
    real(8), intent (in) :: t_m
    real(8), intent (in) :: l
    real(8), intent (in) :: k
    code = t_s * (2.0d0 / (((k ** 2.0d0) / l) * (t_m / (l * (k ** (-2.0d0))))))
end function
t_m = Math.abs(t);
t_s = Math.copySign(1.0, t);
public static double code(double t_s, double t_m, double l, double k) {
	return t_s * (2.0 / ((Math.pow(k, 2.0) / l) * (t_m / (l * Math.pow(k, -2.0)))));
}
t_m = math.fabs(t)
t_s = math.copysign(1.0, t)
def code(t_s, t_m, l, k):
	return t_s * (2.0 / ((math.pow(k, 2.0) / l) * (t_m / (l * math.pow(k, -2.0)))))
t_m = abs(t)
t_s = copysign(1.0, t)
function code(t_s, t_m, l, k)
	return Float64(t_s * Float64(2.0 / Float64(Float64((k ^ 2.0) / l) * Float64(t_m / Float64(l * (k ^ -2.0))))))
end
t_m = abs(t);
t_s = sign(t) * abs(1.0);
function tmp = code(t_s, t_m, l, k)
	tmp = t_s * (2.0 / (((k ^ 2.0) / l) * (t_m / (l * (k ^ -2.0)))));
end
t_m = N[Abs[t], $MachinePrecision]
t_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[t]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[t$95$s_, t$95$m_, l_, k_] := N[(t$95$s * N[(2.0 / N[(N[(N[Power[k, 2.0], $MachinePrecision] / l), $MachinePrecision] * N[(t$95$m / N[(l * N[Power[k, -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 \frac{2}{\frac{{k}^{2}}{\ell} \cdot \frac{t_m}{\ell \cdot {k}^{-2}}}
\end{array}
Derivation
  1. Initial program 37.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-*l*37.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \frac{2}{t \cdot \left({k}^{\color{blue}{\left(2 + 2\right)}} \cdot {\ell}^{-2}\right)} \]
    4. pow-prod-up60.3%

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \frac{2}{t \cdot \left(\frac{{k}^{2}}{\ell} \cdot \color{blue}{\frac{{k}^{2}}{\ell}}\right)} \]
    15. times-frac61.0%

      \[\leadsto \frac{2}{t \cdot \color{blue}{\frac{{k}^{2} \cdot {k}^{2}}{\ell \cdot \ell}}} \]
    16. pow-sqr61.0%

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

      \[\leadsto \frac{2}{t \cdot \frac{{k}^{\color{blue}{4}}}{\ell \cdot \ell}} \]
    18. unpow261.0%

      \[\leadsto \frac{2}{t \cdot \frac{{k}^{4}}{\color{blue}{{\ell}^{2}}}} \]
    19. clear-num61.0%

      \[\leadsto \frac{2}{t \cdot \color{blue}{\frac{1}{\frac{{\ell}^{2}}{{k}^{4}}}}} \]
    20. div-inv61.0%

      \[\leadsto \frac{2}{\color{blue}{\frac{t}{\frac{{\ell}^{2}}{{k}^{4}}}}} \]
    21. *-un-lft-identity61.0%

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

    \[\leadsto \frac{2}{\color{blue}{\frac{{k}^{2}}{\ell} \cdot \frac{t}{\ell \cdot {k}^{-2}}}} \]
  9. Final simplification72.9%

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

Alternative 7: 69.7% accurate, 2.0× speedup?

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

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

    \[\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. associate-/l*72.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 8: 65.5% accurate, 3.8× speedup?

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

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

    \[\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. associate-/l*72.8%

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

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

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

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

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

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

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

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

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

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

    \[\leadsto 2 \cdot \color{blue}{\frac{\frac{{\ell}^{2}}{{k}^{4}}}{t}} \]
  14. Step-by-step derivation
    1. associate-/l/60.9%

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

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

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

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

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

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

Alternative 9: 66.2% accurate, 3.8× speedup?

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

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

    \[\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. associate-/l*72.8%

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto 2 \cdot \frac{\frac{\color{blue}{\ell \cdot \ell}}{{k}^{4}}}{t} \]
    2. *-un-lft-identity61.0%

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

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

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

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

Reproduce

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