Toniolo and Linder, Equation (10+)

Percentage Accurate: 54.1% → 90.7%
Time: 17.9s
Alternatives: 14
Speedup: 24.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 14 alternatives:

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

Initial Program: 54.1% 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: 90.7% accurate, 0.7× speedup?

\[\begin{array}{l} k_m = \left|k\right| \\ t\_m = \left|t\right| \\ t\_s = \mathsf{copysign}\left(1, t\right) \\ \begin{array}{l} t_2 := \sin k\_m \cdot \tan k\_m\\ t\_s \cdot \begin{array}{l} \mathbf{if}\;k\_m \leq 1.92 \cdot 10^{-62}:\\ \;\;\;\;\frac{2}{{\left(k\_m \cdot \left(\frac{{t\_m}^{1.5}}{\ell} \cdot \mathsf{hypot}\left(1, \mathsf{hypot}\left(1, \frac{k\_m}{t\_m}\right)\right)\right)\right)}^{2}}\\ \mathbf{elif}\;k\_m \leq 2.4 \cdot 10^{+148}:\\ \;\;\;\;\frac{2}{\left(t\_m \cdot \mathsf{fma}\left(2, {\left(\frac{t\_m}{\ell}\right)}^{2}, \frac{{k\_m}^{2}}{{\ell}^{2}}\right)\right) \cdot t\_2}\\ \mathbf{else}:\\ \;\;\;\;\frac{2}{t\_2 \cdot {\left(\frac{k\_m}{\ell} \cdot \sqrt{t\_m}\right)}^{2}}\\ \end{array} \end{array} \end{array} \]
k_m = (fabs.f64 k)
t\_m = (fabs.f64 t)
t\_s = (copysign.f64 #s(literal 1 binary64) t)
(FPCore (t_s t_m l k_m)
 :precision binary64
 (let* ((t_2 (* (sin k_m) (tan k_m))))
   (*
    t_s
    (if (<= k_m 1.92e-62)
      (/
       2.0
       (pow
        (* k_m (* (/ (pow t_m 1.5) l) (hypot 1.0 (hypot 1.0 (/ k_m t_m)))))
        2.0))
      (if (<= k_m 2.4e+148)
        (/
         2.0
         (*
          (* t_m (fma 2.0 (pow (/ t_m l) 2.0) (/ (pow k_m 2.0) (pow l 2.0))))
          t_2))
        (/ 2.0 (* t_2 (pow (* (/ k_m l) (sqrt t_m)) 2.0))))))))
k_m = fabs(k);
t\_m = fabs(t);
t\_s = copysign(1.0, t);
double code(double t_s, double t_m, double l, double k_m) {
	double t_2 = sin(k_m) * tan(k_m);
	double tmp;
	if (k_m <= 1.92e-62) {
		tmp = 2.0 / pow((k_m * ((pow(t_m, 1.5) / l) * hypot(1.0, hypot(1.0, (k_m / t_m))))), 2.0);
	} else if (k_m <= 2.4e+148) {
		tmp = 2.0 / ((t_m * fma(2.0, pow((t_m / l), 2.0), (pow(k_m, 2.0) / pow(l, 2.0)))) * t_2);
	} else {
		tmp = 2.0 / (t_2 * pow(((k_m / l) * sqrt(t_m)), 2.0));
	}
	return t_s * tmp;
}
k_m = abs(k)
t\_m = abs(t)
t\_s = copysign(1.0, t)
function code(t_s, t_m, l, k_m)
	t_2 = Float64(sin(k_m) * tan(k_m))
	tmp = 0.0
	if (k_m <= 1.92e-62)
		tmp = Float64(2.0 / (Float64(k_m * Float64(Float64((t_m ^ 1.5) / l) * hypot(1.0, hypot(1.0, Float64(k_m / t_m))))) ^ 2.0));
	elseif (k_m <= 2.4e+148)
		tmp = Float64(2.0 / Float64(Float64(t_m * fma(2.0, (Float64(t_m / l) ^ 2.0), Float64((k_m ^ 2.0) / (l ^ 2.0)))) * t_2));
	else
		tmp = Float64(2.0 / Float64(t_2 * (Float64(Float64(k_m / l) * sqrt(t_m)) ^ 2.0)));
	end
	return Float64(t_s * tmp)
end
k_m = N[Abs[k], $MachinePrecision]
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$95$m_] := Block[{t$95$2 = N[(N[Sin[k$95$m], $MachinePrecision] * N[Tan[k$95$m], $MachinePrecision]), $MachinePrecision]}, N[(t$95$s * If[LessEqual[k$95$m, 1.92e-62], N[(2.0 / N[Power[N[(k$95$m * N[(N[(N[Power[t$95$m, 1.5], $MachinePrecision] / l), $MachinePrecision] * N[Sqrt[1.0 ^ 2 + N[Sqrt[1.0 ^ 2 + N[(k$95$m / t$95$m), $MachinePrecision] ^ 2], $MachinePrecision] ^ 2], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision], If[LessEqual[k$95$m, 2.4e+148], N[(2.0 / N[(N[(t$95$m * N[(2.0 * N[Power[N[(t$95$m / l), $MachinePrecision], 2.0], $MachinePrecision] + N[(N[Power[k$95$m, 2.0], $MachinePrecision] / N[Power[l, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * t$95$2), $MachinePrecision]), $MachinePrecision], N[(2.0 / N[(t$95$2 * N[Power[N[(N[(k$95$m / l), $MachinePrecision] * N[Sqrt[t$95$m], $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]), $MachinePrecision]]
\begin{array}{l}
k_m = \left|k\right|
\\
t\_m = \left|t\right|
\\
t\_s = \mathsf{copysign}\left(1, t\right)

\\
\begin{array}{l}
t_2 := \sin k\_m \cdot \tan k\_m\\
t\_s \cdot \begin{array}{l}
\mathbf{if}\;k\_m \leq 1.92 \cdot 10^{-62}:\\
\;\;\;\;\frac{2}{{\left(k\_m \cdot \left(\frac{{t\_m}^{1.5}}{\ell} \cdot \mathsf{hypot}\left(1, \mathsf{hypot}\left(1, \frac{k\_m}{t\_m}\right)\right)\right)\right)}^{2}}\\

\mathbf{elif}\;k\_m \leq 2.4 \cdot 10^{+148}:\\
\;\;\;\;\frac{2}{\left(t\_m \cdot \mathsf{fma}\left(2, {\left(\frac{t\_m}{\ell}\right)}^{2}, \frac{{k\_m}^{2}}{{\ell}^{2}}\right)\right) \cdot t\_2}\\

\mathbf{else}:\\
\;\;\;\;\frac{2}{t\_2 \cdot {\left(\frac{k\_m}{\ell} \cdot \sqrt{t\_m}\right)}^{2}}\\


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

    1. Initial program 57.7%

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

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

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

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

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

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

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

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

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

      \[\leadsto \frac{2}{\color{blue}{{\left(\frac{{t}^{1.5}}{\ell} \cdot \left(\mathsf{hypot}\left(1, \mathsf{hypot}\left(1, \frac{k}{t}\right)\right) \cdot \sqrt{\sin k \cdot \tan k}\right)\right)}^{2}}} \]
    6. Step-by-step derivation
      1. associate-*r*33.7%

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

      \[\leadsto \frac{2}{\color{blue}{{\left(\left(\frac{{t}^{1.5}}{\ell} \cdot \mathsf{hypot}\left(1, \mathsf{hypot}\left(1, \frac{k}{t}\right)\right)\right) \cdot \sqrt{\sin k \cdot \tan k}\right)}^{2}}} \]
    8. Taylor expanded in k around 0 40.0%

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

    if 1.92e-62 < k < 2.39999999999999995e148

    1. Initial program 51.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. Simplified50.9%

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

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

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

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

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

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

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

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

      \[\leadsto \frac{2}{\color{blue}{{\left(\frac{{t}^{1.5}}{\ell} \cdot \left(\mathsf{hypot}\left(1, \mathsf{hypot}\left(1, \frac{k}{t}\right)\right) \cdot \sqrt{\sin k \cdot \tan k}\right)\right)}^{2}}} \]
    6. Step-by-step derivation
      1. associate-*r*19.6%

        \[\leadsto \frac{2}{{\color{blue}{\left(\left(\frac{{t}^{1.5}}{\ell} \cdot \mathsf{hypot}\left(1, \mathsf{hypot}\left(1, \frac{k}{t}\right)\right)\right) \cdot \sqrt{\sin k \cdot \tan k}\right)}}^{2}} \]
    7. Simplified19.6%

      \[\leadsto \frac{2}{\color{blue}{{\left(\left(\frac{{t}^{1.5}}{\ell} \cdot \mathsf{hypot}\left(1, \mathsf{hypot}\left(1, \frac{k}{t}\right)\right)\right) \cdot \sqrt{\sin k \cdot \tan k}\right)}^{2}}} \]
    8. Step-by-step derivation
      1. unpow-prod-down19.5%

        \[\leadsto \frac{2}{\color{blue}{{\left(\frac{{t}^{1.5}}{\ell} \cdot \mathsf{hypot}\left(1, \mathsf{hypot}\left(1, \frac{k}{t}\right)\right)\right)}^{2} \cdot {\left(\sqrt{\sin k \cdot \tan k}\right)}^{2}}} \]
      2. pow219.5%

        \[\leadsto \frac{2}{{\left(\frac{{t}^{1.5}}{\ell} \cdot \mathsf{hypot}\left(1, \mathsf{hypot}\left(1, \frac{k}{t}\right)\right)\right)}^{2} \cdot \color{blue}{\left(\sqrt{\sin k \cdot \tan k} \cdot \sqrt{\sin k \cdot \tan k}\right)}} \]
      3. add-sqr-sqrt44.9%

        \[\leadsto \frac{2}{{\left(\frac{{t}^{1.5}}{\ell} \cdot \mathsf{hypot}\left(1, \mathsf{hypot}\left(1, \frac{k}{t}\right)\right)\right)}^{2} \cdot \color{blue}{\left(\sin k \cdot \tan k\right)}} \]
    9. Applied egg-rr44.9%

      \[\leadsto \frac{2}{\color{blue}{{\left(\frac{{t}^{1.5}}{\ell} \cdot \mathsf{hypot}\left(1, \mathsf{hypot}\left(1, \frac{k}{t}\right)\right)\right)}^{2} \cdot \left(\sin k \cdot \tan k\right)}} \]
    10. Taylor expanded in t around 0 76.2%

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

        \[\leadsto \frac{2}{\left(t \cdot \color{blue}{\mathsf{fma}\left(2, \frac{{t}^{2}}{{\ell}^{2}}, \frac{{k}^{2}}{{\ell}^{2}}\right)}\right) \cdot \left(\sin k \cdot \tan k\right)} \]
      2. unpow276.2%

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

        \[\leadsto \frac{2}{\left(t \cdot \mathsf{fma}\left(2, \frac{t \cdot t}{\color{blue}{\ell \cdot \ell}}, \frac{{k}^{2}}{{\ell}^{2}}\right)\right) \cdot \left(\sin k \cdot \tan k\right)} \]
      4. times-frac97.7%

        \[\leadsto \frac{2}{\left(t \cdot \mathsf{fma}\left(2, \color{blue}{\frac{t}{\ell} \cdot \frac{t}{\ell}}, \frac{{k}^{2}}{{\ell}^{2}}\right)\right) \cdot \left(\sin k \cdot \tan k\right)} \]
      5. unpow197.7%

        \[\leadsto \frac{2}{\left(t \cdot \mathsf{fma}\left(2, \color{blue}{{\left(\frac{t}{\ell}\right)}^{1}} \cdot \frac{t}{\ell}, \frac{{k}^{2}}{{\ell}^{2}}\right)\right) \cdot \left(\sin k \cdot \tan k\right)} \]
      6. pow-plus97.7%

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

        \[\leadsto \frac{2}{\left(t \cdot \mathsf{fma}\left(2, {\left(\frac{t}{\ell}\right)}^{\color{blue}{2}}, \frac{{k}^{2}}{{\ell}^{2}}\right)\right) \cdot \left(\sin k \cdot \tan k\right)} \]
    12. Simplified97.7%

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

    if 2.39999999999999995e148 < k

    1. Initial program 56.1%

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

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

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

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

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

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

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

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

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

      \[\leadsto \frac{2}{\color{blue}{{\left(\frac{{t}^{1.5}}{\ell} \cdot \left(\mathsf{hypot}\left(1, \mathsf{hypot}\left(1, \frac{k}{t}\right)\right) \cdot \sqrt{\sin k \cdot \tan k}\right)\right)}^{2}}} \]
    6. Step-by-step derivation
      1. associate-*r*15.0%

        \[\leadsto \frac{2}{{\color{blue}{\left(\left(\frac{{t}^{1.5}}{\ell} \cdot \mathsf{hypot}\left(1, \mathsf{hypot}\left(1, \frac{k}{t}\right)\right)\right) \cdot \sqrt{\sin k \cdot \tan k}\right)}}^{2}} \]
    7. Simplified15.0%

      \[\leadsto \frac{2}{\color{blue}{{\left(\left(\frac{{t}^{1.5}}{\ell} \cdot \mathsf{hypot}\left(1, \mathsf{hypot}\left(1, \frac{k}{t}\right)\right)\right) \cdot \sqrt{\sin k \cdot \tan k}\right)}^{2}}} \]
    8. Step-by-step derivation
      1. unpow-prod-down15.0%

        \[\leadsto \frac{2}{\color{blue}{{\left(\frac{{t}^{1.5}}{\ell} \cdot \mathsf{hypot}\left(1, \mathsf{hypot}\left(1, \frac{k}{t}\right)\right)\right)}^{2} \cdot {\left(\sqrt{\sin k \cdot \tan k}\right)}^{2}}} \]
      2. pow215.0%

        \[\leadsto \frac{2}{{\left(\frac{{t}^{1.5}}{\ell} \cdot \mathsf{hypot}\left(1, \mathsf{hypot}\left(1, \frac{k}{t}\right)\right)\right)}^{2} \cdot \color{blue}{\left(\sqrt{\sin k \cdot \tan k} \cdot \sqrt{\sin k \cdot \tan k}\right)}} \]
      3. add-sqr-sqrt37.2%

        \[\leadsto \frac{2}{{\left(\frac{{t}^{1.5}}{\ell} \cdot \mathsf{hypot}\left(1, \mathsf{hypot}\left(1, \frac{k}{t}\right)\right)\right)}^{2} \cdot \color{blue}{\left(\sin k \cdot \tan k\right)}} \]
    9. Applied egg-rr37.2%

      \[\leadsto \frac{2}{\color{blue}{{\left(\frac{{t}^{1.5}}{\ell} \cdot \mathsf{hypot}\left(1, \mathsf{hypot}\left(1, \frac{k}{t}\right)\right)\right)}^{2} \cdot \left(\sin k \cdot \tan k\right)}} \]
    10. Taylor expanded in t around 0 40.7%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;k \leq 1.92 \cdot 10^{-62}:\\ \;\;\;\;\frac{2}{{\left(k \cdot \left(\frac{{t}^{1.5}}{\ell} \cdot \mathsf{hypot}\left(1, \mathsf{hypot}\left(1, \frac{k}{t}\right)\right)\right)\right)}^{2}}\\ \mathbf{elif}\;k \leq 2.4 \cdot 10^{+148}:\\ \;\;\;\;\frac{2}{\left(t \cdot \mathsf{fma}\left(2, {\left(\frac{t}{\ell}\right)}^{2}, \frac{{k}^{2}}{{\ell}^{2}}\right)\right) \cdot \left(\sin k \cdot \tan k\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{2}{\left(\sin k \cdot \tan k\right) \cdot {\left(\frac{k}{\ell} \cdot \sqrt{t}\right)}^{2}}\\ \end{array} \]
  5. Add Preprocessing

Alternative 2: 90.2% accurate, 0.7× speedup?

\[\begin{array}{l} k_m = \left|k\right| \\ t\_m = \left|t\right| \\ t\_s = \mathsf{copysign}\left(1, t\right) \\ \begin{array}{l} t_2 := \sin k\_m \cdot \tan k\_m\\ t_3 := \frac{{t\_m}^{1.5}}{\ell} \cdot \mathsf{hypot}\left(1, \mathsf{hypot}\left(1, \frac{k\_m}{t\_m}\right)\right)\\ t\_s \cdot \begin{array}{l} \mathbf{if}\;k\_m \leq 1.12 \cdot 10^{-28}:\\ \;\;\;\;\frac{2}{{\left(k\_m \cdot t\_3\right)}^{2}}\\ \mathbf{elif}\;k\_m \leq 3 \cdot 10^{+92}:\\ \;\;\;\;\frac{\frac{2}{t\_2}}{{t\_3}^{2}}\\ \mathbf{else}:\\ \;\;\;\;\frac{2}{t\_2 \cdot {\left(\frac{k\_m}{\ell} \cdot \sqrt{t\_m}\right)}^{2}}\\ \end{array} \end{array} \end{array} \]
k_m = (fabs.f64 k)
t\_m = (fabs.f64 t)
t\_s = (copysign.f64 #s(literal 1 binary64) t)
(FPCore (t_s t_m l k_m)
 :precision binary64
 (let* ((t_2 (* (sin k_m) (tan k_m)))
        (t_3 (* (/ (pow t_m 1.5) l) (hypot 1.0 (hypot 1.0 (/ k_m t_m))))))
   (*
    t_s
    (if (<= k_m 1.12e-28)
      (/ 2.0 (pow (* k_m t_3) 2.0))
      (if (<= k_m 3e+92)
        (/ (/ 2.0 t_2) (pow t_3 2.0))
        (/ 2.0 (* t_2 (pow (* (/ k_m l) (sqrt t_m)) 2.0))))))))
k_m = fabs(k);
t\_m = fabs(t);
t\_s = copysign(1.0, t);
double code(double t_s, double t_m, double l, double k_m) {
	double t_2 = sin(k_m) * tan(k_m);
	double t_3 = (pow(t_m, 1.5) / l) * hypot(1.0, hypot(1.0, (k_m / t_m)));
	double tmp;
	if (k_m <= 1.12e-28) {
		tmp = 2.0 / pow((k_m * t_3), 2.0);
	} else if (k_m <= 3e+92) {
		tmp = (2.0 / t_2) / pow(t_3, 2.0);
	} else {
		tmp = 2.0 / (t_2 * pow(((k_m / l) * sqrt(t_m)), 2.0));
	}
	return t_s * tmp;
}
k_m = Math.abs(k);
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_m) {
	double t_2 = Math.sin(k_m) * Math.tan(k_m);
	double t_3 = (Math.pow(t_m, 1.5) / l) * Math.hypot(1.0, Math.hypot(1.0, (k_m / t_m)));
	double tmp;
	if (k_m <= 1.12e-28) {
		tmp = 2.0 / Math.pow((k_m * t_3), 2.0);
	} else if (k_m <= 3e+92) {
		tmp = (2.0 / t_2) / Math.pow(t_3, 2.0);
	} else {
		tmp = 2.0 / (t_2 * Math.pow(((k_m / l) * Math.sqrt(t_m)), 2.0));
	}
	return t_s * tmp;
}
k_m = math.fabs(k)
t\_m = math.fabs(t)
t\_s = math.copysign(1.0, t)
def code(t_s, t_m, l, k_m):
	t_2 = math.sin(k_m) * math.tan(k_m)
	t_3 = (math.pow(t_m, 1.5) / l) * math.hypot(1.0, math.hypot(1.0, (k_m / t_m)))
	tmp = 0
	if k_m <= 1.12e-28:
		tmp = 2.0 / math.pow((k_m * t_3), 2.0)
	elif k_m <= 3e+92:
		tmp = (2.0 / t_2) / math.pow(t_3, 2.0)
	else:
		tmp = 2.0 / (t_2 * math.pow(((k_m / l) * math.sqrt(t_m)), 2.0))
	return t_s * tmp
k_m = abs(k)
t\_m = abs(t)
t\_s = copysign(1.0, t)
function code(t_s, t_m, l, k_m)
	t_2 = Float64(sin(k_m) * tan(k_m))
	t_3 = Float64(Float64((t_m ^ 1.5) / l) * hypot(1.0, hypot(1.0, Float64(k_m / t_m))))
	tmp = 0.0
	if (k_m <= 1.12e-28)
		tmp = Float64(2.0 / (Float64(k_m * t_3) ^ 2.0));
	elseif (k_m <= 3e+92)
		tmp = Float64(Float64(2.0 / t_2) / (t_3 ^ 2.0));
	else
		tmp = Float64(2.0 / Float64(t_2 * (Float64(Float64(k_m / l) * sqrt(t_m)) ^ 2.0)));
	end
	return Float64(t_s * tmp)
end
k_m = abs(k);
t\_m = abs(t);
t\_s = sign(t) * abs(1.0);
function tmp_2 = code(t_s, t_m, l, k_m)
	t_2 = sin(k_m) * tan(k_m);
	t_3 = ((t_m ^ 1.5) / l) * hypot(1.0, hypot(1.0, (k_m / t_m)));
	tmp = 0.0;
	if (k_m <= 1.12e-28)
		tmp = 2.0 / ((k_m * t_3) ^ 2.0);
	elseif (k_m <= 3e+92)
		tmp = (2.0 / t_2) / (t_3 ^ 2.0);
	else
		tmp = 2.0 / (t_2 * (((k_m / l) * sqrt(t_m)) ^ 2.0));
	end
	tmp_2 = t_s * tmp;
end
k_m = N[Abs[k], $MachinePrecision]
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$95$m_] := Block[{t$95$2 = N[(N[Sin[k$95$m], $MachinePrecision] * N[Tan[k$95$m], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(N[(N[Power[t$95$m, 1.5], $MachinePrecision] / l), $MachinePrecision] * N[Sqrt[1.0 ^ 2 + N[Sqrt[1.0 ^ 2 + N[(k$95$m / t$95$m), $MachinePrecision] ^ 2], $MachinePrecision] ^ 2], $MachinePrecision]), $MachinePrecision]}, N[(t$95$s * If[LessEqual[k$95$m, 1.12e-28], N[(2.0 / N[Power[N[(k$95$m * t$95$3), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision], If[LessEqual[k$95$m, 3e+92], N[(N[(2.0 / t$95$2), $MachinePrecision] / N[Power[t$95$3, 2.0], $MachinePrecision]), $MachinePrecision], N[(2.0 / N[(t$95$2 * N[Power[N[(N[(k$95$m / l), $MachinePrecision] * N[Sqrt[t$95$m], $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]), $MachinePrecision]]]
\begin{array}{l}
k_m = \left|k\right|
\\
t\_m = \left|t\right|
\\
t\_s = \mathsf{copysign}\left(1, t\right)

\\
\begin{array}{l}
t_2 := \sin k\_m \cdot \tan k\_m\\
t_3 := \frac{{t\_m}^{1.5}}{\ell} \cdot \mathsf{hypot}\left(1, \mathsf{hypot}\left(1, \frac{k\_m}{t\_m}\right)\right)\\
t\_s \cdot \begin{array}{l}
\mathbf{if}\;k\_m \leq 1.12 \cdot 10^{-28}:\\
\;\;\;\;\frac{2}{{\left(k\_m \cdot t\_3\right)}^{2}}\\

\mathbf{elif}\;k\_m \leq 3 \cdot 10^{+92}:\\
\;\;\;\;\frac{\frac{2}{t\_2}}{{t\_3}^{2}}\\

\mathbf{else}:\\
\;\;\;\;\frac{2}{t\_2 \cdot {\left(\frac{k\_m}{\ell} \cdot \sqrt{t\_m}\right)}^{2}}\\


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

    1. Initial program 58.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. Simplified58.4%

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

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

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

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

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

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

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

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

      \[\leadsto \frac{2}{\color{blue}{{\left(\frac{{t}^{1.5}}{\ell} \cdot \left(\mathsf{hypot}\left(1, \mathsf{hypot}\left(1, \frac{k}{t}\right)\right) \cdot \sqrt{\sin k \cdot \tan k}\right)\right)}^{2}}} \]
    6. Step-by-step derivation
      1. associate-*r*33.3%

        \[\leadsto \frac{2}{{\color{blue}{\left(\left(\frac{{t}^{1.5}}{\ell} \cdot \mathsf{hypot}\left(1, \mathsf{hypot}\left(1, \frac{k}{t}\right)\right)\right) \cdot \sqrt{\sin k \cdot \tan k}\right)}}^{2}} \]
    7. Simplified33.3%

      \[\leadsto \frac{2}{\color{blue}{{\left(\left(\frac{{t}^{1.5}}{\ell} \cdot \mathsf{hypot}\left(1, \mathsf{hypot}\left(1, \frac{k}{t}\right)\right)\right) \cdot \sqrt{\sin k \cdot \tan k}\right)}^{2}}} \]
    8. Taylor expanded in k around 0 39.3%

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

    if 1.1200000000000001e-28 < k < 3.00000000000000013e92

    1. Initial program 48.7%

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

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

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

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

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

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

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

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

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

      \[\leadsto \frac{2}{\color{blue}{{\left(\frac{{t}^{1.5}}{\ell} \cdot \left(\mathsf{hypot}\left(1, \mathsf{hypot}\left(1, \frac{k}{t}\right)\right) \cdot \sqrt{\sin k \cdot \tan k}\right)\right)}^{2}}} \]
    6. Step-by-step derivation
      1. associate-*r*24.0%

        \[\leadsto \frac{2}{{\color{blue}{\left(\left(\frac{{t}^{1.5}}{\ell} \cdot \mathsf{hypot}\left(1, \mathsf{hypot}\left(1, \frac{k}{t}\right)\right)\right) \cdot \sqrt{\sin k \cdot \tan k}\right)}}^{2}} \]
    7. Simplified24.0%

      \[\leadsto \frac{2}{\color{blue}{{\left(\left(\frac{{t}^{1.5}}{\ell} \cdot \mathsf{hypot}\left(1, \mathsf{hypot}\left(1, \frac{k}{t}\right)\right)\right) \cdot \sqrt{\sin k \cdot \tan k}\right)}^{2}}} \]
    8. Step-by-step derivation
      1. *-un-lft-identity24.0%

        \[\leadsto \color{blue}{1 \cdot \frac{2}{{\left(\left(\frac{{t}^{1.5}}{\ell} \cdot \mathsf{hypot}\left(1, \mathsf{hypot}\left(1, \frac{k}{t}\right)\right)\right) \cdot \sqrt{\sin k \cdot \tan k}\right)}^{2}}} \]
      2. *-commutative24.0%

        \[\leadsto 1 \cdot \frac{2}{{\color{blue}{\left(\sqrt{\sin k \cdot \tan k} \cdot \left(\frac{{t}^{1.5}}{\ell} \cdot \mathsf{hypot}\left(1, \mathsf{hypot}\left(1, \frac{k}{t}\right)\right)\right)\right)}}^{2}} \]
      3. unpow-prod-down24.0%

        \[\leadsto 1 \cdot \frac{2}{\color{blue}{{\left(\sqrt{\sin k \cdot \tan k}\right)}^{2} \cdot {\left(\frac{{t}^{1.5}}{\ell} \cdot \mathsf{hypot}\left(1, \mathsf{hypot}\left(1, \frac{k}{t}\right)\right)\right)}^{2}}} \]
      4. pow224.0%

        \[\leadsto 1 \cdot \frac{2}{\color{blue}{\left(\sqrt{\sin k \cdot \tan k} \cdot \sqrt{\sin k \cdot \tan k}\right)} \cdot {\left(\frac{{t}^{1.5}}{\ell} \cdot \mathsf{hypot}\left(1, \mathsf{hypot}\left(1, \frac{k}{t}\right)\right)\right)}^{2}} \]
      5. add-sqr-sqrt55.0%

        \[\leadsto 1 \cdot \frac{2}{\color{blue}{\left(\sin k \cdot \tan k\right)} \cdot {\left(\frac{{t}^{1.5}}{\ell} \cdot \mathsf{hypot}\left(1, \mathsf{hypot}\left(1, \frac{k}{t}\right)\right)\right)}^{2}} \]
    9. Applied egg-rr55.0%

      \[\leadsto \color{blue}{1 \cdot \frac{2}{\left(\sin k \cdot \tan k\right) \cdot {\left(\frac{{t}^{1.5}}{\ell} \cdot \mathsf{hypot}\left(1, \mathsf{hypot}\left(1, \frac{k}{t}\right)\right)\right)}^{2}}} \]
    10. Step-by-step derivation
      1. *-lft-identity55.0%

        \[\leadsto \color{blue}{\frac{2}{\left(\sin k \cdot \tan k\right) \cdot {\left(\frac{{t}^{1.5}}{\ell} \cdot \mathsf{hypot}\left(1, \mathsf{hypot}\left(1, \frac{k}{t}\right)\right)\right)}^{2}}} \]
      2. associate-/r*55.1%

        \[\leadsto \color{blue}{\frac{\frac{2}{\sin k \cdot \tan k}}{{\left(\frac{{t}^{1.5}}{\ell} \cdot \mathsf{hypot}\left(1, \mathsf{hypot}\left(1, \frac{k}{t}\right)\right)\right)}^{2}}} \]
    11. Simplified55.1%

      \[\leadsto \color{blue}{\frac{\frac{2}{\sin k \cdot \tan k}}{{\left(\frac{{t}^{1.5}}{\ell} \cdot \mathsf{hypot}\left(1, \mathsf{hypot}\left(1, \frac{k}{t}\right)\right)\right)}^{2}}} \]

    if 3.00000000000000013e92 < k

    1. Initial program 51.3%

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

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

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

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

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

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

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

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

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

      \[\leadsto \frac{2}{\color{blue}{{\left(\frac{{t}^{1.5}}{\ell} \cdot \left(\mathsf{hypot}\left(1, \mathsf{hypot}\left(1, \frac{k}{t}\right)\right) \cdot \sqrt{\sin k \cdot \tan k}\right)\right)}^{2}}} \]
    6. Step-by-step derivation
      1. associate-*r*12.4%

        \[\leadsto \frac{2}{{\color{blue}{\left(\left(\frac{{t}^{1.5}}{\ell} \cdot \mathsf{hypot}\left(1, \mathsf{hypot}\left(1, \frac{k}{t}\right)\right)\right) \cdot \sqrt{\sin k \cdot \tan k}\right)}}^{2}} \]
    7. Simplified12.4%

      \[\leadsto \frac{2}{\color{blue}{{\left(\left(\frac{{t}^{1.5}}{\ell} \cdot \mathsf{hypot}\left(1, \mathsf{hypot}\left(1, \frac{k}{t}\right)\right)\right) \cdot \sqrt{\sin k \cdot \tan k}\right)}^{2}}} \]
    8. Step-by-step derivation
      1. unpow-prod-down12.4%

        \[\leadsto \frac{2}{\color{blue}{{\left(\frac{{t}^{1.5}}{\ell} \cdot \mathsf{hypot}\left(1, \mathsf{hypot}\left(1, \frac{k}{t}\right)\right)\right)}^{2} \cdot {\left(\sqrt{\sin k \cdot \tan k}\right)}^{2}}} \]
      2. pow212.4%

        \[\leadsto \frac{2}{{\left(\frac{{t}^{1.5}}{\ell} \cdot \mathsf{hypot}\left(1, \mathsf{hypot}\left(1, \frac{k}{t}\right)\right)\right)}^{2} \cdot \color{blue}{\left(\sqrt{\sin k \cdot \tan k} \cdot \sqrt{\sin k \cdot \tan k}\right)}} \]
      3. add-sqr-sqrt36.6%

        \[\leadsto \frac{2}{{\left(\frac{{t}^{1.5}}{\ell} \cdot \mathsf{hypot}\left(1, \mathsf{hypot}\left(1, \frac{k}{t}\right)\right)\right)}^{2} \cdot \color{blue}{\left(\sin k \cdot \tan k\right)}} \]
    9. Applied egg-rr36.6%

      \[\leadsto \frac{2}{\color{blue}{{\left(\frac{{t}^{1.5}}{\ell} \cdot \mathsf{hypot}\left(1, \mathsf{hypot}\left(1, \frac{k}{t}\right)\right)\right)}^{2} \cdot \left(\sin k \cdot \tan k\right)}} \]
    10. Taylor expanded in t around 0 41.5%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;k \leq 1.12 \cdot 10^{-28}:\\ \;\;\;\;\frac{2}{{\left(k \cdot \left(\frac{{t}^{1.5}}{\ell} \cdot \mathsf{hypot}\left(1, \mathsf{hypot}\left(1, \frac{k}{t}\right)\right)\right)\right)}^{2}}\\ \mathbf{elif}\;k \leq 3 \cdot 10^{+92}:\\ \;\;\;\;\frac{\frac{2}{\sin k \cdot \tan k}}{{\left(\frac{{t}^{1.5}}{\ell} \cdot \mathsf{hypot}\left(1, \mathsf{hypot}\left(1, \frac{k}{t}\right)\right)\right)}^{2}}\\ \mathbf{else}:\\ \;\;\;\;\frac{2}{\left(\sin k \cdot \tan k\right) \cdot {\left(\frac{k}{\ell} \cdot \sqrt{t}\right)}^{2}}\\ \end{array} \]
  5. Add Preprocessing

Alternative 3: 90.2% accurate, 0.7× speedup?

\[\begin{array}{l} k_m = \left|k\right| \\ t\_m = \left|t\right| \\ t\_s = \mathsf{copysign}\left(1, t\right) \\ \begin{array}{l} t_2 := \sin k\_m \cdot \tan k\_m\\ t_3 := \frac{{t\_m}^{1.5}}{\ell} \cdot \mathsf{hypot}\left(1, \mathsf{hypot}\left(1, \frac{k\_m}{t\_m}\right)\right)\\ t\_s \cdot \begin{array}{l} \mathbf{if}\;k\_m \leq 2 \cdot 10^{-28}:\\ \;\;\;\;\frac{2}{{\left(k\_m \cdot t\_3\right)}^{2}}\\ \mathbf{elif}\;k\_m \leq 4.9 \cdot 10^{+94}:\\ \;\;\;\;\frac{2}{t\_2} \cdot {t\_3}^{-2}\\ \mathbf{else}:\\ \;\;\;\;\frac{2}{t\_2 \cdot {\left(\frac{k\_m}{\ell} \cdot \sqrt{t\_m}\right)}^{2}}\\ \end{array} \end{array} \end{array} \]
k_m = (fabs.f64 k)
t\_m = (fabs.f64 t)
t\_s = (copysign.f64 #s(literal 1 binary64) t)
(FPCore (t_s t_m l k_m)
 :precision binary64
 (let* ((t_2 (* (sin k_m) (tan k_m)))
        (t_3 (* (/ (pow t_m 1.5) l) (hypot 1.0 (hypot 1.0 (/ k_m t_m))))))
   (*
    t_s
    (if (<= k_m 2e-28)
      (/ 2.0 (pow (* k_m t_3) 2.0))
      (if (<= k_m 4.9e+94)
        (* (/ 2.0 t_2) (pow t_3 -2.0))
        (/ 2.0 (* t_2 (pow (* (/ k_m l) (sqrt t_m)) 2.0))))))))
k_m = fabs(k);
t\_m = fabs(t);
t\_s = copysign(1.0, t);
double code(double t_s, double t_m, double l, double k_m) {
	double t_2 = sin(k_m) * tan(k_m);
	double t_3 = (pow(t_m, 1.5) / l) * hypot(1.0, hypot(1.0, (k_m / t_m)));
	double tmp;
	if (k_m <= 2e-28) {
		tmp = 2.0 / pow((k_m * t_3), 2.0);
	} else if (k_m <= 4.9e+94) {
		tmp = (2.0 / t_2) * pow(t_3, -2.0);
	} else {
		tmp = 2.0 / (t_2 * pow(((k_m / l) * sqrt(t_m)), 2.0));
	}
	return t_s * tmp;
}
k_m = Math.abs(k);
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_m) {
	double t_2 = Math.sin(k_m) * Math.tan(k_m);
	double t_3 = (Math.pow(t_m, 1.5) / l) * Math.hypot(1.0, Math.hypot(1.0, (k_m / t_m)));
	double tmp;
	if (k_m <= 2e-28) {
		tmp = 2.0 / Math.pow((k_m * t_3), 2.0);
	} else if (k_m <= 4.9e+94) {
		tmp = (2.0 / t_2) * Math.pow(t_3, -2.0);
	} else {
		tmp = 2.0 / (t_2 * Math.pow(((k_m / l) * Math.sqrt(t_m)), 2.0));
	}
	return t_s * tmp;
}
k_m = math.fabs(k)
t\_m = math.fabs(t)
t\_s = math.copysign(1.0, t)
def code(t_s, t_m, l, k_m):
	t_2 = math.sin(k_m) * math.tan(k_m)
	t_3 = (math.pow(t_m, 1.5) / l) * math.hypot(1.0, math.hypot(1.0, (k_m / t_m)))
	tmp = 0
	if k_m <= 2e-28:
		tmp = 2.0 / math.pow((k_m * t_3), 2.0)
	elif k_m <= 4.9e+94:
		tmp = (2.0 / t_2) * math.pow(t_3, -2.0)
	else:
		tmp = 2.0 / (t_2 * math.pow(((k_m / l) * math.sqrt(t_m)), 2.0))
	return t_s * tmp
k_m = abs(k)
t\_m = abs(t)
t\_s = copysign(1.0, t)
function code(t_s, t_m, l, k_m)
	t_2 = Float64(sin(k_m) * tan(k_m))
	t_3 = Float64(Float64((t_m ^ 1.5) / l) * hypot(1.0, hypot(1.0, Float64(k_m / t_m))))
	tmp = 0.0
	if (k_m <= 2e-28)
		tmp = Float64(2.0 / (Float64(k_m * t_3) ^ 2.0));
	elseif (k_m <= 4.9e+94)
		tmp = Float64(Float64(2.0 / t_2) * (t_3 ^ -2.0));
	else
		tmp = Float64(2.0 / Float64(t_2 * (Float64(Float64(k_m / l) * sqrt(t_m)) ^ 2.0)));
	end
	return Float64(t_s * tmp)
end
k_m = abs(k);
t\_m = abs(t);
t\_s = sign(t) * abs(1.0);
function tmp_2 = code(t_s, t_m, l, k_m)
	t_2 = sin(k_m) * tan(k_m);
	t_3 = ((t_m ^ 1.5) / l) * hypot(1.0, hypot(1.0, (k_m / t_m)));
	tmp = 0.0;
	if (k_m <= 2e-28)
		tmp = 2.0 / ((k_m * t_3) ^ 2.0);
	elseif (k_m <= 4.9e+94)
		tmp = (2.0 / t_2) * (t_3 ^ -2.0);
	else
		tmp = 2.0 / (t_2 * (((k_m / l) * sqrt(t_m)) ^ 2.0));
	end
	tmp_2 = t_s * tmp;
end
k_m = N[Abs[k], $MachinePrecision]
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$95$m_] := Block[{t$95$2 = N[(N[Sin[k$95$m], $MachinePrecision] * N[Tan[k$95$m], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(N[(N[Power[t$95$m, 1.5], $MachinePrecision] / l), $MachinePrecision] * N[Sqrt[1.0 ^ 2 + N[Sqrt[1.0 ^ 2 + N[(k$95$m / t$95$m), $MachinePrecision] ^ 2], $MachinePrecision] ^ 2], $MachinePrecision]), $MachinePrecision]}, N[(t$95$s * If[LessEqual[k$95$m, 2e-28], N[(2.0 / N[Power[N[(k$95$m * t$95$3), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision], If[LessEqual[k$95$m, 4.9e+94], N[(N[(2.0 / t$95$2), $MachinePrecision] * N[Power[t$95$3, -2.0], $MachinePrecision]), $MachinePrecision], N[(2.0 / N[(t$95$2 * N[Power[N[(N[(k$95$m / l), $MachinePrecision] * N[Sqrt[t$95$m], $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]), $MachinePrecision]]]
\begin{array}{l}
k_m = \left|k\right|
\\
t\_m = \left|t\right|
\\
t\_s = \mathsf{copysign}\left(1, t\right)

\\
\begin{array}{l}
t_2 := \sin k\_m \cdot \tan k\_m\\
t_3 := \frac{{t\_m}^{1.5}}{\ell} \cdot \mathsf{hypot}\left(1, \mathsf{hypot}\left(1, \frac{k\_m}{t\_m}\right)\right)\\
t\_s \cdot \begin{array}{l}
\mathbf{if}\;k\_m \leq 2 \cdot 10^{-28}:\\
\;\;\;\;\frac{2}{{\left(k\_m \cdot t\_3\right)}^{2}}\\

\mathbf{elif}\;k\_m \leq 4.9 \cdot 10^{+94}:\\
\;\;\;\;\frac{2}{t\_2} \cdot {t\_3}^{-2}\\

\mathbf{else}:\\
\;\;\;\;\frac{2}{t\_2 \cdot {\left(\frac{k\_m}{\ell} \cdot \sqrt{t\_m}\right)}^{2}}\\


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

    1. Initial program 58.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. Simplified58.4%

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

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

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

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

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

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

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

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

      \[\leadsto \frac{2}{\color{blue}{{\left(\frac{{t}^{1.5}}{\ell} \cdot \left(\mathsf{hypot}\left(1, \mathsf{hypot}\left(1, \frac{k}{t}\right)\right) \cdot \sqrt{\sin k \cdot \tan k}\right)\right)}^{2}}} \]
    6. Step-by-step derivation
      1. associate-*r*33.3%

        \[\leadsto \frac{2}{{\color{blue}{\left(\left(\frac{{t}^{1.5}}{\ell} \cdot \mathsf{hypot}\left(1, \mathsf{hypot}\left(1, \frac{k}{t}\right)\right)\right) \cdot \sqrt{\sin k \cdot \tan k}\right)}}^{2}} \]
    7. Simplified33.3%

      \[\leadsto \frac{2}{\color{blue}{{\left(\left(\frac{{t}^{1.5}}{\ell} \cdot \mathsf{hypot}\left(1, \mathsf{hypot}\left(1, \frac{k}{t}\right)\right)\right) \cdot \sqrt{\sin k \cdot \tan k}\right)}^{2}}} \]
    8. Taylor expanded in k around 0 39.3%

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

    if 1.99999999999999994e-28 < k < 4.8999999999999999e94

    1. Initial program 48.7%

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

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

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

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

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

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

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

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

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

      \[\leadsto \frac{2}{\color{blue}{{\left(\frac{{t}^{1.5}}{\ell} \cdot \left(\mathsf{hypot}\left(1, \mathsf{hypot}\left(1, \frac{k}{t}\right)\right) \cdot \sqrt{\sin k \cdot \tan k}\right)\right)}^{2}}} \]
    6. Step-by-step derivation
      1. associate-*r*24.0%

        \[\leadsto \frac{2}{{\color{blue}{\left(\left(\frac{{t}^{1.5}}{\ell} \cdot \mathsf{hypot}\left(1, \mathsf{hypot}\left(1, \frac{k}{t}\right)\right)\right) \cdot \sqrt{\sin k \cdot \tan k}\right)}}^{2}} \]
    7. Simplified24.0%

      \[\leadsto \frac{2}{\color{blue}{{\left(\left(\frac{{t}^{1.5}}{\ell} \cdot \mathsf{hypot}\left(1, \mathsf{hypot}\left(1, \frac{k}{t}\right)\right)\right) \cdot \sqrt{\sin k \cdot \tan k}\right)}^{2}}} \]
    8. Step-by-step derivation
      1. unpow-prod-down24.0%

        \[\leadsto \frac{2}{\color{blue}{{\left(\frac{{t}^{1.5}}{\ell} \cdot \mathsf{hypot}\left(1, \mathsf{hypot}\left(1, \frac{k}{t}\right)\right)\right)}^{2} \cdot {\left(\sqrt{\sin k \cdot \tan k}\right)}^{2}}} \]
      2. pow224.0%

        \[\leadsto \frac{2}{{\left(\frac{{t}^{1.5}}{\ell} \cdot \mathsf{hypot}\left(1, \mathsf{hypot}\left(1, \frac{k}{t}\right)\right)\right)}^{2} \cdot \color{blue}{\left(\sqrt{\sin k \cdot \tan k} \cdot \sqrt{\sin k \cdot \tan k}\right)}} \]
      3. add-sqr-sqrt55.0%

        \[\leadsto \frac{2}{{\left(\frac{{t}^{1.5}}{\ell} \cdot \mathsf{hypot}\left(1, \mathsf{hypot}\left(1, \frac{k}{t}\right)\right)\right)}^{2} \cdot \color{blue}{\left(\sin k \cdot \tan k\right)}} \]
    9. Applied egg-rr55.0%

      \[\leadsto \frac{2}{\color{blue}{{\left(\frac{{t}^{1.5}}{\ell} \cdot \mathsf{hypot}\left(1, \mathsf{hypot}\left(1, \frac{k}{t}\right)\right)\right)}^{2} \cdot \left(\sin k \cdot \tan k\right)}} \]
    10. Step-by-step derivation
      1. associate-/l/55.1%

        \[\leadsto \color{blue}{\frac{\frac{2}{\sin k \cdot \tan k}}{{\left(\frac{{t}^{1.5}}{\ell} \cdot \mathsf{hypot}\left(1, \mathsf{hypot}\left(1, \frac{k}{t}\right)\right)\right)}^{2}}} \]
      2. *-un-lft-identity55.1%

        \[\leadsto \color{blue}{1 \cdot \frac{\frac{2}{\sin k \cdot \tan k}}{{\left(\frac{{t}^{1.5}}{\ell} \cdot \mathsf{hypot}\left(1, \mathsf{hypot}\left(1, \frac{k}{t}\right)\right)\right)}^{2}}} \]
      3. div-inv55.1%

        \[\leadsto 1 \cdot \color{blue}{\left(\frac{2}{\sin k \cdot \tan k} \cdot \frac{1}{{\left(\frac{{t}^{1.5}}{\ell} \cdot \mathsf{hypot}\left(1, \mathsf{hypot}\left(1, \frac{k}{t}\right)\right)\right)}^{2}}\right)} \]
      4. pow-flip55.1%

        \[\leadsto 1 \cdot \left(\frac{2}{\sin k \cdot \tan k} \cdot \color{blue}{{\left(\frac{{t}^{1.5}}{\ell} \cdot \mathsf{hypot}\left(1, \mathsf{hypot}\left(1, \frac{k}{t}\right)\right)\right)}^{\left(-2\right)}}\right) \]
      5. metadata-eval55.1%

        \[\leadsto 1 \cdot \left(\frac{2}{\sin k \cdot \tan k} \cdot {\left(\frac{{t}^{1.5}}{\ell} \cdot \mathsf{hypot}\left(1, \mathsf{hypot}\left(1, \frac{k}{t}\right)\right)\right)}^{\color{blue}{-2}}\right) \]
    11. Applied egg-rr55.1%

      \[\leadsto \color{blue}{1 \cdot \left(\frac{2}{\sin k \cdot \tan k} \cdot {\left(\frac{{t}^{1.5}}{\ell} \cdot \mathsf{hypot}\left(1, \mathsf{hypot}\left(1, \frac{k}{t}\right)\right)\right)}^{-2}\right)} \]
    12. Step-by-step derivation
      1. *-lft-identity55.1%

        \[\leadsto \color{blue}{\frac{2}{\sin k \cdot \tan k} \cdot {\left(\frac{{t}^{1.5}}{\ell} \cdot \mathsf{hypot}\left(1, \mathsf{hypot}\left(1, \frac{k}{t}\right)\right)\right)}^{-2}} \]
    13. Simplified55.1%

      \[\leadsto \color{blue}{\frac{2}{\sin k \cdot \tan k} \cdot {\left(\frac{{t}^{1.5}}{\ell} \cdot \mathsf{hypot}\left(1, \mathsf{hypot}\left(1, \frac{k}{t}\right)\right)\right)}^{-2}} \]

    if 4.8999999999999999e94 < k

    1. Initial program 51.3%

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

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

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

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

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

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

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

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

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

      \[\leadsto \frac{2}{\color{blue}{{\left(\frac{{t}^{1.5}}{\ell} \cdot \left(\mathsf{hypot}\left(1, \mathsf{hypot}\left(1, \frac{k}{t}\right)\right) \cdot \sqrt{\sin k \cdot \tan k}\right)\right)}^{2}}} \]
    6. Step-by-step derivation
      1. associate-*r*12.4%

        \[\leadsto \frac{2}{{\color{blue}{\left(\left(\frac{{t}^{1.5}}{\ell} \cdot \mathsf{hypot}\left(1, \mathsf{hypot}\left(1, \frac{k}{t}\right)\right)\right) \cdot \sqrt{\sin k \cdot \tan k}\right)}}^{2}} \]
    7. Simplified12.4%

      \[\leadsto \frac{2}{\color{blue}{{\left(\left(\frac{{t}^{1.5}}{\ell} \cdot \mathsf{hypot}\left(1, \mathsf{hypot}\left(1, \frac{k}{t}\right)\right)\right) \cdot \sqrt{\sin k \cdot \tan k}\right)}^{2}}} \]
    8. Step-by-step derivation
      1. unpow-prod-down12.4%

        \[\leadsto \frac{2}{\color{blue}{{\left(\frac{{t}^{1.5}}{\ell} \cdot \mathsf{hypot}\left(1, \mathsf{hypot}\left(1, \frac{k}{t}\right)\right)\right)}^{2} \cdot {\left(\sqrt{\sin k \cdot \tan k}\right)}^{2}}} \]
      2. pow212.4%

        \[\leadsto \frac{2}{{\left(\frac{{t}^{1.5}}{\ell} \cdot \mathsf{hypot}\left(1, \mathsf{hypot}\left(1, \frac{k}{t}\right)\right)\right)}^{2} \cdot \color{blue}{\left(\sqrt{\sin k \cdot \tan k} \cdot \sqrt{\sin k \cdot \tan k}\right)}} \]
      3. add-sqr-sqrt36.6%

        \[\leadsto \frac{2}{{\left(\frac{{t}^{1.5}}{\ell} \cdot \mathsf{hypot}\left(1, \mathsf{hypot}\left(1, \frac{k}{t}\right)\right)\right)}^{2} \cdot \color{blue}{\left(\sin k \cdot \tan k\right)}} \]
    9. Applied egg-rr36.6%

      \[\leadsto \frac{2}{\color{blue}{{\left(\frac{{t}^{1.5}}{\ell} \cdot \mathsf{hypot}\left(1, \mathsf{hypot}\left(1, \frac{k}{t}\right)\right)\right)}^{2} \cdot \left(\sin k \cdot \tan k\right)}} \]
    10. Taylor expanded in t around 0 41.5%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;k \leq 2 \cdot 10^{-28}:\\ \;\;\;\;\frac{2}{{\left(k \cdot \left(\frac{{t}^{1.5}}{\ell} \cdot \mathsf{hypot}\left(1, \mathsf{hypot}\left(1, \frac{k}{t}\right)\right)\right)\right)}^{2}}\\ \mathbf{elif}\;k \leq 4.9 \cdot 10^{+94}:\\ \;\;\;\;\frac{2}{\sin k \cdot \tan k} \cdot {\left(\frac{{t}^{1.5}}{\ell} \cdot \mathsf{hypot}\left(1, \mathsf{hypot}\left(1, \frac{k}{t}\right)\right)\right)}^{-2}\\ \mathbf{else}:\\ \;\;\;\;\frac{2}{\left(\sin k \cdot \tan k\right) \cdot {\left(\frac{k}{\ell} \cdot \sqrt{t}\right)}^{2}}\\ \end{array} \]
  5. Add Preprocessing

Alternative 4: 88.9% accurate, 1.0× speedup?

\[\begin{array}{l} k_m = \left|k\right| \\ t\_m = \left|t\right| \\ t\_s = \mathsf{copysign}\left(1, t\right) \\ t\_s \cdot \begin{array}{l} \mathbf{if}\;k\_m \leq 8100000000:\\ \;\;\;\;\frac{2}{{\left(k\_m \cdot \left(\frac{{t\_m}^{1.5}}{\ell} \cdot \mathsf{hypot}\left(1, \mathsf{hypot}\left(1, \frac{k\_m}{t\_m}\right)\right)\right)\right)}^{2}}\\ \mathbf{else}:\\ \;\;\;\;\frac{2}{\left(\sin k\_m \cdot \tan k\_m\right) \cdot {\left(\frac{k\_m}{\ell} \cdot \sqrt{t\_m}\right)}^{2}}\\ \end{array} \end{array} \]
k_m = (fabs.f64 k)
t\_m = (fabs.f64 t)
t\_s = (copysign.f64 #s(literal 1 binary64) t)
(FPCore (t_s t_m l k_m)
 :precision binary64
 (*
  t_s
  (if (<= k_m 8100000000.0)
    (/
     2.0
     (pow
      (* k_m (* (/ (pow t_m 1.5) l) (hypot 1.0 (hypot 1.0 (/ k_m t_m)))))
      2.0))
    (/ 2.0 (* (* (sin k_m) (tan k_m)) (pow (* (/ k_m l) (sqrt t_m)) 2.0))))))
k_m = fabs(k);
t\_m = fabs(t);
t\_s = copysign(1.0, t);
double code(double t_s, double t_m, double l, double k_m) {
	double tmp;
	if (k_m <= 8100000000.0) {
		tmp = 2.0 / pow((k_m * ((pow(t_m, 1.5) / l) * hypot(1.0, hypot(1.0, (k_m / t_m))))), 2.0);
	} else {
		tmp = 2.0 / ((sin(k_m) * tan(k_m)) * pow(((k_m / l) * sqrt(t_m)), 2.0));
	}
	return t_s * tmp;
}
k_m = Math.abs(k);
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_m) {
	double tmp;
	if (k_m <= 8100000000.0) {
		tmp = 2.0 / Math.pow((k_m * ((Math.pow(t_m, 1.5) / l) * Math.hypot(1.0, Math.hypot(1.0, (k_m / t_m))))), 2.0);
	} else {
		tmp = 2.0 / ((Math.sin(k_m) * Math.tan(k_m)) * Math.pow(((k_m / l) * Math.sqrt(t_m)), 2.0));
	}
	return t_s * tmp;
}
k_m = math.fabs(k)
t\_m = math.fabs(t)
t\_s = math.copysign(1.0, t)
def code(t_s, t_m, l, k_m):
	tmp = 0
	if k_m <= 8100000000.0:
		tmp = 2.0 / math.pow((k_m * ((math.pow(t_m, 1.5) / l) * math.hypot(1.0, math.hypot(1.0, (k_m / t_m))))), 2.0)
	else:
		tmp = 2.0 / ((math.sin(k_m) * math.tan(k_m)) * math.pow(((k_m / l) * math.sqrt(t_m)), 2.0))
	return t_s * tmp
k_m = abs(k)
t\_m = abs(t)
t\_s = copysign(1.0, t)
function code(t_s, t_m, l, k_m)
	tmp = 0.0
	if (k_m <= 8100000000.0)
		tmp = Float64(2.0 / (Float64(k_m * Float64(Float64((t_m ^ 1.5) / l) * hypot(1.0, hypot(1.0, Float64(k_m / t_m))))) ^ 2.0));
	else
		tmp = Float64(2.0 / Float64(Float64(sin(k_m) * tan(k_m)) * (Float64(Float64(k_m / l) * sqrt(t_m)) ^ 2.0)));
	end
	return Float64(t_s * tmp)
end
k_m = abs(k);
t\_m = abs(t);
t\_s = sign(t) * abs(1.0);
function tmp_2 = code(t_s, t_m, l, k_m)
	tmp = 0.0;
	if (k_m <= 8100000000.0)
		tmp = 2.0 / ((k_m * (((t_m ^ 1.5) / l) * hypot(1.0, hypot(1.0, (k_m / t_m))))) ^ 2.0);
	else
		tmp = 2.0 / ((sin(k_m) * tan(k_m)) * (((k_m / l) * sqrt(t_m)) ^ 2.0));
	end
	tmp_2 = t_s * tmp;
end
k_m = N[Abs[k], $MachinePrecision]
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$95$m_] := N[(t$95$s * If[LessEqual[k$95$m, 8100000000.0], N[(2.0 / N[Power[N[(k$95$m * N[(N[(N[Power[t$95$m, 1.5], $MachinePrecision] / l), $MachinePrecision] * N[Sqrt[1.0 ^ 2 + N[Sqrt[1.0 ^ 2 + N[(k$95$m / t$95$m), $MachinePrecision] ^ 2], $MachinePrecision] ^ 2], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision], N[(2.0 / N[(N[(N[Sin[k$95$m], $MachinePrecision] * N[Tan[k$95$m], $MachinePrecision]), $MachinePrecision] * N[Power[N[(N[(k$95$m / l), $MachinePrecision] * N[Sqrt[t$95$m], $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]), $MachinePrecision]
\begin{array}{l}
k_m = \left|k\right|
\\
t\_m = \left|t\right|
\\
t\_s = \mathsf{copysign}\left(1, t\right)

\\
t\_s \cdot \begin{array}{l}
\mathbf{if}\;k\_m \leq 8100000000:\\
\;\;\;\;\frac{2}{{\left(k\_m \cdot \left(\frac{{t\_m}^{1.5}}{\ell} \cdot \mathsf{hypot}\left(1, \mathsf{hypot}\left(1, \frac{k\_m}{t\_m}\right)\right)\right)\right)}^{2}}\\

\mathbf{else}:\\
\;\;\;\;\frac{2}{\left(\sin k\_m \cdot \tan k\_m\right) \cdot {\left(\frac{k\_m}{\ell} \cdot \sqrt{t\_m}\right)}^{2}}\\


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

    1. Initial program 58.1%

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

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

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

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

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

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

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

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

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

      \[\leadsto \frac{2}{\color{blue}{{\left(\frac{{t}^{1.5}}{\ell} \cdot \left(\mathsf{hypot}\left(1, \mathsf{hypot}\left(1, \frac{k}{t}\right)\right) \cdot \sqrt{\sin k \cdot \tan k}\right)\right)}^{2}}} \]
    6. Step-by-step derivation
      1. associate-*r*33.9%

        \[\leadsto \frac{2}{{\color{blue}{\left(\left(\frac{{t}^{1.5}}{\ell} \cdot \mathsf{hypot}\left(1, \mathsf{hypot}\left(1, \frac{k}{t}\right)\right)\right) \cdot \sqrt{\sin k \cdot \tan k}\right)}}^{2}} \]
    7. Simplified33.9%

      \[\leadsto \frac{2}{\color{blue}{{\left(\left(\frac{{t}^{1.5}}{\ell} \cdot \mathsf{hypot}\left(1, \mathsf{hypot}\left(1, \frac{k}{t}\right)\right)\right) \cdot \sqrt{\sin k \cdot \tan k}\right)}^{2}}} \]
    8. Taylor expanded in k around 0 39.7%

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

    if 8.1e9 < k

    1. Initial program 50.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. Simplified50.2%

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

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

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

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

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

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

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

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

      \[\leadsto \frac{2}{\color{blue}{{\left(\frac{{t}^{1.5}}{\ell} \cdot \left(\mathsf{hypot}\left(1, \mathsf{hypot}\left(1, \frac{k}{t}\right)\right) \cdot \sqrt{\sin k \cdot \tan k}\right)\right)}^{2}}} \]
    6. Step-by-step derivation
      1. associate-*r*14.1%

        \[\leadsto \frac{2}{{\color{blue}{\left(\left(\frac{{t}^{1.5}}{\ell} \cdot \mathsf{hypot}\left(1, \mathsf{hypot}\left(1, \frac{k}{t}\right)\right)\right) \cdot \sqrt{\sin k \cdot \tan k}\right)}}^{2}} \]
    7. Simplified14.1%

      \[\leadsto \frac{2}{\color{blue}{{\left(\left(\frac{{t}^{1.5}}{\ell} \cdot \mathsf{hypot}\left(1, \mathsf{hypot}\left(1, \frac{k}{t}\right)\right)\right) \cdot \sqrt{\sin k \cdot \tan k}\right)}^{2}}} \]
    8. Step-by-step derivation
      1. unpow-prod-down14.1%

        \[\leadsto \frac{2}{\color{blue}{{\left(\frac{{t}^{1.5}}{\ell} \cdot \mathsf{hypot}\left(1, \mathsf{hypot}\left(1, \frac{k}{t}\right)\right)\right)}^{2} \cdot {\left(\sqrt{\sin k \cdot \tan k}\right)}^{2}}} \]
      2. pow214.1%

        \[\leadsto \frac{2}{{\left(\frac{{t}^{1.5}}{\ell} \cdot \mathsf{hypot}\left(1, \mathsf{hypot}\left(1, \frac{k}{t}\right)\right)\right)}^{2} \cdot \color{blue}{\left(\sqrt{\sin k \cdot \tan k} \cdot \sqrt{\sin k \cdot \tan k}\right)}} \]
      3. add-sqr-sqrt43.7%

        \[\leadsto \frac{2}{{\left(\frac{{t}^{1.5}}{\ell} \cdot \mathsf{hypot}\left(1, \mathsf{hypot}\left(1, \frac{k}{t}\right)\right)\right)}^{2} \cdot \color{blue}{\left(\sin k \cdot \tan k\right)}} \]
    9. Applied egg-rr43.7%

      \[\leadsto \frac{2}{\color{blue}{{\left(\frac{{t}^{1.5}}{\ell} \cdot \mathsf{hypot}\left(1, \mathsf{hypot}\left(1, \frac{k}{t}\right)\right)\right)}^{2} \cdot \left(\sin k \cdot \tan k\right)}} \]
    10. Taylor expanded in t around 0 39.4%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;k \leq 8100000000:\\ \;\;\;\;\frac{2}{{\left(k \cdot \left(\frac{{t}^{1.5}}{\ell} \cdot \mathsf{hypot}\left(1, \mathsf{hypot}\left(1, \frac{k}{t}\right)\right)\right)\right)}^{2}}\\ \mathbf{else}:\\ \;\;\;\;\frac{2}{\left(\sin k \cdot \tan k\right) \cdot {\left(\frac{k}{\ell} \cdot \sqrt{t}\right)}^{2}}\\ \end{array} \]
  5. Add Preprocessing

Alternative 5: 82.2% accurate, 1.0× speedup?

\[\begin{array}{l} k_m = \left|k\right| \\ t\_m = \left|t\right| \\ t\_s = \mathsf{copysign}\left(1, t\right) \\ t\_s \cdot \begin{array}{l} \mathbf{if}\;t\_m \leq 4.8 \cdot 10^{+90}:\\ \;\;\;\;\frac{\frac{2}{\sin k\_m \cdot \tan k\_m}}{{\left(\frac{k\_m \cdot \sqrt{t\_m}}{\ell}\right)}^{2}}\\ \mathbf{else}:\\ \;\;\;\;\frac{2}{\left(\sin k\_m \cdot \left(\frac{t\_m}{\ell} \cdot \frac{{t\_m}^{2}}{\ell}\right)\right) \cdot \left(2 \cdot \tan k\_m\right)}\\ \end{array} \end{array} \]
k_m = (fabs.f64 k)
t\_m = (fabs.f64 t)
t\_s = (copysign.f64 #s(literal 1 binary64) t)
(FPCore (t_s t_m l k_m)
 :precision binary64
 (*
  t_s
  (if (<= t_m 4.8e+90)
    (/ (/ 2.0 (* (sin k_m) (tan k_m))) (pow (/ (* k_m (sqrt t_m)) l) 2.0))
    (/
     2.0
     (* (* (sin k_m) (* (/ t_m l) (/ (pow t_m 2.0) l))) (* 2.0 (tan k_m)))))))
k_m = fabs(k);
t\_m = fabs(t);
t\_s = copysign(1.0, t);
double code(double t_s, double t_m, double l, double k_m) {
	double tmp;
	if (t_m <= 4.8e+90) {
		tmp = (2.0 / (sin(k_m) * tan(k_m))) / pow(((k_m * sqrt(t_m)) / l), 2.0);
	} else {
		tmp = 2.0 / ((sin(k_m) * ((t_m / l) * (pow(t_m, 2.0) / l))) * (2.0 * tan(k_m)));
	}
	return t_s * tmp;
}
k_m = abs(k)
t\_m = abs(t)
t\_s = copysign(1.0d0, t)
real(8) function code(t_s, t_m, l, k_m)
    real(8), intent (in) :: t_s
    real(8), intent (in) :: t_m
    real(8), intent (in) :: l
    real(8), intent (in) :: k_m
    real(8) :: tmp
    if (t_m <= 4.8d+90) then
        tmp = (2.0d0 / (sin(k_m) * tan(k_m))) / (((k_m * sqrt(t_m)) / l) ** 2.0d0)
    else
        tmp = 2.0d0 / ((sin(k_m) * ((t_m / l) * ((t_m ** 2.0d0) / l))) * (2.0d0 * tan(k_m)))
    end if
    code = t_s * tmp
end function
k_m = Math.abs(k);
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_m) {
	double tmp;
	if (t_m <= 4.8e+90) {
		tmp = (2.0 / (Math.sin(k_m) * Math.tan(k_m))) / Math.pow(((k_m * Math.sqrt(t_m)) / l), 2.0);
	} else {
		tmp = 2.0 / ((Math.sin(k_m) * ((t_m / l) * (Math.pow(t_m, 2.0) / l))) * (2.0 * Math.tan(k_m)));
	}
	return t_s * tmp;
}
k_m = math.fabs(k)
t\_m = math.fabs(t)
t\_s = math.copysign(1.0, t)
def code(t_s, t_m, l, k_m):
	tmp = 0
	if t_m <= 4.8e+90:
		tmp = (2.0 / (math.sin(k_m) * math.tan(k_m))) / math.pow(((k_m * math.sqrt(t_m)) / l), 2.0)
	else:
		tmp = 2.0 / ((math.sin(k_m) * ((t_m / l) * (math.pow(t_m, 2.0) / l))) * (2.0 * math.tan(k_m)))
	return t_s * tmp
k_m = abs(k)
t\_m = abs(t)
t\_s = copysign(1.0, t)
function code(t_s, t_m, l, k_m)
	tmp = 0.0
	if (t_m <= 4.8e+90)
		tmp = Float64(Float64(2.0 / Float64(sin(k_m) * tan(k_m))) / (Float64(Float64(k_m * sqrt(t_m)) / l) ^ 2.0));
	else
		tmp = Float64(2.0 / Float64(Float64(sin(k_m) * Float64(Float64(t_m / l) * Float64((t_m ^ 2.0) / l))) * Float64(2.0 * tan(k_m))));
	end
	return Float64(t_s * tmp)
end
k_m = abs(k);
t\_m = abs(t);
t\_s = sign(t) * abs(1.0);
function tmp_2 = code(t_s, t_m, l, k_m)
	tmp = 0.0;
	if (t_m <= 4.8e+90)
		tmp = (2.0 / (sin(k_m) * tan(k_m))) / (((k_m * sqrt(t_m)) / l) ^ 2.0);
	else
		tmp = 2.0 / ((sin(k_m) * ((t_m / l) * ((t_m ^ 2.0) / l))) * (2.0 * tan(k_m)));
	end
	tmp_2 = t_s * tmp;
end
k_m = N[Abs[k], $MachinePrecision]
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$95$m_] := N[(t$95$s * If[LessEqual[t$95$m, 4.8e+90], N[(N[(2.0 / N[(N[Sin[k$95$m], $MachinePrecision] * N[Tan[k$95$m], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[Power[N[(N[(k$95$m * N[Sqrt[t$95$m], $MachinePrecision]), $MachinePrecision] / l), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision], N[(2.0 / N[(N[(N[Sin[k$95$m], $MachinePrecision] * N[(N[(t$95$m / l), $MachinePrecision] * N[(N[Power[t$95$m, 2.0], $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(2.0 * N[Tan[k$95$m], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]), $MachinePrecision]
\begin{array}{l}
k_m = \left|k\right|
\\
t\_m = \left|t\right|
\\
t\_s = \mathsf{copysign}\left(1, t\right)

\\
t\_s \cdot \begin{array}{l}
\mathbf{if}\;t\_m \leq 4.8 \cdot 10^{+90}:\\
\;\;\;\;\frac{\frac{2}{\sin k\_m \cdot \tan k\_m}}{{\left(\frac{k\_m \cdot \sqrt{t\_m}}{\ell}\right)}^{2}}\\

\mathbf{else}:\\
\;\;\;\;\frac{2}{\left(\sin k\_m \cdot \left(\frac{t\_m}{\ell} \cdot \frac{{t\_m}^{2}}{\ell}\right)\right) \cdot \left(2 \cdot \tan k\_m\right)}\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t < 4.8000000000000002e90

    1. Initial program 54.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. Simplified54.4%

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

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

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

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

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

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

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

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

      \[\leadsto \frac{2}{\color{blue}{{\left(\frac{{t}^{1.5}}{\ell} \cdot \left(\mathsf{hypot}\left(1, \mathsf{hypot}\left(1, \frac{k}{t}\right)\right) \cdot \sqrt{\sin k \cdot \tan k}\right)\right)}^{2}}} \]
    6. Step-by-step derivation
      1. associate-*r*22.2%

        \[\leadsto \frac{2}{{\color{blue}{\left(\left(\frac{{t}^{1.5}}{\ell} \cdot \mathsf{hypot}\left(1, \mathsf{hypot}\left(1, \frac{k}{t}\right)\right)\right) \cdot \sqrt{\sin k \cdot \tan k}\right)}}^{2}} \]
    7. Simplified22.2%

      \[\leadsto \frac{2}{\color{blue}{{\left(\left(\frac{{t}^{1.5}}{\ell} \cdot \mathsf{hypot}\left(1, \mathsf{hypot}\left(1, \frac{k}{t}\right)\right)\right) \cdot \sqrt{\sin k \cdot \tan k}\right)}^{2}}} \]
    8. Step-by-step derivation
      1. *-un-lft-identity22.2%

        \[\leadsto \color{blue}{1 \cdot \frac{2}{{\left(\left(\frac{{t}^{1.5}}{\ell} \cdot \mathsf{hypot}\left(1, \mathsf{hypot}\left(1, \frac{k}{t}\right)\right)\right) \cdot \sqrt{\sin k \cdot \tan k}\right)}^{2}}} \]
      2. *-commutative22.2%

        \[\leadsto 1 \cdot \frac{2}{{\color{blue}{\left(\sqrt{\sin k \cdot \tan k} \cdot \left(\frac{{t}^{1.5}}{\ell} \cdot \mathsf{hypot}\left(1, \mathsf{hypot}\left(1, \frac{k}{t}\right)\right)\right)\right)}}^{2}} \]
      3. unpow-prod-down21.7%

        \[\leadsto 1 \cdot \frac{2}{\color{blue}{{\left(\sqrt{\sin k \cdot \tan k}\right)}^{2} \cdot {\left(\frac{{t}^{1.5}}{\ell} \cdot \mathsf{hypot}\left(1, \mathsf{hypot}\left(1, \frac{k}{t}\right)\right)\right)}^{2}}} \]
      4. pow221.7%

        \[\leadsto 1 \cdot \frac{2}{\color{blue}{\left(\sqrt{\sin k \cdot \tan k} \cdot \sqrt{\sin k \cdot \tan k}\right)} \cdot {\left(\frac{{t}^{1.5}}{\ell} \cdot \mathsf{hypot}\left(1, \mathsf{hypot}\left(1, \frac{k}{t}\right)\right)\right)}^{2}} \]
      5. add-sqr-sqrt29.7%

        \[\leadsto 1 \cdot \frac{2}{\color{blue}{\left(\sin k \cdot \tan k\right)} \cdot {\left(\frac{{t}^{1.5}}{\ell} \cdot \mathsf{hypot}\left(1, \mathsf{hypot}\left(1, \frac{k}{t}\right)\right)\right)}^{2}} \]
    9. Applied egg-rr29.7%

      \[\leadsto \color{blue}{1 \cdot \frac{2}{\left(\sin k \cdot \tan k\right) \cdot {\left(\frac{{t}^{1.5}}{\ell} \cdot \mathsf{hypot}\left(1, \mathsf{hypot}\left(1, \frac{k}{t}\right)\right)\right)}^{2}}} \]
    10. Step-by-step derivation
      1. *-lft-identity29.7%

        \[\leadsto \color{blue}{\frac{2}{\left(\sin k \cdot \tan k\right) \cdot {\left(\frac{{t}^{1.5}}{\ell} \cdot \mathsf{hypot}\left(1, \mathsf{hypot}\left(1, \frac{k}{t}\right)\right)\right)}^{2}}} \]
      2. associate-/r*29.7%

        \[\leadsto \color{blue}{\frac{\frac{2}{\sin k \cdot \tan k}}{{\left(\frac{{t}^{1.5}}{\ell} \cdot \mathsf{hypot}\left(1, \mathsf{hypot}\left(1, \frac{k}{t}\right)\right)\right)}^{2}}} \]
    11. Simplified29.7%

      \[\leadsto \color{blue}{\frac{\frac{2}{\sin k \cdot \tan k}}{{\left(\frac{{t}^{1.5}}{\ell} \cdot \mathsf{hypot}\left(1, \mathsf{hypot}\left(1, \frac{k}{t}\right)\right)\right)}^{2}}} \]
    12. Taylor expanded in t around 0 32.5%

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

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

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

    if 4.8000000000000002e90 < t

    1. Initial program 64.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. Simplified64.5%

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq 4.8 \cdot 10^{+90}:\\ \;\;\;\;\frac{\frac{2}{\sin k \cdot \tan k}}{{\left(\frac{k \cdot \sqrt{t}}{\ell}\right)}^{2}}\\ \mathbf{else}:\\ \;\;\;\;\frac{2}{\left(\sin k \cdot \left(\frac{t}{\ell} \cdot \frac{{t}^{2}}{\ell}\right)\right) \cdot \left(2 \cdot \tan k\right)}\\ \end{array} \]
  5. Add Preprocessing

Alternative 6: 82.4% accurate, 1.0× speedup?

\[\begin{array}{l} k_m = \left|k\right| \\ t\_m = \left|t\right| \\ t\_s = \mathsf{copysign}\left(1, t\right) \\ t\_s \cdot \begin{array}{l} \mathbf{if}\;t\_m \leq 6.6 \cdot 10^{+89}:\\ \;\;\;\;\frac{2}{\left(\sin k\_m \cdot \tan k\_m\right) \cdot {\left(\frac{k\_m}{\ell} \cdot \sqrt{t\_m}\right)}^{2}}\\ \mathbf{else}:\\ \;\;\;\;\frac{2}{\left(\sin k\_m \cdot \left(\frac{t\_m}{\ell} \cdot \frac{{t\_m}^{2}}{\ell}\right)\right) \cdot \left(2 \cdot \tan k\_m\right)}\\ \end{array} \end{array} \]
k_m = (fabs.f64 k)
t\_m = (fabs.f64 t)
t\_s = (copysign.f64 #s(literal 1 binary64) t)
(FPCore (t_s t_m l k_m)
 :precision binary64
 (*
  t_s
  (if (<= t_m 6.6e+89)
    (/ 2.0 (* (* (sin k_m) (tan k_m)) (pow (* (/ k_m l) (sqrt t_m)) 2.0)))
    (/
     2.0
     (* (* (sin k_m) (* (/ t_m l) (/ (pow t_m 2.0) l))) (* 2.0 (tan k_m)))))))
k_m = fabs(k);
t\_m = fabs(t);
t\_s = copysign(1.0, t);
double code(double t_s, double t_m, double l, double k_m) {
	double tmp;
	if (t_m <= 6.6e+89) {
		tmp = 2.0 / ((sin(k_m) * tan(k_m)) * pow(((k_m / l) * sqrt(t_m)), 2.0));
	} else {
		tmp = 2.0 / ((sin(k_m) * ((t_m / l) * (pow(t_m, 2.0) / l))) * (2.0 * tan(k_m)));
	}
	return t_s * tmp;
}
k_m = abs(k)
t\_m = abs(t)
t\_s = copysign(1.0d0, t)
real(8) function code(t_s, t_m, l, k_m)
    real(8), intent (in) :: t_s
    real(8), intent (in) :: t_m
    real(8), intent (in) :: l
    real(8), intent (in) :: k_m
    real(8) :: tmp
    if (t_m <= 6.6d+89) then
        tmp = 2.0d0 / ((sin(k_m) * tan(k_m)) * (((k_m / l) * sqrt(t_m)) ** 2.0d0))
    else
        tmp = 2.0d0 / ((sin(k_m) * ((t_m / l) * ((t_m ** 2.0d0) / l))) * (2.0d0 * tan(k_m)))
    end if
    code = t_s * tmp
end function
k_m = Math.abs(k);
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_m) {
	double tmp;
	if (t_m <= 6.6e+89) {
		tmp = 2.0 / ((Math.sin(k_m) * Math.tan(k_m)) * Math.pow(((k_m / l) * Math.sqrt(t_m)), 2.0));
	} else {
		tmp = 2.0 / ((Math.sin(k_m) * ((t_m / l) * (Math.pow(t_m, 2.0) / l))) * (2.0 * Math.tan(k_m)));
	}
	return t_s * tmp;
}
k_m = math.fabs(k)
t\_m = math.fabs(t)
t\_s = math.copysign(1.0, t)
def code(t_s, t_m, l, k_m):
	tmp = 0
	if t_m <= 6.6e+89:
		tmp = 2.0 / ((math.sin(k_m) * math.tan(k_m)) * math.pow(((k_m / l) * math.sqrt(t_m)), 2.0))
	else:
		tmp = 2.0 / ((math.sin(k_m) * ((t_m / l) * (math.pow(t_m, 2.0) / l))) * (2.0 * math.tan(k_m)))
	return t_s * tmp
k_m = abs(k)
t\_m = abs(t)
t\_s = copysign(1.0, t)
function code(t_s, t_m, l, k_m)
	tmp = 0.0
	if (t_m <= 6.6e+89)
		tmp = Float64(2.0 / Float64(Float64(sin(k_m) * tan(k_m)) * (Float64(Float64(k_m / l) * sqrt(t_m)) ^ 2.0)));
	else
		tmp = Float64(2.0 / Float64(Float64(sin(k_m) * Float64(Float64(t_m / l) * Float64((t_m ^ 2.0) / l))) * Float64(2.0 * tan(k_m))));
	end
	return Float64(t_s * tmp)
end
k_m = abs(k);
t\_m = abs(t);
t\_s = sign(t) * abs(1.0);
function tmp_2 = code(t_s, t_m, l, k_m)
	tmp = 0.0;
	if (t_m <= 6.6e+89)
		tmp = 2.0 / ((sin(k_m) * tan(k_m)) * (((k_m / l) * sqrt(t_m)) ^ 2.0));
	else
		tmp = 2.0 / ((sin(k_m) * ((t_m / l) * ((t_m ^ 2.0) / l))) * (2.0 * tan(k_m)));
	end
	tmp_2 = t_s * tmp;
end
k_m = N[Abs[k], $MachinePrecision]
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$95$m_] := N[(t$95$s * If[LessEqual[t$95$m, 6.6e+89], N[(2.0 / N[(N[(N[Sin[k$95$m], $MachinePrecision] * N[Tan[k$95$m], $MachinePrecision]), $MachinePrecision] * N[Power[N[(N[(k$95$m / l), $MachinePrecision] * N[Sqrt[t$95$m], $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(2.0 / N[(N[(N[Sin[k$95$m], $MachinePrecision] * N[(N[(t$95$m / l), $MachinePrecision] * N[(N[Power[t$95$m, 2.0], $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(2.0 * N[Tan[k$95$m], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]), $MachinePrecision]
\begin{array}{l}
k_m = \left|k\right|
\\
t\_m = \left|t\right|
\\
t\_s = \mathsf{copysign}\left(1, t\right)

\\
t\_s \cdot \begin{array}{l}
\mathbf{if}\;t\_m \leq 6.6 \cdot 10^{+89}:\\
\;\;\;\;\frac{2}{\left(\sin k\_m \cdot \tan k\_m\right) \cdot {\left(\frac{k\_m}{\ell} \cdot \sqrt{t\_m}\right)}^{2}}\\

\mathbf{else}:\\
\;\;\;\;\frac{2}{\left(\sin k\_m \cdot \left(\frac{t\_m}{\ell} \cdot \frac{{t\_m}^{2}}{\ell}\right)\right) \cdot \left(2 \cdot \tan k\_m\right)}\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t < 6.59999999999999948e89

    1. Initial program 54.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. Simplified54.4%

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

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

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

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

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

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

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

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

      \[\leadsto \frac{2}{\color{blue}{{\left(\frac{{t}^{1.5}}{\ell} \cdot \left(\mathsf{hypot}\left(1, \mathsf{hypot}\left(1, \frac{k}{t}\right)\right) \cdot \sqrt{\sin k \cdot \tan k}\right)\right)}^{2}}} \]
    6. Step-by-step derivation
      1. associate-*r*22.2%

        \[\leadsto \frac{2}{{\color{blue}{\left(\left(\frac{{t}^{1.5}}{\ell} \cdot \mathsf{hypot}\left(1, \mathsf{hypot}\left(1, \frac{k}{t}\right)\right)\right) \cdot \sqrt{\sin k \cdot \tan k}\right)}}^{2}} \]
    7. Simplified22.2%

      \[\leadsto \frac{2}{\color{blue}{{\left(\left(\frac{{t}^{1.5}}{\ell} \cdot \mathsf{hypot}\left(1, \mathsf{hypot}\left(1, \frac{k}{t}\right)\right)\right) \cdot \sqrt{\sin k \cdot \tan k}\right)}^{2}}} \]
    8. Step-by-step derivation
      1. unpow-prod-down21.7%

        \[\leadsto \frac{2}{\color{blue}{{\left(\frac{{t}^{1.5}}{\ell} \cdot \mathsf{hypot}\left(1, \mathsf{hypot}\left(1, \frac{k}{t}\right)\right)\right)}^{2} \cdot {\left(\sqrt{\sin k \cdot \tan k}\right)}^{2}}} \]
      2. pow221.7%

        \[\leadsto \frac{2}{{\left(\frac{{t}^{1.5}}{\ell} \cdot \mathsf{hypot}\left(1, \mathsf{hypot}\left(1, \frac{k}{t}\right)\right)\right)}^{2} \cdot \color{blue}{\left(\sqrt{\sin k \cdot \tan k} \cdot \sqrt{\sin k \cdot \tan k}\right)}} \]
      3. add-sqr-sqrt29.7%

        \[\leadsto \frac{2}{{\left(\frac{{t}^{1.5}}{\ell} \cdot \mathsf{hypot}\left(1, \mathsf{hypot}\left(1, \frac{k}{t}\right)\right)\right)}^{2} \cdot \color{blue}{\left(\sin k \cdot \tan k\right)}} \]
    9. Applied egg-rr29.7%

      \[\leadsto \frac{2}{\color{blue}{{\left(\frac{{t}^{1.5}}{\ell} \cdot \mathsf{hypot}\left(1, \mathsf{hypot}\left(1, \frac{k}{t}\right)\right)\right)}^{2} \cdot \left(\sin k \cdot \tan k\right)}} \]
    10. Taylor expanded in t around 0 32.5%

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

    if 6.59999999999999948e89 < t

    1. Initial program 64.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. Simplified64.5%

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq 6.6 \cdot 10^{+89}:\\ \;\;\;\;\frac{2}{\left(\sin k \cdot \tan k\right) \cdot {\left(\frac{k}{\ell} \cdot \sqrt{t}\right)}^{2}}\\ \mathbf{else}:\\ \;\;\;\;\frac{2}{\left(\sin k \cdot \left(\frac{t}{\ell} \cdot \frac{{t}^{2}}{\ell}\right)\right) \cdot \left(2 \cdot \tan k\right)}\\ \end{array} \]
  5. Add Preprocessing

Alternative 7: 79.0% accurate, 1.0× speedup?

\[\begin{array}{l} k_m = \left|k\right| \\ t\_m = \left|t\right| \\ t\_s = \mathsf{copysign}\left(1, t\right) \\ t\_s \cdot \begin{array}{l} \mathbf{if}\;t\_m \leq 7.2 \cdot 10^{+89}:\\ \;\;\;\;\frac{\cos k\_m}{t\_m} \cdot {\left(\ell \cdot \frac{\frac{\sqrt{2}}{k\_m}}{\sin k\_m}\right)}^{2}\\ \mathbf{else}:\\ \;\;\;\;\frac{2}{\left(\sin k\_m \cdot \left(\frac{t\_m}{\ell} \cdot \frac{{t\_m}^{2}}{\ell}\right)\right) \cdot \left(2 \cdot \tan k\_m\right)}\\ \end{array} \end{array} \]
k_m = (fabs.f64 k)
t\_m = (fabs.f64 t)
t\_s = (copysign.f64 #s(literal 1 binary64) t)
(FPCore (t_s t_m l k_m)
 :precision binary64
 (*
  t_s
  (if (<= t_m 7.2e+89)
    (* (/ (cos k_m) t_m) (pow (* l (/ (/ (sqrt 2.0) k_m) (sin k_m))) 2.0))
    (/
     2.0
     (* (* (sin k_m) (* (/ t_m l) (/ (pow t_m 2.0) l))) (* 2.0 (tan k_m)))))))
k_m = fabs(k);
t\_m = fabs(t);
t\_s = copysign(1.0, t);
double code(double t_s, double t_m, double l, double k_m) {
	double tmp;
	if (t_m <= 7.2e+89) {
		tmp = (cos(k_m) / t_m) * pow((l * ((sqrt(2.0) / k_m) / sin(k_m))), 2.0);
	} else {
		tmp = 2.0 / ((sin(k_m) * ((t_m / l) * (pow(t_m, 2.0) / l))) * (2.0 * tan(k_m)));
	}
	return t_s * tmp;
}
k_m = abs(k)
t\_m = abs(t)
t\_s = copysign(1.0d0, t)
real(8) function code(t_s, t_m, l, k_m)
    real(8), intent (in) :: t_s
    real(8), intent (in) :: t_m
    real(8), intent (in) :: l
    real(8), intent (in) :: k_m
    real(8) :: tmp
    if (t_m <= 7.2d+89) then
        tmp = (cos(k_m) / t_m) * ((l * ((sqrt(2.0d0) / k_m) / sin(k_m))) ** 2.0d0)
    else
        tmp = 2.0d0 / ((sin(k_m) * ((t_m / l) * ((t_m ** 2.0d0) / l))) * (2.0d0 * tan(k_m)))
    end if
    code = t_s * tmp
end function
k_m = Math.abs(k);
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_m) {
	double tmp;
	if (t_m <= 7.2e+89) {
		tmp = (Math.cos(k_m) / t_m) * Math.pow((l * ((Math.sqrt(2.0) / k_m) / Math.sin(k_m))), 2.0);
	} else {
		tmp = 2.0 / ((Math.sin(k_m) * ((t_m / l) * (Math.pow(t_m, 2.0) / l))) * (2.0 * Math.tan(k_m)));
	}
	return t_s * tmp;
}
k_m = math.fabs(k)
t\_m = math.fabs(t)
t\_s = math.copysign(1.0, t)
def code(t_s, t_m, l, k_m):
	tmp = 0
	if t_m <= 7.2e+89:
		tmp = (math.cos(k_m) / t_m) * math.pow((l * ((math.sqrt(2.0) / k_m) / math.sin(k_m))), 2.0)
	else:
		tmp = 2.0 / ((math.sin(k_m) * ((t_m / l) * (math.pow(t_m, 2.0) / l))) * (2.0 * math.tan(k_m)))
	return t_s * tmp
k_m = abs(k)
t\_m = abs(t)
t\_s = copysign(1.0, t)
function code(t_s, t_m, l, k_m)
	tmp = 0.0
	if (t_m <= 7.2e+89)
		tmp = Float64(Float64(cos(k_m) / t_m) * (Float64(l * Float64(Float64(sqrt(2.0) / k_m) / sin(k_m))) ^ 2.0));
	else
		tmp = Float64(2.0 / Float64(Float64(sin(k_m) * Float64(Float64(t_m / l) * Float64((t_m ^ 2.0) / l))) * Float64(2.0 * tan(k_m))));
	end
	return Float64(t_s * tmp)
end
k_m = abs(k);
t\_m = abs(t);
t\_s = sign(t) * abs(1.0);
function tmp_2 = code(t_s, t_m, l, k_m)
	tmp = 0.0;
	if (t_m <= 7.2e+89)
		tmp = (cos(k_m) / t_m) * ((l * ((sqrt(2.0) / k_m) / sin(k_m))) ^ 2.0);
	else
		tmp = 2.0 / ((sin(k_m) * ((t_m / l) * ((t_m ^ 2.0) / l))) * (2.0 * tan(k_m)));
	end
	tmp_2 = t_s * tmp;
end
k_m = N[Abs[k], $MachinePrecision]
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$95$m_] := N[(t$95$s * If[LessEqual[t$95$m, 7.2e+89], N[(N[(N[Cos[k$95$m], $MachinePrecision] / t$95$m), $MachinePrecision] * N[Power[N[(l * N[(N[(N[Sqrt[2.0], $MachinePrecision] / k$95$m), $MachinePrecision] / N[Sin[k$95$m], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision], N[(2.0 / N[(N[(N[Sin[k$95$m], $MachinePrecision] * N[(N[(t$95$m / l), $MachinePrecision] * N[(N[Power[t$95$m, 2.0], $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(2.0 * N[Tan[k$95$m], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]), $MachinePrecision]
\begin{array}{l}
k_m = \left|k\right|
\\
t\_m = \left|t\right|
\\
t\_s = \mathsf{copysign}\left(1, t\right)

\\
t\_s \cdot \begin{array}{l}
\mathbf{if}\;t\_m \leq 7.2 \cdot 10^{+89}:\\
\;\;\;\;\frac{\cos k\_m}{t\_m} \cdot {\left(\ell \cdot \frac{\frac{\sqrt{2}}{k\_m}}{\sin k\_m}\right)}^{2}\\

\mathbf{else}:\\
\;\;\;\;\frac{2}{\left(\sin k\_m \cdot \left(\frac{t\_m}{\ell} \cdot \frac{{t\_m}^{2}}{\ell}\right)\right) \cdot \left(2 \cdot \tan k\_m\right)}\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t < 7.2e89

    1. Initial program 54.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. Simplified52.5%

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

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

      \[\leadsto \color{blue}{\frac{\ell \cdot \sqrt{\frac{2}{\left({t}^{3} \cdot \sin k\right) \cdot \tan k}}}{\mathsf{hypot}\left(1, \mathsf{hypot}\left(1, \frac{k}{t}\right)\right)} \cdot \frac{\ell \cdot \sqrt{\frac{2}{\left({t}^{3} \cdot \sin k\right) \cdot \tan k}}}{\mathsf{hypot}\left(1, \mathsf{hypot}\left(1, \frac{k}{t}\right)\right)}} \]
    6. Step-by-step derivation
      1. unpow241.3%

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

        \[\leadsto {\color{blue}{\left(\ell \cdot \frac{\sqrt{\frac{2}{\left({t}^{3} \cdot \sin k\right) \cdot \tan k}}}{\mathsf{hypot}\left(1, \mathsf{hypot}\left(1, \frac{k}{t}\right)\right)}\right)}}^{2} \]
      3. *-commutative42.1%

        \[\leadsto {\left(\ell \cdot \frac{\sqrt{\frac{2}{\color{blue}{\left(\sin k \cdot {t}^{3}\right)} \cdot \tan k}}}{\mathsf{hypot}\left(1, \mathsf{hypot}\left(1, \frac{k}{t}\right)\right)}\right)}^{2} \]
    7. Simplified42.1%

      \[\leadsto \color{blue}{{\left(\ell \cdot \frac{\sqrt{\frac{2}{\left(\sin k \cdot {t}^{3}\right) \cdot \tan k}}}{\mathsf{hypot}\left(1, \mathsf{hypot}\left(1, \frac{k}{t}\right)\right)}\right)}^{2}} \]
    8. Taylor expanded in k around inf 36.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 7.2e89 < t

    1. Initial program 64.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. Simplified64.5%

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq 7.2 \cdot 10^{+89}:\\ \;\;\;\;\frac{\cos k}{t} \cdot {\left(\ell \cdot \frac{\frac{\sqrt{2}}{k}}{\sin k}\right)}^{2}\\ \mathbf{else}:\\ \;\;\;\;\frac{2}{\left(\sin k \cdot \left(\frac{t}{\ell} \cdot \frac{{t}^{2}}{\ell}\right)\right) \cdot \left(2 \cdot \tan k\right)}\\ \end{array} \]
  5. Add Preprocessing

Alternative 8: 71.2% accurate, 1.3× speedup?

\[\begin{array}{l} k_m = \left|k\right| \\ t\_m = \left|t\right| \\ t\_s = \mathsf{copysign}\left(1, t\right) \\ t\_s \cdot \begin{array}{l} \mathbf{if}\;k\_m \leq 7.5 \cdot 10^{-28}:\\ \;\;\;\;\frac{2}{\left(\sin k\_m \cdot \left(\frac{t\_m}{\ell} \cdot \frac{{t\_m}^{2}}{\ell}\right)\right) \cdot \left(2 \cdot \tan k\_m\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{2 \cdot \left(\cos k\_m \cdot \left(\ell \cdot \ell\right)\right)}{\left(t\_m \cdot \left(k\_m \cdot k\_m\right)\right) \cdot {\sin k\_m}^{2}}\\ \end{array} \end{array} \]
k_m = (fabs.f64 k)
t\_m = (fabs.f64 t)
t\_s = (copysign.f64 #s(literal 1 binary64) t)
(FPCore (t_s t_m l k_m)
 :precision binary64
 (*
  t_s
  (if (<= k_m 7.5e-28)
    (/
     2.0
     (* (* (sin k_m) (* (/ t_m l) (/ (pow t_m 2.0) l))) (* 2.0 (tan k_m))))
    (/
     (* 2.0 (* (cos k_m) (* l l)))
     (* (* t_m (* k_m k_m)) (pow (sin k_m) 2.0))))))
k_m = fabs(k);
t\_m = fabs(t);
t\_s = copysign(1.0, t);
double code(double t_s, double t_m, double l, double k_m) {
	double tmp;
	if (k_m <= 7.5e-28) {
		tmp = 2.0 / ((sin(k_m) * ((t_m / l) * (pow(t_m, 2.0) / l))) * (2.0 * tan(k_m)));
	} else {
		tmp = (2.0 * (cos(k_m) * (l * l))) / ((t_m * (k_m * k_m)) * pow(sin(k_m), 2.0));
	}
	return t_s * tmp;
}
k_m = abs(k)
t\_m = abs(t)
t\_s = copysign(1.0d0, t)
real(8) function code(t_s, t_m, l, k_m)
    real(8), intent (in) :: t_s
    real(8), intent (in) :: t_m
    real(8), intent (in) :: l
    real(8), intent (in) :: k_m
    real(8) :: tmp
    if (k_m <= 7.5d-28) then
        tmp = 2.0d0 / ((sin(k_m) * ((t_m / l) * ((t_m ** 2.0d0) / l))) * (2.0d0 * tan(k_m)))
    else
        tmp = (2.0d0 * (cos(k_m) * (l * l))) / ((t_m * (k_m * k_m)) * (sin(k_m) ** 2.0d0))
    end if
    code = t_s * tmp
end function
k_m = Math.abs(k);
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_m) {
	double tmp;
	if (k_m <= 7.5e-28) {
		tmp = 2.0 / ((Math.sin(k_m) * ((t_m / l) * (Math.pow(t_m, 2.0) / l))) * (2.0 * Math.tan(k_m)));
	} else {
		tmp = (2.0 * (Math.cos(k_m) * (l * l))) / ((t_m * (k_m * k_m)) * Math.pow(Math.sin(k_m), 2.0));
	}
	return t_s * tmp;
}
k_m = math.fabs(k)
t\_m = math.fabs(t)
t\_s = math.copysign(1.0, t)
def code(t_s, t_m, l, k_m):
	tmp = 0
	if k_m <= 7.5e-28:
		tmp = 2.0 / ((math.sin(k_m) * ((t_m / l) * (math.pow(t_m, 2.0) / l))) * (2.0 * math.tan(k_m)))
	else:
		tmp = (2.0 * (math.cos(k_m) * (l * l))) / ((t_m * (k_m * k_m)) * math.pow(math.sin(k_m), 2.0))
	return t_s * tmp
k_m = abs(k)
t\_m = abs(t)
t\_s = copysign(1.0, t)
function code(t_s, t_m, l, k_m)
	tmp = 0.0
	if (k_m <= 7.5e-28)
		tmp = Float64(2.0 / Float64(Float64(sin(k_m) * Float64(Float64(t_m / l) * Float64((t_m ^ 2.0) / l))) * Float64(2.0 * tan(k_m))));
	else
		tmp = Float64(Float64(2.0 * Float64(cos(k_m) * Float64(l * l))) / Float64(Float64(t_m * Float64(k_m * k_m)) * (sin(k_m) ^ 2.0)));
	end
	return Float64(t_s * tmp)
end
k_m = abs(k);
t\_m = abs(t);
t\_s = sign(t) * abs(1.0);
function tmp_2 = code(t_s, t_m, l, k_m)
	tmp = 0.0;
	if (k_m <= 7.5e-28)
		tmp = 2.0 / ((sin(k_m) * ((t_m / l) * ((t_m ^ 2.0) / l))) * (2.0 * tan(k_m)));
	else
		tmp = (2.0 * (cos(k_m) * (l * l))) / ((t_m * (k_m * k_m)) * (sin(k_m) ^ 2.0));
	end
	tmp_2 = t_s * tmp;
end
k_m = N[Abs[k], $MachinePrecision]
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$95$m_] := N[(t$95$s * If[LessEqual[k$95$m, 7.5e-28], N[(2.0 / N[(N[(N[Sin[k$95$m], $MachinePrecision] * N[(N[(t$95$m / l), $MachinePrecision] * N[(N[Power[t$95$m, 2.0], $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(2.0 * N[Tan[k$95$m], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(2.0 * N[(N[Cos[k$95$m], $MachinePrecision] * N[(l * l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(N[(t$95$m * N[(k$95$m * k$95$m), $MachinePrecision]), $MachinePrecision] * N[Power[N[Sin[k$95$m], $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]), $MachinePrecision]
\begin{array}{l}
k_m = \left|k\right|
\\
t\_m = \left|t\right|
\\
t\_s = \mathsf{copysign}\left(1, t\right)

\\
t\_s \cdot \begin{array}{l}
\mathbf{if}\;k\_m \leq 7.5 \cdot 10^{-28}:\\
\;\;\;\;\frac{2}{\left(\sin k\_m \cdot \left(\frac{t\_m}{\ell} \cdot \frac{{t\_m}^{2}}{\ell}\right)\right) \cdot \left(2 \cdot \tan k\_m\right)}\\

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


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

    1. Initial program 58.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. Simplified58.4%

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

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

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

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

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

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

    if 7.5000000000000003e-28 < k

    1. Initial program 50.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. Simplified50.3%

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

      \[\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-*r/69.1%

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;k \leq 7.5 \cdot 10^{-28}:\\ \;\;\;\;\frac{2}{\left(\sin k \cdot \left(\frac{t}{\ell} \cdot \frac{{t}^{2}}{\ell}\right)\right) \cdot \left(2 \cdot \tan k\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{2 \cdot \left(\cos k \cdot \left(\ell \cdot \ell\right)\right)}{\left(t \cdot \left(k \cdot k\right)\right) \cdot {\sin k}^{2}}\\ \end{array} \]
  5. Add Preprocessing

Alternative 9: 66.6% accurate, 1.3× speedup?

\[\begin{array}{l} k_m = \left|k\right| \\ t\_m = \left|t\right| \\ t\_s = \mathsf{copysign}\left(1, t\right) \\ t\_s \cdot \begin{array}{l} \mathbf{if}\;k\_m \leq 2 \cdot 10^{+93}:\\ \;\;\;\;\frac{2}{\left(\sin k\_m \cdot \left(\frac{t\_m}{\ell} \cdot \frac{{t\_m}^{2}}{\ell}\right)\right) \cdot \left(2 \cdot \tan k\_m\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{2 \cdot {\ell}^{2}}{\left(t\_m \cdot \left(k\_m \cdot k\_m\right)\right) \cdot {\sin k\_m}^{2}}\\ \end{array} \end{array} \]
k_m = (fabs.f64 k)
t\_m = (fabs.f64 t)
t\_s = (copysign.f64 #s(literal 1 binary64) t)
(FPCore (t_s t_m l k_m)
 :precision binary64
 (*
  t_s
  (if (<= k_m 2e+93)
    (/
     2.0
     (* (* (sin k_m) (* (/ t_m l) (/ (pow t_m 2.0) l))) (* 2.0 (tan k_m))))
    (/ (* 2.0 (pow l 2.0)) (* (* t_m (* k_m k_m)) (pow (sin k_m) 2.0))))))
k_m = fabs(k);
t\_m = fabs(t);
t\_s = copysign(1.0, t);
double code(double t_s, double t_m, double l, double k_m) {
	double tmp;
	if (k_m <= 2e+93) {
		tmp = 2.0 / ((sin(k_m) * ((t_m / l) * (pow(t_m, 2.0) / l))) * (2.0 * tan(k_m)));
	} else {
		tmp = (2.0 * pow(l, 2.0)) / ((t_m * (k_m * k_m)) * pow(sin(k_m), 2.0));
	}
	return t_s * tmp;
}
k_m = abs(k)
t\_m = abs(t)
t\_s = copysign(1.0d0, t)
real(8) function code(t_s, t_m, l, k_m)
    real(8), intent (in) :: t_s
    real(8), intent (in) :: t_m
    real(8), intent (in) :: l
    real(8), intent (in) :: k_m
    real(8) :: tmp
    if (k_m <= 2d+93) then
        tmp = 2.0d0 / ((sin(k_m) * ((t_m / l) * ((t_m ** 2.0d0) / l))) * (2.0d0 * tan(k_m)))
    else
        tmp = (2.0d0 * (l ** 2.0d0)) / ((t_m * (k_m * k_m)) * (sin(k_m) ** 2.0d0))
    end if
    code = t_s * tmp
end function
k_m = Math.abs(k);
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_m) {
	double tmp;
	if (k_m <= 2e+93) {
		tmp = 2.0 / ((Math.sin(k_m) * ((t_m / l) * (Math.pow(t_m, 2.0) / l))) * (2.0 * Math.tan(k_m)));
	} else {
		tmp = (2.0 * Math.pow(l, 2.0)) / ((t_m * (k_m * k_m)) * Math.pow(Math.sin(k_m), 2.0));
	}
	return t_s * tmp;
}
k_m = math.fabs(k)
t\_m = math.fabs(t)
t\_s = math.copysign(1.0, t)
def code(t_s, t_m, l, k_m):
	tmp = 0
	if k_m <= 2e+93:
		tmp = 2.0 / ((math.sin(k_m) * ((t_m / l) * (math.pow(t_m, 2.0) / l))) * (2.0 * math.tan(k_m)))
	else:
		tmp = (2.0 * math.pow(l, 2.0)) / ((t_m * (k_m * k_m)) * math.pow(math.sin(k_m), 2.0))
	return t_s * tmp
k_m = abs(k)
t\_m = abs(t)
t\_s = copysign(1.0, t)
function code(t_s, t_m, l, k_m)
	tmp = 0.0
	if (k_m <= 2e+93)
		tmp = Float64(2.0 / Float64(Float64(sin(k_m) * Float64(Float64(t_m / l) * Float64((t_m ^ 2.0) / l))) * Float64(2.0 * tan(k_m))));
	else
		tmp = Float64(Float64(2.0 * (l ^ 2.0)) / Float64(Float64(t_m * Float64(k_m * k_m)) * (sin(k_m) ^ 2.0)));
	end
	return Float64(t_s * tmp)
end
k_m = abs(k);
t\_m = abs(t);
t\_s = sign(t) * abs(1.0);
function tmp_2 = code(t_s, t_m, l, k_m)
	tmp = 0.0;
	if (k_m <= 2e+93)
		tmp = 2.0 / ((sin(k_m) * ((t_m / l) * ((t_m ^ 2.0) / l))) * (2.0 * tan(k_m)));
	else
		tmp = (2.0 * (l ^ 2.0)) / ((t_m * (k_m * k_m)) * (sin(k_m) ^ 2.0));
	end
	tmp_2 = t_s * tmp;
end
k_m = N[Abs[k], $MachinePrecision]
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$95$m_] := N[(t$95$s * If[LessEqual[k$95$m, 2e+93], N[(2.0 / N[(N[(N[Sin[k$95$m], $MachinePrecision] * N[(N[(t$95$m / l), $MachinePrecision] * N[(N[Power[t$95$m, 2.0], $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(2.0 * N[Tan[k$95$m], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(2.0 * N[Power[l, 2.0], $MachinePrecision]), $MachinePrecision] / N[(N[(t$95$m * N[(k$95$m * k$95$m), $MachinePrecision]), $MachinePrecision] * N[Power[N[Sin[k$95$m], $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]), $MachinePrecision]
\begin{array}{l}
k_m = \left|k\right|
\\
t\_m = \left|t\right|
\\
t\_s = \mathsf{copysign}\left(1, t\right)

\\
t\_s \cdot \begin{array}{l}
\mathbf{if}\;k\_m \leq 2 \cdot 10^{+93}:\\
\;\;\;\;\frac{2}{\left(\sin k\_m \cdot \left(\frac{t\_m}{\ell} \cdot \frac{{t\_m}^{2}}{\ell}\right)\right) \cdot \left(2 \cdot \tan k\_m\right)}\\

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


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

    1. Initial program 57.1%

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

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

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

        \[\leadsto \frac{2}{\left(\frac{\color{blue}{\left(t \cdot t\right) \cdot t}}{\ell \cdot \ell} \cdot \sin k\right) \cdot \left(\tan k \cdot 2\right)} \]
      2. unpow256.0%

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

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

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

    if 2.00000000000000009e93 < k

    1. Initial program 51.3%

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

      \[\leadsto \color{blue}{\frac{2}{\left(\frac{{t}^{3}}{\ell \cdot \ell} \cdot \sin k\right) \cdot \left(\tan k \cdot \left(1 + \left(1 + {\left(\frac{k}{t}\right)}^{2}\right)\right)\right)}} \]
    3. Add Preprocessing
    4. Taylor expanded in t around 0 63.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-*r/63.8%

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;k \leq 2 \cdot 10^{+93}:\\ \;\;\;\;\frac{2}{\left(\sin k \cdot \left(\frac{t}{\ell} \cdot \frac{{t}^{2}}{\ell}\right)\right) \cdot \left(2 \cdot \tan k\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{2 \cdot {\ell}^{2}}{\left(t \cdot \left(k \cdot k\right)\right) \cdot {\sin k}^{2}}\\ \end{array} \]
  5. Add Preprocessing

Alternative 10: 61.4% accurate, 1.3× speedup?

\[\begin{array}{l} k_m = \left|k\right| \\ t\_m = \left|t\right| \\ t\_s = \mathsf{copysign}\left(1, t\right) \\ t\_s \cdot \begin{array}{l} \mathbf{if}\;k\_m \leq 7.5 \cdot 10^{-28}:\\ \;\;\;\;\frac{2}{{\left(\frac{{t\_m}^{1.5}}{\ell}\right)}^{2} \cdot \left(2 \cdot \left(k\_m \cdot k\_m\right)\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{2 \cdot \left({\ell}^{2} \cdot \cos k\_m\right)}{{k\_m}^{2} \cdot \left(t\_m \cdot \left(k\_m \cdot k\_m\right)\right)}\\ \end{array} \end{array} \]
k_m = (fabs.f64 k)
t\_m = (fabs.f64 t)
t\_s = (copysign.f64 #s(literal 1 binary64) t)
(FPCore (t_s t_m l k_m)
 :precision binary64
 (*
  t_s
  (if (<= k_m 7.5e-28)
    (/ 2.0 (* (pow (/ (pow t_m 1.5) l) 2.0) (* 2.0 (* k_m k_m))))
    (/
     (* 2.0 (* (pow l 2.0) (cos k_m)))
     (* (pow k_m 2.0) (* t_m (* k_m k_m)))))))
k_m = fabs(k);
t\_m = fabs(t);
t\_s = copysign(1.0, t);
double code(double t_s, double t_m, double l, double k_m) {
	double tmp;
	if (k_m <= 7.5e-28) {
		tmp = 2.0 / (pow((pow(t_m, 1.5) / l), 2.0) * (2.0 * (k_m * k_m)));
	} else {
		tmp = (2.0 * (pow(l, 2.0) * cos(k_m))) / (pow(k_m, 2.0) * (t_m * (k_m * k_m)));
	}
	return t_s * tmp;
}
k_m = abs(k)
t\_m = abs(t)
t\_s = copysign(1.0d0, t)
real(8) function code(t_s, t_m, l, k_m)
    real(8), intent (in) :: t_s
    real(8), intent (in) :: t_m
    real(8), intent (in) :: l
    real(8), intent (in) :: k_m
    real(8) :: tmp
    if (k_m <= 7.5d-28) then
        tmp = 2.0d0 / ((((t_m ** 1.5d0) / l) ** 2.0d0) * (2.0d0 * (k_m * k_m)))
    else
        tmp = (2.0d0 * ((l ** 2.0d0) * cos(k_m))) / ((k_m ** 2.0d0) * (t_m * (k_m * k_m)))
    end if
    code = t_s * tmp
end function
k_m = Math.abs(k);
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_m) {
	double tmp;
	if (k_m <= 7.5e-28) {
		tmp = 2.0 / (Math.pow((Math.pow(t_m, 1.5) / l), 2.0) * (2.0 * (k_m * k_m)));
	} else {
		tmp = (2.0 * (Math.pow(l, 2.0) * Math.cos(k_m))) / (Math.pow(k_m, 2.0) * (t_m * (k_m * k_m)));
	}
	return t_s * tmp;
}
k_m = math.fabs(k)
t\_m = math.fabs(t)
t\_s = math.copysign(1.0, t)
def code(t_s, t_m, l, k_m):
	tmp = 0
	if k_m <= 7.5e-28:
		tmp = 2.0 / (math.pow((math.pow(t_m, 1.5) / l), 2.0) * (2.0 * (k_m * k_m)))
	else:
		tmp = (2.0 * (math.pow(l, 2.0) * math.cos(k_m))) / (math.pow(k_m, 2.0) * (t_m * (k_m * k_m)))
	return t_s * tmp
k_m = abs(k)
t\_m = abs(t)
t\_s = copysign(1.0, t)
function code(t_s, t_m, l, k_m)
	tmp = 0.0
	if (k_m <= 7.5e-28)
		tmp = Float64(2.0 / Float64((Float64((t_m ^ 1.5) / l) ^ 2.0) * Float64(2.0 * Float64(k_m * k_m))));
	else
		tmp = Float64(Float64(2.0 * Float64((l ^ 2.0) * cos(k_m))) / Float64((k_m ^ 2.0) * Float64(t_m * Float64(k_m * k_m))));
	end
	return Float64(t_s * tmp)
end
k_m = abs(k);
t\_m = abs(t);
t\_s = sign(t) * abs(1.0);
function tmp_2 = code(t_s, t_m, l, k_m)
	tmp = 0.0;
	if (k_m <= 7.5e-28)
		tmp = 2.0 / ((((t_m ^ 1.5) / l) ^ 2.0) * (2.0 * (k_m * k_m)));
	else
		tmp = (2.0 * ((l ^ 2.0) * cos(k_m))) / ((k_m ^ 2.0) * (t_m * (k_m * k_m)));
	end
	tmp_2 = t_s * tmp;
end
k_m = N[Abs[k], $MachinePrecision]
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$95$m_] := N[(t$95$s * If[LessEqual[k$95$m, 7.5e-28], N[(2.0 / N[(N[Power[N[(N[Power[t$95$m, 1.5], $MachinePrecision] / l), $MachinePrecision], 2.0], $MachinePrecision] * N[(2.0 * N[(k$95$m * k$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(2.0 * N[(N[Power[l, 2.0], $MachinePrecision] * N[Cos[k$95$m], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(N[Power[k$95$m, 2.0], $MachinePrecision] * N[(t$95$m * N[(k$95$m * k$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]), $MachinePrecision]
\begin{array}{l}
k_m = \left|k\right|
\\
t\_m = \left|t\right|
\\
t\_s = \mathsf{copysign}\left(1, t\right)

\\
t\_s \cdot \begin{array}{l}
\mathbf{if}\;k\_m \leq 7.5 \cdot 10^{-28}:\\
\;\;\;\;\frac{2}{{\left(\frac{{t\_m}^{1.5}}{\ell}\right)}^{2} \cdot \left(2 \cdot \left(k\_m \cdot k\_m\right)\right)}\\

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


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

    1. Initial program 58.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. Simplified61.7%

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

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

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

      \[\leadsto \frac{2}{\frac{\frac{{t}^{3}}{\ell}}{\ell} \cdot \left(2 \cdot \color{blue}{\left(k \cdot k\right)}\right)} \]
    7. Step-by-step derivation
      1. add-sqr-sqrt26.9%

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

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

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

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

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

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

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

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

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

    if 7.5000000000000003e-28 < k

    1. Initial program 50.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. Simplified50.3%

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

      \[\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-*r/69.1%

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;k \leq 7.5 \cdot 10^{-28}:\\ \;\;\;\;\frac{2}{{\left(\frac{{t}^{1.5}}{\ell}\right)}^{2} \cdot \left(2 \cdot \left(k \cdot k\right)\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{2 \cdot \left({\ell}^{2} \cdot \cos k\right)}{{k}^{2} \cdot \left(t \cdot \left(k \cdot k\right)\right)}\\ \end{array} \]
  5. Add Preprocessing

Alternative 11: 60.7% accurate, 1.3× speedup?

\[\begin{array}{l} k_m = \left|k\right| \\ t\_m = \left|t\right| \\ t\_s = \mathsf{copysign}\left(1, t\right) \\ t\_s \cdot \begin{array}{l} \mathbf{if}\;k\_m \leq 7.5 \cdot 10^{-28}:\\ \;\;\;\;\frac{2}{{\left(\frac{{t\_m}^{1.5}}{\ell}\right)}^{2} \cdot \left(2 \cdot \left(k\_m \cdot k\_m\right)\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{2 \cdot \left({\ell}^{2} \cdot \cos k\_m\right)}{t\_m \cdot {k\_m}^{4}}\\ \end{array} \end{array} \]
k_m = (fabs.f64 k)
t\_m = (fabs.f64 t)
t\_s = (copysign.f64 #s(literal 1 binary64) t)
(FPCore (t_s t_m l k_m)
 :precision binary64
 (*
  t_s
  (if (<= k_m 7.5e-28)
    (/ 2.0 (* (pow (/ (pow t_m 1.5) l) 2.0) (* 2.0 (* k_m k_m))))
    (/ (* 2.0 (* (pow l 2.0) (cos k_m))) (* t_m (pow k_m 4.0))))))
k_m = fabs(k);
t\_m = fabs(t);
t\_s = copysign(1.0, t);
double code(double t_s, double t_m, double l, double k_m) {
	double tmp;
	if (k_m <= 7.5e-28) {
		tmp = 2.0 / (pow((pow(t_m, 1.5) / l), 2.0) * (2.0 * (k_m * k_m)));
	} else {
		tmp = (2.0 * (pow(l, 2.0) * cos(k_m))) / (t_m * pow(k_m, 4.0));
	}
	return t_s * tmp;
}
k_m = abs(k)
t\_m = abs(t)
t\_s = copysign(1.0d0, t)
real(8) function code(t_s, t_m, l, k_m)
    real(8), intent (in) :: t_s
    real(8), intent (in) :: t_m
    real(8), intent (in) :: l
    real(8), intent (in) :: k_m
    real(8) :: tmp
    if (k_m <= 7.5d-28) then
        tmp = 2.0d0 / ((((t_m ** 1.5d0) / l) ** 2.0d0) * (2.0d0 * (k_m * k_m)))
    else
        tmp = (2.0d0 * ((l ** 2.0d0) * cos(k_m))) / (t_m * (k_m ** 4.0d0))
    end if
    code = t_s * tmp
end function
k_m = Math.abs(k);
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_m) {
	double tmp;
	if (k_m <= 7.5e-28) {
		tmp = 2.0 / (Math.pow((Math.pow(t_m, 1.5) / l), 2.0) * (2.0 * (k_m * k_m)));
	} else {
		tmp = (2.0 * (Math.pow(l, 2.0) * Math.cos(k_m))) / (t_m * Math.pow(k_m, 4.0));
	}
	return t_s * tmp;
}
k_m = math.fabs(k)
t\_m = math.fabs(t)
t\_s = math.copysign(1.0, t)
def code(t_s, t_m, l, k_m):
	tmp = 0
	if k_m <= 7.5e-28:
		tmp = 2.0 / (math.pow((math.pow(t_m, 1.5) / l), 2.0) * (2.0 * (k_m * k_m)))
	else:
		tmp = (2.0 * (math.pow(l, 2.0) * math.cos(k_m))) / (t_m * math.pow(k_m, 4.0))
	return t_s * tmp
k_m = abs(k)
t\_m = abs(t)
t\_s = copysign(1.0, t)
function code(t_s, t_m, l, k_m)
	tmp = 0.0
	if (k_m <= 7.5e-28)
		tmp = Float64(2.0 / Float64((Float64((t_m ^ 1.5) / l) ^ 2.0) * Float64(2.0 * Float64(k_m * k_m))));
	else
		tmp = Float64(Float64(2.0 * Float64((l ^ 2.0) * cos(k_m))) / Float64(t_m * (k_m ^ 4.0)));
	end
	return Float64(t_s * tmp)
end
k_m = abs(k);
t\_m = abs(t);
t\_s = sign(t) * abs(1.0);
function tmp_2 = code(t_s, t_m, l, k_m)
	tmp = 0.0;
	if (k_m <= 7.5e-28)
		tmp = 2.0 / ((((t_m ^ 1.5) / l) ^ 2.0) * (2.0 * (k_m * k_m)));
	else
		tmp = (2.0 * ((l ^ 2.0) * cos(k_m))) / (t_m * (k_m ^ 4.0));
	end
	tmp_2 = t_s * tmp;
end
k_m = N[Abs[k], $MachinePrecision]
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$95$m_] := N[(t$95$s * If[LessEqual[k$95$m, 7.5e-28], N[(2.0 / N[(N[Power[N[(N[Power[t$95$m, 1.5], $MachinePrecision] / l), $MachinePrecision], 2.0], $MachinePrecision] * N[(2.0 * N[(k$95$m * k$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(2.0 * N[(N[Power[l, 2.0], $MachinePrecision] * N[Cos[k$95$m], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(t$95$m * N[Power[k$95$m, 4.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]), $MachinePrecision]
\begin{array}{l}
k_m = \left|k\right|
\\
t\_m = \left|t\right|
\\
t\_s = \mathsf{copysign}\left(1, t\right)

\\
t\_s \cdot \begin{array}{l}
\mathbf{if}\;k\_m \leq 7.5 \cdot 10^{-28}:\\
\;\;\;\;\frac{2}{{\left(\frac{{t\_m}^{1.5}}{\ell}\right)}^{2} \cdot \left(2 \cdot \left(k\_m \cdot k\_m\right)\right)}\\

\mathbf{else}:\\
\;\;\;\;\frac{2 \cdot \left({\ell}^{2} \cdot \cos k\_m\right)}{t\_m \cdot {k\_m}^{4}}\\


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

    1. Initial program 58.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. Simplified61.7%

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

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

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

      \[\leadsto \frac{2}{\frac{\frac{{t}^{3}}{\ell}}{\ell} \cdot \left(2 \cdot \color{blue}{\left(k \cdot k\right)}\right)} \]
    7. Step-by-step derivation
      1. add-sqr-sqrt26.9%

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

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

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

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

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

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

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

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

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

    if 7.5000000000000003e-28 < k

    1. Initial program 50.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. Simplified50.3%

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

      \[\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-*r/69.1%

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;k \leq 7.5 \cdot 10^{-28}:\\ \;\;\;\;\frac{2}{{\left(\frac{{t}^{1.5}}{\ell}\right)}^{2} \cdot \left(2 \cdot \left(k \cdot k\right)\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{2 \cdot \left({\ell}^{2} \cdot \cos k\right)}{t \cdot {k}^{4}}\\ \end{array} \]
  5. Add Preprocessing

Alternative 12: 59.7% accurate, 1.9× speedup?

\[\begin{array}{l} k_m = \left|k\right| \\ t\_m = \left|t\right| \\ t\_s = \mathsf{copysign}\left(1, t\right) \\ t\_s \cdot \begin{array}{l} \mathbf{if}\;k\_m \leq 6.2 \cdot 10^{-28}:\\ \;\;\;\;\frac{2}{{\left(\frac{{t\_m}^{1.5}}{\ell}\right)}^{2} \cdot \left(2 \cdot \left(k\_m \cdot k\_m\right)\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{2 \cdot {\ell}^{2}}{t\_m \cdot {k\_m}^{4}}\\ \end{array} \end{array} \]
k_m = (fabs.f64 k)
t\_m = (fabs.f64 t)
t\_s = (copysign.f64 #s(literal 1 binary64) t)
(FPCore (t_s t_m l k_m)
 :precision binary64
 (*
  t_s
  (if (<= k_m 6.2e-28)
    (/ 2.0 (* (pow (/ (pow t_m 1.5) l) 2.0) (* 2.0 (* k_m k_m))))
    (/ (* 2.0 (pow l 2.0)) (* t_m (pow k_m 4.0))))))
k_m = fabs(k);
t\_m = fabs(t);
t\_s = copysign(1.0, t);
double code(double t_s, double t_m, double l, double k_m) {
	double tmp;
	if (k_m <= 6.2e-28) {
		tmp = 2.0 / (pow((pow(t_m, 1.5) / l), 2.0) * (2.0 * (k_m * k_m)));
	} else {
		tmp = (2.0 * pow(l, 2.0)) / (t_m * pow(k_m, 4.0));
	}
	return t_s * tmp;
}
k_m = abs(k)
t\_m = abs(t)
t\_s = copysign(1.0d0, t)
real(8) function code(t_s, t_m, l, k_m)
    real(8), intent (in) :: t_s
    real(8), intent (in) :: t_m
    real(8), intent (in) :: l
    real(8), intent (in) :: k_m
    real(8) :: tmp
    if (k_m <= 6.2d-28) then
        tmp = 2.0d0 / ((((t_m ** 1.5d0) / l) ** 2.0d0) * (2.0d0 * (k_m * k_m)))
    else
        tmp = (2.0d0 * (l ** 2.0d0)) / (t_m * (k_m ** 4.0d0))
    end if
    code = t_s * tmp
end function
k_m = Math.abs(k);
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_m) {
	double tmp;
	if (k_m <= 6.2e-28) {
		tmp = 2.0 / (Math.pow((Math.pow(t_m, 1.5) / l), 2.0) * (2.0 * (k_m * k_m)));
	} else {
		tmp = (2.0 * Math.pow(l, 2.0)) / (t_m * Math.pow(k_m, 4.0));
	}
	return t_s * tmp;
}
k_m = math.fabs(k)
t\_m = math.fabs(t)
t\_s = math.copysign(1.0, t)
def code(t_s, t_m, l, k_m):
	tmp = 0
	if k_m <= 6.2e-28:
		tmp = 2.0 / (math.pow((math.pow(t_m, 1.5) / l), 2.0) * (2.0 * (k_m * k_m)))
	else:
		tmp = (2.0 * math.pow(l, 2.0)) / (t_m * math.pow(k_m, 4.0))
	return t_s * tmp
k_m = abs(k)
t\_m = abs(t)
t\_s = copysign(1.0, t)
function code(t_s, t_m, l, k_m)
	tmp = 0.0
	if (k_m <= 6.2e-28)
		tmp = Float64(2.0 / Float64((Float64((t_m ^ 1.5) / l) ^ 2.0) * Float64(2.0 * Float64(k_m * k_m))));
	else
		tmp = Float64(Float64(2.0 * (l ^ 2.0)) / Float64(t_m * (k_m ^ 4.0)));
	end
	return Float64(t_s * tmp)
end
k_m = abs(k);
t\_m = abs(t);
t\_s = sign(t) * abs(1.0);
function tmp_2 = code(t_s, t_m, l, k_m)
	tmp = 0.0;
	if (k_m <= 6.2e-28)
		tmp = 2.0 / ((((t_m ^ 1.5) / l) ^ 2.0) * (2.0 * (k_m * k_m)));
	else
		tmp = (2.0 * (l ^ 2.0)) / (t_m * (k_m ^ 4.0));
	end
	tmp_2 = t_s * tmp;
end
k_m = N[Abs[k], $MachinePrecision]
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$95$m_] := N[(t$95$s * If[LessEqual[k$95$m, 6.2e-28], N[(2.0 / N[(N[Power[N[(N[Power[t$95$m, 1.5], $MachinePrecision] / l), $MachinePrecision], 2.0], $MachinePrecision] * N[(2.0 * N[(k$95$m * k$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(2.0 * N[Power[l, 2.0], $MachinePrecision]), $MachinePrecision] / N[(t$95$m * N[Power[k$95$m, 4.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]), $MachinePrecision]
\begin{array}{l}
k_m = \left|k\right|
\\
t\_m = \left|t\right|
\\
t\_s = \mathsf{copysign}\left(1, t\right)

\\
t\_s \cdot \begin{array}{l}
\mathbf{if}\;k\_m \leq 6.2 \cdot 10^{-28}:\\
\;\;\;\;\frac{2}{{\left(\frac{{t\_m}^{1.5}}{\ell}\right)}^{2} \cdot \left(2 \cdot \left(k\_m \cdot k\_m\right)\right)}\\

\mathbf{else}:\\
\;\;\;\;\frac{2 \cdot {\ell}^{2}}{t\_m \cdot {k\_m}^{4}}\\


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

    1. Initial program 58.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. Simplified61.7%

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

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

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

      \[\leadsto \frac{2}{\frac{\frac{{t}^{3}}{\ell}}{\ell} \cdot \left(2 \cdot \color{blue}{\left(k \cdot k\right)}\right)} \]
    7. Step-by-step derivation
      1. add-sqr-sqrt26.9%

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

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

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

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

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

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

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

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

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

    if 6.19999999999999984e-28 < k

    1. Initial program 50.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. Simplified50.3%

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

      \[\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-*r/69.1%

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

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

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

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

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

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

      \[\leadsto \color{blue}{\frac{2 \cdot {\ell}^{2}}{t \cdot {k}^{4}}} \]
  3. Recombined 2 regimes into one program.
  4. Add Preprocessing

Alternative 13: 58.7% accurate, 2.0× speedup?

\[\begin{array}{l} k_m = \left|k\right| \\ t\_m = \left|t\right| \\ t\_s = \mathsf{copysign}\left(1, t\right) \\ t\_s \cdot \begin{array}{l} \mathbf{if}\;k\_m \leq 7.5 \cdot 10^{-28}:\\ \;\;\;\;\frac{2}{\left(2 \cdot \left(k\_m \cdot k\_m\right)\right) \cdot \left(\frac{t\_m}{\ell} \cdot \frac{t\_m \cdot t\_m}{\ell}\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{2 \cdot {\ell}^{2}}{t\_m \cdot {k\_m}^{4}}\\ \end{array} \end{array} \]
k_m = (fabs.f64 k)
t\_m = (fabs.f64 t)
t\_s = (copysign.f64 #s(literal 1 binary64) t)
(FPCore (t_s t_m l k_m)
 :precision binary64
 (*
  t_s
  (if (<= k_m 7.5e-28)
    (/ 2.0 (* (* 2.0 (* k_m k_m)) (* (/ t_m l) (/ (* t_m t_m) l))))
    (/ (* 2.0 (pow l 2.0)) (* t_m (pow k_m 4.0))))))
k_m = fabs(k);
t\_m = fabs(t);
t\_s = copysign(1.0, t);
double code(double t_s, double t_m, double l, double k_m) {
	double tmp;
	if (k_m <= 7.5e-28) {
		tmp = 2.0 / ((2.0 * (k_m * k_m)) * ((t_m / l) * ((t_m * t_m) / l)));
	} else {
		tmp = (2.0 * pow(l, 2.0)) / (t_m * pow(k_m, 4.0));
	}
	return t_s * tmp;
}
k_m = abs(k)
t\_m = abs(t)
t\_s = copysign(1.0d0, t)
real(8) function code(t_s, t_m, l, k_m)
    real(8), intent (in) :: t_s
    real(8), intent (in) :: t_m
    real(8), intent (in) :: l
    real(8), intent (in) :: k_m
    real(8) :: tmp
    if (k_m <= 7.5d-28) then
        tmp = 2.0d0 / ((2.0d0 * (k_m * k_m)) * ((t_m / l) * ((t_m * t_m) / l)))
    else
        tmp = (2.0d0 * (l ** 2.0d0)) / (t_m * (k_m ** 4.0d0))
    end if
    code = t_s * tmp
end function
k_m = Math.abs(k);
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_m) {
	double tmp;
	if (k_m <= 7.5e-28) {
		tmp = 2.0 / ((2.0 * (k_m * k_m)) * ((t_m / l) * ((t_m * t_m) / l)));
	} else {
		tmp = (2.0 * Math.pow(l, 2.0)) / (t_m * Math.pow(k_m, 4.0));
	}
	return t_s * tmp;
}
k_m = math.fabs(k)
t\_m = math.fabs(t)
t\_s = math.copysign(1.0, t)
def code(t_s, t_m, l, k_m):
	tmp = 0
	if k_m <= 7.5e-28:
		tmp = 2.0 / ((2.0 * (k_m * k_m)) * ((t_m / l) * ((t_m * t_m) / l)))
	else:
		tmp = (2.0 * math.pow(l, 2.0)) / (t_m * math.pow(k_m, 4.0))
	return t_s * tmp
k_m = abs(k)
t\_m = abs(t)
t\_s = copysign(1.0, t)
function code(t_s, t_m, l, k_m)
	tmp = 0.0
	if (k_m <= 7.5e-28)
		tmp = Float64(2.0 / Float64(Float64(2.0 * Float64(k_m * k_m)) * Float64(Float64(t_m / l) * Float64(Float64(t_m * t_m) / l))));
	else
		tmp = Float64(Float64(2.0 * (l ^ 2.0)) / Float64(t_m * (k_m ^ 4.0)));
	end
	return Float64(t_s * tmp)
end
k_m = abs(k);
t\_m = abs(t);
t\_s = sign(t) * abs(1.0);
function tmp_2 = code(t_s, t_m, l, k_m)
	tmp = 0.0;
	if (k_m <= 7.5e-28)
		tmp = 2.0 / ((2.0 * (k_m * k_m)) * ((t_m / l) * ((t_m * t_m) / l)));
	else
		tmp = (2.0 * (l ^ 2.0)) / (t_m * (k_m ^ 4.0));
	end
	tmp_2 = t_s * tmp;
end
k_m = N[Abs[k], $MachinePrecision]
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$95$m_] := N[(t$95$s * If[LessEqual[k$95$m, 7.5e-28], N[(2.0 / N[(N[(2.0 * N[(k$95$m * k$95$m), $MachinePrecision]), $MachinePrecision] * N[(N[(t$95$m / l), $MachinePrecision] * N[(N[(t$95$m * t$95$m), $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(2.0 * N[Power[l, 2.0], $MachinePrecision]), $MachinePrecision] / N[(t$95$m * N[Power[k$95$m, 4.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]), $MachinePrecision]
\begin{array}{l}
k_m = \left|k\right|
\\
t\_m = \left|t\right|
\\
t\_s = \mathsf{copysign}\left(1, t\right)

\\
t\_s \cdot \begin{array}{l}
\mathbf{if}\;k\_m \leq 7.5 \cdot 10^{-28}:\\
\;\;\;\;\frac{2}{\left(2 \cdot \left(k\_m \cdot k\_m\right)\right) \cdot \left(\frac{t\_m}{\ell} \cdot \frac{t\_m \cdot t\_m}{\ell}\right)}\\

\mathbf{else}:\\
\;\;\;\;\frac{2 \cdot {\ell}^{2}}{t\_m \cdot {k\_m}^{4}}\\


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

    1. Initial program 58.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. Simplified61.7%

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

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

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

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

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

        \[\leadsto \frac{2}{\frac{\color{blue}{\left(t \cdot t\right) \cdot t}}{\ell \cdot \ell} \cdot \left(2 \cdot \left(k \cdot k\right)\right)} \]
      3. times-frac62.9%

        \[\leadsto \frac{2}{\color{blue}{\left(\frac{t \cdot t}{\ell} \cdot \frac{t}{\ell}\right)} \cdot \left(2 \cdot \left(k \cdot k\right)\right)} \]
      4. pow262.9%

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

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

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

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

    if 7.5000000000000003e-28 < k

    1. Initial program 50.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. Simplified50.3%

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

      \[\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-*r/69.1%

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

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

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

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

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

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

      \[\leadsto \color{blue}{\frac{2 \cdot {\ell}^{2}}{t \cdot {k}^{4}}} \]
  3. Recombined 2 regimes into one program.
  4. Final simplification60.4%

    \[\leadsto \begin{array}{l} \mathbf{if}\;k \leq 7.5 \cdot 10^{-28}:\\ \;\;\;\;\frac{2}{\left(2 \cdot \left(k \cdot k\right)\right) \cdot \left(\frac{t}{\ell} \cdot \frac{t \cdot t}{\ell}\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{2 \cdot {\ell}^{2}}{t \cdot {k}^{4}}\\ \end{array} \]
  5. Add Preprocessing

Alternative 14: 56.7% accurate, 24.8× speedup?

\[\begin{array}{l} k_m = \left|k\right| \\ t\_m = \left|t\right| \\ t\_s = \mathsf{copysign}\left(1, t\right) \\ t\_s \cdot \frac{2}{\left(2 \cdot \left(k\_m \cdot k\_m\right)\right) \cdot \left(\frac{t\_m}{\ell} \cdot \frac{t\_m \cdot t\_m}{\ell}\right)} \end{array} \]
k_m = (fabs.f64 k)
t\_m = (fabs.f64 t)
t\_s = (copysign.f64 #s(literal 1 binary64) t)
(FPCore (t_s t_m l k_m)
 :precision binary64
 (* t_s (/ 2.0 (* (* 2.0 (* k_m k_m)) (* (/ t_m l) (/ (* t_m t_m) l))))))
k_m = fabs(k);
t\_m = fabs(t);
t\_s = copysign(1.0, t);
double code(double t_s, double t_m, double l, double k_m) {
	return t_s * (2.0 / ((2.0 * (k_m * k_m)) * ((t_m / l) * ((t_m * t_m) / l))));
}
k_m = abs(k)
t\_m = abs(t)
t\_s = copysign(1.0d0, t)
real(8) function code(t_s, t_m, l, k_m)
    real(8), intent (in) :: t_s
    real(8), intent (in) :: t_m
    real(8), intent (in) :: l
    real(8), intent (in) :: k_m
    code = t_s * (2.0d0 / ((2.0d0 * (k_m * k_m)) * ((t_m / l) * ((t_m * t_m) / l))))
end function
k_m = Math.abs(k);
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_m) {
	return t_s * (2.0 / ((2.0 * (k_m * k_m)) * ((t_m / l) * ((t_m * t_m) / l))));
}
k_m = math.fabs(k)
t\_m = math.fabs(t)
t\_s = math.copysign(1.0, t)
def code(t_s, t_m, l, k_m):
	return t_s * (2.0 / ((2.0 * (k_m * k_m)) * ((t_m / l) * ((t_m * t_m) / l))))
k_m = abs(k)
t\_m = abs(t)
t\_s = copysign(1.0, t)
function code(t_s, t_m, l, k_m)
	return Float64(t_s * Float64(2.0 / Float64(Float64(2.0 * Float64(k_m * k_m)) * Float64(Float64(t_m / l) * Float64(Float64(t_m * t_m) / l)))))
end
k_m = abs(k);
t\_m = abs(t);
t\_s = sign(t) * abs(1.0);
function tmp = code(t_s, t_m, l, k_m)
	tmp = t_s * (2.0 / ((2.0 * (k_m * k_m)) * ((t_m / l) * ((t_m * t_m) / l))));
end
k_m = N[Abs[k], $MachinePrecision]
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$95$m_] := N[(t$95$s * N[(2.0 / N[(N[(2.0 * N[(k$95$m * k$95$m), $MachinePrecision]), $MachinePrecision] * N[(N[(t$95$m / l), $MachinePrecision] * N[(N[(t$95$m * t$95$m), $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
k_m = \left|k\right|
\\
t\_m = \left|t\right|
\\
t\_s = \mathsf{copysign}\left(1, t\right)

\\
t\_s \cdot \frac{2}{\left(2 \cdot \left(k\_m \cdot k\_m\right)\right) \cdot \left(\frac{t\_m}{\ell} \cdot \frac{t\_m \cdot t\_m}{\ell}\right)}
\end{array}
Derivation
  1. Initial program 56.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. Simplified59.9%

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \frac{2}{\left(2 \cdot \left(k \cdot k\right)\right) \cdot \left(\frac{t}{\ell} \cdot \frac{t \cdot t}{\ell}\right)} \]
  12. Add Preprocessing

Reproduce

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