Toniolo and Linder, Equation (10-)

Percentage Accurate: 35.5% → 91.4%
Time: 19.3s
Alternatives: 18
Speedup: 3.8×

Specification

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

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

Sampling outcomes in binary64 precision:

Local Percentage Accuracy vs ?

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

Accuracy vs Speed?

Herbie found 18 alternatives:

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

Initial Program: 35.5% 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: 91.4% accurate, 0.5× speedup?

\[\begin{array}{l} k_m = \left|k\right| \\ \begin{array}{l} t_1 := {\left(\sqrt[3]{\ell}\right)}^{2} \cdot \sqrt[3]{2}\\ \mathbf{if}\;k\_m \leq 7.2 \cdot 10^{-6}:\\ \;\;\;\;{\left(\frac{t\_1}{k\_m \cdot \left(\sqrt[3]{k\_m \cdot t} + 0.05555555555555555 \cdot \sqrt[3]{t \cdot {k\_m}^{7}}\right)}\right)}^{3}\\ \mathbf{else}:\\ \;\;\;\;{\left(\frac{t\_1}{t \cdot \left({\left(\sqrt[3]{\frac{k\_m}{t}}\right)}^{2} \cdot \sqrt[3]{\sin k\_m \cdot \tan k\_m}\right)}\right)}^{3}\\ \end{array} \end{array} \]
k_m = (fabs.f64 k)
(FPCore (t l k_m)
 :precision binary64
 (let* ((t_1 (* (pow (cbrt l) 2.0) (cbrt 2.0))))
   (if (<= k_m 7.2e-6)
     (pow
      (/
       t_1
       (*
        k_m
        (+
         (cbrt (* k_m t))
         (* 0.05555555555555555 (cbrt (* t (pow k_m 7.0)))))))
      3.0)
     (pow
      (/
       t_1
       (* t (* (pow (cbrt (/ k_m t)) 2.0) (cbrt (* (sin k_m) (tan k_m))))))
      3.0))))
k_m = fabs(k);
double code(double t, double l, double k_m) {
	double t_1 = pow(cbrt(l), 2.0) * cbrt(2.0);
	double tmp;
	if (k_m <= 7.2e-6) {
		tmp = pow((t_1 / (k_m * (cbrt((k_m * t)) + (0.05555555555555555 * cbrt((t * pow(k_m, 7.0))))))), 3.0);
	} else {
		tmp = pow((t_1 / (t * (pow(cbrt((k_m / t)), 2.0) * cbrt((sin(k_m) * tan(k_m)))))), 3.0);
	}
	return tmp;
}
k_m = Math.abs(k);
public static double code(double t, double l, double k_m) {
	double t_1 = Math.pow(Math.cbrt(l), 2.0) * Math.cbrt(2.0);
	double tmp;
	if (k_m <= 7.2e-6) {
		tmp = Math.pow((t_1 / (k_m * (Math.cbrt((k_m * t)) + (0.05555555555555555 * Math.cbrt((t * Math.pow(k_m, 7.0))))))), 3.0);
	} else {
		tmp = Math.pow((t_1 / (t * (Math.pow(Math.cbrt((k_m / t)), 2.0) * Math.cbrt((Math.sin(k_m) * Math.tan(k_m)))))), 3.0);
	}
	return tmp;
}
k_m = abs(k)
function code(t, l, k_m)
	t_1 = Float64((cbrt(l) ^ 2.0) * cbrt(2.0))
	tmp = 0.0
	if (k_m <= 7.2e-6)
		tmp = Float64(t_1 / Float64(k_m * Float64(cbrt(Float64(k_m * t)) + Float64(0.05555555555555555 * cbrt(Float64(t * (k_m ^ 7.0))))))) ^ 3.0;
	else
		tmp = Float64(t_1 / Float64(t * Float64((cbrt(Float64(k_m / t)) ^ 2.0) * cbrt(Float64(sin(k_m) * tan(k_m)))))) ^ 3.0;
	end
	return tmp
