Toniolo and Linder, Equation (10+)

Percentage Accurate: 53.7% → 80.2%
Time: 16.6s
Alternatives: 16
Speedup: 2.0×

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 16 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: 53.7% 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: 80.2% accurate, 0.7× speedup?

\[\begin{array}{l} t\_m = \left|t\right| \\ t\_s = \mathsf{copysign}\left(1, t\right) \\ \begin{array}{l} t_2 := 2 + {\left(\frac{k}{t\_m}\right)}^{2}\\ t\_s \cdot \begin{array}{l} \mathbf{if}\;t\_m \leq 2.55 \cdot 10^{-100}:\\ \;\;\;\;\frac{2}{\frac{t\_m \cdot {k}^{2}}{{\ell}^{2}} \cdot \frac{{\sin k}^{2}}{\cos k}}\\ \mathbf{elif}\;t\_m \leq 5.5 \cdot 10^{+102}:\\ \;\;\;\;\frac{\ell \cdot \left(\frac{\frac{2}{{t\_m}^{3}}}{\tan k} \cdot \frac{\ell}{\sin k}\right)}{t\_2}\\ \mathbf{else}:\\ \;\;\;\;\frac{2}{t\_2 \cdot \left(\tan k \cdot \left(\sin k \cdot {\left(\frac{\frac{t\_m}{\sqrt[3]{\ell}}}{\sqrt[3]{\ell}}\right)}^{3}\right)\right)}\\ \end{array} \end{array} \end{array} \]
t\_m = (fabs.f64 t)
t\_s = (copysign.f64 #s(literal 1 binary64) t)
(FPCore (t_s t_m l k)
 :precision binary64
 (let* ((t_2 (+ 2.0 (pow (/ k t_m) 2.0))))
   (*
    t_s
    (if (<= t_m 2.55e-100)
      (/
       2.0
       (* (/ (* t_m (pow k 2.0)) (pow l 2.0)) (/ (pow (sin k) 2.0) (cos k))))
      (if (<= t_m 5.5e+102)
        (/ (* l (* (/ (/ 2.0 (pow t_m 3.0)) (tan k)) (/ l (sin k)))) t_2)
        (/
         2.0
         (*
          t_2
          (*
           (tan k)
           (* (sin k) (pow (/ (/ t_m (cbrt l)) (cbrt l)) 3.0))))))))))
t\_m = fabs(t);
t\_s = copysign(1.0, t);
double code(double t_s, double t_m, double l, double k) {
	double t_2 = 2.0 + pow((k / t_m), 2.0);
	double tmp;
	if (t_m <= 2.55e-100) {
		tmp = 2.0 / (((t_m * pow(k, 2.0)) / pow(l, 2.0)) * (pow(sin(k), 2.0) / cos(k)));
	} else if (t_m <= 5.5e+102) {
		tmp = (l * (((2.0 / pow(t_m, 3.0)) / tan(k)) * (l / sin(k)))) / t_2;
	} else {
		tmp = 2.0 / (t_2 * (tan(k) * (sin(k) * pow(((t_m / cbrt(l)) / cbrt(l)), 3.0))));
	}
	return t_s * tmp;
}
t\_m = Math.abs(t);
t\_s = Math.copySign(1.0, t);
public static double code(double t_s, double t_m, double l, double k) {
	double t_2 = 2.0 + Math.pow((k / t_m), 2.0);
	double tmp;
	if (t_m <= 2.55e-100) {
		tmp = 2.0 / (((t_m * Math.pow(k, 2.0)) / Math.pow(l, 2.0)) * (Math.pow(Math.sin(k), 2.0) / Math.cos(k)));
	} else if (t_m <= 5.5e+102) {
		tmp = (l * (((2.0 / Math.pow(t_m, 3.0)) / Math.tan(k)) * (l / Math.sin(k)))) / t_2;
	} else {
		tmp = 2.0 / (t_2 * (Math.tan(k) * (Math.sin(k) * Math.pow(((t_m / Math.cbrt(l)) / Math.cbrt(l)), 3.0))));
	}
	return t_s * tmp;
}
t\_m = abs(t)
t\_s = copysign(1.0, t)
function code(t_s, t_m, l, k)
	t_2 = Float64(2.0 + (Float64(k / t_m) ^ 2.0))
	tmp = 0.0
	if (t_m <= 2.55e-100)
		tmp = Float64(2.0 / Float64(Float64(Float64(t_m * (k ^ 2.0)) / (l ^ 2.0)) * Float64((sin(k) ^ 2.0) / cos(k))));
	elseif (t_m <= 5.5e+102)
		tmp = Float64(Float64(l * Float64(Float64(Float64(2.0 / (t_m ^ 3.0)) / tan(k)) * Float64(l / sin(k)))) / t_2);
	else
		tmp = Float64(2.0 / Float64(t_2 * Float64(tan(k) * Float64(sin(k) * (Float64(Float64(t_m / cbrt(l)) / cbrt(l)) ^ 3.0)))));
	end
	return Float64(t_s * tmp)
end
t\_m = N[Abs[t], $MachinePrecision]
t\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[t]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[t$95$s_, t$95$m_, l_, k_] := Block[{t$95$2 = N[(2.0 + N[Power[N[(k / t$95$m), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]}, N[(t$95$s * If[LessEqual[t$95$m, 2.55e-100], N[(2.0 / N[(N[(N[(t$95$m * N[Power[k, 2.0], $MachinePrecision]), $MachinePrecision] / N[Power[l, 2.0], $MachinePrecision]), $MachinePrecision] * N[(N[Power[N[Sin[k], $MachinePrecision], 2.0], $MachinePrecision] / N[Cos[k], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$m, 5.5e+102], N[(N[(l * N[(N[(N[(2.0 / N[Power[t$95$m, 3.0], $MachinePrecision]), $MachinePrecision] / N[Tan[k], $MachinePrecision]), $MachinePrecision] * N[(l / N[Sin[k], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / t$95$2), $MachinePrecision], N[(2.0 / N[(t$95$2 * N[(N[Tan[k], $MachinePrecision] * N[(N[Sin[k], $MachinePrecision] * N[Power[N[(N[(t$95$m / N[Power[l, 1/3], $MachinePrecision]), $MachinePrecision] / N[Power[l, 1/3], $MachinePrecision]), $MachinePrecision], 3.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]), $MachinePrecision]]
\begin{array}{l}
t\_m = \left|t\right|
\\
t\_s = \mathsf{copysign}\left(1, t\right)

\\
\begin{array}{l}
t_2 := 2 + {\left(\frac{k}{t\_m}\right)}^{2}\\
t\_s \cdot \begin{array}{l}
\mathbf{if}\;t\_m \leq 2.55 \cdot 10^{-100}:\\
\;\;\;\;\frac{2}{\frac{t\_m \cdot {k}^{2}}{{\ell}^{2}} \cdot \frac{{\sin k}^{2}}{\cos k}}\\

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

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


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

    1. Initial program 51.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. Add Preprocessing
    3. Step-by-step derivation
      1. associate-/r*57.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 2.5499999999999999e-100 < t < 5.49999999999999981e102

    1. Initial program 80.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. Simplified80.5%

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

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

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

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

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

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

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

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

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

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

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

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

    if 5.49999999999999981e102 < t

    1. Initial program 56.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. Add Preprocessing
    3. Taylor expanded in k around 0 45.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 2: 80.3% accurate, 0.7× speedup?

\[\begin{array}{l} t\_m = \left|t\right| \\ t\_s = \mathsf{copysign}\left(1, t\right) \\ \begin{array}{l} t_2 := 2 + {\left(\frac{k}{t\_m}\right)}^{2}\\ t\_s \cdot \begin{array}{l} \mathbf{if}\;t\_m \leq 2.7 \cdot 10^{-100}:\\ \;\;\;\;\frac{2}{\frac{t\_m \cdot {k}^{2}}{{\ell}^{2}} \cdot \frac{{\sin k}^{2}}{\cos k}}\\ \mathbf{elif}\;t\_m \leq 5.5 \cdot 10^{+102}:\\ \;\;\;\;\frac{\ell \cdot \left(\frac{\frac{2}{{t\_m}^{3}}}{\tan k} \cdot \frac{\ell}{\sin k}\right)}{t\_2}\\ \mathbf{else}:\\ \;\;\;\;\frac{2}{\sin k \cdot \frac{\tan k \cdot t\_2}{{\left(\frac{{\left(\sqrt[3]{\ell}\right)}^{2}}{t\_m}\right)}^{3}}}\\ \end{array} \end{array} \end{array} \]
t\_m = (fabs.f64 t)
t\_s = (copysign.f64 #s(literal 1 binary64) t)
(FPCore (t_s t_m l k)
 :precision binary64
 (let* ((t_2 (+ 2.0 (pow (/ k t_m) 2.0))))
   (*
    t_s
    (if (<= t_m 2.7e-100)
      (/
       2.0
       (* (/ (* t_m (pow k 2.0)) (pow l 2.0)) (/ (pow (sin k) 2.0) (cos k))))
      (if (<= t_m 5.5e+102)
        (/ (* l (* (/ (/ 2.0 (pow t_m 3.0)) (tan k)) (/ l (sin k)))) t_2)
        (/
         2.0
         (*
          (sin k)
          (/ (* (tan k) t_2) (pow (/ (pow (cbrt l) 2.0) t_m) 3.0)))))))))
t\_m = fabs(t);
t\_s = copysign(1.0, t);
double code(double t_s, double t_m, double l, double k) {
	double t_2 = 2.0 + pow((k / t_m), 2.0);
	double tmp;
	if (t_m <= 2.7e-100) {
		tmp = 2.0 / (((t_m * pow(k, 2.0)) / pow(l, 2.0)) * (pow(sin(k), 2.0) / cos(k)));
	} else if (t_m <= 5.5e+102) {
		tmp = (l * (((2.0 / pow(t_m, 3.0)) / tan(k)) * (l / sin(k)))) / t_2;
	} else {
		tmp = 2.0 / (sin(k) * ((tan(k) * t_2) / pow((pow(cbrt(l), 2.0) / t_m), 3.0)));
	}
	return t_s * tmp;
}
t\_m = Math.abs(t);
t\_s = Math.copySign(1.0, t);
public static double code(double t_s, double t_m, double l, double k) {
	double t_2 = 2.0 + Math.pow((k / t_m), 2.0);
	double tmp;
	if (t_m <= 2.7e-100) {
		tmp = 2.0 / (((t_m * Math.pow(k, 2.0)) / Math.pow(l, 2.0)) * (Math.pow(Math.sin(k), 2.0) / Math.cos(k)));
	} else if (t_m <= 5.5e+102) {
		tmp = (l * (((2.0 / Math.pow(t_m, 3.0)) / Math.tan(k)) * (l / Math.sin(k)))) / t_2;
	} else {
		tmp = 2.0 / (Math.sin(k) * ((Math.tan(k) * t_2) / Math.pow((Math.pow(Math.cbrt(l), 2.0) / t_m), 3.0)));
	}
	return t_s * tmp;
}
t\_m = abs(t)
t\_s = copysign(1.0, t)
function code(t_s, t_m, l, k)
	t_2 = Float64(2.0 + (Float64(k / t_m) ^ 2.0))
	tmp = 0.0
	if (t_m <= 2.7e-100)
		tmp = Float64(2.0 / Float64(Float64(Float64(t_m * (k ^ 2.0)) / (l ^ 2.0)) * Float64((sin(k) ^ 2.0) / cos(k))));
	elseif (t_m <= 5.5e+102)
		tmp = Float64(Float64(l * Float64(Float64(Float64(2.0 / (t_m ^ 3.0)) / tan(k)) * Float64(l / sin(k)))) / t_2);
	else
		tmp = Float64(2.0 / Float64(sin(k) * Float64(Float64(tan(k) * t_2) / (Float64((cbrt(l) ^ 2.0) / t_m) ^ 3.0))));
	end
	return Float64(t_s * tmp)
end
t\_m = N[Abs[t], $MachinePrecision]
t\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[t]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[t$95$s_, t$95$m_, l_, k_] := Block[{t$95$2 = N[(2.0 + N[Power[N[(k / t$95$m), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]}, N[(t$95$s * If[LessEqual[t$95$m, 2.7e-100], N[(2.0 / N[(N[(N[(t$95$m * N[Power[k, 2.0], $MachinePrecision]), $MachinePrecision] / N[Power[l, 2.0], $MachinePrecision]), $MachinePrecision] * N[(N[Power[N[Sin[k], $MachinePrecision], 2.0], $MachinePrecision] / N[Cos[k], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$m, 5.5e+102], N[(N[(l * N[(N[(N[(2.0 / N[Power[t$95$m, 3.0], $MachinePrecision]), $MachinePrecision] / N[Tan[k], $MachinePrecision]), $MachinePrecision] * N[(l / N[Sin[k], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / t$95$2), $MachinePrecision], N[(2.0 / N[(N[Sin[k], $MachinePrecision] * N[(N[(N[Tan[k], $MachinePrecision] * t$95$2), $MachinePrecision] / N[Power[N[(N[Power[N[Power[l, 1/3], $MachinePrecision], 2.0], $MachinePrecision] / t$95$m), $MachinePrecision], 3.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]), $MachinePrecision]]
\begin{array}{l}
t\_m = \left|t\right|
\\
t\_s = \mathsf{copysign}\left(1, t\right)

\\
\begin{array}{l}
t_2 := 2 + {\left(\frac{k}{t\_m}\right)}^{2}\\
t\_s \cdot \begin{array}{l}
\mathbf{if}\;t\_m \leq 2.7 \cdot 10^{-100}:\\
\;\;\;\;\frac{2}{\frac{t\_m \cdot {k}^{2}}{{\ell}^{2}} \cdot \frac{{\sin k}^{2}}{\cos k}}\\

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

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


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

    1. Initial program 51.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. Add Preprocessing
    3. Step-by-step derivation
      1. associate-/r*57.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 2.70000000000000016e-100 < t < 5.49999999999999981e102

    1. Initial program 80.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. Simplified80.5%

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

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

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

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

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

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

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

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

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

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

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

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

    if 5.49999999999999981e102 < t

    1. Initial program 56.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. Simplified39.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 3: 77.5% accurate, 0.8× speedup?

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

\\
t\_s \cdot \begin{array}{l}
\mathbf{if}\;t\_m \leq 3.3 \cdot 10^{-100}:\\
\;\;\;\;\frac{2}{\frac{t\_m \cdot {k}^{2}}{{\ell}^{2}} \cdot \frac{{\sin k}^{2}}{\cos k}}\\

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

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


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

    1. Initial program 51.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. Add Preprocessing
    3. Step-by-step derivation
      1. associate-/r*57.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 3.29999999999999996e-100 < t < 1.11999999999999994e108

    1. Initial program 80.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. Simplified80.5%

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

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

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

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

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

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

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

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

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

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

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

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

    if 1.11999999999999994e108 < t

    1. Initial program 56.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. Simplified39.9%

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

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

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

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

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

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

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

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

        \[\leadsto \frac{2}{{\left(\frac{{t}^{1.5}}{\color{blue}{\sqrt{\ell} \cdot \sqrt{\ell}}} \cdot \sqrt{\left(\sin k \cdot \tan k\right) \cdot \left(2 + {\left(\frac{k}{t}\right)}^{2}\right)}\right)}^{2}} \]
      9. add-sqr-sqrt36.5%

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

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

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

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

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

Alternative 4: 77.5% accurate, 0.8× speedup?

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

\\
t\_s \cdot \begin{array}{l}
\mathbf{if}\;t\_m \leq 3.1 \cdot 10^{-100}:\\
\;\;\;\;\frac{2}{t\_m \cdot {k}^{2}} \cdot \frac{{\ell}^{2} \cdot \cos k}{{\sin k}^{2}}\\

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

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


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

    1. Initial program 51.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. Simplified47.4%

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

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

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

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

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

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

    if 3.0999999999999999e-100 < t < 1.11999999999999994e108

    1. Initial program 80.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. Simplified80.5%

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

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

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

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

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

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

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

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

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

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

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

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

    if 1.11999999999999994e108 < t

    1. Initial program 56.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. Simplified39.9%

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

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

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

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

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

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

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

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

        \[\leadsto \frac{2}{{\left(\frac{{t}^{1.5}}{\color{blue}{\sqrt{\ell} \cdot \sqrt{\ell}}} \cdot \sqrt{\left(\sin k \cdot \tan k\right) \cdot \left(2 + {\left(\frac{k}{t}\right)}^{2}\right)}\right)}^{2}} \]
      9. add-sqr-sqrt36.5%

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

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

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

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

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

Alternative 5: 77.2% accurate, 0.8× speedup?

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

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

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

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


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

    1. Initial program 51.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. Simplified47.4%

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

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

    if 3.29999999999999996e-100 < t < 1.11999999999999994e108

    1. Initial program 80.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. Simplified80.5%

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

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

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

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

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

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

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

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

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

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

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

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

    if 1.11999999999999994e108 < t

    1. Initial program 56.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. Simplified39.9%

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

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

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

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

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

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

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

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

        \[\leadsto \frac{2}{{\left(\frac{{t}^{1.5}}{\color{blue}{\sqrt{\ell} \cdot \sqrt{\ell}}} \cdot \sqrt{\left(\sin k \cdot \tan k\right) \cdot \left(2 + {\left(\frac{k}{t}\right)}^{2}\right)}\right)}^{2}} \]
      9. add-sqr-sqrt36.5%

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

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

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

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

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

Alternative 6: 78.5% accurate, 1.0× speedup?

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

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

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

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


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

    1. Initial program 51.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. Simplified52.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 2.25e-100 < t < 1.11999999999999994e108

    1. Initial program 80.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. Simplified80.5%

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

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

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

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

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

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

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

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

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

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

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

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

    if 1.11999999999999994e108 < t

    1. Initial program 56.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. Simplified39.9%

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

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

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

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

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

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

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

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

        \[\leadsto \frac{2}{{\left(\frac{{t}^{1.5}}{\color{blue}{\sqrt{\ell} \cdot \sqrt{\ell}}} \cdot \sqrt{\left(\sin k \cdot \tan k\right) \cdot \left(2 + {\left(\frac{k}{t}\right)}^{2}\right)}\right)}^{2}} \]
      9. add-sqr-sqrt36.5%

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

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

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

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

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

Alternative 7: 76.8% accurate, 1.0× speedup?

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

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

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

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


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

    1. Initial program 51.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. Simplified52.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 2.29999999999999994e-100 < t < 1.8000000000000001e30

    1. Initial program 83.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. Add Preprocessing
    3. Taylor expanded in k around 0 75.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 1.8000000000000001e30 < t

    1. Initial program 61.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. Simplified48.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 8: 68.6% accurate, 1.0× speedup?

\[\begin{array}{l} t\_m = \left|t\right| \\ t\_s = \mathsf{copysign}\left(1, t\right) \\ t\_s \cdot \begin{array}{l} \mathbf{if}\;k \leq 0.00016:\\ \;\;\;\;\frac{2}{{\left(\frac{{t\_m}^{1.5}}{\ell} \cdot \left(k \cdot \sqrt{2}\right)\right)}^{2}}\\ \mathbf{elif}\;k \leq 3.8 \cdot 10^{+142}:\\ \;\;\;\;\frac{2}{\frac{{t\_m}^{2} \cdot \frac{t\_m}{\ell}}{\ell} \cdot \frac{2 \cdot \left(0.5 - \frac{\cos \left(2 \cdot k\right)}{2}\right)}{\cos k}}\\ \mathbf{else}:\\ \;\;\;\;\frac{2}{{\left(t\_m \cdot \sqrt[3]{{\ell}^{-2}}\right)}^{3} \cdot \left(2 \cdot {k}^{2}\right)}\\ \end{array} \end{array} \]
t\_m = (fabs.f64 t)
t\_s = (copysign.f64 #s(literal 1 binary64) t)
(FPCore (t_s t_m l k)
 :precision binary64
 (*
  t_s
  (if (<= k 0.00016)
    (/ 2.0 (pow (* (/ (pow t_m 1.5) l) (* k (sqrt 2.0))) 2.0))
    (if (<= k 3.8e+142)
      (/
       2.0
       (*
        (/ (* (pow t_m 2.0) (/ t_m l)) l)
        (/ (* 2.0 (- 0.5 (/ (cos (* 2.0 k)) 2.0))) (cos k))))
      (/ 2.0 (* (pow (* t_m (cbrt (pow l -2.0))) 3.0) (* 2.0 (pow k 2.0))))))))
t\_m = fabs(t);
t\_s = copysign(1.0, t);
double code(double t_s, double t_m, double l, double k) {
	double tmp;
	if (k <= 0.00016) {
		tmp = 2.0 / pow(((pow(t_m, 1.5) / l) * (k * sqrt(2.0))), 2.0);
	} else if (k <= 3.8e+142) {
		tmp = 2.0 / (((pow(t_m, 2.0) * (t_m / l)) / l) * ((2.0 * (0.5 - (cos((2.0 * k)) / 2.0))) / cos(k)));
	} else {
		tmp = 2.0 / (pow((t_m * cbrt(pow(l, -2.0))), 3.0) * (2.0 * pow(k, 2.0)));
	}
	return t_s * tmp;
}
t\_m = Math.abs(t);
t\_s = Math.copySign(1.0, t);
public static double code(double t_s, double t_m, double l, double k) {
	double tmp;
	if (k <= 0.00016) {
		tmp = 2.0 / Math.pow(((Math.pow(t_m, 1.5) / l) * (k * Math.sqrt(2.0))), 2.0);
	} else if (k <= 3.8e+142) {
		tmp = 2.0 / (((Math.pow(t_m, 2.0) * (t_m / l)) / l) * ((2.0 * (0.5 - (Math.cos((2.0 * k)) / 2.0))) / Math.cos(k)));
	} else {
		tmp = 2.0 / (Math.pow((t_m * Math.cbrt(Math.pow(l, -2.0))), 3.0) * (2.0 * Math.pow(k, 2.0)));
	}
	return t_s * tmp;
}
t\_m = abs(t)
t\_s = copysign(1.0, t)
function code(t_s, t_m, l, k)
	tmp = 0.0
	if (k <= 0.00016)
		tmp = Float64(2.0 / (Float64(Float64((t_m ^ 1.5) / l) * Float64(k * sqrt(2.0))) ^ 2.0));
	elseif (k <= 3.8e+142)
		tmp = Float64(2.0 / Float64(Float64(Float64((t_m ^ 2.0) * Float64(t_m / l)) / l) * Float64(Float64(2.0 * Float64(0.5 - Float64(cos(Float64(2.0 * k)) / 2.0))) / cos(k))));
	else
		tmp = Float64(2.0 / Float64((Float64(t_m * cbrt((l ^ -2.0))) ^ 3.0) * Float64(2.0 * (k ^ 2.0))));
	end
	return Float64(t_s * tmp)
end
t\_m = N[Abs[t], $MachinePrecision]
t\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[t]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[t$95$s_, t$95$m_, l_, k_] := N[(t$95$s * If[LessEqual[k, 0.00016], N[(2.0 / N[Power[N[(N[(N[Power[t$95$m, 1.5], $MachinePrecision] / l), $MachinePrecision] * N[(k * N[Sqrt[2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision], If[LessEqual[k, 3.8e+142], N[(2.0 / N[(N[(N[(N[Power[t$95$m, 2.0], $MachinePrecision] * N[(t$95$m / l), $MachinePrecision]), $MachinePrecision] / l), $MachinePrecision] * N[(N[(2.0 * N[(0.5 - N[(N[Cos[N[(2.0 * k), $MachinePrecision]], $MachinePrecision] / 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[Cos[k], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(2.0 / N[(N[Power[N[(t$95$m * N[Power[N[Power[l, -2.0], $MachinePrecision], 1/3], $MachinePrecision]), $MachinePrecision], 3.0], $MachinePrecision] * N[(2.0 * N[Power[k, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]), $MachinePrecision]
\begin{array}{l}
t\_m = \left|t\right|
\\
t\_s = \mathsf{copysign}\left(1, t\right)

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

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

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


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

    1. Initial program 60.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. Simplified56.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 1.60000000000000013e-4 < k < 3.7999999999999999e142

    1. Initial program 44.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. Simplified51.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \frac{2}{\frac{\frac{{t}^{2}}{1} \cdot \frac{t}{\ell}}{\ell} \cdot \frac{2 \cdot \left(0.5 - \frac{\cos \color{blue}{\left(k \cdot 2\right)}}{2}\right)}{\cos k}} \]
    12. Simplified60.0%

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

    if 3.7999999999999999e142 < k

    1. Initial program 43.2%

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

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

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

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

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

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

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

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

        \[\leadsto \frac{2}{{\left(\sqrt[3]{\color{blue}{\left(t \cdot t\right) \cdot t}} \cdot \sqrt[3]{\frac{1}{\ell \cdot \ell}}\right)}^{3} \cdot \left(2 \cdot {k}^{2}\right)} \]
      7. add-cbrt-cube63.9%

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

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

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

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

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

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

Alternative 9: 75.3% accurate, 1.0× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t < 6.1999999999999996e-47

    1. Initial program 53.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. Simplified54.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 6.1999999999999996e-47 < t

    1. Initial program 65.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. Simplified55.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 10: 68.2% accurate, 1.3× speedup?

\[\begin{array}{l} t\_m = \left|t\right| \\ t\_s = \mathsf{copysign}\left(1, t\right) \\ t\_s \cdot \begin{array}{l} \mathbf{if}\;k \leq 9.6 \cdot 10^{-5}:\\ \;\;\;\;\frac{2}{{\left(\frac{{t\_m}^{1.5}}{\ell} \cdot \left(k \cdot \sqrt{2}\right)\right)}^{2}}\\ \mathbf{elif}\;k \leq 7.2 \cdot 10^{+155}:\\ \;\;\;\;\frac{2}{\frac{\frac{t\_m}{\ell} \cdot \left(t\_m \cdot t\_m\right)}{\ell} \cdot \frac{2 \cdot {\sin k}^{2}}{\cos k}}\\ \mathbf{else}:\\ \;\;\;\;\frac{2}{{\left(\frac{t\_m}{\sqrt[3]{\ell}}\right)}^{3} \cdot \frac{2 \cdot {k}^{2}}{\ell}}\\ \end{array} \end{array} \]
t\_m = (fabs.f64 t)
t\_s = (copysign.f64 #s(literal 1 binary64) t)
(FPCore (t_s t_m l k)
 :precision binary64
 (*
  t_s
  (if (<= k 9.6e-5)
    (/ 2.0 (pow (* (/ (pow t_m 1.5) l) (* k (sqrt 2.0))) 2.0))
    (if (<= k 7.2e+155)
      (/
       2.0
       (*
        (/ (* (/ t_m l) (* t_m t_m)) l)
        (/ (* 2.0 (pow (sin k) 2.0)) (cos k))))
      (/ 2.0 (* (pow (/ t_m (cbrt l)) 3.0) (/ (* 2.0 (pow k 2.0)) l)))))))
t\_m = fabs(t);
t\_s = copysign(1.0, t);
double code(double t_s, double t_m, double l, double k) {
	double tmp;
	if (k <= 9.6e-5) {
		tmp = 2.0 / pow(((pow(t_m, 1.5) / l) * (k * sqrt(2.0))), 2.0);
	} else if (k <= 7.2e+155) {
		tmp = 2.0 / ((((t_m / l) * (t_m * t_m)) / l) * ((2.0 * pow(sin(k), 2.0)) / cos(k)));
	} else {
		tmp = 2.0 / (pow((t_m / cbrt(l)), 3.0) * ((2.0 * pow(k, 2.0)) / l));
	}
	return t_s * tmp;
}
t\_m = Math.abs(t);
t\_s = Math.copySign(1.0, t);
public static double code(double t_s, double t_m, double l, double k) {
	double tmp;
	if (k <= 9.6e-5) {
		tmp = 2.0 / Math.pow(((Math.pow(t_m, 1.5) / l) * (k * Math.sqrt(2.0))), 2.0);
	} else if (k <= 7.2e+155) {
		tmp = 2.0 / ((((t_m / l) * (t_m * t_m)) / l) * ((2.0 * Math.pow(Math.sin(k), 2.0)) / Math.cos(k)));
	} else {
		tmp = 2.0 / (Math.pow((t_m / Math.cbrt(l)), 3.0) * ((2.0 * Math.pow(k, 2.0)) / l));
	}
	return t_s * tmp;
}
t\_m = abs(t)
t\_s = copysign(1.0, t)
function code(t_s, t_m, l, k)
	tmp = 0.0
	if (k <= 9.6e-5)
		tmp = Float64(2.0 / (Float64(Float64((t_m ^ 1.5) / l) * Float64(k * sqrt(2.0))) ^ 2.0));
	elseif (k <= 7.2e+155)
		tmp = Float64(2.0 / Float64(Float64(Float64(Float64(t_m / l) * Float64(t_m * t_m)) / l) * Float64(Float64(2.0 * (sin(k) ^ 2.0)) / cos(k))));
	else
		tmp = Float64(2.0 / Float64((Float64(t_m / cbrt(l)) ^ 3.0) * Float64(Float64(2.0 * (k ^ 2.0)) / l)));
	end
	return Float64(t_s * tmp)
end
t\_m = N[Abs[t], $MachinePrecision]
t\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[t]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[t$95$s_, t$95$m_, l_, k_] := N[(t$95$s * If[LessEqual[k, 9.6e-5], N[(2.0 / N[Power[N[(N[(N[Power[t$95$m, 1.5], $MachinePrecision] / l), $MachinePrecision] * N[(k * N[Sqrt[2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision], If[LessEqual[k, 7.2e+155], N[(2.0 / N[(N[(N[(N[(t$95$m / l), $MachinePrecision] * N[(t$95$m * t$95$m), $MachinePrecision]), $MachinePrecision] / l), $MachinePrecision] * N[(N[(2.0 * N[Power[N[Sin[k], $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision] / N[Cos[k], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(2.0 / N[(N[Power[N[(t$95$m / N[Power[l, 1/3], $MachinePrecision]), $MachinePrecision], 3.0], $MachinePrecision] * N[(N[(2.0 * N[Power[k, 2.0], $MachinePrecision]), $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]), $MachinePrecision]
\begin{array}{l}
t\_m = \left|t\right|
\\
t\_s = \mathsf{copysign}\left(1, t\right)

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

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

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


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

    1. Initial program 60.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. Simplified56.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 9.6000000000000002e-5 < k < 7.20000000000000015e155

    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. Simplified49.6%

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

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

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

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

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

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

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

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

      \[\leadsto \frac{2}{\frac{\frac{{t}^{2}}{1} \cdot \frac{t}{\ell}}{\ell} \cdot \color{blue}{\frac{2 \cdot {\sin k}^{2}}{\cos k}}} \]
    9. Step-by-step derivation
      1. /-rgt-identity58.1%

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

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

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

    if 7.20000000000000015e155 < k

    1. Initial program 44.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. Simplified47.8%

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

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

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

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

        \[\leadsto \frac{2}{\color{blue}{\frac{{t}^{3}}{\ell} \cdot \frac{2 \cdot {k}^{2}}{\ell}}} \]
    8. Simplified41.6%

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

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

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

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

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

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

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

Alternative 11: 67.9% accurate, 1.3× speedup?

\[\begin{array}{l} t\_m = \left|t\right| \\ t\_s = \mathsf{copysign}\left(1, t\right) \\ t\_s \cdot \begin{array}{l} \mathbf{if}\;k \leq 12000000000:\\ \;\;\;\;\frac{2}{{\left(\frac{{t\_m}^{1.5}}{\ell} \cdot \left(k \cdot \sqrt{2}\right)\right)}^{2}}\\ \mathbf{elif}\;k \leq 8.6 \cdot 10^{+113}:\\ \;\;\;\;\frac{2}{2 \cdot \left(\tan k \cdot \left(\sin k \cdot \frac{{t\_m}^{3}}{\ell \cdot \ell}\right)\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{2}{\frac{\left(2 \cdot {k}^{2}\right) \cdot {\left(\frac{t\_m}{\sqrt[3]{\ell}}\right)}^{3}}{\ell}}\\ \end{array} \end{array} \]
t\_m = (fabs.f64 t)
t\_s = (copysign.f64 #s(literal 1 binary64) t)
(FPCore (t_s t_m l k)
 :precision binary64
 (*
  t_s
  (if (<= k 12000000000.0)
    (/ 2.0 (pow (* (/ (pow t_m 1.5) l) (* k (sqrt 2.0))) 2.0))
    (if (<= k 8.6e+113)
      (/ 2.0 (* 2.0 (* (tan k) (* (sin k) (/ (pow t_m 3.0) (* l l))))))
      (/ 2.0 (/ (* (* 2.0 (pow k 2.0)) (pow (/ t_m (cbrt l)) 3.0)) l))))))
t\_m = fabs(t);
t\_s = copysign(1.0, t);
double code(double t_s, double t_m, double l, double k) {
	double tmp;
	if (k <= 12000000000.0) {
		tmp = 2.0 / pow(((pow(t_m, 1.5) / l) * (k * sqrt(2.0))), 2.0);
	} else if (k <= 8.6e+113) {
		tmp = 2.0 / (2.0 * (tan(k) * (sin(k) * (pow(t_m, 3.0) / (l * l)))));
	} else {
		tmp = 2.0 / (((2.0 * pow(k, 2.0)) * pow((t_m / cbrt(l)), 3.0)) / l);
	}
	return t_s * tmp;
}
t\_m = Math.abs(t);
t\_s = Math.copySign(1.0, t);
public static double code(double t_s, double t_m, double l, double k) {
	double tmp;
	if (k <= 12000000000.0) {
		tmp = 2.0 / Math.pow(((Math.pow(t_m, 1.5) / l) * (k * Math.sqrt(2.0))), 2.0);
	} else if (k <= 8.6e+113) {
		tmp = 2.0 / (2.0 * (Math.tan(k) * (Math.sin(k) * (Math.pow(t_m, 3.0) / (l * l)))));
	} else {
		tmp = 2.0 / (((2.0 * Math.pow(k, 2.0)) * Math.pow((t_m / Math.cbrt(l)), 3.0)) / l);
	}
	return t_s * tmp;
}
t\_m = abs(t)
t\_s = copysign(1.0, t)
function code(t_s, t_m, l, k)
	tmp = 0.0
	if (k <= 12000000000.0)
		tmp = Float64(2.0 / (Float64(Float64((t_m ^ 1.5) / l) * Float64(k * sqrt(2.0))) ^ 2.0));
	elseif (k <= 8.6e+113)
		tmp = Float64(2.0 / Float64(2.0 * Float64(tan(k) * Float64(sin(k) * Float64((t_m ^ 3.0) / Float64(l * l))))));
	else
		tmp = Float64(2.0 / Float64(Float64(Float64(2.0 * (k ^ 2.0)) * (Float64(t_m / cbrt(l)) ^ 3.0)) / l));
	end
	return Float64(t_s * tmp)
end
t\_m = N[Abs[t], $MachinePrecision]
t\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[t]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[t$95$s_, t$95$m_, l_, k_] := N[(t$95$s * If[LessEqual[k, 12000000000.0], N[(2.0 / N[Power[N[(N[(N[Power[t$95$m, 1.5], $MachinePrecision] / l), $MachinePrecision] * N[(k * N[Sqrt[2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision], If[LessEqual[k, 8.6e+113], N[(2.0 / N[(2.0 * N[(N[Tan[k], $MachinePrecision] * N[(N[Sin[k], $MachinePrecision] * N[(N[Power[t$95$m, 3.0], $MachinePrecision] / N[(l * l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(2.0 / N[(N[(N[(2.0 * N[Power[k, 2.0], $MachinePrecision]), $MachinePrecision] * N[Power[N[(t$95$m / N[Power[l, 1/3], $MachinePrecision]), $MachinePrecision], 3.0], $MachinePrecision]), $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision]]]), $MachinePrecision]
\begin{array}{l}
t\_m = \left|t\right|
\\
t\_s = \mathsf{copysign}\left(1, t\right)

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

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

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


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

    1. Initial program 59.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 1.2e10 < k < 8.6000000000000007e113

    1. Initial program 58.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. Add Preprocessing
    3. Taylor expanded in k around 0 65.4%

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

    if 8.6000000000000007e113 < k

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

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

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

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

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

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

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

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

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

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

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

Alternative 12: 68.0% accurate, 1.3× speedup?

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

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

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


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

    1. Initial program 60.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. Simplified56.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 1e-22 < k

    1. Initial program 43.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. Simplified48.0%

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

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

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

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

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

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

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

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

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

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

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

Alternative 13: 67.4% accurate, 1.4× speedup?

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 14: 56.3% accurate, 2.0× speedup?

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

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

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

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

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

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

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

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

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

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

Alternative 15: 55.2% accurate, 2.0× speedup?

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

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

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

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

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

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

Alternative 16: 55.1% accurate, 2.0× speedup?

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \ell \cdot \frac{2}{\color{blue}{{t}^{3} \cdot \frac{2 \cdot {k}^{2}}{\ell}}} \]
  10. Simplified54.4%

    \[\leadsto \color{blue}{\ell \cdot \frac{2}{{t}^{3} \cdot \frac{2 \cdot {k}^{2}}{\ell}}} \]
  11. Add Preprocessing

Reproduce

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