Toniolo and Linder, Equation (10-)

Percentage Accurate: 35.9% → 85.4%
Time: 34.5s
Alternatives: 22
Speedup: 3.8×

Specification

?
\[\begin{array}{l} \\ \frac{2}{\left(\left(\frac{{t}^{3}}{\ell \cdot \ell} \cdot \sin k\right) \cdot \tan k\right) \cdot \left(\left(1 + {\left(\frac{k}{t}\right)}^{2}\right) - 1\right)} \end{array} \]
(FPCore (t l k)
 :precision binary64
 (/
  2.0
  (*
   (* (* (/ (pow t 3.0) (* l l)) (sin k)) (tan k))
   (- (+ 1.0 (pow (/ k t) 2.0)) 1.0))))
double code(double t, double l, double k) {
	return 2.0 / ((((pow(t, 3.0) / (l * l)) * sin(k)) * tan(k)) * ((1.0 + pow((k / t), 2.0)) - 1.0));
}
real(8) function code(t, l, k)
    real(8), intent (in) :: t
    real(8), intent (in) :: l
    real(8), intent (in) :: k
    code = 2.0d0 / (((((t ** 3.0d0) / (l * l)) * sin(k)) * tan(k)) * ((1.0d0 + ((k / t) ** 2.0d0)) - 1.0d0))
end function
public static double code(double t, double l, double k) {
	return 2.0 / ((((Math.pow(t, 3.0) / (l * l)) * Math.sin(k)) * Math.tan(k)) * ((1.0 + Math.pow((k / t), 2.0)) - 1.0));
}
def code(t, l, k):
	return 2.0 / ((((math.pow(t, 3.0) / (l * l)) * math.sin(k)) * math.tan(k)) * ((1.0 + math.pow((k / t), 2.0)) - 1.0))
function code(t, l, k)
	return Float64(2.0 / Float64(Float64(Float64(Float64((t ^ 3.0) / Float64(l * l)) * sin(k)) * tan(k)) * Float64(Float64(1.0 + (Float64(k / t) ^ 2.0)) - 1.0)))
end
function tmp = code(t, l, k)
	tmp = 2.0 / (((((t ^ 3.0) / (l * l)) * sin(k)) * tan(k)) * ((1.0 + ((k / t) ^ 2.0)) - 1.0));