end
k_m = N[Abs[k], $MachinePrecision]
code[t_, l_, k$95$m_] := Block[{t$95$1 = N[(N[Power[N[Power[l, 1/3], $MachinePrecision], 2.0], $MachinePrecision] * N[Power[2.0, 1/3], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[k$95$m, 7.2e-6], N[Power[N[(t$95$1 / N[(k$95$m * N[(N[Power[N[(k$95$m * t), $MachinePrecision], 1/3], $MachinePrecision] + N[(0.05555555555555555 * N[Power[N[(t * N[Power[k$95$m, 7.0], $MachinePrecision]), $MachinePrecision], 1/3], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 3.0], $MachinePrecision], N[Power[N[(t$95$1 / N[(t * N[(N[Power[N[Power[N[(k$95$m / t), $MachinePrecision], 1/3], $MachinePrecision], 2.0], $MachinePrecision] * N[Power[N[(N[Sin[k$95$m], $MachinePrecision] * N[Tan[k$95$m], $MachinePrecision]), $MachinePrecision], 1/3], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 3.0], $MachinePrecision]]]
\begin{array}{l}
k_m = \left|k\right|

\\
\begin{array}{l}
t_1 := {\left(\sqrt[3]{\ell}\right)}^{2} \cdot \sqrt[3]{2}\\
\mathbf{if}\;k\_m \leq 7.2 \cdot 10^{-6}:\\
\;\;\;\;{\left(\frac{t\_1}{k\_m \cdot \left(\sqrt[3]{k\_m \cdot t} + 0.05555555555555555 \cdot \sqrt[3]{t \cdot {k\_m}^{7}}\right)}\right)}^{3}\\

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


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

    1. Initial program 38.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. Simplified43.7%

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

        \[\leadsto \color{blue}{\left(\sqrt[3]{\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[3]{\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) \cdot \sqrt[3]{\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. pow343.7%

        \[\leadsto \color{blue}{{\left(\sqrt[3]{\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)}^{3}} \]
    5. Applied egg-rr57.8%

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

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

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

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

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

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

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

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

    if 7.19999999999999967e-6 < k

    1. Initial program 27.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. Simplified34.5%

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

        \[\leadsto \color{blue}{\left(\sqrt[3]{\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[3]{\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) \cdot \sqrt[3]{\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. pow334.4%

        \[\leadsto \color{blue}{{\left(\sqrt[3]{\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)}^{3}} \]
    5. Applied egg-rr56.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 2: 88.8% accurate, 0.5× speedup?

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

\\
\begin{array}{l}
t_1 := {\left(\sqrt[3]{\ell}\right)}^{2} \cdot \sqrt[3]{2}\\
\mathbf{if}\;k\_m \leq 4 \cdot 10^{-9}:\\
\;\;\;\;{\left(\frac{t\_1}{k\_m \cdot \left(\sqrt[3]{k\_m \cdot t} + 0.05555555555555555 \cdot \sqrt[3]{t \cdot {k\_m}^{7}}\right)}\right)}^{3}\\

\mathbf{elif}\;k\_m \leq 1.46 \cdot 10^{+158}:\\
\;\;\;\;{\left(\frac{t\_1}{\sqrt[3]{\frac{{k\_m}^{2} \cdot \left(t \cdot {\sin k\_m}^{2}\right)}{\cos k\_m}}}\right)}^{3}\\

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


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

    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. Simplified43.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-cube-cbrt43.9%

        \[\leadsto \color{blue}{\left(\sqrt[3]{\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[3]{\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) \cdot \sqrt[3]{\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. pow343.9%

        \[\leadsto \color{blue}{{\left(\sqrt[3]{\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)}^{3}} \]
    5. Applied egg-rr58.0%

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

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

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

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

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

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

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

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

    if 4.00000000000000025e-9 < k < 1.4599999999999999e158

    1. Initial program 25.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. Simplified36.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. Step-by-step derivation
      1. add-cube-cbrt36.5%

        \[\leadsto \color{blue}{\left(\sqrt[3]{\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[3]{\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) \cdot \sqrt[3]{\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. pow336.5%

        \[\leadsto \color{blue}{{\left(\sqrt[3]{\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)}^{3}} \]
    5. Applied egg-rr60.0%

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

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

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

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

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

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

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

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

    if 1.4599999999999999e158 < k

    1. Initial program 29.3%

      \[\frac{2}{\left(\left(\frac{{t}^{3}}{\ell \cdot \ell} \cdot \sin k\right) \cdot \tan k\right) \cdot \left(\left(1 + {\left(\frac{k}{t}\right)}^{2}\right) - 1\right)} \]
    2. Simplified29.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-cube-cbrt29.2%

        \[\leadsto \color{blue}{\left(\sqrt[3]{\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[3]{\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) \cdot \sqrt[3]{\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. pow329.2%

        \[\leadsto \color{blue}{{\left(\sqrt[3]{\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)}^{3}} \]
    5. Applied egg-rr47.0%

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

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

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

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

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

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

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

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

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

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

Alternative 3: 87.5% accurate, 0.6× speedup?

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

\\
\begin{array}{l}
t_1 := {\left(\sqrt[3]{\ell}\right)}^{2} \cdot \sqrt[3]{2}\\
\mathbf{if}\;k\_m \leq 0.7:\\
\;\;\;\;{\left(\frac{t\_1}{k\_m \cdot \left(\sqrt[3]{k\_m \cdot t} + 0.05555555555555555 \cdot \sqrt[3]{t \cdot {k\_m}^{7}}\right)}\right)}^{3}\\

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

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


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

    1. Initial program 38.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. Simplified43.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. Step-by-step derivation
      1. add-cube-cbrt43.7%

        \[\leadsto \color{blue}{\left(\sqrt[3]{\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[3]{\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) \cdot \sqrt[3]{\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. pow343.8%

        \[\leadsto \color{blue}{{\left(\sqrt[3]{\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)}^{3}} \]
    5. Applied egg-rr58.2%

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

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

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

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

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

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

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

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

    if 0.69999999999999996 < k < 1.99999999999999991e158

    1. Initial program 27.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. Simplified36.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 t around 0 86.1%

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

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

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

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

      \[\leadsto \color{blue}{2 \cdot \frac{{\ell}^{2} \cdot \cos k}{{k}^{2} \cdot \left(t \cdot {\sin k}^{2}\right)}} \]
    8. Step-by-step derivation
      1. associate-*r/86.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. times-frac84.2%

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

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

      \[\leadsto \color{blue}{\frac{2}{{k}^{2}} \cdot \frac{\cos k \cdot {\ell}^{2}}{t \cdot {\sin k}^{2}}} \]
    10. Step-by-step derivation
      1. associate-*r/81.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 1.99999999999999991e158 < k

    1. Initial program 29.3%

      \[\frac{2}{\left(\left(\frac{{t}^{3}}{\ell \cdot \ell} \cdot \sin k\right) \cdot \tan k\right) \cdot \left(\left(1 + {\left(\frac{k}{t}\right)}^{2}\right) - 1\right)} \]
    2. Simplified29.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-cube-cbrt29.2%

        \[\leadsto \color{blue}{\left(\sqrt[3]{\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[3]{\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) \cdot \sqrt[3]{\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. pow329.2%

        \[\leadsto \color{blue}{{\left(\sqrt[3]{\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)}^{3}} \]
    5. Applied egg-rr47.0%

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

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

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

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

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

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

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

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

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

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

Alternative 4: 75.7% accurate, 0.6× speedup?

\[\begin{array}{l} k_m = \left|k\right| \\ \begin{array}{l} \mathbf{if}\;t \leq 3.4 \cdot 10^{-76}:\\ \;\;\;\;\left(\cos k\_m \cdot \frac{{\ell}^{2}}{{\sin k\_m}^{2}}\right) \cdot \left({k\_m}^{-2} \cdot \frac{2}{t}\right)\\ \mathbf{elif}\;t \leq 4.3 \cdot 10^{+228}:\\ \;\;\;\;\frac{\frac{2}{{\left(\frac{k\_m}{t}\right)}^{2}}}{{\left(t \cdot \left(\sqrt[3]{\sin k\_m \cdot \tan k\_m} \cdot {\left(\sqrt[3]{\ell}\right)}^{-2}\right)\right)}^{3}}\\ \mathbf{else}:\\ \;\;\;\;{\left(\frac{\sqrt[3]{2 \cdot {\ell}^{2}}}{k\_m \cdot \left(\sqrt[3]{k\_m \cdot t} + 0.05555555555555555 \cdot \sqrt[3]{t \cdot {k\_m}^{7}}\right)}\right)}^{3}\\ \end{array} \end{array} \]
k_m = (fabs.f64 k)
(FPCore (t l k_m)
 :precision binary64
 (if (<= t 3.4e-76)
   (*
    (* (cos k_m) (/ (pow l 2.0) (pow (sin k_m) 2.0)))
    (* (pow k_m -2.0) (/ 2.0 t)))
   (if (<= t 4.3e+228)
     (/
      (/ 2.0 (pow (/ k_m t) 2.0))
      (pow (* t (* (cbrt (* (sin k_m) (tan k_m))) (pow (cbrt l) -2.0))) 3.0))
     (pow
      (/
       (cbrt (* 2.0 (pow l 2.0)))
       (*
        k_m
        (+
         (cbrt (* k_m t))
         (* 0.05555555555555555 (cbrt (* t (pow k_m 7.0)))))))
      3.0))))
k_m = fabs(k);
double code(double t, double l, double k_m) {
	double tmp;
	if (t <= 3.4e-76) {
		tmp = (cos(k_m) * (pow(l, 2.0) / pow(sin(k_m), 2.0))) * (pow(k_m, -2.0) * (2.0 / t));
	} else if (t <= 4.3e+228) {
		tmp = (2.0 / pow((k_m / t), 2.0)) / pow((t * (cbrt((sin(k_m) * tan(k_m))) * pow(cbrt(l), -2.0))), 3.0);
	} else {
		tmp = pow((cbrt((2.0 * pow(l, 2.0))) / (k_m * (cbrt((k_m * t)) + (0.05555555555555555 * cbrt((t * pow(k_m, 7.0))))))), 3.0);
	}
	return tmp;
}
k_m = Math.abs(k);
public static double code(double t, double l, double k_m) {
	double tmp;
	if (t <= 3.4e-76) {
		tmp = (Math.cos(k_m) * (Math.pow(l, 2.0) / Math.pow(Math.sin(k_m), 2.0))) * (Math.pow(k_m, -2.0) * (2.0 / t));
	} else if (t <= 4.3e+228) {
		tmp = (2.0 / Math.pow((k_m / t), 2.0)) / Math.pow((t * (Math.cbrt((Math.sin(k_m) * Math.tan(k_m))) * Math.pow(Math.cbrt(l), -2.0))), 3.0);
	} else {
		tmp = Math.pow((Math.cbrt((2.0 * Math.pow(l, 2.0))) / (k_m * (Math.cbrt((k_m * t)) + (0.05555555555555555 * Math.cbrt((t * Math.pow(k_m, 7.0))))))), 3.0);
	}
	return tmp;
}
k_m = abs(k)
function code(t, l, k_m)
	tmp = 0.0
	if (t <= 3.4e-76)
		tmp = Float64(Float64(cos(k_m) * Float64((l ^ 2.0) / (sin(k_m) ^ 2.0))) * Float64((k_m ^ -2.0) * Float64(2.0 / t)));
	elseif (t <= 4.3e+228)
		tmp = Float64(Float64(2.0 / (Float64(k_m / t) ^ 2.0)) / (Float64(t * Float64(cbrt(Float64(sin(k_m) * tan(k_m))) * (cbrt(l) ^ -2.0))) ^ 3.0));
	else
		tmp = Float64(cbrt(Float64(2.0 * (l ^ 2.0))) / Float64(k_m * Float64(cbrt(Float64(k_m * t)) + Float64(0.05555555555555555 * cbrt(Float64(t * (k_m ^ 7.0))))))) ^ 3.0;
	end
	return tmp
end
k_m = N[Abs[k], $MachinePrecision]
code[t_, l_, k$95$m_] := If[LessEqual[t, 3.4e-76], N[(N[(N[Cos[k$95$m], $MachinePrecision] * N[(N[Power[l, 2.0], $MachinePrecision] / N[Power[N[Sin[k$95$m], $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(N[Power[k$95$m, -2.0], $MachinePrecision] * N[(2.0 / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 4.3e+228], N[(N[(2.0 / N[Power[N[(k$95$m / t), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision] / N[Power[N[(t * N[(N[Power[N[(N[Sin[k$95$m], $MachinePrecision] * N[Tan[k$95$m], $MachinePrecision]), $MachinePrecision], 1/3], $MachinePrecision] * N[Power[N[Power[l, 1/3], $MachinePrecision], -2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 3.0], $MachinePrecision]), $MachinePrecision], N[Power[N[(N[Power[N[(2.0 * N[Power[l, 2.0], $MachinePrecision]), $MachinePrecision], 1/3], $MachinePrecision] / N[(k$95$m * N[(N[Power[N[(k$95$m * t), $MachinePrecision], 1/3], $MachinePrecision] + N[(0.05555555555555555 * N[Power[N[(t * N[Power[k$95$m, 7.0], $MachinePrecision]), $MachinePrecision], 1/3], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 3.0], $MachinePrecision]]]
\begin{array}{l}
k_m = \left|k\right|

\\
\begin{array}{l}
\mathbf{if}\;t \leq 3.4 \cdot 10^{-76}:\\
\;\;\;\;\left(\cos k\_m \cdot \frac{{\ell}^{2}}{{\sin k\_m}^{2}}\right) \cdot \left({k\_m}^{-2} \cdot \frac{2}{t}\right)\\

\mathbf{elif}\;t \leq 4.3 \cdot 10^{+228}:\\
\;\;\;\;\frac{\frac{2}{{\left(\frac{k\_m}{t}\right)}^{2}}}{{\left(t \cdot \left(\sqrt[3]{\sin k\_m \cdot \tan k\_m} \cdot {\left(\sqrt[3]{\ell}\right)}^{-2}\right)\right)}^{3}}\\

\mathbf{else}:\\
\;\;\;\;{\left(\frac{\sqrt[3]{2 \cdot {\ell}^{2}}}{k\_m \cdot \left(\sqrt[3]{k\_m \cdot t} + 0.05555555555555555 \cdot \sqrt[3]{t \cdot {k\_m}^{7}}\right)}\right)}^{3}\\


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

    1. Initial program 35.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. Simplified39.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 71.6%

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

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

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

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

      \[\leadsto \color{blue}{2 \cdot \frac{{\ell}^{2} \cdot \cos k}{{k}^{2} \cdot \left(t \cdot {\sin k}^{2}\right)}} \]
    8. Step-by-step derivation
      1. associate-*r/71.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. times-frac72.1%

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

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

      \[\leadsto \color{blue}{\frac{2}{{k}^{2}} \cdot \frac{\cos k \cdot {\ell}^{2}}{t \cdot {\sin k}^{2}}} \]
    10. Step-by-step derivation
      1. associate-*r/71.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 3.3999999999999999e-76 < t < 4.30000000000000032e228

    1. Initial program 43.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. *-commutative43.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*43.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. Simplified51.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. unpow351.9%

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

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

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

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

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

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

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

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

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

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

    if 4.30000000000000032e228 < t

    1. Initial program 6.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. Simplified20.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. Step-by-step derivation
      1. add-cube-cbrt20.0%

        \[\leadsto \color{blue}{\left(\sqrt[3]{\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[3]{\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) \cdot \sqrt[3]{\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. pow320.0%

        \[\leadsto \color{blue}{{\left(\sqrt[3]{\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)}^{3}} \]
    5. Applied egg-rr47.3%

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

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

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

Alternative 5: 85.0% accurate, 0.6× speedup?

\[\begin{array}{l} k_m = \left|k\right| \\ \begin{array}{l} \mathbf{if}\;k\_m \leq 0.7:\\ \;\;\;\;{\left(\frac{{\left(\sqrt[3]{\ell}\right)}^{2} \cdot \sqrt[3]{2}}{k\_m \cdot \left(\sqrt[3]{k\_m \cdot t} + 0.05555555555555555 \cdot \sqrt[3]{t \cdot {k\_m}^{7}}\right)}\right)}^{3}\\ \mathbf{else}:\\ \;\;\;\;\left(\cos k\_m \cdot \frac{{\ell}^{2}}{{\sin k\_m}^{2}}\right) \cdot \left({k\_m}^{-2} \cdot \frac{2}{t}\right)\\ \end{array} \end{array} \]
k_m = (fabs.f64 k)
(FPCore (t l k_m)
 :precision binary64
 (if (<= k_m 0.7)
   (pow
    (/
     (* (pow (cbrt l) 2.0) (cbrt 2.0))
     (*
      k_m
      (+ (cbrt (* k_m t)) (* 0.05555555555555555 (cbrt (* t (pow k_m 7.0)))))))
    3.0)
   (*
    (* (cos k_m) (/ (pow l 2.0) (pow (sin k_m) 2.0)))
    (* (pow k_m -2.0) (/ 2.0 t)))))
k_m = fabs(k);
double code(double t, double l, double k_m) {
	double tmp;
	if (k_m <= 0.7) {
		tmp = pow(((pow(cbrt(l), 2.0) * cbrt(2.0)) / (k_m * (cbrt((k_m * t)) + (0.05555555555555555 * cbrt((t * pow(k_m, 7.0))))))), 3.0);
	} else {
		tmp = (cos(k_m) * (pow(l, 2.0) / pow(sin(k_m), 2.0))) * (pow(k_m, -2.0) * (2.0 / t));
	}
	return tmp;
}
k_m = Math.abs(k);
public static double code(double t, double l, double k_m) {
	double tmp;
	if (k_m <= 0.7) {
		tmp = Math.pow(((Math.pow(Math.cbrt(l), 2.0) * Math.cbrt(2.0)) / (k_m * (Math.cbrt((k_m * t)) + (0.05555555555555555 * Math.cbrt((t * Math.pow(k_m, 7.0))))))), 3.0);
	} else {
		tmp = (Math.cos(k_m) * (Math.pow(l, 2.0) / Math.pow(Math.sin(k_m), 2.0))) * (Math.pow(k_m, -2.0) * (2.0 / t));
	}
	return tmp;
}
k_m = abs(k)
function code(t, l, k_m)
	tmp = 0.0
	if (k_m <= 0.7)
		tmp = Float64(Float64((cbrt(l) ^ 2.0) * cbrt(2.0)) / Float64(k_m * Float64(cbrt(Float64(k_m * t)) + Float64(0.05555555555555555 * cbrt(Float64(t * (k_m ^ 7.0))))))) ^ 3.0;
	else
		tmp = Float64(Float64(cos(k_m) * Float64((l ^ 2.0) / (sin(k_m) ^ 2.0))) * Float64((k_m ^ -2.0) * Float64(2.0 / t)));
	end
	return tmp
end
k_m = N[Abs[k], $MachinePrecision]
code[t_, l_, k$95$m_] := If[LessEqual[k$95$m, 0.7], N[Power[N[(N[(N[Power[N[Power[l, 1/3], $MachinePrecision], 2.0], $MachinePrecision] * N[Power[2.0, 1/3], $MachinePrecision]), $MachinePrecision] / N[(k$95$m * N[(N[Power[N[(k$95$m * t), $MachinePrecision], 1/3], $MachinePrecision] + N[(0.05555555555555555 * N[Power[N[(t * N[Power[k$95$m, 7.0], $MachinePrecision]), $MachinePrecision], 1/3], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 3.0], $MachinePrecision], N[(N[(N[Cos[k$95$m], $MachinePrecision] * N[(N[Power[l, 2.0], $MachinePrecision] / N[Power[N[Sin[k$95$m], $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(N[Power[k$95$m, -2.0], $MachinePrecision] * N[(2.0 / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
k_m = \left|k\right|

\\
\begin{array}{l}
\mathbf{if}\;k\_m \leq 0.7:\\
\;\;\;\;{\left(\frac{{\left(\sqrt[3]{\ell}\right)}^{2} \cdot \sqrt[3]{2}}{k\_m \cdot \left(\sqrt[3]{k\_m \cdot t} + 0.05555555555555555 \cdot \sqrt[3]{t \cdot {k\_m}^{7}}\right)}\right)}^{3}\\

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


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

    1. Initial program 38.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. Simplified43.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. Step-by-step derivation
      1. add-cube-cbrt43.7%

        \[\leadsto \color{blue}{\left(\sqrt[3]{\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[3]{\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) \cdot \sqrt[3]{\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. pow343.8%

        \[\leadsto \color{blue}{{\left(\sqrt[3]{\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)}^{3}} \]
    5. Applied egg-rr58.2%

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

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

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

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

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

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

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

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

    if 0.69999999999999996 < k

    1. Initial program 27.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. Simplified34.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 71.5%

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

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

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

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

      \[\leadsto \color{blue}{2 \cdot \frac{{\ell}^{2} \cdot \cos k}{{k}^{2} \cdot \left(t \cdot {\sin k}^{2}\right)}} \]
    8. Step-by-step derivation
      1. associate-*r/71.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. times-frac70.3%

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

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

      \[\leadsto \color{blue}{\frac{2}{{k}^{2}} \cdot \frac{\cos k \cdot {\ell}^{2}}{t \cdot {\sin k}^{2}}} \]
    10. Step-by-step derivation
      1. associate-*r/68.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 6: 79.1% accurate, 0.7× speedup?

\[\begin{array}{l} k_m = \left|k\right| \\ \begin{array}{l} \mathbf{if}\;k\_m \leq 6.2 \cdot 10^{-159}:\\ \;\;\;\;{\left(\frac{{\left(\sqrt[3]{\ell}\right)}^{2} \cdot \sqrt[3]{2}}{\sqrt[3]{t \cdot {k\_m}^{4}}}\right)}^{3}\\ \mathbf{else}:\\ \;\;\;\;\left(\cos k\_m \cdot \frac{{\ell}^{2}}{{\sin k\_m}^{2}}\right) \cdot \left({k\_m}^{-2} \cdot \frac{2}{t}\right)\\ \end{array} \end{array} \]
k_m = (fabs.f64 k)
(FPCore (t l k_m)
 :precision binary64
 (if (<= k_m 6.2e-159)
   (pow (/ (* (pow (cbrt l) 2.0) (cbrt 2.0)) (cbrt (* t (pow k_m 4.0)))) 3.0)
   (*
    (* (cos k_m) (/ (pow l 2.0) (pow (sin k_m) 2.0)))
    (* (pow k_m -2.0) (/ 2.0 t)))))
k_m = fabs(k);
double code(double t, double l, double k_m) {
	double tmp;
	if (k_m <= 6.2e-159) {
		tmp = pow(((pow(cbrt(l), 2.0) * cbrt(2.0)) / cbrt((t * pow(k_m, 4.0)))), 3.0);
	} else {
		tmp = (cos(k_m) * (pow(l, 2.0) / pow(sin(k_m), 2.0))) * (pow(k_m, -2.0) * (2.0 / t));
	}
	return tmp;
}
k_m = Math.abs(k);
public static double code(double t, double l, double k_m) {
	double tmp;
	if (k_m <= 6.2e-159) {
		tmp = Math.pow(((Math.pow(Math.cbrt(l), 2.0) * Math.cbrt(2.0)) / Math.cbrt((t * Math.pow(k_m, 4.0)))), 3.0);
	} else {
		tmp = (Math.cos(k_m) * (Math.pow(l, 2.0) / Math.pow(Math.sin(k_m), 2.0))) * (Math.pow(k_m, -2.0) * (2.0 / t));
	}
	return tmp;
}
k_m = abs(k)
function code(t, l, k_m)
	tmp = 0.0
	if (k_m <= 6.2e-159)
		tmp = Float64(Float64((cbrt(l) ^ 2.0) * cbrt(2.0)) / cbrt(Float64(t * (k_m ^ 4.0)))) ^ 3.0;
	else
		tmp = Float64(Float64(cos(k_m) * Float64((l ^ 2.0) / (sin(k_m) ^ 2.0))) * Float64((k_m ^ -2.0) * Float64(2.0 / t)));
	end
	return tmp
end
k_m = N[Abs[k], $MachinePrecision]
code[t_, l_, k$95$m_] := If[LessEqual[k$95$m, 6.2e-159], N[Power[N[(N[(N[Power[N[Power[l, 1/3], $MachinePrecision], 2.0], $MachinePrecision] * N[Power[2.0, 1/3], $MachinePrecision]), $MachinePrecision] / N[Power[N[(t * N[Power[k$95$m, 4.0], $MachinePrecision]), $MachinePrecision], 1/3], $MachinePrecision]), $MachinePrecision], 3.0], $MachinePrecision], N[(N[(N[Cos[k$95$m], $MachinePrecision] * N[(N[Power[l, 2.0], $MachinePrecision] / N[Power[N[Sin[k$95$m], $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(N[Power[k$95$m, -2.0], $MachinePrecision] * N[(2.0 / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
k_m = \left|k\right|

\\
\begin{array}{l}
\mathbf{if}\;k\_m \leq 6.2 \cdot 10^{-159}:\\
\;\;\;\;{\left(\frac{{\left(\sqrt[3]{\ell}\right)}^{2} \cdot \sqrt[3]{2}}{\sqrt[3]{t \cdot {k\_m}^{4}}}\right)}^{3}\\

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


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

    1. Initial program 39.3%

      \[\frac{2}{\left(\left(\frac{{t}^{3}}{\ell \cdot \ell} \cdot \sin k\right) \cdot \tan k\right) \cdot \left(\left(1 + {\left(\frac{k}{t}\right)}^{2}\right) - 1\right)} \]
    2. Simplified45.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. Step-by-step derivation
      1. add-cube-cbrt45.8%

        \[\leadsto \color{blue}{\left(\sqrt[3]{\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[3]{\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) \cdot \sqrt[3]{\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. pow345.8%

        \[\leadsto \color{blue}{{\left(\sqrt[3]{\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)}^{3}} \]
    5. Applied egg-rr59.7%

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

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

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

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

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

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

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

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

    if 6.2e-159 < k

    1. Initial program 29.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. Simplified34.5%

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

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{\frac{2}{{k}^{2}} \cdot \frac{\cos k \cdot {\ell}^{2}}{t \cdot {\sin k}^{2}}} \]
    10. Step-by-step derivation
      1. associate-*r/71.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 7: 75.1% accurate, 0.8× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;t \leq 1.9 \cdot 10^{-76} \lor \neg \left(t \leq 3.2 \cdot 10^{+106}\right):\\
\;\;\;\;\left(\cos k\_m \cdot \frac{{\ell}^{2}}{{\sin k\_m}^{2}}\right) \cdot \left({k\_m}^{-2} \cdot \frac{2}{t}\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t < 1.9000000000000001e-76 or 3.1999999999999998e106 < t

    1. Initial program 31.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. Simplified36.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 t around 0 72.6%

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

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

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

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

      \[\leadsto \color{blue}{2 \cdot \frac{{\ell}^{2} \cdot \cos k}{{k}^{2} \cdot \left(t \cdot {\sin k}^{2}\right)}} \]
    8. Step-by-step derivation
      1. associate-*r/72.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. times-frac73.5%

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

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

      \[\leadsto \color{blue}{\frac{2}{{k}^{2}} \cdot \frac{\cos k \cdot {\ell}^{2}}{t \cdot {\sin k}^{2}}} \]
    10. Step-by-step derivation
      1. associate-*r/72.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 1.9000000000000001e-76 < t < 3.1999999999999998e106

    1. Initial program 58.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. *-commutative58.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*58.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. Simplified65.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. unpow265.4%

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

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

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

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

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

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

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

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

Alternative 8: 75.5% accurate, 0.8× speedup?

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

\\
\begin{array}{l}
t_1 := {\sin k\_m}^{2}\\
\mathbf{if}\;t \leq 3.2 \cdot 10^{-77}:\\
\;\;\;\;\left(\cos k\_m \cdot \frac{{\ell}^{2}}{t\_1}\right) \cdot \left({k\_m}^{-2} \cdot \frac{2}{t}\right)\\

\mathbf{elif}\;t \leq 3.2 \cdot 10^{+106}:\\
\;\;\;\;\frac{\frac{2}{\frac{\frac{k\_m}{t}}{\frac{t}{k\_m}}}}{\frac{\frac{\left(\sin k\_m \cdot \tan k\_m\right) \cdot {t}^{3}}{\ell}}{\ell}}\\

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


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

    1. Initial program 35.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. Simplified39.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 71.6%

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

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

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

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

      \[\leadsto \color{blue}{2 \cdot \frac{{\ell}^{2} \cdot \cos k}{{k}^{2} \cdot \left(t \cdot {\sin k}^{2}\right)}} \]
    8. Step-by-step derivation
      1. associate-*r/71.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. times-frac72.1%

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

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

      \[\leadsto \color{blue}{\frac{2}{{k}^{2}} \cdot \frac{\cos k \cdot {\ell}^{2}}{t \cdot {\sin k}^{2}}} \]
    10. Step-by-step derivation
      1. associate-*r/71.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 3.2e-77 < t < 3.1999999999999998e106

    1. Initial program 58.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. *-commutative58.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*58.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. Simplified65.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. unpow265.4%

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

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

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

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

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

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

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

    if 3.1999999999999998e106 < t

    1. Initial program 12.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. Simplified25.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 t around 0 77.2%

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{\frac{2}{{k}^{2}} \cdot \frac{\cos k \cdot {\ell}^{2}}{t \cdot {\sin k}^{2}}} \]
    10. Taylor expanded in k around inf 79.7%

      \[\leadsto \frac{2}{{k}^{2}} \cdot \color{blue}{\frac{{\ell}^{2} \cdot \cos k}{t \cdot {\sin k}^{2}}} \]
    11. Step-by-step derivation
      1. associate-/l*79.7%

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

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

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

Alternative 9: 73.9% accurate, 0.8× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;t \leq 4.7 \cdot 10^{-76}:\\
\;\;\;\;\frac{{\ell}^{2} \cdot \left(2 \cdot \cos k\_m\right)}{t \cdot {\left(k\_m \cdot \sin k\_m\right)}^{2}}\\

\mathbf{elif}\;t \leq 3.2 \cdot 10^{+106}:\\
\;\;\;\;\frac{\frac{2}{\frac{\frac{k\_m}{t}}{\frac{t}{k\_m}}}}{\frac{\frac{\left(\sin k\_m \cdot \tan k\_m\right) \cdot {t}^{3}}{\ell}}{\ell}}\\

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


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

    1. Initial program 35.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. Simplified39.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 71.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 4.7000000000000002e-76 < t < 3.1999999999999998e106

    1. Initial program 58.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. *-commutative58.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*58.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. Simplified65.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. unpow265.4%

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

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

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

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

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

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

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

    if 3.1999999999999998e106 < t

    1. Initial program 12.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. Simplified25.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 t around 0 77.3%

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

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

Alternative 10: 73.9% accurate, 1.0× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;t \leq 6 \cdot 10^{-76}:\\
\;\;\;\;\frac{{\ell}^{2} \cdot \left(2 \cdot \cos k\_m\right)}{t \cdot {\left(k\_m \cdot \sin k\_m\right)}^{2}}\\

\mathbf{elif}\;t \leq 3.2 \cdot 10^{+106}:\\
\;\;\;\;\frac{\frac{2}{\frac{\frac{k\_m}{t}}{\frac{t}{k\_m}}}}{\frac{\frac{\left(\sin k\_m \cdot \tan k\_m\right) \cdot {t}^{3}}{\ell}}{\ell}}\\

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


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

    1. Initial program 35.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. Simplified39.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 71.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 6.00000000000000048e-76 < t < 3.1999999999999998e106

    1. Initial program 58.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. *-commutative58.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*58.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. Simplified65.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. unpow265.4%

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

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

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

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

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

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

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

    if 3.1999999999999998e106 < t

    1. Initial program 12.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. Simplified25.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 t around 0 77.2%

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

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

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

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

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

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

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

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

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

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

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

Alternative 11: 73.9% accurate, 1.0× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;t \leq 6.8 \cdot 10^{-76}:\\
\;\;\;\;\frac{{\ell}^{2} \cdot \left(2 \cdot \cos k\_m\right)}{t \cdot {\left(k\_m \cdot \sin k\_m\right)}^{2}}\\

\mathbf{elif}\;t \leq 3.2 \cdot 10^{+106}:\\
\;\;\;\;\frac{\frac{2}{\frac{\frac{k\_m}{t}}{\frac{t}{k\_m}}}}{\frac{\frac{\left(\sin k\_m \cdot \tan k\_m\right) \cdot {t}^{3}}{\ell}}{\ell}}\\

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


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

    1. Initial program 35.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. Simplified39.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 71.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 6.7999999999999998e-76 < t < 3.1999999999999998e106

    1. Initial program 58.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. *-commutative58.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*58.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. Simplified65.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. unpow265.4%

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

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

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

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

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

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

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

    if 3.1999999999999998e106 < t

    1. Initial program 12.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. Simplified25.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 t around 0 77.2%

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

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

Alternative 12: 73.3% accurate, 1.0× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;t \leq 9 \cdot 10^{-76}:\\
\;\;\;\;\frac{{\ell}^{2} \cdot \left(2 \cdot \cos k\_m\right)}{t \cdot {\left(k\_m \cdot \sin k\_m\right)}^{2}}\\

\mathbf{elif}\;t \leq 3.2 \cdot 10^{+106}:\\
\;\;\;\;\frac{\frac{2}{\frac{\frac{k\_m}{t}}{\frac{t}{k\_m}}}}{\frac{\frac{\left(\sin k\_m \cdot \tan k\_m\right) \cdot {t}^{3}}{\ell}}{\ell}}\\

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


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

    1. Initial program 35.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. Simplified39.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 71.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 9.0000000000000001e-76 < t < 3.1999999999999998e106

    1. Initial program 58.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. *-commutative58.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*58.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. Simplified65.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. unpow265.4%

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

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

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

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

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

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

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

    if 3.1999999999999998e106 < t

    1. Initial program 12.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. Simplified25.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 t around 0 77.2%

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

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

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

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

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

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

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

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

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

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

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

Alternative 13: 73.3% accurate, 1.3× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;t \leq 5 \cdot 10^{-76}:\\
\;\;\;\;\left(\ell \cdot \ell\right) \cdot \left(2 \cdot \frac{1}{{\left(k\_m \cdot \sin k\_m\right)}^{2} \cdot \frac{t}{\cos k\_m}}\right)\\

\mathbf{elif}\;t \leq 3.2 \cdot 10^{+106}:\\
\;\;\;\;\frac{\frac{2}{\frac{\frac{k\_m}{t}}{\frac{t}{k\_m}}}}{\frac{\frac{\left(\sin k\_m \cdot \tan k\_m\right) \cdot {t}^{3}}{\ell}}{\ell}}\\

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


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

    1. Initial program 35.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. Simplified39.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 71.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 4.9999999999999998e-76 < t < 3.1999999999999998e106

    1. Initial program 58.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. *-commutative58.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*58.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. Simplified65.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. unpow265.4%

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

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

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

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

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

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

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

    if 3.1999999999999998e106 < t

    1. Initial program 12.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. Simplified25.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 t around 0 77.2%

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

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

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

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

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

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

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

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

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

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

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

Alternative 14: 74.4% accurate, 1.3× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;k\_m \leq 9.2 \cdot 10^{-15}:\\
\;\;\;\;\frac{2}{{k\_m}^{2}} \cdot \frac{{\ell}^{2}}{t \cdot {k\_m}^{2}}\\

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


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

    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. Simplified44.1%

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

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

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

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

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

      \[\leadsto \color{blue}{2 \cdot \frac{{\ell}^{2} \cdot \cos k}{{k}^{2} \cdot \left(t \cdot {\sin k}^{2}\right)}} \]
    8. Step-by-step derivation
      1. associate-*r/71.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. times-frac73.1%

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

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

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

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

    if 9.19999999999999961e-15 < k

    1. Initial program 27.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. Simplified34.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 72.6%

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 15: 64.9% accurate, 1.3× speedup?

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

\\
\frac{2}{{k\_m}^{2}} \cdot \frac{{\ell}^{2}}{t \cdot {k\_m}^{2}}
\end{array}
Derivation
  1. Initial program 35.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. Simplified41.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 71.8%

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

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

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

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

    \[\leadsto \color{blue}{2 \cdot \frac{{\ell}^{2} \cdot \cos k}{{k}^{2} \cdot \left(t \cdot {\sin k}^{2}\right)}} \]
  8. Step-by-step derivation
    1. associate-*r/72.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. times-frac72.6%

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

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

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

    \[\leadsto \frac{2}{{k}^{2}} \cdot \color{blue}{\frac{{\ell}^{2}}{{k}^{2} \cdot t}} \]
  11. Final simplification63.6%

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

Alternative 16: 63.7% accurate, 2.0× speedup?

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

\\
\left(\ell \cdot \ell\right) \cdot \frac{2}{t \cdot {\left(k\_m \cdot \sin k\_m\right)}^{2}}
\end{array}
Derivation
  1. Initial program 35.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. Simplified41.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 71.8%

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

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

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

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

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

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

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

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

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

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

Alternative 17: 63.9% accurate, 2.0× speedup?

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

\\
\left(\ell \cdot \ell\right) \cdot \left(2 \cdot \frac{\cos k\_m}{t \cdot {k\_m}^{4}}\right)
\end{array}
Derivation
  1. Initial program 35.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. Simplified41.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 71.8%

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

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

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

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

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

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

Alternative 18: 62.4% accurate, 3.8× speedup?

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

\\
\left(\ell \cdot \ell\right) \cdot \left(2 \cdot \frac{{k\_m}^{-4}}{t}\right)
\end{array}
Derivation
  1. Initial program 35.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. Simplified41.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 k around 0 57.5%

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

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

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

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

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

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

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

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

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

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

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

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

Reproduce

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