end
code[t_, l_, k_] := N[(2.0 / N[(N[(N[(N[(N[Power[t, 3.0], $MachinePrecision] / N[(l * l), $MachinePrecision]), $MachinePrecision] * N[Sin[k], $MachinePrecision]), $MachinePrecision] * N[Tan[k], $MachinePrecision]), $MachinePrecision] * N[(N[(1.0 + N[Power[N[(k / t), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision] - 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}

\\
\frac{2}{\left(\left(\frac{{t}^{3}}{\ell \cdot \ell} \cdot \sin k\right) \cdot \tan k\right) \cdot \left(\left(1 + {\left(\frac{k}{t}\right)}^{2}\right) - 1\right)}
\end{array}

Sampling outcomes in binary64 precision:

Local Percentage Accuracy vs ?

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

Accuracy vs Speed?

Herbie found 22 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: 35.9% 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: 85.4% accurate, 0.3× speedup?

\[\begin{array}{l} l_m = \left|\ell\right| \\ \begin{array}{l} t_1 := \sqrt[3]{\sin k \cdot \tan k}\\ t_2 := \frac{t}{{\left(\sqrt[3]{l\_m}\right)}^{2}} \cdot t\_1\\ t_3 := \frac{\sqrt{2}}{\frac{k}{t}}\\ t_4 := \frac{t\_3}{{t\_2}^{2}}\\ t_5 := \sqrt[3]{\sqrt{l\_m}}\\ \mathbf{if}\;l\_m \leq 6.3 \cdot 10^{-164}:\\ \;\;\;\;t\_4 \cdot \frac{t\_3}{t\_2}\\ \mathbf{elif}\;l\_m \leq 5.4 \cdot 10^{+47}:\\ \;\;\;\;\frac{2}{t \cdot {k}^{2}} \cdot \frac{\cos k \cdot {l\_m}^{2}}{{\sin k}^{2}}\\ \mathbf{else}:\\ \;\;\;\;t\_4 \cdot \frac{t\_3}{t\_1 \cdot \frac{t}{{\left(t\_5 \cdot t\_5\right)}^{2}}}\\ \end{array} \end{array} \]
l_m = (fabs.f64 l)
(FPCore (t l_m k)
 :precision binary64
 (let* ((t_1 (cbrt (* (sin k) (tan k))))
        (t_2 (* (/ t (pow (cbrt l_m) 2.0)) t_1))
        (t_3 (/ (sqrt 2.0) (/ k t)))
        (t_4 (/ t_3 (pow t_2 2.0)))
        (t_5 (cbrt (sqrt l_m))))
   (if (<= l_m 6.3e-164)
     (* t_4 (/ t_3 t_2))
     (if (<= l_m 5.4e+47)
       (*
        (/ 2.0 (* t (pow k 2.0)))
        (/ (* (cos k) (pow l_m 2.0)) (pow (sin k) 2.0)))
       (* t_4 (/ t_3 (* t_1 (/ t (pow (* t_5 t_5) 2.0)))))))))
l_m = fabs(l);
double code(double t, double l_m, double k) {
	double t_1 = cbrt((sin(k) * tan(k)));
	double t_2 = (t / pow(cbrt(l_m), 2.0)) * t_1;
	double t_3 = sqrt(2.0) / (k / t);
	double t_4 = t_3 / pow(t_2, 2.0);
	double t_5 = cbrt(sqrt(l_m));
	double tmp;
	if (l_m <= 6.3e-164) {
		tmp = t_4 * (t_3 / t_2);
	} else if (l_m <= 5.4e+47) {
		tmp = (2.0 / (t * pow(k, 2.0))) * ((cos(k) * pow(l_m, 2.0)) / pow(sin(k), 2.0));
	} else {
		tmp = t_4 * (t_3 / (t_1 * (t / pow((t_5 * t_5), 2.0))));
	}
	return tmp;
}
l_m = Math.abs(l);
public static double code(double t, double l_m, double k) {
	double t_1 = Math.cbrt((Math.sin(k) * Math.tan(k)));
	double t_2 = (t / Math.pow(Math.cbrt(l_m), 2.0)) * t_1;
	double t_3 = Math.sqrt(2.0) / (k / t);
	double t_4 = t_3 / Math.pow(t_2, 2.0);
	double t_5 = Math.cbrt(Math.sqrt(l_m));
	double tmp;
	if (l_m <= 6.3e-164) {
		tmp = t_4 * (t_3 / t_2);
	} else if (l_m <= 5.4e+47) {
		tmp = (2.0 / (t * Math.pow(k, 2.0))) * ((Math.cos(k) * Math.pow(l_m, 2.0)) / Math.pow(Math.sin(k), 2.0));
	} else {
		tmp = t_4 * (t_3 / (t_1 * (t / Math.pow((t_5 * t_5), 2.0))));
	}
	return tmp;
}
l_m = abs(l)
function code(t, l_m, k)
	t_1 = cbrt(Float64(sin(k) * tan(k)))
	t_2 = Float64(Float64(t / (cbrt(l_m) ^ 2.0)) * t_1)
	t_3 = Float64(sqrt(2.0) / Float64(k / t))
	t_4 = Float64(t_3 / (t_2 ^ 2.0))
	t_5 = cbrt(sqrt(l_m))
	tmp = 0.0
	if (l_m <= 6.3e-164)
		tmp = Float64(t_4 * Float64(t_3 / t_2));
	elseif (l_m <= 5.4e+47)
		tmp = Float64(Float64(2.0 / Float64(t * (k ^ 2.0))) * Float64(Float64(cos(k) * (l_m ^ 2.0)) / (sin(k) ^ 2.0)));
	else
		tmp = Float64(t_4 * Float64(t_3 / Float64(t_1 * Float64(t / (Float64(t_5 * t_5) ^ 2.0)))));
	end
	return tmp
end
l_m = N[Abs[l], $MachinePrecision]
code[t_, l$95$m_, k_] := Block[{t$95$1 = N[Power[N[(N[Sin[k], $MachinePrecision] * N[Tan[k], $MachinePrecision]), $MachinePrecision], 1/3], $MachinePrecision]}, Block[{t$95$2 = N[(N[(t / N[Power[N[Power[l$95$m, 1/3], $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision] * t$95$1), $MachinePrecision]}, Block[{t$95$3 = N[(N[Sqrt[2.0], $MachinePrecision] / N[(k / t), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$4 = N[(t$95$3 / N[Power[t$95$2, 2.0], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$5 = N[Power[N[Sqrt[l$95$m], $MachinePrecision], 1/3], $MachinePrecision]}, If[LessEqual[l$95$m, 6.3e-164], N[(t$95$4 * N[(t$95$3 / t$95$2), $MachinePrecision]), $MachinePrecision], If[LessEqual[l$95$m, 5.4e+47], N[(N[(2.0 / N[(t * N[Power[k, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(N[(N[Cos[k], $MachinePrecision] * N[Power[l$95$m, 2.0], $MachinePrecision]), $MachinePrecision] / N[Power[N[Sin[k], $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(t$95$4 * N[(t$95$3 / N[(t$95$1 * N[(t / N[Power[N[(t$95$5 * t$95$5), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]]]
\begin{array}{l}
l_m = \left|\ell\right|

\\
\begin{array}{l}
t_1 := \sqrt[3]{\sin k \cdot \tan k}\\
t_2 := \frac{t}{{\left(\sqrt[3]{l\_m}\right)}^{2}} \cdot t\_1\\
t_3 := \frac{\sqrt{2}}{\frac{k}{t}}\\
t_4 := \frac{t\_3}{{t\_2}^{2}}\\
t_5 := \sqrt[3]{\sqrt{l\_m}}\\
\mathbf{if}\;l\_m \leq 6.3 \cdot 10^{-164}:\\
\;\;\;\;t\_4 \cdot \frac{t\_3}{t\_2}\\

\mathbf{elif}\;l\_m \leq 5.4 \cdot 10^{+47}:\\
\;\;\;\;\frac{2}{t \cdot {k}^{2}} \cdot \frac{\cos k \cdot {l\_m}^{2}}{{\sin k}^{2}}\\

\mathbf{else}:\\
\;\;\;\;t\_4 \cdot \frac{t\_3}{t\_1 \cdot \frac{t}{{\left(t\_5 \cdot t\_5\right)}^{2}}}\\


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if l < 6.30000000000000009e-164

    1. Initial program 38.8%

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

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

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

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

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

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

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

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

    if 6.30000000000000009e-164 < l < 5.39999999999999991e47

    1. Initial program 53.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. Simplified64.8%

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

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

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

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

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

        \[\leadsto \frac{2}{{k}^{2} \cdot t} \cdot \frac{\color{blue}{\cos k \cdot {\ell}^{2}}}{{\sin k}^{2}} \]
    6. Simplified95.6%

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

    if 5.39999999999999991e47 < l

    1. Initial program 47.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 2: 85.9% accurate, 0.3× speedup?

\[\begin{array}{l} l_m = \left|\ell\right| \\ \begin{array}{l} t_1 := \frac{t}{{\left(\sqrt[3]{l\_m}\right)}^{2}} \cdot \sqrt[3]{\sin k \cdot \tan k}\\ t_2 := {\sin k}^{2}\\ t_3 := \frac{\sqrt{2}}{\frac{k}{t}}\\ t_4 := \frac{t\_3}{t\_1}\\ \mathbf{if}\;l\_m \cdot l\_m \leq 0:\\ \;\;\;\;\frac{t\_3}{{t\_1}^{2}} \cdot t\_4\\ \mathbf{elif}\;l\_m \cdot l\_m \leq 2 \cdot 10^{+194}:\\ \;\;\;\;\frac{2}{t \cdot {k}^{2}} \cdot \frac{\cos k \cdot {l\_m}^{2}}{t\_2}\\ \mathbf{else}:\\ \;\;\;\;t\_4 \cdot \frac{1}{\frac{{\left(\sqrt[3]{\frac{t\_2}{\cos k}} \cdot \left(t \cdot {\left(\sqrt[3]{l\_m}\right)}^{-2}\right)\right)}^{2}}{t \cdot \frac{\sqrt{2}}{k}}}\\ \end{array} \end{array} \]
l_m = (fabs.f64 l)
(FPCore (t l_m k)
 :precision binary64
 (let* ((t_1 (* (/ t (pow (cbrt l_m) 2.0)) (cbrt (* (sin k) (tan k)))))
        (t_2 (pow (sin k) 2.0))
        (t_3 (/ (sqrt 2.0) (/ k t)))
        (t_4 (/ t_3 t_1)))
   (if (<= (* l_m l_m) 0.0)
     (* (/ t_3 (pow t_1 2.0)) t_4)
     (if (<= (* l_m l_m) 2e+194)
       (* (/ 2.0 (* t (pow k 2.0))) (/ (* (cos k) (pow l_m 2.0)) t_2))
       (*
        t_4
        (/
         1.0
         (/
          (pow (* (cbrt (/ t_2 (cos k))) (* t (pow (cbrt l_m) -2.0))) 2.0)
          (* t (/ (sqrt 2.0) k)))))))))
l_m = fabs(l);
double code(double t, double l_m, double k) {
	double t_1 = (t / pow(cbrt(l_m), 2.0)) * cbrt((sin(k) * tan(k)));
	double t_2 = pow(sin(k), 2.0);
	double t_3 = sqrt(2.0) / (k / t);
	double t_4 = t_3 / t_1;
	double tmp;
	if ((l_m * l_m) <= 0.0) {
		tmp = (t_3 / pow(t_1, 2.0)) * t_4;
	} else if ((l_m * l_m) <= 2e+194) {
		tmp = (2.0 / (t * pow(k, 2.0))) * ((cos(k) * pow(l_m, 2.0)) / t_2);
	} else {
		tmp = t_4 * (1.0 / (pow((cbrt((t_2 / cos(k))) * (t * pow(cbrt(l_m), -2.0))), 2.0) / (t * (sqrt(2.0) / k))));
	}
	return tmp;
}
l_m = Math.abs(l);
public static double code(double t, double l_m, double k) {
	double t_1 = (t / Math.pow(Math.cbrt(l_m), 2.0)) * Math.cbrt((Math.sin(k) * Math.tan(k)));
	double t_2 = Math.pow(Math.sin(k), 2.0);
	double t_3 = Math.sqrt(2.0) / (k / t);
	double t_4 = t_3 / t_1;
	double tmp;
	if ((l_m * l_m) <= 0.0) {
		tmp = (t_3 / Math.pow(t_1, 2.0)) * t_4;
	} else if ((l_m * l_m) <= 2e+194) {
		tmp = (2.0 / (t * Math.pow(k, 2.0))) * ((Math.cos(k) * Math.pow(l_m, 2.0)) / t_2);
	} else {
		tmp = t_4 * (1.0 / (Math.pow((Math.cbrt((t_2 / Math.cos(k))) * (t * Math.pow(Math.cbrt(l_m), -2.0))), 2.0) / (t * (Math.sqrt(2.0) / k))));
	}
	return tmp;
}
l_m = abs(l)
function code(t, l_m, k)
	t_1 = Float64(Float64(t / (cbrt(l_m) ^ 2.0)) * cbrt(Float64(sin(k) * tan(k))))
	t_2 = sin(k) ^ 2.0
	t_3 = Float64(sqrt(2.0) / Float64(k / t))
	t_4 = Float64(t_3 / t_1)
	tmp = 0.0
	if (Float64(l_m * l_m) <= 0.0)
		tmp = Float64(Float64(t_3 / (t_1 ^ 2.0)) * t_4);
	elseif (Float64(l_m * l_m) <= 2e+194)
		tmp = Float64(Float64(2.0 / Float64(t * (k ^ 2.0))) * Float64(Float64(cos(k) * (l_m ^ 2.0)) / t_2));
	else
		tmp = Float64(t_4 * Float64(1.0 / Float64((Float64(cbrt(Float64(t_2 / cos(k))) * Float64(t * (cbrt(l_m) ^ -2.0))) ^ 2.0) / Float64(t * Float64(sqrt(2.0) / k)))));
	end
	return tmp
end
l_m = N[Abs[l], $MachinePrecision]
code[t_, l$95$m_, k_] := Block[{t$95$1 = N[(N[(t / N[Power[N[Power[l$95$m, 1/3], $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision] * N[Power[N[(N[Sin[k], $MachinePrecision] * N[Tan[k], $MachinePrecision]), $MachinePrecision], 1/3], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[Power[N[Sin[k], $MachinePrecision], 2.0], $MachinePrecision]}, Block[{t$95$3 = N[(N[Sqrt[2.0], $MachinePrecision] / N[(k / t), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$4 = N[(t$95$3 / t$95$1), $MachinePrecision]}, If[LessEqual[N[(l$95$m * l$95$m), $MachinePrecision], 0.0], N[(N[(t$95$3 / N[Power[t$95$1, 2.0], $MachinePrecision]), $MachinePrecision] * t$95$4), $MachinePrecision], If[LessEqual[N[(l$95$m * l$95$m), $MachinePrecision], 2e+194], N[(N[(2.0 / N[(t * N[Power[k, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(N[(N[Cos[k], $MachinePrecision] * N[Power[l$95$m, 2.0], $MachinePrecision]), $MachinePrecision] / t$95$2), $MachinePrecision]), $MachinePrecision], N[(t$95$4 * N[(1.0 / N[(N[Power[N[(N[Power[N[(t$95$2 / N[Cos[k], $MachinePrecision]), $MachinePrecision], 1/3], $MachinePrecision] * N[(t * N[Power[N[Power[l$95$m, 1/3], $MachinePrecision], -2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision] / N[(t * N[(N[Sqrt[2.0], $MachinePrecision] / k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]]
\begin{array}{l}
l_m = \left|\ell\right|

\\
\begin{array}{l}
t_1 := \frac{t}{{\left(\sqrt[3]{l\_m}\right)}^{2}} \cdot \sqrt[3]{\sin k \cdot \tan k}\\
t_2 := {\sin k}^{2}\\
t_3 := \frac{\sqrt{2}}{\frac{k}{t}}\\
t_4 := \frac{t\_3}{t\_1}\\
\mathbf{if}\;l\_m \cdot l\_m \leq 0:\\
\;\;\;\;\frac{t\_3}{{t\_1}^{2}} \cdot t\_4\\

\mathbf{elif}\;l\_m \cdot l\_m \leq 2 \cdot 10^{+194}:\\
\;\;\;\;\frac{2}{t \cdot {k}^{2}} \cdot \frac{\cos k \cdot {l\_m}^{2}}{t\_2}\\

\mathbf{else}:\\
\;\;\;\;t\_4 \cdot \frac{1}{\frac{{\left(\sqrt[3]{\frac{t\_2}{\cos k}} \cdot \left(t \cdot {\left(\sqrt[3]{l\_m}\right)}^{-2}\right)\right)}^{2}}{t \cdot \frac{\sqrt{2}}{k}}}\\


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

    1. Initial program 29.0%

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

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

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

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

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

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

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

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

    if 0.0 < (*.f64 l l) < 1.99999999999999989e194

    1. Initial program 54.9%

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

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

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

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

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

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

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

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

    if 1.99999999999999989e194 < (*.f64 l l)

    1. Initial program 41.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 3: 85.9% accurate, 0.3× speedup?

\[\begin{array}{l} l_m = \left|\ell\right| \\ \begin{array}{l} t_1 := \frac{t}{{\left(\sqrt[3]{l\_m}\right)}^{2}} \cdot \sqrt[3]{\sin k \cdot \tan k}\\ t_2 := {\sin k}^{2}\\ t_3 := \frac{\sqrt{2}}{\frac{k}{t}}\\ t_4 := \frac{t\_3}{t\_1}\\ \mathbf{if}\;l\_m \cdot l\_m \leq 0:\\ \;\;\;\;\frac{t\_3}{{t\_1}^{2}} \cdot t\_4\\ \mathbf{elif}\;l\_m \cdot l\_m \leq 2 \cdot 10^{+194}:\\ \;\;\;\;\frac{2}{t \cdot {k}^{2}} \cdot \frac{\cos k \cdot {l\_m}^{2}}{t\_2}\\ \mathbf{else}:\\ \;\;\;\;t\_4 \cdot \left(\left(t \cdot \frac{\sqrt{2}}{k}\right) \cdot {\left(\sqrt[3]{\frac{t\_2}{\cos k}} \cdot \left(t \cdot {\left(\sqrt[3]{l\_m}\right)}^{-2}\right)\right)}^{-2}\right)\\ \end{array} \end{array} \]
l_m = (fabs.f64 l)
(FPCore (t l_m k)
 :precision binary64
 (let* ((t_1 (* (/ t (pow (cbrt l_m) 2.0)) (cbrt (* (sin k) (tan k)))))
        (t_2 (pow (sin k) 2.0))
        (t_3 (/ (sqrt 2.0) (/ k t)))
        (t_4 (/ t_3 t_1)))
   (if (<= (* l_m l_m) 0.0)
     (* (/ t_3 (pow t_1 2.0)) t_4)
     (if (<= (* l_m l_m) 2e+194)
       (* (/ 2.0 (* t (pow k 2.0))) (/ (* (cos k) (pow l_m 2.0)) t_2))
       (*
        t_4
        (*
         (* t (/ (sqrt 2.0) k))
         (pow
          (* (cbrt (/ t_2 (cos k))) (* t (pow (cbrt l_m) -2.0)))
          -2.0)))))))
l_m = fabs(l);
double code(double t, double l_m, double k) {
	double t_1 = (t / pow(cbrt(l_m), 2.0)) * cbrt((sin(k) * tan(k)));
	double t_2 = pow(sin(k), 2.0);
	double t_3 = sqrt(2.0) / (k / t);
	double t_4 = t_3 / t_1;
	double tmp;
	if ((l_m * l_m) <= 0.0) {
		tmp = (t_3 / pow(t_1, 2.0)) * t_4;
	} else if ((l_m * l_m) <= 2e+194) {
		tmp = (2.0 / (t * pow(k, 2.0))) * ((cos(k) * pow(l_m, 2.0)) / t_2);
	} else {
		tmp = t_4 * ((t * (sqrt(2.0) / k)) * pow((cbrt((t_2 / cos(k))) * (t * pow(cbrt(l_m), -2.0))), -2.0));
	}
	return tmp;
}
l_m = Math.abs(l);
public static double code(double t, double l_m, double k) {
	double t_1 = (t / Math.pow(Math.cbrt(l_m), 2.0)) * Math.cbrt((Math.sin(k) * Math.tan(k)));
	double t_2 = Math.pow(Math.sin(k), 2.0);
	double t_3 = Math.sqrt(2.0) / (k / t);
	double t_4 = t_3 / t_1;
	double tmp;
	if ((l_m * l_m) <= 0.0) {
		tmp = (t_3 / Math.pow(t_1, 2.0)) * t_4;
	} else if ((l_m * l_m) <= 2e+194) {
		tmp = (2.0 / (t * Math.pow(k, 2.0))) * ((Math.cos(k) * Math.pow(l_m, 2.0)) / t_2);
	} else {
		tmp = t_4 * ((t * (Math.sqrt(2.0) / k)) * Math.pow((Math.cbrt((t_2 / Math.cos(k))) * (t * Math.pow(Math.cbrt(l_m), -2.0))), -2.0));
	}
	return tmp;
}
l_m = abs(l)
function code(t, l_m, k)
	t_1 = Float64(Float64(t / (cbrt(l_m) ^ 2.0)) * cbrt(Float64(sin(k) * tan(k))))
	t_2 = sin(k) ^ 2.0
	t_3 = Float64(sqrt(2.0) / Float64(k / t))
	t_4 = Float64(t_3 / t_1)
	tmp = 0.0
	if (Float64(l_m * l_m) <= 0.0)
		tmp = Float64(Float64(t_3 / (t_1 ^ 2.0)) * t_4);
	elseif (Float64(l_m * l_m) <= 2e+194)
		tmp = Float64(Float64(2.0 / Float64(t * (k ^ 2.0))) * Float64(Float64(cos(k) * (l_m ^ 2.0)) / t_2));
	else
		tmp = Float64(t_4 * Float64(Float64(t * Float64(sqrt(2.0) / k)) * (Float64(cbrt(Float64(t_2 / cos(k))) * Float64(t * (cbrt(l_m) ^ -2.0))) ^ -2.0)));
	end
	return tmp
end
l_m = N[Abs[l], $MachinePrecision]
code[t_, l$95$m_, k_] := Block[{t$95$1 = N[(N[(t / N[Power[N[Power[l$95$m, 1/3], $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision] * N[Power[N[(N[Sin[k], $MachinePrecision] * N[Tan[k], $MachinePrecision]), $MachinePrecision], 1/3], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[Power[N[Sin[k], $MachinePrecision], 2.0], $MachinePrecision]}, Block[{t$95$3 = N[(N[Sqrt[2.0], $MachinePrecision] / N[(k / t), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$4 = N[(t$95$3 / t$95$1), $MachinePrecision]}, If[LessEqual[N[(l$95$m * l$95$m), $MachinePrecision], 0.0], N[(N[(t$95$3 / N[Power[t$95$1, 2.0], $MachinePrecision]), $MachinePrecision] * t$95$4), $MachinePrecision], If[LessEqual[N[(l$95$m * l$95$m), $MachinePrecision], 2e+194], N[(N[(2.0 / N[(t * N[Power[k, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(N[(N[Cos[k], $MachinePrecision] * N[Power[l$95$m, 2.0], $MachinePrecision]), $MachinePrecision] / t$95$2), $MachinePrecision]), $MachinePrecision], N[(t$95$4 * N[(N[(t * N[(N[Sqrt[2.0], $MachinePrecision] / k), $MachinePrecision]), $MachinePrecision] * N[Power[N[(N[Power[N[(t$95$2 / N[Cos[k], $MachinePrecision]), $MachinePrecision], 1/3], $MachinePrecision] * N[(t * N[Power[N[Power[l$95$m, 1/3], $MachinePrecision], -2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], -2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]]
\begin{array}{l}
l_m = \left|\ell\right|

\\
\begin{array}{l}
t_1 := \frac{t}{{\left(\sqrt[3]{l\_m}\right)}^{2}} \cdot \sqrt[3]{\sin k \cdot \tan k}\\
t_2 := {\sin k}^{2}\\
t_3 := \frac{\sqrt{2}}{\frac{k}{t}}\\
t_4 := \frac{t\_3}{t\_1}\\
\mathbf{if}\;l\_m \cdot l\_m \leq 0:\\
\;\;\;\;\frac{t\_3}{{t\_1}^{2}} \cdot t\_4\\

\mathbf{elif}\;l\_m \cdot l\_m \leq 2 \cdot 10^{+194}:\\
\;\;\;\;\frac{2}{t \cdot {k}^{2}} \cdot \frac{\cos k \cdot {l\_m}^{2}}{t\_2}\\

\mathbf{else}:\\
\;\;\;\;t\_4 \cdot \left(\left(t \cdot \frac{\sqrt{2}}{k}\right) \cdot {\left(\sqrt[3]{\frac{t\_2}{\cos k}} \cdot \left(t \cdot {\left(\sqrt[3]{l\_m}\right)}^{-2}\right)\right)}^{-2}\right)\\


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

    1. Initial program 29.0%

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

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

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

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

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

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

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

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

    if 0.0 < (*.f64 l l) < 1.99999999999999989e194

    1. Initial program 54.9%

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

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

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

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

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

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

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

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

    if 1.99999999999999989e194 < (*.f64 l l)

    1. Initial program 41.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 4: 85.4% accurate, 0.3× speedup?

\[\begin{array}{l} l_m = \left|\ell\right| \\ \begin{array}{l} t_1 := \frac{t}{{\left(\sqrt[3]{l\_m}\right)}^{2}}\\ t_2 := t\_1 \cdot \sqrt[3]{\sin k \cdot \tan k}\\ t_3 := {\sin k}^{2}\\ t_4 := \frac{\sqrt{2}}{\frac{k}{t}}\\ t_5 := \frac{t\_4}{t\_2}\\ \mathbf{if}\;l\_m \leq 6.3 \cdot 10^{-164}:\\ \;\;\;\;\frac{t\_4}{{t\_2}^{2}} \cdot t\_5\\ \mathbf{elif}\;l\_m \leq 7 \cdot 10^{+47}:\\ \;\;\;\;\frac{2}{t \cdot {k}^{2}} \cdot \frac{\cos k \cdot {l\_m}^{2}}{t\_3}\\ \mathbf{else}:\\ \;\;\;\;t\_5 \cdot \frac{t\_4}{{\left(t\_1 \cdot \frac{1}{\sqrt[3]{\frac{\cos k}{t\_3}}}\right)}^{2}}\\ \end{array} \end{array} \]
l_m = (fabs.f64 l)
(FPCore (t l_m k)
 :precision binary64
 (let* ((t_1 (/ t (pow (cbrt l_m) 2.0)))
        (t_2 (* t_1 (cbrt (* (sin k) (tan k)))))
        (t_3 (pow (sin k) 2.0))
        (t_4 (/ (sqrt 2.0) (/ k t)))
        (t_5 (/ t_4 t_2)))
   (if (<= l_m 6.3e-164)
     (* (/ t_4 (pow t_2 2.0)) t_5)
     (if (<= l_m 7e+47)
       (* (/ 2.0 (* t (pow k 2.0))) (/ (* (cos k) (pow l_m 2.0)) t_3))
       (* t_5 (/ t_4 (pow (* t_1 (/ 1.0 (cbrt (/ (cos k) t_3)))) 2.0)))))))
l_m = fabs(l);
double code(double t, double l_m, double k) {
	double t_1 = t / pow(cbrt(l_m), 2.0);
	double t_2 = t_1 * cbrt((sin(k) * tan(k)));
	double t_3 = pow(sin(k), 2.0);
	double t_4 = sqrt(2.0) / (k / t);
	double t_5 = t_4 / t_2;
	double tmp;
	if (l_m <= 6.3e-164) {
		tmp = (t_4 / pow(t_2, 2.0)) * t_5;
	} else if (l_m <= 7e+47) {
		tmp = (2.0 / (t * pow(k, 2.0))) * ((cos(k) * pow(l_m, 2.0)) / t_3);
	} else {
		tmp = t_5 * (t_4 / pow((t_1 * (1.0 / cbrt((cos(k) / t_3)))), 2.0));
	}
	return tmp;
}
l_m = Math.abs(l);
public static double code(double t, double l_m, double k) {
	double t_1 = t / Math.pow(Math.cbrt(l_m), 2.0);
	double t_2 = t_1 * Math.cbrt((Math.sin(k) * Math.tan(k)));
	double t_3 = Math.pow(Math.sin(k), 2.0);
	double t_4 = Math.sqrt(2.0) / (k / t);
	double t_5 = t_4 / t_2;
	double tmp;
	if (l_m <= 6.3e-164) {
		tmp = (t_4 / Math.pow(t_2, 2.0)) * t_5;
	} else if (l_m <= 7e+47) {
		tmp = (2.0 / (t * Math.pow(k, 2.0))) * ((Math.cos(k) * Math.pow(l_m, 2.0)) / t_3);
	} else {
		tmp = t_5 * (t_4 / Math.pow((t_1 * (1.0 / Math.cbrt((Math.cos(k) / t_3)))), 2.0));
	}
	return tmp;
}
l_m = abs(l)
function code(t, l_m, k)
	t_1 = Float64(t / (cbrt(l_m) ^ 2.0))
	t_2 = Float64(t_1 * cbrt(Float64(sin(k) * tan(k))))
	t_3 = sin(k) ^ 2.0
	t_4 = Float64(sqrt(2.0) / Float64(k / t))
	t_5 = Float64(t_4 / t_2)
	tmp = 0.0
	if (l_m <= 6.3e-164)
		tmp = Float64(Float64(t_4 / (t_2 ^ 2.0)) * t_5);
	elseif (l_m <= 7e+47)
		tmp = Float64(Float64(2.0 / Float64(t * (k ^ 2.0))) * Float64(Float64(cos(k) * (l_m ^ 2.0)) / t_3));
	else
		tmp = Float64(t_5 * Float64(t_4 / (Float64(t_1 * Float64(1.0 / cbrt(Float64(cos(k) / t_3)))) ^ 2.0)));
	end
	return tmp
end
l_m = N[Abs[l], $MachinePrecision]
code[t_, l$95$m_, k_] := Block[{t$95$1 = N[(t / N[Power[N[Power[l$95$m, 1/3], $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(t$95$1 * N[Power[N[(N[Sin[k], $MachinePrecision] * N[Tan[k], $MachinePrecision]), $MachinePrecision], 1/3], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[Power[N[Sin[k], $MachinePrecision], 2.0], $MachinePrecision]}, Block[{t$95$4 = N[(N[Sqrt[2.0], $MachinePrecision] / N[(k / t), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$5 = N[(t$95$4 / t$95$2), $MachinePrecision]}, If[LessEqual[l$95$m, 6.3e-164], N[(N[(t$95$4 / N[Power[t$95$2, 2.0], $MachinePrecision]), $MachinePrecision] * t$95$5), $MachinePrecision], If[LessEqual[l$95$m, 7e+47], N[(N[(2.0 / N[(t * N[Power[k, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(N[(N[Cos[k], $MachinePrecision] * N[Power[l$95$m, 2.0], $MachinePrecision]), $MachinePrecision] / t$95$3), $MachinePrecision]), $MachinePrecision], N[(t$95$5 * N[(t$95$4 / N[Power[N[(t$95$1 * N[(1.0 / N[Power[N[(N[Cos[k], $MachinePrecision] / t$95$3), $MachinePrecision], 1/3], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]]]
\begin{array}{l}
l_m = \left|\ell\right|

\\
\begin{array}{l}
t_1 := \frac{t}{{\left(\sqrt[3]{l\_m}\right)}^{2}}\\
t_2 := t\_1 \cdot \sqrt[3]{\sin k \cdot \tan k}\\
t_3 := {\sin k}^{2}\\
t_4 := \frac{\sqrt{2}}{\frac{k}{t}}\\
t_5 := \frac{t\_4}{t\_2}\\
\mathbf{if}\;l\_m \leq 6.3 \cdot 10^{-164}:\\
\;\;\;\;\frac{t\_4}{{t\_2}^{2}} \cdot t\_5\\

\mathbf{elif}\;l\_m \leq 7 \cdot 10^{+47}:\\
\;\;\;\;\frac{2}{t \cdot {k}^{2}} \cdot \frac{\cos k \cdot {l\_m}^{2}}{t\_3}\\

\mathbf{else}:\\
\;\;\;\;t\_5 \cdot \frac{t\_4}{{\left(t\_1 \cdot \frac{1}{\sqrt[3]{\frac{\cos k}{t\_3}}}\right)}^{2}}\\


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if l < 6.30000000000000009e-164

    1. Initial program 38.8%

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

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

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

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

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

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

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

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

    if 6.30000000000000009e-164 < l < 7.00000000000000031e47

    1. Initial program 53.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. Simplified64.8%

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

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

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

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

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

        \[\leadsto \frac{2}{{k}^{2} \cdot t} \cdot \frac{\color{blue}{\cos k \cdot {\ell}^{2}}}{{\sin k}^{2}} \]
    6. Simplified95.6%

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

    if 7.00000000000000031e47 < l

    1. Initial program 47.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;\ell \leq 6.3 \cdot 10^{-164}:\\ \;\;\;\;\frac{\frac{\sqrt{2}}{\frac{k}{t}}}{{\left(\frac{t}{{\left(\sqrt[3]{\ell}\right)}^{2}} \cdot \sqrt[3]{\sin k \cdot \tan k}\right)}^{2}} \cdot \frac{\frac{\sqrt{2}}{\frac{k}{t}}}{\frac{t}{{\left(\sqrt[3]{\ell}\right)}^{2}} \cdot \sqrt[3]{\sin k \cdot \tan k}}\\ \mathbf{elif}\;\ell \leq 7 \cdot 10^{+47}:\\ \;\;\;\;\frac{2}{t \cdot {k}^{2}} \cdot \frac{\cos k \cdot {\ell}^{2}}{{\sin k}^{2}}\\ \mathbf{else}:\\ \;\;\;\;\frac{\frac{\sqrt{2}}{\frac{k}{t}}}{\frac{t}{{\left(\sqrt[3]{\ell}\right)}^{2}} \cdot \sqrt[3]{\sin k \cdot \tan k}} \cdot \frac{\frac{\sqrt{2}}{\frac{k}{t}}}{{\left(\frac{t}{{\left(\sqrt[3]{\ell}\right)}^{2}} \cdot \frac{1}{\sqrt[3]{\frac{\cos k}{{\sin k}^{2}}}}\right)}^{2}}\\ \end{array} \]
  5. Add Preprocessing

Alternative 5: 85.8% accurate, 0.3× speedup?

\[\begin{array}{l} l_m = \left|\ell\right| \\ \begin{array}{l} t_1 := \frac{t}{{\left(\sqrt[3]{l\_m}\right)}^{2}}\\ t_2 := t\_1 \cdot \sqrt[3]{\sin k \cdot \tan k}\\ t_3 := \frac{\sqrt{2}}{\frac{k}{t}}\\ t_4 := \frac{t\_3}{t\_2}\\ \mathbf{if}\;l\_m \leq 6.3 \cdot 10^{-164}:\\ \;\;\;\;\frac{t\_3}{{t\_2}^{2}} \cdot t\_4\\ \mathbf{elif}\;l\_m \leq 8.2 \cdot 10^{+98}:\\ \;\;\;\;\frac{2}{t \cdot {k}^{2}} \cdot \frac{\cos k \cdot {l\_m}^{2}}{{\sin k}^{2}}\\ \mathbf{else}:\\ \;\;\;\;t\_4 \cdot \frac{t\_3}{{\left(t\_1 \cdot \left(\sqrt[3]{\tan k} \cdot \sqrt[3]{\sin k}\right)\right)}^{2}}\\ \end{array} \end{array} \]
l_m = (fabs.f64 l)
(FPCore (t l_m k)
 :precision binary64
 (let* ((t_1 (/ t (pow (cbrt l_m) 2.0)))
        (t_2 (* t_1 (cbrt (* (sin k) (tan k)))))
        (t_3 (/ (sqrt 2.0) (/ k t)))
        (t_4 (/ t_3 t_2)))
   (if (<= l_m 6.3e-164)
     (* (/ t_3 (pow t_2 2.0)) t_4)
     (if (<= l_m 8.2e+98)
       (*
        (/ 2.0 (* t (pow k 2.0)))
        (/ (* (cos k) (pow l_m 2.0)) (pow (sin k) 2.0)))
       (* t_4 (/ t_3 (pow (* t_1 (* (cbrt (tan k)) (cbrt (sin k)))) 2.0)))))))
l_m = fabs(l);
double code(double t, double l_m, double k) {
	double t_1 = t / pow(cbrt(l_m), 2.0);
	double t_2 = t_1 * cbrt((sin(k) * tan(k)));
	double t_3 = sqrt(2.0) / (k / t);
	double t_4 = t_3 / t_2;
	double tmp;
	if (l_m <= 6.3e-164) {
		tmp = (t_3 / pow(t_2, 2.0)) * t_4;
	} else if (l_m <= 8.2e+98) {
		tmp = (2.0 / (t * pow(k, 2.0))) * ((cos(k) * pow(l_m, 2.0)) / pow(sin(k), 2.0));
	} else {
		tmp = t_4 * (t_3 / pow((t_1 * (cbrt(tan(k)) * cbrt(sin(k)))), 2.0));
	}
	return tmp;
}
l_m = Math.abs(l);
public static double code(double t, double l_m, double k) {
	double t_1 = t / Math.pow(Math.cbrt(l_m), 2.0);
	double t_2 = t_1 * Math.cbrt((Math.sin(k) * Math.tan(k)));
	double t_3 = Math.sqrt(2.0) / (k / t);
	double t_4 = t_3 / t_2;
	double tmp;
	if (l_m <= 6.3e-164) {
		tmp = (t_3 / Math.pow(t_2, 2.0)) * t_4;
	} else if (l_m <= 8.2e+98) {
		tmp = (2.0 / (t * Math.pow(k, 2.0))) * ((Math.cos(k) * Math.pow(l_m, 2.0)) / Math.pow(Math.sin(k), 2.0));
	} else {
		tmp = t_4 * (t_3 / Math.pow((t_1 * (Math.cbrt(Math.tan(k)) * Math.cbrt(Math.sin(k)))), 2.0));
	}
	return tmp;
}
l_m = abs(l)
function code(t, l_m, k)
	t_1 = Float64(t / (cbrt(l_m) ^ 2.0))
	t_2 = Float64(t_1 * cbrt(Float64(sin(k) * tan(k))))
	t_3 = Float64(sqrt(2.0) / Float64(k / t))
	t_4 = Float64(t_3 / t_2)
	tmp = 0.0
	if (l_m <= 6.3e-164)
		tmp = Float64(Float64(t_3 / (t_2 ^ 2.0)) * t_4);
	elseif (l_m <= 8.2e+98)
		tmp = Float64(Float64(2.0 / Float64(t * (k ^ 2.0))) * Float64(Float64(cos(k) * (l_m ^ 2.0)) / (sin(k) ^ 2.0)));
	else
		tmp = Float64(t_4 * Float64(t_3 / (Float64(t_1 * Float64(cbrt(tan(k)) * cbrt(sin(k)))) ^ 2.0)));
	end
	return tmp
end
l_m = N[Abs[l], $MachinePrecision]
code[t_, l$95$m_, k_] := Block[{t$95$1 = N[(t / N[Power[N[Power[l$95$m, 1/3], $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(t$95$1 * N[Power[N[(N[Sin[k], $MachinePrecision] * N[Tan[k], $MachinePrecision]), $MachinePrecision], 1/3], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(N[Sqrt[2.0], $MachinePrecision] / N[(k / t), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$4 = N[(t$95$3 / t$95$2), $MachinePrecision]}, If[LessEqual[l$95$m, 6.3e-164], N[(N[(t$95$3 / N[Power[t$95$2, 2.0], $MachinePrecision]), $MachinePrecision] * t$95$4), $MachinePrecision], If[LessEqual[l$95$m, 8.2e+98], N[(N[(2.0 / N[(t * N[Power[k, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(N[(N[Cos[k], $MachinePrecision] * N[Power[l$95$m, 2.0], $MachinePrecision]), $MachinePrecision] / N[Power[N[Sin[k], $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(t$95$4 * N[(t$95$3 / N[Power[N[(t$95$1 * N[(N[Power[N[Tan[k], $MachinePrecision], 1/3], $MachinePrecision] * N[Power[N[Sin[k], $MachinePrecision], 1/3], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]]
\begin{array}{l}
l_m = \left|\ell\right|

\\
\begin{array}{l}
t_1 := \frac{t}{{\left(\sqrt[3]{l\_m}\right)}^{2}}\\
t_2 := t\_1 \cdot \sqrt[3]{\sin k \cdot \tan k}\\
t_3 := \frac{\sqrt{2}}{\frac{k}{t}}\\
t_4 := \frac{t\_3}{t\_2}\\
\mathbf{if}\;l\_m \leq 6.3 \cdot 10^{-164}:\\
\;\;\;\;\frac{t\_3}{{t\_2}^{2}} \cdot t\_4\\

\mathbf{elif}\;l\_m \leq 8.2 \cdot 10^{+98}:\\
\;\;\;\;\frac{2}{t \cdot {k}^{2}} \cdot \frac{\cos k \cdot {l\_m}^{2}}{{\sin k}^{2}}\\

\mathbf{else}:\\
\;\;\;\;t\_4 \cdot \frac{t\_3}{{\left(t\_1 \cdot \left(\sqrt[3]{\tan k} \cdot \sqrt[3]{\sin k}\right)\right)}^{2}}\\


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if l < 6.30000000000000009e-164

    1. Initial program 38.8%

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

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

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

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

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

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

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

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

    if 6.30000000000000009e-164 < l < 8.2000000000000001e98

    1. Initial program 55.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. Simplified65.0%

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

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

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

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

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

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

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

    if 8.2000000000000001e98 < l

    1. Initial program 45.4%

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 6: 85.8% accurate, 0.3× speedup?

\[\begin{array}{l} l_m = \left|\ell\right| \\ \begin{array}{l} t_1 := \frac{t}{{\left(\sqrt[3]{l\_m}\right)}^{2}} \cdot \sqrt[3]{\sin k \cdot \tan k}\\ \mathbf{if}\;l\_m \leq 6.3 \cdot 10^{-164} \lor \neg \left(l\_m \leq 9.4 \cdot 10^{+97}\right):\\ \;\;\;\;\frac{t \cdot \frac{\sqrt{2}}{k}}{{t\_1}^{2}} \cdot \frac{\sqrt{2}}{\frac{k}{t} \cdot t\_1}\\ \mathbf{else}:\\ \;\;\;\;\frac{2}{t \cdot {k}^{2}} \cdot \frac{\cos k \cdot {l\_m}^{2}}{{\sin k}^{2}}\\ \end{array} \end{array} \]
l_m = (fabs.f64 l)
(FPCore (t l_m k)
 :precision binary64
 (let* ((t_1 (* (/ t (pow (cbrt l_m) 2.0)) (cbrt (* (sin k) (tan k))))))
   (if (or (<= l_m 6.3e-164) (not (<= l_m 9.4e+97)))
     (*
      (/ (* t (/ (sqrt 2.0) k)) (pow t_1 2.0))
      (/ (sqrt 2.0) (* (/ k t) t_1)))
     (*
      (/ 2.0 (* t (pow k 2.0)))
      (/ (* (cos k) (pow l_m 2.0)) (pow (sin k) 2.0))))))
l_m = fabs(l);
double code(double t, double l_m, double k) {
	double t_1 = (t / pow(cbrt(l_m), 2.0)) * cbrt((sin(k) * tan(k)));
	double tmp;
	if ((l_m <= 6.3e-164) || !(l_m <= 9.4e+97)) {
		tmp = ((t * (sqrt(2.0) / k)) / pow(t_1, 2.0)) * (sqrt(2.0) / ((k / t) * t_1));
	} else {
		tmp = (2.0 / (t * pow(k, 2.0))) * ((cos(k) * pow(l_m, 2.0)) / pow(sin(k), 2.0));
	}
	return tmp;
}
l_m = Math.abs(l);
public static double code(double t, double l_m, double k) {
	double t_1 = (t / Math.pow(Math.cbrt(l_m), 2.0)) * Math.cbrt((Math.sin(k) * Math.tan(k)));
	double tmp;
	if ((l_m <= 6.3e-164) || !(l_m <= 9.4e+97)) {
		tmp = ((t * (Math.sqrt(2.0) / k)) / Math.pow(t_1, 2.0)) * (Math.sqrt(2.0) / ((k / t) * t_1));
	} else {
		tmp = (2.0 / (t * Math.pow(k, 2.0))) * ((Math.cos(k) * Math.pow(l_m, 2.0)) / Math.pow(Math.sin(k), 2.0));
	}
	return tmp;
}
l_m = abs(l)
function code(t, l_m, k)
	t_1 = Float64(Float64(t / (cbrt(l_m) ^ 2.0)) * cbrt(Float64(sin(k) * tan(k))))
	tmp = 0.0
	if ((l_m <= 6.3e-164) || !(l_m <= 9.4e+97))
		tmp = Float64(Float64(Float64(t * Float64(sqrt(2.0) / k)) / (t_1 ^ 2.0)) * Float64(sqrt(2.0) / Float64(Float64(k / t) * t_1)));
	else
		tmp = Float64(Float64(2.0 / Float64(t * (k ^ 2.0))) * Float64(Float64(cos(k) * (l_m ^ 2.0)) / (sin(k) ^ 2.0)));
	end
	return tmp
end
l_m = N[Abs[l], $MachinePrecision]
code[t_, l$95$m_, k_] := Block[{t$95$1 = N[(N[(t / N[Power[N[Power[l$95$m, 1/3], $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision] * N[Power[N[(N[Sin[k], $MachinePrecision] * N[Tan[k], $MachinePrecision]), $MachinePrecision], 1/3], $MachinePrecision]), $MachinePrecision]}, If[Or[LessEqual[l$95$m, 6.3e-164], N[Not[LessEqual[l$95$m, 9.4e+97]], $MachinePrecision]], N[(N[(N[(t * N[(N[Sqrt[2.0], $MachinePrecision] / k), $MachinePrecision]), $MachinePrecision] / N[Power[t$95$1, 2.0], $MachinePrecision]), $MachinePrecision] * N[(N[Sqrt[2.0], $MachinePrecision] / N[(N[(k / t), $MachinePrecision] * t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(2.0 / N[(t * N[Power[k, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(N[(N[Cos[k], $MachinePrecision] * N[Power[l$95$m, 2.0], $MachinePrecision]), $MachinePrecision] / N[Power[N[Sin[k], $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
l_m = \left|\ell\right|

\\
\begin{array}{l}
t_1 := \frac{t}{{\left(\sqrt[3]{l\_m}\right)}^{2}} \cdot \sqrt[3]{\sin k \cdot \tan k}\\
\mathbf{if}\;l\_m \leq 6.3 \cdot 10^{-164} \lor \neg \left(l\_m \leq 9.4 \cdot 10^{+97}\right):\\
\;\;\;\;\frac{t \cdot \frac{\sqrt{2}}{k}}{{t\_1}^{2}} \cdot \frac{\sqrt{2}}{\frac{k}{t} \cdot t\_1}\\

\mathbf{else}:\\
\;\;\;\;\frac{2}{t \cdot {k}^{2}} \cdot \frac{\cos k \cdot {l\_m}^{2}}{{\sin k}^{2}}\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if l < 6.30000000000000009e-164 or 9.3999999999999994e97 < l

    1. Initial program 40.2%

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

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

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

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

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

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

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

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

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

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

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

    if 6.30000000000000009e-164 < l < 9.3999999999999994e97

    1. Initial program 55.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. Simplified65.0%

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;\ell \leq 6.3 \cdot 10^{-164} \lor \neg \left(\ell \leq 9.4 \cdot 10^{+97}\right):\\ \;\;\;\;\frac{t \cdot \frac{\sqrt{2}}{k}}{{\left(\frac{t}{{\left(\sqrt[3]{\ell}\right)}^{2}} \cdot \sqrt[3]{\sin k \cdot \tan k}\right)}^{2}} \cdot \frac{\sqrt{2}}{\frac{k}{t} \cdot \left(\frac{t}{{\left(\sqrt[3]{\ell}\right)}^{2}} \cdot \sqrt[3]{\sin k \cdot \tan k}\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{2}{t \cdot {k}^{2}} \cdot \frac{\cos k \cdot {\ell}^{2}}{{\sin k}^{2}}\\ \end{array} \]
  5. Add Preprocessing

Alternative 7: 85.2% accurate, 0.3× speedup?

\[\begin{array}{l} l_m = \left|\ell\right| \\ \begin{array}{l} t_1 := \frac{t}{{\left(\sqrt[3]{l\_m}\right)}^{2}} \cdot \sqrt[3]{\sin k \cdot \tan k}\\ t_2 := \frac{\sqrt{2}}{\frac{k}{t}}\\ \mathbf{if}\;l\_m \leq 6.3 \cdot 10^{-164} \lor \neg \left(l\_m \leq 2.55 \cdot 10^{+31}\right):\\ \;\;\;\;\frac{t\_2}{{t\_1}^{2}} \cdot \frac{t\_2}{t\_1}\\ \mathbf{else}:\\ \;\;\;\;\frac{2}{t \cdot {k}^{2}} \cdot \frac{\cos k \cdot {l\_m}^{2}}{{\sin k}^{2}}\\ \end{array} \end{array} \]
l_m = (fabs.f64 l)
(FPCore (t l_m k)
 :precision binary64
 (let* ((t_1 (* (/ t (pow (cbrt l_m) 2.0)) (cbrt (* (sin k) (tan k)))))
        (t_2 (/ (sqrt 2.0) (/ k t))))
   (if (or (<= l_m 6.3e-164) (not (<= l_m 2.55e+31)))
     (* (/ t_2 (pow t_1 2.0)) (/ t_2 t_1))
     (*
      (/ 2.0 (* t (pow k 2.0)))
      (/ (* (cos k) (pow l_m 2.0)) (pow (sin k) 2.0))))))
l_m = fabs(l);
double code(double t, double l_m, double k) {
	double t_1 = (t / pow(cbrt(l_m), 2.0)) * cbrt((sin(k) * tan(k)));
	double t_2 = sqrt(2.0) / (k / t);
	double tmp;
	if ((l_m <= 6.3e-164) || !(l_m <= 2.55e+31)) {
		tmp = (t_2 / pow(t_1, 2.0)) * (t_2 / t_1);
	} else {
		tmp = (2.0 / (t * pow(k, 2.0))) * ((cos(k) * pow(l_m, 2.0)) / pow(sin(k), 2.0));
	}
	return tmp;
}
l_m = Math.abs(l);
public static double code(double t, double l_m, double k) {
	double t_1 = (t / Math.pow(Math.cbrt(l_m), 2.0)) * Math.cbrt((Math.sin(k) * Math.tan(k)));
	double t_2 = Math.sqrt(2.0) / (k / t);
	double tmp;
	if ((l_m <= 6.3e-164) || !(l_m <= 2.55e+31)) {
		tmp = (t_2 / Math.pow(t_1, 2.0)) * (t_2 / t_1);
	} else {
		tmp = (2.0 / (t * Math.pow(k, 2.0))) * ((Math.cos(k) * Math.pow(l_m, 2.0)) / Math.pow(Math.sin(k), 2.0));
	}
	return tmp;
}
l_m = abs(l)
function code(t, l_m, k)
	t_1 = Float64(Float64(t / (cbrt(l_m) ^ 2.0)) * cbrt(Float64(sin(k) * tan(k))))
	t_2 = Float64(sqrt(2.0) / Float64(k / t))
	tmp = 0.0
	if ((l_m <= 6.3e-164) || !(l_m <= 2.55e+31))
		tmp = Float64(Float64(t_2 / (t_1 ^ 2.0)) * Float64(t_2 / t_1));
	else
		tmp = Float64(Float64(2.0 / Float64(t * (k ^ 2.0))) * Float64(Float64(cos(k) * (l_m ^ 2.0)) / (sin(k) ^ 2.0)));
	end
	return tmp
end
l_m = N[Abs[l], $MachinePrecision]
code[t_, l$95$m_, k_] := Block[{t$95$1 = N[(N[(t / N[Power[N[Power[l$95$m, 1/3], $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision] * N[Power[N[(N[Sin[k], $MachinePrecision] * N[Tan[k], $MachinePrecision]), $MachinePrecision], 1/3], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[Sqrt[2.0], $MachinePrecision] / N[(k / t), $MachinePrecision]), $MachinePrecision]}, If[Or[LessEqual[l$95$m, 6.3e-164], N[Not[LessEqual[l$95$m, 2.55e+31]], $MachinePrecision]], N[(N[(t$95$2 / N[Power[t$95$1, 2.0], $MachinePrecision]), $MachinePrecision] * N[(t$95$2 / t$95$1), $MachinePrecision]), $MachinePrecision], N[(N[(2.0 / N[(t * N[Power[k, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(N[(N[Cos[k], $MachinePrecision] * N[Power[l$95$m, 2.0], $MachinePrecision]), $MachinePrecision] / N[Power[N[Sin[k], $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
l_m = \left|\ell\right|

\\
\begin{array}{l}
t_1 := \frac{t}{{\left(\sqrt[3]{l\_m}\right)}^{2}} \cdot \sqrt[3]{\sin k \cdot \tan k}\\
t_2 := \frac{\sqrt{2}}{\frac{k}{t}}\\
\mathbf{if}\;l\_m \leq 6.3 \cdot 10^{-164} \lor \neg \left(l\_m \leq 2.55 \cdot 10^{+31}\right):\\
\;\;\;\;\frac{t\_2}{{t\_1}^{2}} \cdot \frac{t\_2}{t\_1}\\

\mathbf{else}:\\
\;\;\;\;\frac{2}{t \cdot {k}^{2}} \cdot \frac{\cos k \cdot {l\_m}^{2}}{{\sin k}^{2}}\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if l < 6.30000000000000009e-164 or 2.5499999999999998e31 < l

    1. Initial program 41.1%

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

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

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

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

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

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

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

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

    if 6.30000000000000009e-164 < l < 2.5499999999999998e31

    1. Initial program 54.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. Simplified63.8%

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

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

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

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

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

        \[\leadsto \frac{2}{{k}^{2} \cdot t} \cdot \frac{\color{blue}{\cos k \cdot {\ell}^{2}}}{{\sin k}^{2}} \]
    6. Simplified95.2%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;\ell \leq 6.3 \cdot 10^{-164} \lor \neg \left(\ell \leq 2.55 \cdot 10^{+31}\right):\\ \;\;\;\;\frac{\frac{\sqrt{2}}{\frac{k}{t}}}{{\left(\frac{t}{{\left(\sqrt[3]{\ell}\right)}^{2}} \cdot \sqrt[3]{\sin k \cdot \tan k}\right)}^{2}} \cdot \frac{\frac{\sqrt{2}}{\frac{k}{t}}}{\frac{t}{{\left(\sqrt[3]{\ell}\right)}^{2}} \cdot \sqrt[3]{\sin k \cdot \tan k}}\\ \mathbf{else}:\\ \;\;\;\;\frac{2}{t \cdot {k}^{2}} \cdot \frac{\cos k \cdot {\ell}^{2}}{{\sin k}^{2}}\\ \end{array} \]
  5. Add Preprocessing

Alternative 8: 80.6% accurate, 0.3× speedup?

\[\begin{array}{l} l_m = \left|\ell\right| \\ \begin{array}{l} t_1 := \frac{t}{{\left(\sqrt[3]{l\_m}\right)}^{2}}\\ t_2 := \frac{\sqrt{2}}{\frac{k}{t}}\\ \mathbf{if}\;l\_m \cdot l\_m \leq 0:\\ \;\;\;\;\frac{t\_2}{{\left(t\_1 \cdot \sqrt[3]{\sin k \cdot \tan k}\right)}^{2}} \cdot \frac{t\_2}{t\_1 \cdot \sqrt[3]{{k}^{2}}}\\ \mathbf{else}:\\ \;\;\;\;\frac{2}{t \cdot {k}^{2}} \cdot \frac{\cos k \cdot {l\_m}^{2}}{{\sin k}^{2}}\\ \end{array} \end{array} \]
l_m = (fabs.f64 l)
(FPCore (t l_m k)
 :precision binary64
 (let* ((t_1 (/ t (pow (cbrt l_m) 2.0))) (t_2 (/ (sqrt 2.0) (/ k t))))
   (if (<= (* l_m l_m) 0.0)
     (*
      (/ t_2 (pow (* t_1 (cbrt (* (sin k) (tan k)))) 2.0))
      (/ t_2 (* t_1 (cbrt (pow k 2.0)))))
     (*
      (/ 2.0 (* t (pow k 2.0)))
      (/ (* (cos k) (pow l_m 2.0)) (pow (sin k) 2.0))))))
l_m = fabs(l);
double code(double t, double l_m, double k) {
	double t_1 = t / pow(cbrt(l_m), 2.0);
	double t_2 = sqrt(2.0) / (k / t);
	double tmp;
	if ((l_m * l_m) <= 0.0) {
		tmp = (t_2 / pow((t_1 * cbrt((sin(k) * tan(k)))), 2.0)) * (t_2 / (t_1 * cbrt(pow(k, 2.0))));
	} else {
		tmp = (2.0 / (t * pow(k, 2.0))) * ((cos(k) * pow(l_m, 2.0)) / pow(sin(k), 2.0));
	}
	return tmp;
}
l_m = Math.abs(l);
public static double code(double t, double l_m, double k) {
	double t_1 = t / Math.pow(Math.cbrt(l_m), 2.0);
	double t_2 = Math.sqrt(2.0) / (k / t);
	double tmp;
	if ((l_m * l_m) <= 0.0) {
		tmp = (t_2 / Math.pow((t_1 * Math.cbrt((Math.sin(k) * Math.tan(k)))), 2.0)) * (t_2 / (t_1 * Math.cbrt(Math.pow(k, 2.0))));
	} else {
		tmp = (2.0 / (t * Math.pow(k, 2.0))) * ((Math.cos(k) * Math.pow(l_m, 2.0)) / Math.pow(Math.sin(k), 2.0));
	}
	return tmp;
}
l_m = abs(l)
function code(t, l_m, k)
	t_1 = Float64(t / (cbrt(l_m) ^ 2.0))
	t_2 = Float64(sqrt(2.0) / Float64(k / t))
	tmp = 0.0
	if (Float64(l_m * l_m) <= 0.0)
		tmp = Float64(Float64(t_2 / (Float64(t_1 * cbrt(Float64(sin(k) * tan(k)))) ^ 2.0)) * Float64(t_2 / Float64(t_1 * cbrt((k ^ 2.0)))));
	else
		tmp = Float64(Float64(2.0 / Float64(t * (k ^ 2.0))) * Float64(Float64(cos(k) * (l_m ^ 2.0)) / (sin(k) ^ 2.0)));
	end
	return tmp
end
l_m = N[Abs[l], $MachinePrecision]
code[t_, l$95$m_, k_] := Block[{t$95$1 = N[(t / N[Power[N[Power[l$95$m, 1/3], $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[Sqrt[2.0], $MachinePrecision] / N[(k / t), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[N[(l$95$m * l$95$m), $MachinePrecision], 0.0], N[(N[(t$95$2 / N[Power[N[(t$95$1 * N[Power[N[(N[Sin[k], $MachinePrecision] * N[Tan[k], $MachinePrecision]), $MachinePrecision], 1/3], $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision] * N[(t$95$2 / N[(t$95$1 * N[Power[N[Power[k, 2.0], $MachinePrecision], 1/3], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(2.0 / N[(t * N[Power[k, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(N[(N[Cos[k], $MachinePrecision] * N[Power[l$95$m, 2.0], $MachinePrecision]), $MachinePrecision] / N[Power[N[Sin[k], $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
l_m = \left|\ell\right|

\\
\begin{array}{l}
t_1 := \frac{t}{{\left(\sqrt[3]{l\_m}\right)}^{2}}\\
t_2 := \frac{\sqrt{2}}{\frac{k}{t}}\\
\mathbf{if}\;l\_m \cdot l\_m \leq 0:\\
\;\;\;\;\frac{t\_2}{{\left(t\_1 \cdot \sqrt[3]{\sin k \cdot \tan k}\right)}^{2}} \cdot \frac{t\_2}{t\_1 \cdot \sqrt[3]{{k}^{2}}}\\

\mathbf{else}:\\
\;\;\;\;\frac{2}{t \cdot {k}^{2}} \cdot \frac{\cos k \cdot {l\_m}^{2}}{{\sin k}^{2}}\\


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

    1. Initial program 29.0%

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

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

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

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

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

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

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

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

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

    if 0.0 < (*.f64 l l)

    1. Initial program 48.1%

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

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

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

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

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

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

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

Alternative 9: 80.7% accurate, 0.3× speedup?

\[\begin{array}{l} l_m = \left|\ell\right| \\ \begin{array}{l} t_1 := \frac{t}{{\left(\sqrt[3]{l\_m}\right)}^{2}}\\ t_2 := \frac{\sqrt{2}}{\frac{k}{t}}\\ \mathbf{if}\;l\_m \cdot l\_m \leq 0:\\ \;\;\;\;\frac{t\_2}{t\_1 \cdot \sqrt[3]{\sin k \cdot \tan k}} \cdot \frac{t\_2}{{\left(t\_1 \cdot \sqrt[3]{{k}^{2}}\right)}^{2}}\\ \mathbf{else}:\\ \;\;\;\;\frac{2}{t \cdot {k}^{2}} \cdot \frac{\cos k \cdot {l\_m}^{2}}{{\sin k}^{2}}\\ \end{array} \end{array} \]
l_m = (fabs.f64 l)
(FPCore (t l_m k)
 :precision binary64
 (let* ((t_1 (/ t (pow (cbrt l_m) 2.0))) (t_2 (/ (sqrt 2.0) (/ k t))))
   (if (<= (* l_m l_m) 0.0)
     (*
      (/ t_2 (* t_1 (cbrt (* (sin k) (tan k)))))
      (/ t_2 (pow (* t_1 (cbrt (pow k 2.0))) 2.0)))
     (*
      (/ 2.0 (* t (pow k 2.0)))
      (/ (* (cos k) (pow l_m 2.0)) (pow (sin k) 2.0))))))
l_m = fabs(l);
double code(double t, double l_m, double k) {
	double t_1 = t / pow(cbrt(l_m), 2.0);
	double t_2 = sqrt(2.0) / (k / t);
	double tmp;
	if ((l_m * l_m) <= 0.0) {
		tmp = (t_2 / (t_1 * cbrt((sin(k) * tan(k))))) * (t_2 / pow((t_1 * cbrt(pow(k, 2.0))), 2.0));
	} else {
		tmp = (2.0 / (t * pow(k, 2.0))) * ((cos(k) * pow(l_m, 2.0)) / pow(sin(k), 2.0));
	}
	return tmp;
}
l_m = Math.abs(l);
public static double code(double t, double l_m, double k) {
	double t_1 = t / Math.pow(Math.cbrt(l_m), 2.0);
	double t_2 = Math.sqrt(2.0) / (k / t);
	double tmp;
	if ((l_m * l_m) <= 0.0) {
		tmp = (t_2 / (t_1 * Math.cbrt((Math.sin(k) * Math.tan(k))))) * (t_2 / Math.pow((t_1 * Math.cbrt(Math.pow(k, 2.0))), 2.0));
	} else {
		tmp = (2.0 / (t * Math.pow(k, 2.0))) * ((Math.cos(k) * Math.pow(l_m, 2.0)) / Math.pow(Math.sin(k), 2.0));
	}
	return tmp;
}
l_m = abs(l)
function code(t, l_m, k)
	t_1 = Float64(t / (cbrt(l_m) ^ 2.0))
	t_2 = Float64(sqrt(2.0) / Float64(k / t))
	tmp = 0.0
	if (Float64(l_m * l_m) <= 0.0)
		tmp = Float64(Float64(t_2 / Float64(t_1 * cbrt(Float64(sin(k) * tan(k))))) * Float64(t_2 / (Float64(t_1 * cbrt((k ^ 2.0))) ^ 2.0)));
	else
		tmp = Float64(Float64(2.0 / Float64(t * (k ^ 2.0))) * Float64(Float64(cos(k) * (l_m ^ 2.0)) / (sin(k) ^ 2.0)));
	end
	return tmp
end
l_m = N[Abs[l], $MachinePrecision]
code[t_, l$95$m_, k_] := Block[{t$95$1 = N[(t / N[Power[N[Power[l$95$m, 1/3], $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[Sqrt[2.0], $MachinePrecision] / N[(k / t), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[N[(l$95$m * l$95$m), $MachinePrecision], 0.0], N[(N[(t$95$2 / N[(t$95$1 * N[Power[N[(N[Sin[k], $MachinePrecision] * N[Tan[k], $MachinePrecision]), $MachinePrecision], 1/3], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(t$95$2 / N[Power[N[(t$95$1 * N[Power[N[Power[k, 2.0], $MachinePrecision], 1/3], $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(2.0 / N[(t * N[Power[k, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(N[(N[Cos[k], $MachinePrecision] * N[Power[l$95$m, 2.0], $MachinePrecision]), $MachinePrecision] / N[Power[N[Sin[k], $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
l_m = \left|\ell\right|

\\
\begin{array}{l}
t_1 := \frac{t}{{\left(\sqrt[3]{l\_m}\right)}^{2}}\\
t_2 := \frac{\sqrt{2}}{\frac{k}{t}}\\
\mathbf{if}\;l\_m \cdot l\_m \leq 0:\\
\;\;\;\;\frac{t\_2}{t\_1 \cdot \sqrt[3]{\sin k \cdot \tan k}} \cdot \frac{t\_2}{{\left(t\_1 \cdot \sqrt[3]{{k}^{2}}\right)}^{2}}\\

\mathbf{else}:\\
\;\;\;\;\frac{2}{t \cdot {k}^{2}} \cdot \frac{\cos k \cdot {l\_m}^{2}}{{\sin k}^{2}}\\


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

    1. Initial program 29.0%

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

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

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

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

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

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

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

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

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

    if 0.0 < (*.f64 l l)

    1. Initial program 48.1%

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

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

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

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

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

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

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

Alternative 10: 75.8% accurate, 0.5× speedup?

\[\begin{array}{l} l_m = \left|\ell\right| \\ \begin{array}{l} \mathbf{if}\;k \leq 3.6 \cdot 10^{-81} \lor \neg \left(k \leq 8.5 \cdot 10^{+142}\right):\\ \;\;\;\;{\left(\frac{\sqrt[3]{2 \cdot {\left(\frac{k}{t}\right)}^{-2}}}{\sqrt[3]{\sin k \cdot \tan k} \cdot \left(t \cdot {\left(\sqrt[3]{l\_m}\right)}^{-2}\right)}\right)}^{3}\\ \mathbf{else}:\\ \;\;\;\;\frac{2}{t \cdot {k}^{2}} \cdot \frac{\cos k \cdot {l\_m}^{2}}{{\sin k}^{2}}\\ \end{array} \end{array} \]
l_m = (fabs.f64 l)
(FPCore (t l_m k)
 :precision binary64
 (if (or (<= k 3.6e-81) (not (<= k 8.5e+142)))
   (pow
    (/
     (cbrt (* 2.0 (pow (/ k t) -2.0)))
     (* (cbrt (* (sin k) (tan k))) (* t (pow (cbrt l_m) -2.0))))
    3.0)
   (*
    (/ 2.0 (* t (pow k 2.0)))
    (/ (* (cos k) (pow l_m 2.0)) (pow (sin k) 2.0)))))
l_m = fabs(l);
double code(double t, double l_m, double k) {
	double tmp;
	if ((k <= 3.6e-81) || !(k <= 8.5e+142)) {
		tmp = pow((cbrt((2.0 * pow((k / t), -2.0))) / (cbrt((sin(k) * tan(k))) * (t * pow(cbrt(l_m), -2.0)))), 3.0);
	} else {
		tmp = (2.0 / (t * pow(k, 2.0))) * ((cos(k) * pow(l_m, 2.0)) / pow(sin(k), 2.0));
	}
	return tmp;
}
l_m = Math.abs(l);
public static double code(double t, double l_m, double k) {
	double tmp;
	if ((k <= 3.6e-81) || !(k <= 8.5e+142)) {
		tmp = Math.pow((Math.cbrt((2.0 * Math.pow((k / t), -2.0))) / (Math.cbrt((Math.sin(k) * Math.tan(k))) * (t * Math.pow(Math.cbrt(l_m), -2.0)))), 3.0);
	} else {
		tmp = (2.0 / (t * Math.pow(k, 2.0))) * ((Math.cos(k) * Math.pow(l_m, 2.0)) / Math.pow(Math.sin(k), 2.0));
	}
	return tmp;
}
l_m = abs(l)
function code(t, l_m, k)
	tmp = 0.0
	if ((k <= 3.6e-81) || !(k <= 8.5e+142))
		tmp = Float64(cbrt(Float64(2.0 * (Float64(k / t) ^ -2.0))) / Float64(cbrt(Float64(sin(k) * tan(k))) * Float64(t * (cbrt(l_m) ^ -2.0)))) ^ 3.0;
	else
		tmp = Float64(Float64(2.0 / Float64(t * (k ^ 2.0))) * Float64(Float64(cos(k) * (l_m ^ 2.0)) / (sin(k) ^ 2.0)));
	end
	return tmp
end
l_m = N[Abs[l], $MachinePrecision]
code[t_, l$95$m_, k_] := If[Or[LessEqual[k, 3.6e-81], N[Not[LessEqual[k, 8.5e+142]], $MachinePrecision]], N[Power[N[(N[Power[N[(2.0 * N[Power[N[(k / t), $MachinePrecision], -2.0], $MachinePrecision]), $MachinePrecision], 1/3], $MachinePrecision] / N[(N[Power[N[(N[Sin[k], $MachinePrecision] * N[Tan[k], $MachinePrecision]), $MachinePrecision], 1/3], $MachinePrecision] * N[(t * N[Power[N[Power[l$95$m, 1/3], $MachinePrecision], -2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 3.0], $MachinePrecision], N[(N[(2.0 / N[(t * N[Power[k, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(N[(N[Cos[k], $MachinePrecision] * N[Power[l$95$m, 2.0], $MachinePrecision]), $MachinePrecision] / N[Power[N[Sin[k], $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
l_m = \left|\ell\right|

\\
\begin{array}{l}
\mathbf{if}\;k \leq 3.6 \cdot 10^{-81} \lor \neg \left(k \leq 8.5 \cdot 10^{+142}\right):\\
\;\;\;\;{\left(\frac{\sqrt[3]{2 \cdot {\left(\frac{k}{t}\right)}^{-2}}}{\sqrt[3]{\sin k \cdot \tan k} \cdot \left(t \cdot {\left(\sqrt[3]{l\_m}\right)}^{-2}\right)}\right)}^{3}\\

\mathbf{else}:\\
\;\;\;\;\frac{2}{t \cdot {k}^{2}} \cdot \frac{\cos k \cdot {l\_m}^{2}}{{\sin k}^{2}}\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if k < 3.5999999999999999e-81 or 8.49999999999999955e142 < k

    1. Initial program 46.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 3.5999999999999999e-81 < k < 8.49999999999999955e142

    1. Initial program 29.9%

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;k \leq 3.6 \cdot 10^{-81} \lor \neg \left(k \leq 8.5 \cdot 10^{+142}\right):\\ \;\;\;\;{\left(\frac{\sqrt[3]{2 \cdot {\left(\frac{k}{t}\right)}^{-2}}}{\sqrt[3]{\sin k \cdot \tan k} \cdot \left(t \cdot {\left(\sqrt[3]{\ell}\right)}^{-2}\right)}\right)}^{3}\\ \mathbf{else}:\\ \;\;\;\;\frac{2}{t \cdot {k}^{2}} \cdot \frac{\cos k \cdot {\ell}^{2}}{{\sin k}^{2}}\\ \end{array} \]
  5. Add Preprocessing

Alternative 11: 44.8% accurate, 0.7× speedup?

\[\begin{array}{l} l_m = \left|\ell\right| \\ \begin{array}{l} \mathbf{if}\;k \leq 6.6 \cdot 10^{-81}:\\ \;\;\;\;{\left(l\_m \cdot \frac{\sqrt{2}}{\sqrt{\sin k \cdot \tan k} \cdot \left(\frac{k}{t} \cdot {t}^{1.5}\right)}\right)}^{2}\\ \mathbf{else}:\\ \;\;\;\;\frac{2}{t \cdot {k}^{2}} \cdot \frac{\cos k \cdot {l\_m}^{2}}{{\sin k}^{2}}\\ \end{array} \end{array} \]
l_m = (fabs.f64 l)
(FPCore (t l_m k)
 :precision binary64
 (if (<= k 6.6e-81)
   (pow
    (*
     l_m
     (/ (sqrt 2.0) (* (sqrt (* (sin k) (tan k))) (* (/ k t) (pow t 1.5)))))
    2.0)
   (*
    (/ 2.0 (* t (pow k 2.0)))
    (/ (* (cos k) (pow l_m 2.0)) (pow (sin k) 2.0)))))
l_m = fabs(l);
double code(double t, double l_m, double k) {
	double tmp;
	if (k <= 6.6e-81) {
		tmp = pow((l_m * (sqrt(2.0) / (sqrt((sin(k) * tan(k))) * ((k / t) * pow(t, 1.5))))), 2.0);
	} else {
		tmp = (2.0 / (t * pow(k, 2.0))) * ((cos(k) * pow(l_m, 2.0)) / pow(sin(k), 2.0));
	}
	return tmp;
}
l_m = abs(l)
real(8) function code(t, l_m, k)
    real(8), intent (in) :: t
    real(8), intent (in) :: l_m
    real(8), intent (in) :: k
    real(8) :: tmp
    if (k <= 6.6d-81) then
        tmp = (l_m * (sqrt(2.0d0) / (sqrt((sin(k) * tan(k))) * ((k / t) * (t ** 1.5d0))))) ** 2.0d0
    else
        tmp = (2.0d0 / (t * (k ** 2.0d0))) * ((cos(k) * (l_m ** 2.0d0)) / (sin(k) ** 2.0d0))
    end if
    code = tmp
end function
l_m = Math.abs(l);
public static double code(double t, double l_m, double k) {
	double tmp;
	if (k <= 6.6e-81) {
		tmp = Math.pow((l_m * (Math.sqrt(2.0) / (Math.sqrt((Math.sin(k) * Math.tan(k))) * ((k / t) * Math.pow(t, 1.5))))), 2.0);
	} else {
		tmp = (2.0 / (t * Math.pow(k, 2.0))) * ((Math.cos(k) * Math.pow(l_m, 2.0)) / Math.pow(Math.sin(k), 2.0));
	}
	return tmp;
}
l_m = math.fabs(l)
def code(t, l_m, k):
	tmp = 0
	if k <= 6.6e-81:
		tmp = math.pow((l_m * (math.sqrt(2.0) / (math.sqrt((math.sin(k) * math.tan(k))) * ((k / t) * math.pow(t, 1.5))))), 2.0)
	else:
		tmp = (2.0 / (t * math.pow(k, 2.0))) * ((math.cos(k) * math.pow(l_m, 2.0)) / math.pow(math.sin(k), 2.0))
	return tmp
l_m = abs(l)
function code(t, l_m, k)
	tmp = 0.0
	if (k <= 6.6e-81)
		tmp = Float64(l_m * Float64(sqrt(2.0) / Float64(sqrt(Float64(sin(k) * tan(k))) * Float64(Float64(k / t) * (t ^ 1.5))))) ^ 2.0;
	else
		tmp = Float64(Float64(2.0 / Float64(t * (k ^ 2.0))) * Float64(Float64(cos(k) * (l_m ^ 2.0)) / (sin(k) ^ 2.0)));
	end
	return tmp
end
l_m = abs(l);
function tmp_2 = code(t, l_m, k)
	tmp = 0.0;
	if (k <= 6.6e-81)
		tmp = (l_m * (sqrt(2.0) / (sqrt((sin(k) * tan(k))) * ((k / t) * (t ^ 1.5))))) ^ 2.0;
	else
		tmp = (2.0 / (t * (k ^ 2.0))) * ((cos(k) * (l_m ^ 2.0)) / (sin(k) ^ 2.0));
	end
	tmp_2 = tmp;
end
l_m = N[Abs[l], $MachinePrecision]
code[t_, l$95$m_, k_] := If[LessEqual[k, 6.6e-81], N[Power[N[(l$95$m * N[(N[Sqrt[2.0], $MachinePrecision] / N[(N[Sqrt[N[(N[Sin[k], $MachinePrecision] * N[Tan[k], $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[(N[(k / t), $MachinePrecision] * N[Power[t, 1.5], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision], N[(N[(2.0 / N[(t * N[Power[k, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(N[(N[Cos[k], $MachinePrecision] * N[Power[l$95$m, 2.0], $MachinePrecision]), $MachinePrecision] / N[Power[N[Sin[k], $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
l_m = \left|\ell\right|

\\
\begin{array}{l}
\mathbf{if}\;k \leq 6.6 \cdot 10^{-81}:\\
\;\;\;\;{\left(l\_m \cdot \frac{\sqrt{2}}{\sqrt{\sin k \cdot \tan k} \cdot \left(\frac{k}{t} \cdot {t}^{1.5}\right)}\right)}^{2}\\

\mathbf{else}:\\
\;\;\;\;\frac{2}{t \cdot {k}^{2}} \cdot \frac{\cos k \cdot {l\_m}^{2}}{{\sin k}^{2}}\\


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

    1. Initial program 45.4%

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

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

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

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

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

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

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

    if 6.59999999999999975e-81 < k

    1. Initial program 38.6%

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

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

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

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

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

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

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

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

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

Alternative 12: 45.0% accurate, 0.7× speedup?

\[\begin{array}{l} l_m = \left|\ell\right| \\ \begin{array}{l} \mathbf{if}\;k \leq 2.8 \cdot 10^{-81}:\\ \;\;\;\;{\left(\frac{l\_m}{\sqrt{\sin k \cdot \tan k}} \cdot \frac{\sqrt{2}}{\frac{k}{t} \cdot {t}^{1.5}}\right)}^{2}\\ \mathbf{else}:\\ \;\;\;\;\frac{2}{t \cdot {k}^{2}} \cdot \frac{\cos k \cdot {l\_m}^{2}}{{\sin k}^{2}}\\ \end{array} \end{array} \]
l_m = (fabs.f64 l)
(FPCore (t l_m k)
 :precision binary64
 (if (<= k 2.8e-81)
   (pow
    (*
     (/ l_m (sqrt (* (sin k) (tan k))))
     (/ (sqrt 2.0) (* (/ k t) (pow t 1.5))))
    2.0)
   (*
    (/ 2.0 (* t (pow k 2.0)))
    (/ (* (cos k) (pow l_m 2.0)) (pow (sin k) 2.0)))))
l_m = fabs(l);
double code(double t, double l_m, double k) {
	double tmp;
	if (k <= 2.8e-81) {
		tmp = pow(((l_m / sqrt((sin(k) * tan(k)))) * (sqrt(2.0) / ((k / t) * pow(t, 1.5)))), 2.0);
	} else {
		tmp = (2.0 / (t * pow(k, 2.0))) * ((cos(k) * pow(l_m, 2.0)) / pow(sin(k), 2.0));
	}
	return tmp;
}
l_m = abs(l)
real(8) function code(t, l_m, k)
    real(8), intent (in) :: t
    real(8), intent (in) :: l_m
    real(8), intent (in) :: k
    real(8) :: tmp
    if (k <= 2.8d-81) then
        tmp = ((l_m / sqrt((sin(k) * tan(k)))) * (sqrt(2.0d0) / ((k / t) * (t ** 1.5d0)))) ** 2.0d0
    else
        tmp = (2.0d0 / (t * (k ** 2.0d0))) * ((cos(k) * (l_m ** 2.0d0)) / (sin(k) ** 2.0d0))
    end if
    code = tmp
end function
l_m = Math.abs(l);
public static double code(double t, double l_m, double k) {
	double tmp;
	if (k <= 2.8e-81) {
		tmp = Math.pow(((l_m / Math.sqrt((Math.sin(k) * Math.tan(k)))) * (Math.sqrt(2.0) / ((k / t) * Math.pow(t, 1.5)))), 2.0);
	} else {
		tmp = (2.0 / (t * Math.pow(k, 2.0))) * ((Math.cos(k) * Math.pow(l_m, 2.0)) / Math.pow(Math.sin(k), 2.0));
	}
	return tmp;
}
l_m = math.fabs(l)
def code(t, l_m, k):
	tmp = 0
	if k <= 2.8e-81:
		tmp = math.pow(((l_m / math.sqrt((math.sin(k) * math.tan(k)))) * (math.sqrt(2.0) / ((k / t) * math.pow(t, 1.5)))), 2.0)
	else:
		tmp = (2.0 / (t * math.pow(k, 2.0))) * ((math.cos(k) * math.pow(l_m, 2.0)) / math.pow(math.sin(k), 2.0))
	return tmp
l_m = abs(l)
function code(t, l_m, k)
	tmp = 0.0
	if (k <= 2.8e-81)
		tmp = Float64(Float64(l_m / sqrt(Float64(sin(k) * tan(k)))) * Float64(sqrt(2.0) / Float64(Float64(k / t) * (t ^ 1.5)))) ^ 2.0;
	else
		tmp = Float64(Float64(2.0 / Float64(t * (k ^ 2.0))) * Float64(Float64(cos(k) * (l_m ^ 2.0)) / (sin(k) ^ 2.0)));
	end
	return tmp
end
l_m = abs(l);
function tmp_2 = code(t, l_m, k)
	tmp = 0.0;
	if (k <= 2.8e-81)
		tmp = ((l_m / sqrt((sin(k) * tan(k)))) * (sqrt(2.0) / ((k / t) * (t ^ 1.5)))) ^ 2.0;
	else
		tmp = (2.0 / (t * (k ^ 2.0))) * ((cos(k) * (l_m ^ 2.0)) / (sin(k) ^ 2.0));
	end
	tmp_2 = tmp;
end
l_m = N[Abs[l], $MachinePrecision]
code[t_, l$95$m_, k_] := If[LessEqual[k, 2.8e-81], N[Power[N[(N[(l$95$m / N[Sqrt[N[(N[Sin[k], $MachinePrecision] * N[Tan[k], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] * N[(N[Sqrt[2.0], $MachinePrecision] / N[(N[(k / t), $MachinePrecision] * N[Power[t, 1.5], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision], N[(N[(2.0 / N[(t * N[Power[k, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(N[(N[Cos[k], $MachinePrecision] * N[Power[l$95$m, 2.0], $MachinePrecision]), $MachinePrecision] / N[Power[N[Sin[k], $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
l_m = \left|\ell\right|

\\
\begin{array}{l}
\mathbf{if}\;k \leq 2.8 \cdot 10^{-81}:\\
\;\;\;\;{\left(\frac{l\_m}{\sqrt{\sin k \cdot \tan k}} \cdot \frac{\sqrt{2}}{\frac{k}{t} \cdot {t}^{1.5}}\right)}^{2}\\

\mathbf{else}:\\
\;\;\;\;\frac{2}{t \cdot {k}^{2}} \cdot \frac{\cos k \cdot {l\_m}^{2}}{{\sin k}^{2}}\\


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

    1. Initial program 45.4%

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

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

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

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

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

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

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

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

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

    if 2.7999999999999999e-81 < k

    1. Initial program 38.6%

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

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

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

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

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

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

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

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

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

Alternative 13: 73.3% accurate, 0.8× speedup?

\[\begin{array}{l} l_m = \left|\ell\right| \\ \begin{array}{l} \mathbf{if}\;l\_m \leq 2.9 \cdot 10^{-210}:\\ \;\;\;\;\frac{2 \cdot {\left(\frac{k}{t}\right)}^{-2}}{\frac{\frac{\left(\sin k \cdot \tan k\right) \cdot {t}^{3}}{l\_m}}{l\_m}}\\ \mathbf{else}:\\ \;\;\;\;\frac{2}{t \cdot {k}^{2}} \cdot \frac{\cos k \cdot {l\_m}^{2}}{{\sin k}^{2}}\\ \end{array} \end{array} \]
l_m = (fabs.f64 l)
(FPCore (t l_m k)
 :precision binary64
 (if (<= l_m 2.9e-210)
   (/
    (* 2.0 (pow (/ k t) -2.0))
    (/ (/ (* (* (sin k) (tan k)) (pow t 3.0)) l_m) l_m))
   (*
    (/ 2.0 (* t (pow k 2.0)))
    (/ (* (cos k) (pow l_m 2.0)) (pow (sin k) 2.0)))))
l_m = fabs(l);
double code(double t, double l_m, double k) {
	double tmp;
	if (l_m <= 2.9e-210) {
		tmp = (2.0 * pow((k / t), -2.0)) / ((((sin(k) * tan(k)) * pow(t, 3.0)) / l_m) / l_m);
	} else {
		tmp = (2.0 / (t * pow(k, 2.0))) * ((cos(k) * pow(l_m, 2.0)) / pow(sin(k), 2.0));
	}
	return tmp;
}
l_m = abs(l)
real(8) function code(t, l_m, k)
    real(8), intent (in) :: t
    real(8), intent (in) :: l_m
    real(8), intent (in) :: k
    real(8) :: tmp
    if (l_m <= 2.9d-210) then
        tmp = (2.0d0 * ((k / t) ** (-2.0d0))) / ((((sin(k) * tan(k)) * (t ** 3.0d0)) / l_m) / l_m)
    else
        tmp = (2.0d0 / (t * (k ** 2.0d0))) * ((cos(k) * (l_m ** 2.0d0)) / (sin(k) ** 2.0d0))
    end if
    code = tmp
end function
l_m = Math.abs(l);
public static double code(double t, double l_m, double k) {
	double tmp;
	if (l_m <= 2.9e-210) {
		tmp = (2.0 * Math.pow((k / t), -2.0)) / ((((Math.sin(k) * Math.tan(k)) * Math.pow(t, 3.0)) / l_m) / l_m);
	} else {
		tmp = (2.0 / (t * Math.pow(k, 2.0))) * ((Math.cos(k) * Math.pow(l_m, 2.0)) / Math.pow(Math.sin(k), 2.0));
	}
	return tmp;
}
l_m = math.fabs(l)
def code(t, l_m, k):
	tmp = 0
	if l_m <= 2.9e-210:
		tmp = (2.0 * math.pow((k / t), -2.0)) / ((((math.sin(k) * math.tan(k)) * math.pow(t, 3.0)) / l_m) / l_m)
	else:
		tmp = (2.0 / (t * math.pow(k, 2.0))) * ((math.cos(k) * math.pow(l_m, 2.0)) / math.pow(math.sin(k), 2.0))
	return tmp
l_m = abs(l)
function code(t, l_m, k)
	tmp = 0.0
	if (l_m <= 2.9e-210)
		tmp = Float64(Float64(2.0 * (Float64(k / t) ^ -2.0)) / Float64(Float64(Float64(Float64(sin(k) * tan(k)) * (t ^ 3.0)) / l_m) / l_m));
	else
		tmp = Float64(Float64(2.0 / Float64(t * (k ^ 2.0))) * Float64(Float64(cos(k) * (l_m ^ 2.0)) / (sin(k) ^ 2.0)));
	end
	return tmp
end
l_m = abs(l);
function tmp_2 = code(t, l_m, k)
	tmp = 0.0;
	if (l_m <= 2.9e-210)
		tmp = (2.0 * ((k / t) ^ -2.0)) / ((((sin(k) * tan(k)) * (t ^ 3.0)) / l_m) / l_m);
	else
		tmp = (2.0 / (t * (k ^ 2.0))) * ((cos(k) * (l_m ^ 2.0)) / (sin(k) ^ 2.0));
	end
	tmp_2 = tmp;
end
l_m = N[Abs[l], $MachinePrecision]
code[t_, l$95$m_, k_] := If[LessEqual[l$95$m, 2.9e-210], N[(N[(2.0 * N[Power[N[(k / t), $MachinePrecision], -2.0], $MachinePrecision]), $MachinePrecision] / N[(N[(N[(N[(N[Sin[k], $MachinePrecision] * N[Tan[k], $MachinePrecision]), $MachinePrecision] * N[Power[t, 3.0], $MachinePrecision]), $MachinePrecision] / l$95$m), $MachinePrecision] / l$95$m), $MachinePrecision]), $MachinePrecision], N[(N[(2.0 / N[(t * N[Power[k, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(N[(N[Cos[k], $MachinePrecision] * N[Power[l$95$m, 2.0], $MachinePrecision]), $MachinePrecision] / N[Power[N[Sin[k], $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
l_m = \left|\ell\right|

\\
\begin{array}{l}
\mathbf{if}\;l\_m \leq 2.9 \cdot 10^{-210}:\\
\;\;\;\;\frac{2 \cdot {\left(\frac{k}{t}\right)}^{-2}}{\frac{\frac{\left(\sin k \cdot \tan k\right) \cdot {t}^{3}}{l\_m}}{l\_m}}\\

\mathbf{else}:\\
\;\;\;\;\frac{2}{t \cdot {k}^{2}} \cdot \frac{\cos k \cdot {l\_m}^{2}}{{\sin k}^{2}}\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if l < 2.90000000000000006e-210

    1. Initial program 39.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 2.90000000000000006e-210 < l

    1. Initial program 49.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. Simplified55.2%

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

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

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

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

        \[\leadsto \color{blue}{\frac{2}{{k}^{2} \cdot t} \cdot \frac{{\ell}^{2} \cdot \cos k}{{\sin k}^{2}}} \]
      4. *-commutative82.5%

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

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

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

Alternative 14: 73.4% accurate, 1.0× speedup?

\[\begin{array}{l} l_m = \left|\ell\right| \\ \begin{array}{l} \mathbf{if}\;l\_m \leq 1.65 \cdot 10^{-209}:\\ \;\;\;\;\frac{2 \cdot {\left(\frac{k}{t}\right)}^{-2}}{\frac{\frac{\left(\sin k \cdot \tan k\right) \cdot {t}^{3}}{l\_m}}{l\_m}}\\ \mathbf{else}:\\ \;\;\;\;\frac{{l\_m}^{2}}{{k}^{2}} \cdot \frac{2}{\tan k \cdot \left(t \cdot \sin k\right)}\\ \end{array} \end{array} \]
l_m = (fabs.f64 l)
(FPCore (t l_m k)
 :precision binary64
 (if (<= l_m 1.65e-209)
   (/
    (* 2.0 (pow (/ k t) -2.0))
    (/ (/ (* (* (sin k) (tan k)) (pow t 3.0)) l_m) l_m))
   (* (/ (pow l_m 2.0) (pow k 2.0)) (/ 2.0 (* (tan k) (* t (sin k)))))))
l_m = fabs(l);
double code(double t, double l_m, double k) {
	double tmp;
	if (l_m <= 1.65e-209) {
		tmp = (2.0 * pow((k / t), -2.0)) / ((((sin(k) * tan(k)) * pow(t, 3.0)) / l_m) / l_m);
	} else {
		tmp = (pow(l_m, 2.0) / pow(k, 2.0)) * (2.0 / (tan(k) * (t * sin(k))));
	}
	return tmp;
}
l_m = abs(l)
real(8) function code(t, l_m, k)
    real(8), intent (in) :: t
    real(8), intent (in) :: l_m
    real(8), intent (in) :: k
    real(8) :: tmp
    if (l_m <= 1.65d-209) then
        tmp = (2.0d0 * ((k / t) ** (-2.0d0))) / ((((sin(k) * tan(k)) * (t ** 3.0d0)) / l_m) / l_m)
    else
        tmp = ((l_m ** 2.0d0) / (k ** 2.0d0)) * (2.0d0 / (tan(k) * (t * sin(k))))
    end if
    code = tmp
end function
l_m = Math.abs(l);
public static double code(double t, double l_m, double k) {
	double tmp;
	if (l_m <= 1.65e-209) {
		tmp = (2.0 * Math.pow((k / t), -2.0)) / ((((Math.sin(k) * Math.tan(k)) * Math.pow(t, 3.0)) / l_m) / l_m);
	} else {
		tmp = (Math.pow(l_m, 2.0) / Math.pow(k, 2.0)) * (2.0 / (Math.tan(k) * (t * Math.sin(k))));
	}
	return tmp;
}
l_m = math.fabs(l)
def code(t, l_m, k):
	tmp = 0
	if l_m <= 1.65e-209:
		tmp = (2.0 * math.pow((k / t), -2.0)) / ((((math.sin(k) * math.tan(k)) * math.pow(t, 3.0)) / l_m) / l_m)
	else:
		tmp = (math.pow(l_m, 2.0) / math.pow(k, 2.0)) * (2.0 / (math.tan(k) * (t * math.sin(k))))
	return tmp
l_m = abs(l)
function code(t, l_m, k)
	tmp = 0.0
	if (l_m <= 1.65e-209)
		tmp = Float64(Float64(2.0 * (Float64(k / t) ^ -2.0)) / Float64(Float64(Float64(Float64(sin(k) * tan(k)) * (t ^ 3.0)) / l_m) / l_m));
	else
		tmp = Float64(Float64((l_m ^ 2.0) / (k ^ 2.0)) * Float64(2.0 / Float64(tan(k) * Float64(t * sin(k)))));
	end
	return tmp
end
l_m = abs(l);
function tmp_2 = code(t, l_m, k)
	tmp = 0.0;
	if (l_m <= 1.65e-209)
		tmp = (2.0 * ((k / t) ^ -2.0)) / ((((sin(k) * tan(k)) * (t ^ 3.0)) / l_m) / l_m);
	else
		tmp = ((l_m ^ 2.0) / (k ^ 2.0)) * (2.0 / (tan(k) * (t * sin(k))));
	end
	tmp_2 = tmp;
end
l_m = N[Abs[l], $MachinePrecision]
code[t_, l$95$m_, k_] := If[LessEqual[l$95$m, 1.65e-209], N[(N[(2.0 * N[Power[N[(k / t), $MachinePrecision], -2.0], $MachinePrecision]), $MachinePrecision] / N[(N[(N[(N[(N[Sin[k], $MachinePrecision] * N[Tan[k], $MachinePrecision]), $MachinePrecision] * N[Power[t, 3.0], $MachinePrecision]), $MachinePrecision] / l$95$m), $MachinePrecision] / l$95$m), $MachinePrecision]), $MachinePrecision], N[(N[(N[Power[l$95$m, 2.0], $MachinePrecision] / N[Power[k, 2.0], $MachinePrecision]), $MachinePrecision] * N[(2.0 / N[(N[Tan[k], $MachinePrecision] * N[(t * N[Sin[k], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
l_m = \left|\ell\right|

\\
\begin{array}{l}
\mathbf{if}\;l\_m \leq 1.65 \cdot 10^{-209}:\\
\;\;\;\;\frac{2 \cdot {\left(\frac{k}{t}\right)}^{-2}}{\frac{\frac{\left(\sin k \cdot \tan k\right) \cdot {t}^{3}}{l\_m}}{l\_m}}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if l < 1.64999999999999987e-209

    1. Initial program 39.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 1.64999999999999987e-209 < l

    1. Initial program 49.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. Simplified55.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 15: 74.8% accurate, 1.0× speedup?

\[\begin{array}{l} l_m = \left|\ell\right| \\ \frac{{l\_m}^{2}}{{k}^{2}} \cdot \frac{2}{\tan k \cdot \left(t \cdot \sin k\right)} \end{array} \]
l_m = (fabs.f64 l)
(FPCore (t l_m k)
 :precision binary64
 (* (/ (pow l_m 2.0) (pow k 2.0)) (/ 2.0 (* (tan k) (* t (sin k))))))
l_m = fabs(l);
double code(double t, double l_m, double k) {
	return (pow(l_m, 2.0) / pow(k, 2.0)) * (2.0 / (tan(k) * (t * sin(k))));
}
l_m = abs(l)
real(8) function code(t, l_m, k)
    real(8), intent (in) :: t
    real(8), intent (in) :: l_m
    real(8), intent (in) :: k
    code = ((l_m ** 2.0d0) / (k ** 2.0d0)) * (2.0d0 / (tan(k) * (t * sin(k))))
end function
l_m = Math.abs(l);
public static double code(double t, double l_m, double k) {
	return (Math.pow(l_m, 2.0) / Math.pow(k, 2.0)) * (2.0 / (Math.tan(k) * (t * Math.sin(k))));
}
l_m = math.fabs(l)
def code(t, l_m, k):
	return (math.pow(l_m, 2.0) / math.pow(k, 2.0)) * (2.0 / (math.tan(k) * (t * math.sin(k))))
l_m = abs(l)
function code(t, l_m, k)
	return Float64(Float64((l_m ^ 2.0) / (k ^ 2.0)) * Float64(2.0 / Float64(tan(k) * Float64(t * sin(k)))))
end
l_m = abs(l);
function tmp = code(t, l_m, k)
	tmp = ((l_m ^ 2.0) / (k ^ 2.0)) * (2.0 / (tan(k) * (t * sin(k))));
end
l_m = N[Abs[l], $MachinePrecision]
code[t_, l$95$m_, k_] := N[(N[(N[Power[l$95$m, 2.0], $MachinePrecision] / N[Power[k, 2.0], $MachinePrecision]), $MachinePrecision] * N[(2.0 / N[(N[Tan[k], $MachinePrecision] * N[(t * N[Sin[k], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
l_m = \left|\ell\right|

\\
\frac{{l\_m}^{2}}{{k}^{2}} \cdot \frac{2}{\tan k \cdot \left(t \cdot \sin k\right)}
\end{array}
Derivation
  1. Initial program 43.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.9%

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \frac{{\ell}^{2}}{{k}^{2}} \cdot \frac{2}{\tan k \cdot \left(t \cdot \sin k\right)} \]
  10. Add Preprocessing

Alternative 16: 73.8% accurate, 1.3× speedup?

\[\begin{array}{l} l_m = \left|\ell\right| \\ \left(l\_m \cdot l\_m\right) \cdot \frac{2}{{k}^{2} \cdot \left(t \cdot \left(\sin k \cdot \tan k\right)\right)} \end{array} \]
l_m = (fabs.f64 l)
(FPCore (t l_m k)
 :precision binary64
 (* (* l_m l_m) (/ 2.0 (* (pow k 2.0) (* t (* (sin k) (tan k)))))))
l_m = fabs(l);
double code(double t, double l_m, double k) {
	return (l_m * l_m) * (2.0 / (pow(k, 2.0) * (t * (sin(k) * tan(k)))));
}
l_m = abs(l)
real(8) function code(t, l_m, k)
    real(8), intent (in) :: t
    real(8), intent (in) :: l_m
    real(8), intent (in) :: k
    code = (l_m * l_m) * (2.0d0 / ((k ** 2.0d0) * (t * (sin(k) * tan(k)))))
end function
l_m = Math.abs(l);
public static double code(double t, double l_m, double k) {
	return (l_m * l_m) * (2.0 / (Math.pow(k, 2.0) * (t * (Math.sin(k) * Math.tan(k)))));
}
l_m = math.fabs(l)
def code(t, l_m, k):
	return (l_m * l_m) * (2.0 / (math.pow(k, 2.0) * (t * (math.sin(k) * math.tan(k)))))
l_m = abs(l)
function code(t, l_m, k)
	return Float64(Float64(l_m * l_m) * Float64(2.0 / Float64((k ^ 2.0) * Float64(t * Float64(sin(k) * tan(k))))))
end
l_m = abs(l);
function tmp = code(t, l_m, k)
	tmp = (l_m * l_m) * (2.0 / ((k ^ 2.0) * (t * (sin(k) * tan(k)))));
end
l_m = N[Abs[l], $MachinePrecision]
code[t_, l$95$m_, k_] := N[(N[(l$95$m * l$95$m), $MachinePrecision] * N[(2.0 / N[(N[Power[k, 2.0], $MachinePrecision] * N[(t * N[(N[Sin[k], $MachinePrecision] * N[Tan[k], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
l_m = \left|\ell\right|

\\
\left(l\_m \cdot l\_m\right) \cdot \frac{2}{{k}^{2} \cdot \left(t \cdot \left(\sin k \cdot \tan k\right)\right)}
\end{array}
Derivation
  1. Initial program 43.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.9%

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

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

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

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

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

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

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

    \[\leadsto \left(\ell \cdot \ell\right) \cdot \frac{2}{{k}^{2} \cdot \left(t \cdot \left(\sin k \cdot \tan k\right)\right)} \]
  8. Add Preprocessing

Alternative 17: 73.8% accurate, 1.3× speedup?

\[\begin{array}{l} l_m = \left|\ell\right| \\ \left(l\_m \cdot l\_m\right) \cdot \frac{2}{{k}^{2} \cdot \left(\sin k \cdot \left(t \cdot \tan k\right)\right)} \end{array} \]
l_m = (fabs.f64 l)
(FPCore (t l_m k)
 :precision binary64
 (* (* l_m l_m) (/ 2.0 (* (pow k 2.0) (* (sin k) (* t (tan k)))))))
l_m = fabs(l);
double code(double t, double l_m, double k) {
	return (l_m * l_m) * (2.0 / (pow(k, 2.0) * (sin(k) * (t * tan(k)))));
}
l_m = abs(l)
real(8) function code(t, l_m, k)
    real(8), intent (in) :: t
    real(8), intent (in) :: l_m
    real(8), intent (in) :: k
    code = (l_m * l_m) * (2.0d0 / ((k ** 2.0d0) * (sin(k) * (t * tan(k)))))
end function
l_m = Math.abs(l);
public static double code(double t, double l_m, double k) {
	return (l_m * l_m) * (2.0 / (Math.pow(k, 2.0) * (Math.sin(k) * (t * Math.tan(k)))));
}
l_m = math.fabs(l)
def code(t, l_m, k):
	return (l_m * l_m) * (2.0 / (math.pow(k, 2.0) * (math.sin(k) * (t * math.tan(k)))))
l_m = abs(l)
function code(t, l_m, k)
	return Float64(Float64(l_m * l_m) * Float64(2.0 / Float64((k ^ 2.0) * Float64(sin(k) * Float64(t * tan(k))))))
end
l_m = abs(l);
function tmp = code(t, l_m, k)
	tmp = (l_m * l_m) * (2.0 / ((k ^ 2.0) * (sin(k) * (t * tan(k)))));
end
l_m = N[Abs[l], $MachinePrecision]
code[t_, l$95$m_, k_] := N[(N[(l$95$m * l$95$m), $MachinePrecision] * N[(2.0 / N[(N[Power[k, 2.0], $MachinePrecision] * N[(N[Sin[k], $MachinePrecision] * N[(t * N[Tan[k], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
l_m = \left|\ell\right|

\\
\left(l\_m \cdot l\_m\right) \cdot \frac{2}{{k}^{2} \cdot \left(\sin k \cdot \left(t \cdot \tan k\right)\right)}
\end{array}
Derivation
  1. Initial program 43.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.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \left(\ell \cdot \ell\right) \cdot \frac{2}{{k}^{2} \cdot \left(\sin k \cdot \left(t \cdot \tan k\right)\right)} \]
  14. Add Preprocessing

Alternative 18: 32.1% accurate, 1.4× speedup?

\[\begin{array}{l} l_m = \left|\ell\right| \\ \left(l\_m \cdot l\_m\right) \cdot \frac{2}{{\left({k}^{2} \cdot \sqrt{t}\right)}^{2}} \end{array} \]
l_m = (fabs.f64 l)
(FPCore (t l_m k)
 :precision binary64
 (* (* l_m l_m) (/ 2.0 (pow (* (pow k 2.0) (sqrt t)) 2.0))))
l_m = fabs(l);
double code(double t, double l_m, double k) {
	return (l_m * l_m) * (2.0 / pow((pow(k, 2.0) * sqrt(t)), 2.0));
}
l_m = abs(l)
real(8) function code(t, l_m, k)
    real(8), intent (in) :: t
    real(8), intent (in) :: l_m
    real(8), intent (in) :: k
    code = (l_m * l_m) * (2.0d0 / (((k ** 2.0d0) * sqrt(t)) ** 2.0d0))
end function
l_m = Math.abs(l);
public static double code(double t, double l_m, double k) {
	return (l_m * l_m) * (2.0 / Math.pow((Math.pow(k, 2.0) * Math.sqrt(t)), 2.0));
}
l_m = math.fabs(l)
def code(t, l_m, k):
	return (l_m * l_m) * (2.0 / math.pow((math.pow(k, 2.0) * math.sqrt(t)), 2.0))
l_m = abs(l)
function code(t, l_m, k)
	return Float64(Float64(l_m * l_m) * Float64(2.0 / (Float64((k ^ 2.0) * sqrt(t)) ^ 2.0)))
end
l_m = abs(l);
function tmp = code(t, l_m, k)
	tmp = (l_m * l_m) * (2.0 / (((k ^ 2.0) * sqrt(t)) ^ 2.0));
end
l_m = N[Abs[l], $MachinePrecision]
code[t_, l$95$m_, k_] := N[(N[(l$95$m * l$95$m), $MachinePrecision] * N[(2.0 / N[Power[N[(N[Power[k, 2.0], $MachinePrecision] * N[Sqrt[t], $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
l_m = \left|\ell\right|

\\
\left(l\_m \cdot l\_m\right) \cdot \frac{2}{{\left({k}^{2} \cdot \sqrt{t}\right)}^{2}}
\end{array}
Derivation
  1. Initial program 43.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.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 19: 64.4% accurate, 2.0× speedup?

\[\begin{array}{l} l_m = \left|\ell\right| \\ \left(l\_m \cdot l\_m\right) \cdot \frac{2}{{k}^{2} \cdot \left(t \cdot {k}^{2}\right)} \end{array} \]
l_m = (fabs.f64 l)
(FPCore (t l_m k)
 :precision binary64
 (* (* l_m l_m) (/ 2.0 (* (pow k 2.0) (* t (pow k 2.0))))))
l_m = fabs(l);
double code(double t, double l_m, double k) {
	return (l_m * l_m) * (2.0 / (pow(k, 2.0) * (t * pow(k, 2.0))));
}
l_m = abs(l)
real(8) function code(t, l_m, k)
    real(8), intent (in) :: t
    real(8), intent (in) :: l_m
    real(8), intent (in) :: k
    code = (l_m * l_m) * (2.0d0 / ((k ** 2.0d0) * (t * (k ** 2.0d0))))
end function
l_m = Math.abs(l);
public static double code(double t, double l_m, double k) {
	return (l_m * l_m) * (2.0 / (Math.pow(k, 2.0) * (t * Math.pow(k, 2.0))));
}
l_m = math.fabs(l)
def code(t, l_m, k):
	return (l_m * l_m) * (2.0 / (math.pow(k, 2.0) * (t * math.pow(k, 2.0))))
l_m = abs(l)
function code(t, l_m, k)
	return Float64(Float64(l_m * l_m) * Float64(2.0 / Float64((k ^ 2.0) * Float64(t * (k ^ 2.0)))))
end
l_m = abs(l);
function tmp = code(t, l_m, k)
	tmp = (l_m * l_m) * (2.0 / ((k ^ 2.0) * (t * (k ^ 2.0))));
end
l_m = N[Abs[l], $MachinePrecision]
code[t_, l$95$m_, k_] := N[(N[(l$95$m * l$95$m), $MachinePrecision] * N[(2.0 / N[(N[Power[k, 2.0], $MachinePrecision] * N[(t * N[Power[k, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
l_m = \left|\ell\right|

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 20: 62.7% accurate, 2.0× speedup?

\[\begin{array}{l} l_m = \left|\ell\right| \\ 2 \cdot \frac{{l\_m}^{2}}{t \cdot {k}^{4}} \end{array} \]
l_m = (fabs.f64 l)
(FPCore (t l_m k)
 :precision binary64
 (* 2.0 (/ (pow l_m 2.0) (* t (pow k 4.0)))))
l_m = fabs(l);
double code(double t, double l_m, double k) {
	return 2.0 * (pow(l_m, 2.0) / (t * pow(k, 4.0)));
}
l_m = abs(l)
real(8) function code(t, l_m, k)
    real(8), intent (in) :: t
    real(8), intent (in) :: l_m
    real(8), intent (in) :: k
    code = 2.0d0 * ((l_m ** 2.0d0) / (t * (k ** 4.0d0)))
end function
l_m = Math.abs(l);
public static double code(double t, double l_m, double k) {
	return 2.0 * (Math.pow(l_m, 2.0) / (t * Math.pow(k, 4.0)));
}
l_m = math.fabs(l)
def code(t, l_m, k):
	return 2.0 * (math.pow(l_m, 2.0) / (t * math.pow(k, 4.0)))
l_m = abs(l)
function code(t, l_m, k)
	return Float64(2.0 * Float64((l_m ^ 2.0) / Float64(t * (k ^ 4.0))))
end
l_m = abs(l);
function tmp = code(t, l_m, k)
	tmp = 2.0 * ((l_m ^ 2.0) / (t * (k ^ 4.0)));
end
l_m = N[Abs[l], $MachinePrecision]
code[t_, l$95$m_, k_] := N[(2.0 * N[(N[Power[l$95$m, 2.0], $MachinePrecision] / N[(t * N[Power[k, 4.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
l_m = \left|\ell\right|

\\
2 \cdot \frac{{l\_m}^{2}}{t \cdot {k}^{4}}
\end{array}
Derivation
  1. Initial program 43.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.9%

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

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

    \[\leadsto 2 \cdot \frac{{\ell}^{2}}{t \cdot {k}^{4}} \]
  6. Add Preprocessing

Alternative 21: 62.7% accurate, 3.8× speedup?

\[\begin{array}{l} l_m = \left|\ell\right| \\ \left(l\_m \cdot l\_m\right) \cdot \frac{2}{t \cdot {k}^{4}} \end{array} \]
l_m = (fabs.f64 l)
(FPCore (t l_m k)
 :precision binary64
 (* (* l_m l_m) (/ 2.0 (* t (pow k 4.0)))))
l_m = fabs(l);
double code(double t, double l_m, double k) {
	return (l_m * l_m) * (2.0 / (t * pow(k, 4.0)));
}
l_m = abs(l)
real(8) function code(t, l_m, k)
    real(8), intent (in) :: t
    real(8), intent (in) :: l_m
    real(8), intent (in) :: k
    code = (l_m * l_m) * (2.0d0 / (t * (k ** 4.0d0)))
end function
l_m = Math.abs(l);
public static double code(double t, double l_m, double k) {
	return (l_m * l_m) * (2.0 / (t * Math.pow(k, 4.0)));
}
l_m = math.fabs(l)
def code(t, l_m, k):
	return (l_m * l_m) * (2.0 / (t * math.pow(k, 4.0)))
l_m = abs(l)
function code(t, l_m, k)
	return Float64(Float64(l_m * l_m) * Float64(2.0 / Float64(t * (k ^ 4.0))))
end
l_m = abs(l);
function tmp = code(t, l_m, k)
	tmp = (l_m * l_m) * (2.0 / (t * (k ^ 4.0)));
end
l_m = N[Abs[l], $MachinePrecision]
code[t_, l$95$m_, k_] := N[(N[(l$95$m * l$95$m), $MachinePrecision] * N[(2.0 / N[(t * N[Power[k, 4.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
l_m = \left|\ell\right|

\\
\left(l\_m \cdot l\_m\right) \cdot \frac{2}{t \cdot {k}^{4}}
\end{array}
Derivation
  1. Initial program 43.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.9%

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

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

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

Alternative 22: 19.0% accurate, 60.1× speedup?

\[\begin{array}{l} l_m = \left|\ell\right| \\ \left(l\_m \cdot l\_m\right) \cdot \frac{2}{0} \end{array} \]
l_m = (fabs.f64 l)
(FPCore (t l_m k) :precision binary64 (* (* l_m l_m) (/ 2.0 0.0)))
l_m = fabs(l);
double code(double t, double l_m, double k) {
	return (l_m * l_m) * (2.0 / 0.0);
}
l_m = abs(l)
real(8) function code(t, l_m, k)
    real(8), intent (in) :: t
    real(8), intent (in) :: l_m
    real(8), intent (in) :: k
    code = (l_m * l_m) * (2.0d0 / 0.0d0)
end function
l_m = Math.abs(l);
public static double code(double t, double l_m, double k) {
	return (l_m * l_m) * (2.0 / 0.0);
}
l_m = math.fabs(l)
def code(t, l_m, k):
	return (l_m * l_m) * (2.0 / 0.0)
l_m = abs(l)
function code(t, l_m, k)
	return Float64(Float64(l_m * l_m) * Float64(2.0 / 0.0))
end
l_m = abs(l);
function tmp = code(t, l_m, k)
	tmp = (l_m * l_m) * (2.0 / 0.0);
end
l_m = N[Abs[l], $MachinePrecision]
code[t_, l$95$m_, k_] := N[(N[(l$95$m * l$95$m), $MachinePrecision] * N[(2.0 / 0.0), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
l_m = \left|\ell\right|

\\
\left(l\_m \cdot l\_m\right) \cdot \frac{2}{0}
\end{array}
Derivation
  1. Initial program 43.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.9%

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

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

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

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

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

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

    \[\leadsto \frac{2}{\log \color{blue}{1}} \cdot \left(\ell \cdot \ell\right) \]
  7. Final simplification16.0%

    \[\leadsto \left(\ell \cdot \ell\right) \cdot \frac{2}{0} \]
  8. Add Preprocessing

Reproduce

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