Toniolo and Linder, Equation (10+)

Percentage Accurate: 55.6% → 88.0%
Time: 21.5s
Alternatives: 30
Speedup: 1.9×

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 30 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: 55.6% accurate, 1.0× speedup?

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

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

Alternative 1: 88.0% accurate, 0.5× 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^{-155}:\\ \;\;\;\;\frac{2}{\frac{{\left(\left(k \cdot \sin k\right) \cdot \sqrt{t\_m}\right)}^{2}}{\cos k \cdot {\ell}^{2}}}\\ \mathbf{else}:\\ \;\;\;\;\frac{2}{{\left(\frac{t\_m}{{\left(\sqrt[3]{\ell}\right)}^{2}} \cdot \left(\sqrt[3]{\sin k} \cdot \sqrt[3]{\left(2 + {\left(\frac{k}{t\_m}\right)}^{2}\right) \cdot \tan k}\right)\right)}^{3}}\\ \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-155)
    (/ 2.0 (/ (pow (* (* k (sin k)) (sqrt t_m)) 2.0) (* (cos k) (pow l 2.0))))
    (/
     2.0
     (pow
      (*
       (/ t_m (pow (cbrt l) 2.0))
       (* (cbrt (sin k)) (cbrt (* (+ 2.0 (pow (/ k t_m) 2.0)) (tan k)))))
      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 tmp;
	if (t_m <= 6.2e-155) {
		tmp = 2.0 / (pow(((k * sin(k)) * sqrt(t_m)), 2.0) / (cos(k) * pow(l, 2.0)));
	} else {
		tmp = 2.0 / pow(((t_m / pow(cbrt(l), 2.0)) * (cbrt(sin(k)) * cbrt(((2.0 + pow((k / t_m), 2.0)) * tan(k))))), 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 tmp;
	if (t_m <= 6.2e-155) {
		tmp = 2.0 / (Math.pow(((k * Math.sin(k)) * Math.sqrt(t_m)), 2.0) / (Math.cos(k) * Math.pow(l, 2.0)));
	} else {
		tmp = 2.0 / Math.pow(((t_m / Math.pow(Math.cbrt(l), 2.0)) * (Math.cbrt(Math.sin(k)) * Math.cbrt(((2.0 + Math.pow((k / t_m), 2.0)) * Math.tan(k))))), 3.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-155)
		tmp = Float64(2.0 / Float64((Float64(Float64(k * sin(k)) * sqrt(t_m)) ^ 2.0) / Float64(cos(k) * (l ^ 2.0))));
	else
		tmp = Float64(2.0 / (Float64(Float64(t_m / (cbrt(l) ^ 2.0)) * Float64(cbrt(sin(k)) * cbrt(Float64(Float64(2.0 + (Float64(k / t_m) ^ 2.0)) * tan(k))))) ^ 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_] := N[(t$95$s * If[LessEqual[t$95$m, 6.2e-155], N[(2.0 / N[(N[Power[N[(N[(k * N[Sin[k], $MachinePrecision]), $MachinePrecision] * N[Sqrt[t$95$m], $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision] / N[(N[Cos[k], $MachinePrecision] * N[Power[l, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(2.0 / N[Power[N[(N[(t$95$m / N[Power[N[Power[l, 1/3], $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision] * N[(N[Power[N[Sin[k], $MachinePrecision], 1/3], $MachinePrecision] * N[Power[N[(N[(2.0 + N[Power[N[(k / t$95$m), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision] * N[Tan[k], $MachinePrecision]), $MachinePrecision], 1/3], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 3.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^{-155}:\\
\;\;\;\;\frac{2}{\frac{{\left(\left(k \cdot \sin k\right) \cdot \sqrt{t\_m}\right)}^{2}}{\cos k \cdot {\ell}^{2}}}\\

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


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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 6.2e-155 < t

    1. Initial program 63.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. Simplified63.4%

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

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

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

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

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

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

        \[\leadsto \frac{2}{\color{blue}{\left(\sqrt[3]{\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[3]{\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) \cdot \sqrt[3]{\frac{\frac{{t}^{3}}{\ell}}{\ell} \cdot \left(\left(\sin k \cdot \tan k\right) \cdot \left(2 + {\left(\frac{k}{t}\right)}^{2}\right)\right)}}} \]
      7. pow366.3%

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

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

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

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

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

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

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

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

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

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

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

Alternative 2: 84.6% accurate, 0.6× speedup?

\[\begin{array}{l} t\_m = \left|t\right| \\ t\_s = \mathsf{copysign}\left(1, t\right) \\ \begin{array}{l} t_2 := \mathsf{hypot}\left(1, \mathsf{hypot}\left(1, \frac{k}{t\_m}\right)\right)\\ t_3 := {\left(\frac{k}{t\_m}\right)}^{2}\\ t_4 := \sin k \cdot \tan k\\ t_5 := \frac{t\_m}{{\left(\sqrt[3]{\ell}\right)}^{2}}\\ t\_s \cdot \begin{array}{l} \mathbf{if}\;t\_m \leq 1.06 \cdot 10^{-154}:\\ \;\;\;\;\frac{2}{\frac{{\left(\left(k \cdot \sin k\right) \cdot \sqrt{t\_m}\right)}^{2}}{\cos k \cdot {\ell}^{2}}}\\ \mathbf{elif}\;t\_m \leq 5.6 \cdot 10^{-33}:\\ \;\;\;\;\frac{2}{{\left(t\_5 \cdot \sqrt[3]{\left(2 + t\_3\right) \cdot t\_4}\right)}^{3}}\\ \mathbf{elif}\;t\_m \leq 3.1 \cdot 10^{+97}:\\ \;\;\;\;\frac{\ell \cdot \frac{2}{t\_4 \cdot {t\_m}^{3}}}{t\_2} \cdot \frac{\ell}{t\_2}\\ \mathbf{else}:\\ \;\;\;\;\frac{2}{{\left(t\_5 \cdot \sqrt[3]{\sin k}\right)}^{3} \cdot \left(\tan k \cdot \left(1 + \left(t\_3 + 1\right)\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 (hypot 1.0 (hypot 1.0 (/ k t_m))))
        (t_3 (pow (/ k t_m) 2.0))
        (t_4 (* (sin k) (tan k)))
        (t_5 (/ t_m (pow (cbrt l) 2.0))))
   (*
    t_s
    (if (<= t_m 1.06e-154)
      (/
       2.0
       (/ (pow (* (* k (sin k)) (sqrt t_m)) 2.0) (* (cos k) (pow l 2.0))))
      (if (<= t_m 5.6e-33)
        (/ 2.0 (pow (* t_5 (cbrt (* (+ 2.0 t_3) t_4))) 3.0))
        (if (<= t_m 3.1e+97)
          (* (/ (* l (/ 2.0 (* t_4 (pow t_m 3.0)))) t_2) (/ l t_2))
          (/
           2.0
           (*
            (pow (* t_5 (cbrt (sin k))) 3.0)
            (* (tan k) (+ 1.0 (+ t_3 1.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 = hypot(1.0, hypot(1.0, (k / t_m)));
	double t_3 = pow((k / t_m), 2.0);
	double t_4 = sin(k) * tan(k);
	double t_5 = t_m / pow(cbrt(l), 2.0);
	double tmp;
	if (t_m <= 1.06e-154) {
		tmp = 2.0 / (pow(((k * sin(k)) * sqrt(t_m)), 2.0) / (cos(k) * pow(l, 2.0)));
	} else if (t_m <= 5.6e-33) {
		tmp = 2.0 / pow((t_5 * cbrt(((2.0 + t_3) * t_4))), 3.0);
	} else if (t_m <= 3.1e+97) {
		tmp = ((l * (2.0 / (t_4 * pow(t_m, 3.0)))) / t_2) * (l / t_2);
	} else {
		tmp = 2.0 / (pow((t_5 * cbrt(sin(k))), 3.0) * (tan(k) * (1.0 + (t_3 + 1.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 = Math.hypot(1.0, Math.hypot(1.0, (k / t_m)));
	double t_3 = Math.pow((k / t_m), 2.0);
	double t_4 = Math.sin(k) * Math.tan(k);
	double t_5 = t_m / Math.pow(Math.cbrt(l), 2.0);
	double tmp;
	if (t_m <= 1.06e-154) {
		tmp = 2.0 / (Math.pow(((k * Math.sin(k)) * Math.sqrt(t_m)), 2.0) / (Math.cos(k) * Math.pow(l, 2.0)));
	} else if (t_m <= 5.6e-33) {
		tmp = 2.0 / Math.pow((t_5 * Math.cbrt(((2.0 + t_3) * t_4))), 3.0);
	} else if (t_m <= 3.1e+97) {
		tmp = ((l * (2.0 / (t_4 * Math.pow(t_m, 3.0)))) / t_2) * (l / t_2);
	} else {
		tmp = 2.0 / (Math.pow((t_5 * Math.cbrt(Math.sin(k))), 3.0) * (Math.tan(k) * (1.0 + (t_3 + 1.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 = hypot(1.0, hypot(1.0, Float64(k / t_m)))
	t_3 = Float64(k / t_m) ^ 2.0
	t_4 = Float64(sin(k) * tan(k))
	t_5 = Float64(t_m / (cbrt(l) ^ 2.0))
	tmp = 0.0
	if (t_m <= 1.06e-154)
		tmp = Float64(2.0 / Float64((Float64(Float64(k * sin(k)) * sqrt(t_m)) ^ 2.0) / Float64(cos(k) * (l ^ 2.0))));
	elseif (t_m <= 5.6e-33)
		tmp = Float64(2.0 / (Float64(t_5 * cbrt(Float64(Float64(2.0 + t_3) * t_4))) ^ 3.0));
	elseif (t_m <= 3.1e+97)
		tmp = Float64(Float64(Float64(l * Float64(2.0 / Float64(t_4 * (t_m ^ 3.0)))) / t_2) * Float64(l / t_2));
	else
		tmp = Float64(2.0 / Float64((Float64(t_5 * cbrt(sin(k))) ^ 3.0) * Float64(tan(k) * Float64(1.0 + Float64(t_3 + 1.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[Sqrt[1.0 ^ 2 + N[Sqrt[1.0 ^ 2 + N[(k / t$95$m), $MachinePrecision] ^ 2], $MachinePrecision] ^ 2], $MachinePrecision]}, Block[{t$95$3 = N[Power[N[(k / t$95$m), $MachinePrecision], 2.0], $MachinePrecision]}, Block[{t$95$4 = N[(N[Sin[k], $MachinePrecision] * N[Tan[k], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$5 = N[(t$95$m / N[Power[N[Power[l, 1/3], $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]}, N[(t$95$s * If[LessEqual[t$95$m, 1.06e-154], N[(2.0 / N[(N[Power[N[(N[(k * N[Sin[k], $MachinePrecision]), $MachinePrecision] * N[Sqrt[t$95$m], $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision] / N[(N[Cos[k], $MachinePrecision] * N[Power[l, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$m, 5.6e-33], N[(2.0 / N[Power[N[(t$95$5 * N[Power[N[(N[(2.0 + t$95$3), $MachinePrecision] * t$95$4), $MachinePrecision], 1/3], $MachinePrecision]), $MachinePrecision], 3.0], $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$m, 3.1e+97], N[(N[(N[(l * N[(2.0 / N[(t$95$4 * N[Power[t$95$m, 3.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / t$95$2), $MachinePrecision] * N[(l / t$95$2), $MachinePrecision]), $MachinePrecision], N[(2.0 / N[(N[Power[N[(t$95$5 * N[Power[N[Sin[k], $MachinePrecision], 1/3], $MachinePrecision]), $MachinePrecision], 3.0], $MachinePrecision] * N[(N[Tan[k], $MachinePrecision] * N[(1.0 + N[(t$95$3 + 1.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 := \mathsf{hypot}\left(1, \mathsf{hypot}\left(1, \frac{k}{t\_m}\right)\right)\\
t_3 := {\left(\frac{k}{t\_m}\right)}^{2}\\
t_4 := \sin k \cdot \tan k\\
t_5 := \frac{t\_m}{{\left(\sqrt[3]{\ell}\right)}^{2}}\\
t\_s \cdot \begin{array}{l}
\mathbf{if}\;t\_m \leq 1.06 \cdot 10^{-154}:\\
\;\;\;\;\frac{2}{\frac{{\left(\left(k \cdot \sin k\right) \cdot \sqrt{t\_m}\right)}^{2}}{\cos k \cdot {\ell}^{2}}}\\

\mathbf{elif}\;t\_m \leq 5.6 \cdot 10^{-33}:\\
\;\;\;\;\frac{2}{{\left(t\_5 \cdot \sqrt[3]{\left(2 + t\_3\right) \cdot t\_4}\right)}^{3}}\\

\mathbf{elif}\;t\_m \leq 3.1 \cdot 10^{+97}:\\
\;\;\;\;\frac{\ell \cdot \frac{2}{t\_4 \cdot {t\_m}^{3}}}{t\_2} \cdot \frac{\ell}{t\_2}\\

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


\end{array}
\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if t < 1.06e-154

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 1.06e-154 < t < 5.6e-33

    1. Initial program 67.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. Simplified67.7%

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

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

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

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

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

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

        \[\leadsto \frac{2}{\color{blue}{\left(\sqrt[3]{\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[3]{\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) \cdot \sqrt[3]{\frac{\frac{{t}^{3}}{\ell}}{\ell} \cdot \left(\left(\sin k \cdot \tan k\right) \cdot \left(2 + {\left(\frac{k}{t}\right)}^{2}\right)\right)}}} \]
      7. pow375.5%

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

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

    if 5.6e-33 < t < 3.09999999999999981e97

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

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

        \[\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. add-sqr-sqrt72.1%

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

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

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

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

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

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

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

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

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

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

    if 3.09999999999999981e97 < t

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

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq 1.06 \cdot 10^{-154}:\\ \;\;\;\;\frac{2}{\frac{{\left(\left(k \cdot \sin k\right) \cdot \sqrt{t}\right)}^{2}}{\cos k \cdot {\ell}^{2}}}\\ \mathbf{elif}\;t \leq 5.6 \cdot 10^{-33}:\\ \;\;\;\;\frac{2}{{\left(\frac{t}{{\left(\sqrt[3]{\ell}\right)}^{2}} \cdot \sqrt[3]{\left(2 + {\left(\frac{k}{t}\right)}^{2}\right) \cdot \left(\sin k \cdot \tan k\right)}\right)}^{3}}\\ \mathbf{elif}\;t \leq 3.1 \cdot 10^{+97}:\\ \;\;\;\;\frac{\ell \cdot \frac{2}{\left(\sin k \cdot \tan k\right) \cdot {t}^{3}}}{\mathsf{hypot}\left(1, \mathsf{hypot}\left(1, \frac{k}{t}\right)\right)} \cdot \frac{\ell}{\mathsf{hypot}\left(1, \mathsf{hypot}\left(1, \frac{k}{t}\right)\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{2}{{\left(\frac{t}{{\left(\sqrt[3]{\ell}\right)}^{2}} \cdot \sqrt[3]{\sin k}\right)}^{3} \cdot \left(\tan k \cdot \left(1 + \left({\left(\frac{k}{t}\right)}^{2} + 1\right)\right)\right)}\\ \end{array} \]
  5. Add Preprocessing

Alternative 3: 81.7% accurate, 0.6× speedup?

\[\begin{array}{l} t\_m = \left|t\right| \\ t\_s = \mathsf{copysign}\left(1, t\right) \\ \begin{array}{l} t_2 := \frac{t\_m}{{\left(\sqrt[3]{\ell}\right)}^{2}}\\ t\_s \cdot \begin{array}{l} \mathbf{if}\;t\_m \leq 1.1 \cdot 10^{-154}:\\ \;\;\;\;\frac{2}{\frac{{\left(\left(k \cdot \sin k\right) \cdot \sqrt{t\_m}\right)}^{2}}{\cos k \cdot {\ell}^{2}}}\\ \mathbf{elif}\;t\_m \leq 3.7 \cdot 10^{+96}:\\ \;\;\;\;\frac{2}{{\left(t\_2 \cdot \sqrt[3]{\left(2 + {\left(\frac{k}{t\_m}\right)}^{2}\right) \cdot \left(\sin k \cdot \tan k\right)}\right)}^{3}}\\ \mathbf{else}:\\ \;\;\;\;\frac{2}{{\left(t\_2 \cdot \left(\sqrt[3]{\sin k} \cdot \left(\sqrt[3]{k} \cdot \sqrt[3]{2}\right)\right)\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 (/ t_m (pow (cbrt l) 2.0))))
   (*
    t_s
    (if (<= t_m 1.1e-154)
      (/
       2.0
       (/ (pow (* (* k (sin k)) (sqrt t_m)) 2.0) (* (cos k) (pow l 2.0))))
      (if (<= t_m 3.7e+96)
        (/
         2.0
         (pow
          (* t_2 (cbrt (* (+ 2.0 (pow (/ k t_m) 2.0)) (* (sin k) (tan k)))))
          3.0))
        (/
         2.0
         (pow (* t_2 (* (cbrt (sin k)) (* (cbrt k) (cbrt 2.0)))) 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 = t_m / pow(cbrt(l), 2.0);
	double tmp;
	if (t_m <= 1.1e-154) {
		tmp = 2.0 / (pow(((k * sin(k)) * sqrt(t_m)), 2.0) / (cos(k) * pow(l, 2.0)));
	} else if (t_m <= 3.7e+96) {
		tmp = 2.0 / pow((t_2 * cbrt(((2.0 + pow((k / t_m), 2.0)) * (sin(k) * tan(k))))), 3.0);
	} else {
		tmp = 2.0 / pow((t_2 * (cbrt(sin(k)) * (cbrt(k) * cbrt(2.0)))), 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 = t_m / Math.pow(Math.cbrt(l), 2.0);
	double tmp;
	if (t_m <= 1.1e-154) {
		tmp = 2.0 / (Math.pow(((k * Math.sin(k)) * Math.sqrt(t_m)), 2.0) / (Math.cos(k) * Math.pow(l, 2.0)));
	} else if (t_m <= 3.7e+96) {
		tmp = 2.0 / Math.pow((t_2 * Math.cbrt(((2.0 + Math.pow((k / t_m), 2.0)) * (Math.sin(k) * Math.tan(k))))), 3.0);
	} else {
		tmp = 2.0 / Math.pow((t_2 * (Math.cbrt(Math.sin(k)) * (Math.cbrt(k) * Math.cbrt(2.0)))), 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(t_m / (cbrt(l) ^ 2.0))
	tmp = 0.0
	if (t_m <= 1.1e-154)
		tmp = Float64(2.0 / Float64((Float64(Float64(k * sin(k)) * sqrt(t_m)) ^ 2.0) / Float64(cos(k) * (l ^ 2.0))));
	elseif (t_m <= 3.7e+96)
		tmp = Float64(2.0 / (Float64(t_2 * cbrt(Float64(Float64(2.0 + (Float64(k / t_m) ^ 2.0)) * Float64(sin(k) * tan(k))))) ^ 3.0));
	else
		tmp = Float64(2.0 / (Float64(t_2 * Float64(cbrt(sin(k)) * Float64(cbrt(k) * cbrt(2.0)))) ^ 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[(t$95$m / N[Power[N[Power[l, 1/3], $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]}, N[(t$95$s * If[LessEqual[t$95$m, 1.1e-154], N[(2.0 / N[(N[Power[N[(N[(k * N[Sin[k], $MachinePrecision]), $MachinePrecision] * N[Sqrt[t$95$m], $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision] / N[(N[Cos[k], $MachinePrecision] * N[Power[l, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$m, 3.7e+96], N[(2.0 / N[Power[N[(t$95$2 * N[Power[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], 1/3], $MachinePrecision]), $MachinePrecision], 3.0], $MachinePrecision]), $MachinePrecision], N[(2.0 / N[Power[N[(t$95$2 * N[(N[Power[N[Sin[k], $MachinePrecision], 1/3], $MachinePrecision] * N[(N[Power[k, 1/3], $MachinePrecision] * N[Power[2.0, 1/3], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 3.0], $MachinePrecision]), $MachinePrecision]]]), $MachinePrecision]]
\begin{array}{l}
t\_m = \left|t\right|
\\
t\_s = \mathsf{copysign}\left(1, t\right)

\\
\begin{array}{l}
t_2 := \frac{t\_m}{{\left(\sqrt[3]{\ell}\right)}^{2}}\\
t\_s \cdot \begin{array}{l}
\mathbf{if}\;t\_m \leq 1.1 \cdot 10^{-154}:\\
\;\;\;\;\frac{2}{\frac{{\left(\left(k \cdot \sin k\right) \cdot \sqrt{t\_m}\right)}^{2}}{\cos k \cdot {\ell}^{2}}}\\

\mathbf{elif}\;t\_m \leq 3.7 \cdot 10^{+96}:\\
\;\;\;\;\frac{2}{{\left(t\_2 \cdot \sqrt[3]{\left(2 + {\left(\frac{k}{t\_m}\right)}^{2}\right) \cdot \left(\sin k \cdot \tan k\right)}\right)}^{3}}\\

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


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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 1.10000000000000004e-154 < t < 3.69999999999999991e96

    1. Initial program 66.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. Simplified66.2%

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

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

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

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

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

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

        \[\leadsto \frac{2}{\color{blue}{\left(\sqrt[3]{\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[3]{\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) \cdot \sqrt[3]{\frac{\frac{{t}^{3}}{\ell}}{\ell} \cdot \left(\left(\sin k \cdot \tan k\right) \cdot \left(2 + {\left(\frac{k}{t}\right)}^{2}\right)\right)}}} \]
      7. pow371.6%

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

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

    if 3.69999999999999991e96 < t

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

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

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

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

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

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

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

        \[\leadsto \frac{2}{\color{blue}{\left(\sqrt[3]{\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[3]{\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) \cdot \sqrt[3]{\frac{\frac{{t}^{3}}{\ell}}{\ell} \cdot \left(\left(\sin k \cdot \tan k\right) \cdot \left(2 + {\left(\frac{k}{t}\right)}^{2}\right)\right)}}} \]
      7. pow360.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 4: 77.9% accurate, 0.6× 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.5 \cdot 10^{-112}:\\ \;\;\;\;\frac{2}{{\left(\frac{t\_m}{{\left(\sqrt[3]{\ell}\right)}^{2}} \cdot \left(\sqrt[3]{2} \cdot {\left(\sqrt[3]{k}\right)}^{2}\right)\right)}^{3}}\\ \mathbf{elif}\;k \leq 1.6:\\ \;\;\;\;\frac{2}{{\left(\frac{{t\_m}^{1.5}}{\ell} \cdot \left(\mathsf{hypot}\left(1, \mathsf{hypot}\left(1, \frac{k}{t\_m}\right)\right) \cdot \sqrt{\sin k \cdot \tan k}\right)\right)}^{2}}\\ \mathbf{else}:\\ \;\;\;\;\frac{2}{\frac{{\left(\left(k \cdot \sin k\right) \cdot \sqrt{t\_m}\right)}^{2}}{\cos k \cdot {\ell}^{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 (<= k 9.5e-112)
    (/
     2.0
     (pow
      (* (/ t_m (pow (cbrt l) 2.0)) (* (cbrt 2.0) (pow (cbrt k) 2.0)))
      3.0))
    (if (<= k 1.6)
      (/
       2.0
       (pow
        (*
         (/ (pow t_m 1.5) l)
         (* (hypot 1.0 (hypot 1.0 (/ k t_m))) (sqrt (* (sin k) (tan k)))))
        2.0))
      (/
       2.0
       (/ (pow (* (* k (sin k)) (sqrt t_m)) 2.0) (* (cos k) (pow l 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 <= 9.5e-112) {
		tmp = 2.0 / pow(((t_m / pow(cbrt(l), 2.0)) * (cbrt(2.0) * pow(cbrt(k), 2.0))), 3.0);
	} else if (k <= 1.6) {
		tmp = 2.0 / pow(((pow(t_m, 1.5) / l) * (hypot(1.0, hypot(1.0, (k / t_m))) * sqrt((sin(k) * tan(k))))), 2.0);
	} else {
		tmp = 2.0 / (pow(((k * sin(k)) * sqrt(t_m)), 2.0) / (cos(k) * pow(l, 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 <= 9.5e-112) {
		tmp = 2.0 / Math.pow(((t_m / Math.pow(Math.cbrt(l), 2.0)) * (Math.cbrt(2.0) * Math.pow(Math.cbrt(k), 2.0))), 3.0);
	} else if (k <= 1.6) {
		tmp = 2.0 / Math.pow(((Math.pow(t_m, 1.5) / l) * (Math.hypot(1.0, Math.hypot(1.0, (k / t_m))) * Math.sqrt((Math.sin(k) * Math.tan(k))))), 2.0);
	} else {
		tmp = 2.0 / (Math.pow(((k * Math.sin(k)) * Math.sqrt(t_m)), 2.0) / (Math.cos(k) * Math.pow(l, 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 <= 9.5e-112)
		tmp = Float64(2.0 / (Float64(Float64(t_m / (cbrt(l) ^ 2.0)) * Float64(cbrt(2.0) * (cbrt(k) ^ 2.0))) ^ 3.0));
	elseif (k <= 1.6)
		tmp = Float64(2.0 / (Float64(Float64((t_m ^ 1.5) / l) * Float64(hypot(1.0, hypot(1.0, Float64(k / t_m))) * sqrt(Float64(sin(k) * tan(k))))) ^ 2.0));
	else
		tmp = Float64(2.0 / Float64((Float64(Float64(k * sin(k)) * sqrt(t_m)) ^ 2.0) / Float64(cos(k) * (l ^ 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, 9.5e-112], N[(2.0 / N[Power[N[(N[(t$95$m / N[Power[N[Power[l, 1/3], $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision] * N[(N[Power[2.0, 1/3], $MachinePrecision] * N[Power[N[Power[k, 1/3], $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 3.0], $MachinePrecision]), $MachinePrecision], If[LessEqual[k, 1.6], N[(2.0 / N[Power[N[(N[(N[Power[t$95$m, 1.5], $MachinePrecision] / l), $MachinePrecision] * N[(N[Sqrt[1.0 ^ 2 + N[Sqrt[1.0 ^ 2 + N[(k / t$95$m), $MachinePrecision] ^ 2], $MachinePrecision] ^ 2], $MachinePrecision] * N[Sqrt[N[(N[Sin[k], $MachinePrecision] * N[Tan[k], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision], N[(2.0 / N[(N[Power[N[(N[(k * N[Sin[k], $MachinePrecision]), $MachinePrecision] * N[Sqrt[t$95$m], $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision] / N[(N[Cos[k], $MachinePrecision] * N[Power[l, 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 9.5 \cdot 10^{-112}:\\
\;\;\;\;\frac{2}{{\left(\frac{t\_m}{{\left(\sqrt[3]{\ell}\right)}^{2}} \cdot \left(\sqrt[3]{2} \cdot {\left(\sqrt[3]{k}\right)}^{2}\right)\right)}^{3}}\\

\mathbf{elif}\;k \leq 1.6:\\
\;\;\;\;\frac{2}{{\left(\frac{{t\_m}^{1.5}}{\ell} \cdot \left(\mathsf{hypot}\left(1, \mathsf{hypot}\left(1, \frac{k}{t\_m}\right)\right) \cdot \sqrt{\sin k \cdot \tan k}\right)\right)}^{2}}\\

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


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

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

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

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

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

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

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

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

        \[\leadsto \frac{2}{\color{blue}{\left(\sqrt[3]{\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[3]{\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) \cdot \sqrt[3]{\frac{\frac{{t}^{3}}{\ell}}{\ell} \cdot \left(\left(\sin k \cdot \tan k\right) \cdot \left(2 + {\left(\frac{k}{t}\right)}^{2}\right)\right)}}} \]
      7. pow354.0%

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

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

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

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

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

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

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

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

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

    if 9.50000000000000056e-112 < k < 1.6000000000000001

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

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

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

    if 1.6000000000000001 < k

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 5: 85.0% accurate, 0.6× 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.45 \cdot 10^{-82}:\\ \;\;\;\;\frac{2}{\frac{{\left(\left(k \cdot \sin k\right) \cdot \sqrt{t\_m}\right)}^{2}}{\cos k \cdot {\ell}^{2}}}\\ \mathbf{else}:\\ \;\;\;\;\frac{2}{{\left(\frac{t\_m}{{\left(\sqrt[3]{\ell}\right)}^{2}} \cdot \sqrt[3]{\sin k}\right)}^{3} \cdot \left(\tan k \cdot \left(1 + \left({\left(\frac{k}{t\_m}\right)}^{2} + 1\right)\right)\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 (<= t_m 2.45e-82)
    (/ 2.0 (/ (pow (* (* k (sin k)) (sqrt t_m)) 2.0) (* (cos k) (pow l 2.0))))
    (/
     2.0
     (*
      (pow (* (/ t_m (pow (cbrt l) 2.0)) (cbrt (sin k))) 3.0)
      (* (tan k) (+ 1.0 (+ (pow (/ k t_m) 2.0) 1.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.45e-82) {
		tmp = 2.0 / (pow(((k * sin(k)) * sqrt(t_m)), 2.0) / (cos(k) * pow(l, 2.0)));
	} else {
		tmp = 2.0 / (pow(((t_m / pow(cbrt(l), 2.0)) * cbrt(sin(k))), 3.0) * (tan(k) * (1.0 + (pow((k / t_m), 2.0) + 1.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 (t_m <= 2.45e-82) {
		tmp = 2.0 / (Math.pow(((k * Math.sin(k)) * Math.sqrt(t_m)), 2.0) / (Math.cos(k) * Math.pow(l, 2.0)));
	} else {
		tmp = 2.0 / (Math.pow(((t_m / Math.pow(Math.cbrt(l), 2.0)) * Math.cbrt(Math.sin(k))), 3.0) * (Math.tan(k) * (1.0 + (Math.pow((k / t_m), 2.0) + 1.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.45e-82)
		tmp = Float64(2.0 / Float64((Float64(Float64(k * sin(k)) * sqrt(t_m)) ^ 2.0) / Float64(cos(k) * (l ^ 2.0))));
	else
		tmp = Float64(2.0 / Float64((Float64(Float64(t_m / (cbrt(l) ^ 2.0)) * cbrt(sin(k))) ^ 3.0) * Float64(tan(k) * Float64(1.0 + Float64((Float64(k / t_m) ^ 2.0) + 1.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[t$95$m, 2.45e-82], N[(2.0 / N[(N[Power[N[(N[(k * N[Sin[k], $MachinePrecision]), $MachinePrecision] * N[Sqrt[t$95$m], $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision] / N[(N[Cos[k], $MachinePrecision] * N[Power[l, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(2.0 / N[(N[Power[N[(N[(t$95$m / N[Power[N[Power[l, 1/3], $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision] * N[Power[N[Sin[k], $MachinePrecision], 1/3], $MachinePrecision]), $MachinePrecision], 3.0], $MachinePrecision] * N[(N[Tan[k], $MachinePrecision] * N[(1.0 + N[(N[Power[N[(k / t$95$m), $MachinePrecision], 2.0], $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]), $MachinePrecision]
\begin{array}{l}
t\_m = \left|t\right|
\\
t\_s = \mathsf{copysign}\left(1, t\right)

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

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


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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 2.4500000000000001e-82 < t

    1. Initial program 65.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. Simplified65.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 6: 77.2% accurate, 0.7× speedup?

\[\begin{array}{l} t\_m = \left|t\right| \\ t\_s = \mathsf{copysign}\left(1, t\right) \\ t\_s \cdot \begin{array}{l} \mathbf{if}\;k \leq 1.66:\\ \;\;\;\;\frac{2}{{\left(\frac{t\_m}{{\left(\sqrt[3]{\ell}\right)}^{2}} \cdot \left(\sqrt[3]{2} \cdot {\left(\sqrt[3]{k}\right)}^{2}\right)\right)}^{3}}\\ \mathbf{else}:\\ \;\;\;\;\frac{2}{\frac{{\left(\left(k \cdot \sin k\right) \cdot \sqrt{t\_m}\right)}^{2}}{\cos k \cdot {\ell}^{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 (<= k 1.66)
    (/
     2.0
     (pow
      (* (/ t_m (pow (cbrt l) 2.0)) (* (cbrt 2.0) (pow (cbrt k) 2.0)))
      3.0))
    (/
     2.0
     (/ (pow (* (* k (sin k)) (sqrt t_m)) 2.0) (* (cos k) (pow l 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 <= 1.66) {
		tmp = 2.0 / pow(((t_m / pow(cbrt(l), 2.0)) * (cbrt(2.0) * pow(cbrt(k), 2.0))), 3.0);
	} else {
		tmp = 2.0 / (pow(((k * sin(k)) * sqrt(t_m)), 2.0) / (cos(k) * pow(l, 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 <= 1.66) {
		tmp = 2.0 / Math.pow(((t_m / Math.pow(Math.cbrt(l), 2.0)) * (Math.cbrt(2.0) * Math.pow(Math.cbrt(k), 2.0))), 3.0);
	} else {
		tmp = 2.0 / (Math.pow(((k * Math.sin(k)) * Math.sqrt(t_m)), 2.0) / (Math.cos(k) * Math.pow(l, 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 <= 1.66)
		tmp = Float64(2.0 / (Float64(Float64(t_m / (cbrt(l) ^ 2.0)) * Float64(cbrt(2.0) * (cbrt(k) ^ 2.0))) ^ 3.0));
	else
		tmp = Float64(2.0 / Float64((Float64(Float64(k * sin(k)) * sqrt(t_m)) ^ 2.0) / Float64(cos(k) * (l ^ 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, 1.66], N[(2.0 / N[Power[N[(N[(t$95$m / N[Power[N[Power[l, 1/3], $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision] * N[(N[Power[2.0, 1/3], $MachinePrecision] * N[Power[N[Power[k, 1/3], $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 3.0], $MachinePrecision]), $MachinePrecision], N[(2.0 / N[(N[Power[N[(N[(k * N[Sin[k], $MachinePrecision]), $MachinePrecision] * N[Sqrt[t$95$m], $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision] / N[(N[Cos[k], $MachinePrecision] * N[Power[l, 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 1.66:\\
\;\;\;\;\frac{2}{{\left(\frac{t\_m}{{\left(\sqrt[3]{\ell}\right)}^{2}} \cdot \left(\sqrt[3]{2} \cdot {\left(\sqrt[3]{k}\right)}^{2}\right)\right)}^{3}}\\

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


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

    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. Simplified51.9%

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

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

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

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

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

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

        \[\leadsto \frac{2}{\color{blue}{\left(\sqrt[3]{\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[3]{\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) \cdot \sqrt[3]{\frac{\frac{{t}^{3}}{\ell}}{\ell} \cdot \left(\left(\sin k \cdot \tan k\right) \cdot \left(2 + {\left(\frac{k}{t}\right)}^{2}\right)\right)}}} \]
      7. pow355.3%

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

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

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

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

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

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

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

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

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

    if 1.65999999999999992 < k

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 7: 79.8% accurate, 0.8× speedup?

\[\begin{array}{l} t\_m = \left|t\right| \\ t\_s = \mathsf{copysign}\left(1, t\right) \\ \begin{array}{l} t_2 := {\left(\frac{k}{t\_m}\right)}^{2}\\ t\_s \cdot \begin{array}{l} \mathbf{if}\;t\_m \leq 3.7 \cdot 10^{-90}:\\ \;\;\;\;\frac{2}{\frac{{\left(\left(k \cdot \sin k\right) \cdot \sqrt{t\_m}\right)}^{2}}{\cos k \cdot {\ell}^{2}}}\\ \mathbf{elif}\;t\_m \leq 9.8 \cdot 10^{+87}:\\ \;\;\;\;\frac{2}{\frac{\left(\left(2 + t\_2\right) \cdot \left(\sin k \cdot \tan k\right)\right) \cdot \frac{{t\_m}^{3}}{\ell}}{\ell}}\\ \mathbf{else}:\\ \;\;\;\;\frac{2}{\left(\tan k \cdot \left(1 + \left(t\_2 + 1\right)\right)\right) \cdot \left(\sin k \cdot {\left(\frac{{t\_m}^{1.5}}{\ell}\right)}^{2}\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 (pow (/ k t_m) 2.0)))
   (*
    t_s
    (if (<= t_m 3.7e-90)
      (/
       2.0
       (/ (pow (* (* k (sin k)) (sqrt t_m)) 2.0) (* (cos k) (pow l 2.0))))
      (if (<= t_m 9.8e+87)
        (/
         2.0
         (/ (* (* (+ 2.0 t_2) (* (sin k) (tan k))) (/ (pow t_m 3.0) l)) l))
        (/
         2.0
         (*
          (* (tan k) (+ 1.0 (+ t_2 1.0)))
          (* (sin k) (pow (/ (pow t_m 1.5) l) 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 t_2 = pow((k / t_m), 2.0);
	double tmp;
	if (t_m <= 3.7e-90) {
		tmp = 2.0 / (pow(((k * sin(k)) * sqrt(t_m)), 2.0) / (cos(k) * pow(l, 2.0)));
	} else if (t_m <= 9.8e+87) {
		tmp = 2.0 / ((((2.0 + t_2) * (sin(k) * tan(k))) * (pow(t_m, 3.0) / l)) / l);
	} else {
		tmp = 2.0 / ((tan(k) * (1.0 + (t_2 + 1.0))) * (sin(k) * pow((pow(t_m, 1.5) / l), 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) :: t_2
    real(8) :: tmp
    t_2 = (k / t_m) ** 2.0d0
    if (t_m <= 3.7d-90) then
        tmp = 2.0d0 / ((((k * sin(k)) * sqrt(t_m)) ** 2.0d0) / (cos(k) * (l ** 2.0d0)))
    else if (t_m <= 9.8d+87) then
        tmp = 2.0d0 / ((((2.0d0 + t_2) * (sin(k) * tan(k))) * ((t_m ** 3.0d0) / l)) / l)
    else
        tmp = 2.0d0 / ((tan(k) * (1.0d0 + (t_2 + 1.0d0))) * (sin(k) * (((t_m ** 1.5d0) / l) ** 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 t_2 = Math.pow((k / t_m), 2.0);
	double tmp;
	if (t_m <= 3.7e-90) {
		tmp = 2.0 / (Math.pow(((k * Math.sin(k)) * Math.sqrt(t_m)), 2.0) / (Math.cos(k) * Math.pow(l, 2.0)));
	} else if (t_m <= 9.8e+87) {
		tmp = 2.0 / ((((2.0 + t_2) * (Math.sin(k) * Math.tan(k))) * (Math.pow(t_m, 3.0) / l)) / l);
	} else {
		tmp = 2.0 / ((Math.tan(k) * (1.0 + (t_2 + 1.0))) * (Math.sin(k) * Math.pow((Math.pow(t_m, 1.5) / l), 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):
	t_2 = math.pow((k / t_m), 2.0)
	tmp = 0
	if t_m <= 3.7e-90:
		tmp = 2.0 / (math.pow(((k * math.sin(k)) * math.sqrt(t_m)), 2.0) / (math.cos(k) * math.pow(l, 2.0)))
	elif t_m <= 9.8e+87:
		tmp = 2.0 / ((((2.0 + t_2) * (math.sin(k) * math.tan(k))) * (math.pow(t_m, 3.0) / l)) / l)
	else:
		tmp = 2.0 / ((math.tan(k) * (1.0 + (t_2 + 1.0))) * (math.sin(k) * math.pow((math.pow(t_m, 1.5) / l), 2.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(k / t_m) ^ 2.0
	tmp = 0.0
	if (t_m <= 3.7e-90)
		tmp = Float64(2.0 / Float64((Float64(Float64(k * sin(k)) * sqrt(t_m)) ^ 2.0) / Float64(cos(k) * (l ^ 2.0))));
	elseif (t_m <= 9.8e+87)
		tmp = Float64(2.0 / Float64(Float64(Float64(Float64(2.0 + t_2) * Float64(sin(k) * tan(k))) * Float64((t_m ^ 3.0) / l)) / l));
	else
		tmp = Float64(2.0 / Float64(Float64(tan(k) * Float64(1.0 + Float64(t_2 + 1.0))) * Float64(sin(k) * (Float64((t_m ^ 1.5) / l) ^ 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)
	t_2 = (k / t_m) ^ 2.0;
	tmp = 0.0;
	if (t_m <= 3.7e-90)
		tmp = 2.0 / ((((k * sin(k)) * sqrt(t_m)) ^ 2.0) / (cos(k) * (l ^ 2.0)));
	elseif (t_m <= 9.8e+87)
		tmp = 2.0 / ((((2.0 + t_2) * (sin(k) * tan(k))) * ((t_m ^ 3.0) / l)) / l);
	else
		tmp = 2.0 / ((tan(k) * (1.0 + (t_2 + 1.0))) * (sin(k) * (((t_m ^ 1.5) / l) ^ 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_] := Block[{t$95$2 = N[Power[N[(k / t$95$m), $MachinePrecision], 2.0], $MachinePrecision]}, N[(t$95$s * If[LessEqual[t$95$m, 3.7e-90], N[(2.0 / N[(N[Power[N[(N[(k * N[Sin[k], $MachinePrecision]), $MachinePrecision] * N[Sqrt[t$95$m], $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision] / N[(N[Cos[k], $MachinePrecision] * N[Power[l, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$m, 9.8e+87], N[(2.0 / N[(N[(N[(N[(2.0 + t$95$2), $MachinePrecision] * N[(N[Sin[k], $MachinePrecision] * N[Tan[k], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(N[Power[t$95$m, 3.0], $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision], N[(2.0 / N[(N[(N[Tan[k], $MachinePrecision] * N[(1.0 + N[(t$95$2 + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(N[Sin[k], $MachinePrecision] * N[Power[N[(N[Power[t$95$m, 1.5], $MachinePrecision] / l), $MachinePrecision], 2.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 := {\left(\frac{k}{t\_m}\right)}^{2}\\
t\_s \cdot \begin{array}{l}
\mathbf{if}\;t\_m \leq 3.7 \cdot 10^{-90}:\\
\;\;\;\;\frac{2}{\frac{{\left(\left(k \cdot \sin k\right) \cdot \sqrt{t\_m}\right)}^{2}}{\cos k \cdot {\ell}^{2}}}\\

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

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


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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 3.70000000000000018e-90 < t < 9.79999999999999943e87

    1. Initial program 69.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. Simplified69.7%

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

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

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

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

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

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

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

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

    if 9.79999999999999943e87 < t

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

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

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

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

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

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

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

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

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

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

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

Alternative 8: 79.8% accurate, 0.8× 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 3.4 \cdot 10^{-91}:\\ \;\;\;\;\frac{2}{\frac{{\left(\left(k \cdot \sin k\right) \cdot \sqrt{t\_m}\right)}^{2}}{\cos k \cdot {\ell}^{2}}}\\ \mathbf{elif}\;t\_m \leq 2.25 \cdot 10^{+88}:\\ \;\;\;\;\frac{2}{\frac{\left(t\_2 \cdot \left(\sin k \cdot \tan k\right)\right) \cdot \frac{{t\_m}^{3}}{\ell}}{\ell}}\\ \mathbf{else}:\\ \;\;\;\;\frac{2}{t\_2 \cdot \left(\tan k \cdot \left(\sin k \cdot {\left(\frac{{t\_m}^{1.5}}{\ell}\right)}^{2}\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 3.4e-91)
      (/
       2.0
       (/ (pow (* (* k (sin k)) (sqrt t_m)) 2.0) (* (cos k) (pow l 2.0))))
      (if (<= t_m 2.25e+88)
        (/ 2.0 (/ (* (* t_2 (* (sin k) (tan k))) (/ (pow t_m 3.0) l)) l))
        (/
         2.0
         (* t_2 (* (tan k) (* (sin k) (pow (/ (pow t_m 1.5) l) 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 t_2 = 2.0 + pow((k / t_m), 2.0);
	double tmp;
	if (t_m <= 3.4e-91) {
		tmp = 2.0 / (pow(((k * sin(k)) * sqrt(t_m)), 2.0) / (cos(k) * pow(l, 2.0)));
	} else if (t_m <= 2.25e+88) {
		tmp = 2.0 / (((t_2 * (sin(k) * tan(k))) * (pow(t_m, 3.0) / l)) / l);
	} else {
		tmp = 2.0 / (t_2 * (tan(k) * (sin(k) * pow((pow(t_m, 1.5) / l), 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) :: t_2
    real(8) :: tmp
    t_2 = 2.0d0 + ((k / t_m) ** 2.0d0)
    if (t_m <= 3.4d-91) then
        tmp = 2.0d0 / ((((k * sin(k)) * sqrt(t_m)) ** 2.0d0) / (cos(k) * (l ** 2.0d0)))
    else if (t_m <= 2.25d+88) then
        tmp = 2.0d0 / (((t_2 * (sin(k) * tan(k))) * ((t_m ** 3.0d0) / l)) / l)
    else
        tmp = 2.0d0 / (t_2 * (tan(k) * (sin(k) * (((t_m ** 1.5d0) / l) ** 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 t_2 = 2.0 + Math.pow((k / t_m), 2.0);
	double tmp;
	if (t_m <= 3.4e-91) {
		tmp = 2.0 / (Math.pow(((k * Math.sin(k)) * Math.sqrt(t_m)), 2.0) / (Math.cos(k) * Math.pow(l, 2.0)));
	} else if (t_m <= 2.25e+88) {
		tmp = 2.0 / (((t_2 * (Math.sin(k) * Math.tan(k))) * (Math.pow(t_m, 3.0) / l)) / l);
	} else {
		tmp = 2.0 / (t_2 * (Math.tan(k) * (Math.sin(k) * Math.pow((Math.pow(t_m, 1.5) / l), 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):
	t_2 = 2.0 + math.pow((k / t_m), 2.0)
	tmp = 0
	if t_m <= 3.4e-91:
		tmp = 2.0 / (math.pow(((k * math.sin(k)) * math.sqrt(t_m)), 2.0) / (math.cos(k) * math.pow(l, 2.0)))
	elif t_m <= 2.25e+88:
		tmp = 2.0 / (((t_2 * (math.sin(k) * math.tan(k))) * (math.pow(t_m, 3.0) / l)) / l)
	else:
		tmp = 2.0 / (t_2 * (math.tan(k) * (math.sin(k) * math.pow((math.pow(t_m, 1.5) / l), 2.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 <= 3.4e-91)
		tmp = Float64(2.0 / Float64((Float64(Float64(k * sin(k)) * sqrt(t_m)) ^ 2.0) / Float64(cos(k) * (l ^ 2.0))));
	elseif (t_m <= 2.25e+88)
		tmp = Float64(2.0 / Float64(Float64(Float64(t_2 * Float64(sin(k) * tan(k))) * Float64((t_m ^ 3.0) / l)) / l));
	else
		tmp = Float64(2.0 / Float64(t_2 * Float64(tan(k) * Float64(sin(k) * (Float64((t_m ^ 1.5) / l) ^ 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)
	t_2 = 2.0 + ((k / t_m) ^ 2.0);
	tmp = 0.0;
	if (t_m <= 3.4e-91)
		tmp = 2.0 / ((((k * sin(k)) * sqrt(t_m)) ^ 2.0) / (cos(k) * (l ^ 2.0)));
	elseif (t_m <= 2.25e+88)
		tmp = 2.0 / (((t_2 * (sin(k) * tan(k))) * ((t_m ^ 3.0) / l)) / l);
	else
		tmp = 2.0 / (t_2 * (tan(k) * (sin(k) * (((t_m ^ 1.5) / l) ^ 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_] := 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, 3.4e-91], N[(2.0 / N[(N[Power[N[(N[(k * N[Sin[k], $MachinePrecision]), $MachinePrecision] * N[Sqrt[t$95$m], $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision] / N[(N[Cos[k], $MachinePrecision] * N[Power[l, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$m, 2.25e+88], N[(2.0 / N[(N[(N[(t$95$2 * N[(N[Sin[k], $MachinePrecision] * N[Tan[k], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(N[Power[t$95$m, 3.0], $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision], N[(2.0 / N[(t$95$2 * N[(N[Tan[k], $MachinePrecision] * N[(N[Sin[k], $MachinePrecision] * N[Power[N[(N[Power[t$95$m, 1.5], $MachinePrecision] / l), $MachinePrecision], 2.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 3.4 \cdot 10^{-91}:\\
\;\;\;\;\frac{2}{\frac{{\left(\left(k \cdot \sin k\right) \cdot \sqrt{t\_m}\right)}^{2}}{\cos k \cdot {\ell}^{2}}}\\

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

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


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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 3.40000000000000027e-91 < t < 2.25e88

    1. Initial program 69.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. Simplified69.7%

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

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

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

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

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

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

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

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

    if 2.25e88 < t

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 9: 44.8% 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}\;k \leq 1.4 \cdot 10^{-137}:\\ \;\;\;\;\frac{2}{{\left(\frac{{t\_m}^{1.5}}{\ell} \cdot \sqrt{\sin k}\right)}^{2} \cdot \left(2 \cdot k\right)}\\ \mathbf{elif}\;k \leq 1.6:\\ \;\;\;\;\frac{2}{{\left(\left(t\_m \cdot {\left(\sqrt[3]{\ell}\right)}^{-2}\right) \cdot \sqrt[3]{2 \cdot {k}^{2}}\right)}^{3}}\\ \mathbf{else}:\\ \;\;\;\;\frac{2}{\frac{{\left(\left(k \cdot \sin k\right) \cdot \sqrt{t\_m}\right)}^{2}}{\cos k \cdot {\ell}^{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 (<= k 1.4e-137)
    (/ 2.0 (* (pow (* (/ (pow t_m 1.5) l) (sqrt (sin k))) 2.0) (* 2.0 k)))
    (if (<= k 1.6)
      (/
       2.0
       (pow (* (* t_m (pow (cbrt l) -2.0)) (cbrt (* 2.0 (pow k 2.0)))) 3.0))
      (/
       2.0
       (/ (pow (* (* k (sin k)) (sqrt t_m)) 2.0) (* (cos k) (pow l 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 <= 1.4e-137) {
		tmp = 2.0 / (pow(((pow(t_m, 1.5) / l) * sqrt(sin(k))), 2.0) * (2.0 * k));
	} else if (k <= 1.6) {
		tmp = 2.0 / pow(((t_m * pow(cbrt(l), -2.0)) * cbrt((2.0 * pow(k, 2.0)))), 3.0);
	} else {
		tmp = 2.0 / (pow(((k * sin(k)) * sqrt(t_m)), 2.0) / (cos(k) * pow(l, 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 <= 1.4e-137) {
		tmp = 2.0 / (Math.pow(((Math.pow(t_m, 1.5) / l) * Math.sqrt(Math.sin(k))), 2.0) * (2.0 * k));
	} else if (k <= 1.6) {
		tmp = 2.0 / Math.pow(((t_m * Math.pow(Math.cbrt(l), -2.0)) * Math.cbrt((2.0 * Math.pow(k, 2.0)))), 3.0);
	} else {
		tmp = 2.0 / (Math.pow(((k * Math.sin(k)) * Math.sqrt(t_m)), 2.0) / (Math.cos(k) * Math.pow(l, 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 <= 1.4e-137)
		tmp = Float64(2.0 / Float64((Float64(Float64((t_m ^ 1.5) / l) * sqrt(sin(k))) ^ 2.0) * Float64(2.0 * k)));
	elseif (k <= 1.6)
		tmp = Float64(2.0 / (Float64(Float64(t_m * (cbrt(l) ^ -2.0)) * cbrt(Float64(2.0 * (k ^ 2.0)))) ^ 3.0));
	else
		tmp = Float64(2.0 / Float64((Float64(Float64(k * sin(k)) * sqrt(t_m)) ^ 2.0) / Float64(cos(k) * (l ^ 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, 1.4e-137], N[(2.0 / N[(N[Power[N[(N[(N[Power[t$95$m, 1.5], $MachinePrecision] / l), $MachinePrecision] * N[Sqrt[N[Sin[k], $MachinePrecision]], $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision] * N[(2.0 * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[k, 1.6], N[(2.0 / N[Power[N[(N[(t$95$m * N[Power[N[Power[l, 1/3], $MachinePrecision], -2.0], $MachinePrecision]), $MachinePrecision] * N[Power[N[(2.0 * N[Power[k, 2.0], $MachinePrecision]), $MachinePrecision], 1/3], $MachinePrecision]), $MachinePrecision], 3.0], $MachinePrecision]), $MachinePrecision], N[(2.0 / N[(N[Power[N[(N[(k * N[Sin[k], $MachinePrecision]), $MachinePrecision] * N[Sqrt[t$95$m], $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision] / N[(N[Cos[k], $MachinePrecision] * N[Power[l, 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 1.4 \cdot 10^{-137}:\\
\;\;\;\;\frac{2}{{\left(\frac{{t\_m}^{1.5}}{\ell} \cdot \sqrt{\sin k}\right)}^{2} \cdot \left(2 \cdot k\right)}\\

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

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


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

    1. Initial program 49.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. Simplified49.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 1.3999999999999999e-137 < k < 1.6000000000000001

    1. Initial program 65.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. Simplified69.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 69.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 1.6000000000000001 < k

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 10: 44.9% 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}\;k \leq 2.15 \cdot 10^{-138}:\\ \;\;\;\;\frac{2}{{\left(\frac{{t\_m}^{1.5}}{\ell} \cdot \sqrt{\sin k}\right)}^{2} \cdot \left(2 \cdot k\right)}\\ \mathbf{elif}\;k \leq 2:\\ \;\;\;\;\frac{2}{{\left(\left(t\_m \cdot {\left(\sqrt[3]{\ell}\right)}^{-2}\right) \cdot \sqrt[3]{2 \cdot {k}^{2}}\right)}^{3}}\\ \mathbf{else}:\\ \;\;\;\;\frac{2}{\frac{{\left(k \cdot \left(\sin k \cdot \sqrt{t\_m}\right)\right)}^{2}}{\cos k \cdot {\ell}^{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 (<= k 2.15e-138)
    (/ 2.0 (* (pow (* (/ (pow t_m 1.5) l) (sqrt (sin k))) 2.0) (* 2.0 k)))
    (if (<= k 2.0)
      (/
       2.0
       (pow (* (* t_m (pow (cbrt l) -2.0)) (cbrt (* 2.0 (pow k 2.0)))) 3.0))
      (/
       2.0
       (/ (pow (* k (* (sin k) (sqrt t_m))) 2.0) (* (cos k) (pow l 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 <= 2.15e-138) {
		tmp = 2.0 / (pow(((pow(t_m, 1.5) / l) * sqrt(sin(k))), 2.0) * (2.0 * k));
	} else if (k <= 2.0) {
		tmp = 2.0 / pow(((t_m * pow(cbrt(l), -2.0)) * cbrt((2.0 * pow(k, 2.0)))), 3.0);
	} else {
		tmp = 2.0 / (pow((k * (sin(k) * sqrt(t_m))), 2.0) / (cos(k) * pow(l, 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 <= 2.15e-138) {
		tmp = 2.0 / (Math.pow(((Math.pow(t_m, 1.5) / l) * Math.sqrt(Math.sin(k))), 2.0) * (2.0 * k));
	} else if (k <= 2.0) {
		tmp = 2.0 / Math.pow(((t_m * Math.pow(Math.cbrt(l), -2.0)) * Math.cbrt((2.0 * Math.pow(k, 2.0)))), 3.0);
	} else {
		tmp = 2.0 / (Math.pow((k * (Math.sin(k) * Math.sqrt(t_m))), 2.0) / (Math.cos(k) * Math.pow(l, 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 <= 2.15e-138)
		tmp = Float64(2.0 / Float64((Float64(Float64((t_m ^ 1.5) / l) * sqrt(sin(k))) ^ 2.0) * Float64(2.0 * k)));
	elseif (k <= 2.0)
		tmp = Float64(2.0 / (Float64(Float64(t_m * (cbrt(l) ^ -2.0)) * cbrt(Float64(2.0 * (k ^ 2.0)))) ^ 3.0));
	else
		tmp = Float64(2.0 / Float64((Float64(k * Float64(sin(k) * sqrt(t_m))) ^ 2.0) / Float64(cos(k) * (l ^ 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, 2.15e-138], N[(2.0 / N[(N[Power[N[(N[(N[Power[t$95$m, 1.5], $MachinePrecision] / l), $MachinePrecision] * N[Sqrt[N[Sin[k], $MachinePrecision]], $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision] * N[(2.0 * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[k, 2.0], N[(2.0 / N[Power[N[(N[(t$95$m * N[Power[N[Power[l, 1/3], $MachinePrecision], -2.0], $MachinePrecision]), $MachinePrecision] * N[Power[N[(2.0 * N[Power[k, 2.0], $MachinePrecision]), $MachinePrecision], 1/3], $MachinePrecision]), $MachinePrecision], 3.0], $MachinePrecision]), $MachinePrecision], N[(2.0 / N[(N[Power[N[(k * N[(N[Sin[k], $MachinePrecision] * N[Sqrt[t$95$m], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision] / N[(N[Cos[k], $MachinePrecision] * N[Power[l, 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 2.15 \cdot 10^{-138}:\\
\;\;\;\;\frac{2}{{\left(\frac{{t\_m}^{1.5}}{\ell} \cdot \sqrt{\sin k}\right)}^{2} \cdot \left(2 \cdot k\right)}\\

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

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


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

    1. Initial program 49.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. Simplified49.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 2.15e-138 < k < 2

    1. Initial program 65.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. Simplified69.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 69.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 2 < k

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 11: 43.6% 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}\;k \leq 1.55 \cdot 10^{-138}:\\ \;\;\;\;\frac{2}{{\left(\frac{{t\_m}^{1.5}}{\ell} \cdot \sqrt{\sin k}\right)}^{2} \cdot \left(2 \cdot k\right)}\\ \mathbf{elif}\;k \leq 1.66:\\ \;\;\;\;\frac{2}{{\left(\left(t\_m \cdot {\left(\sqrt[3]{\ell}\right)}^{-2}\right) \cdot \sqrt[3]{2 \cdot {k}^{2}}\right)}^{3}}\\ \mathbf{else}:\\ \;\;\;\;\frac{2}{\frac{t\_m \cdot {\left(k \cdot \sin k\right)}^{2}}{\cos k \cdot {\ell}^{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 (<= k 1.55e-138)
    (/ 2.0 (* (pow (* (/ (pow t_m 1.5) l) (sqrt (sin k))) 2.0) (* 2.0 k)))
    (if (<= k 1.66)
      (/
       2.0
       (pow (* (* t_m (pow (cbrt l) -2.0)) (cbrt (* 2.0 (pow k 2.0)))) 3.0))
      (/ 2.0 (/ (* t_m (pow (* k (sin k)) 2.0)) (* (cos k) (pow l 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 <= 1.55e-138) {
		tmp = 2.0 / (pow(((pow(t_m, 1.5) / l) * sqrt(sin(k))), 2.0) * (2.0 * k));
	} else if (k <= 1.66) {
		tmp = 2.0 / pow(((t_m * pow(cbrt(l), -2.0)) * cbrt((2.0 * pow(k, 2.0)))), 3.0);
	} else {
		tmp = 2.0 / ((t_m * pow((k * sin(k)), 2.0)) / (cos(k) * pow(l, 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 <= 1.55e-138) {
		tmp = 2.0 / (Math.pow(((Math.pow(t_m, 1.5) / l) * Math.sqrt(Math.sin(k))), 2.0) * (2.0 * k));
	} else if (k <= 1.66) {
		tmp = 2.0 / Math.pow(((t_m * Math.pow(Math.cbrt(l), -2.0)) * Math.cbrt((2.0 * Math.pow(k, 2.0)))), 3.0);
	} else {
		tmp = 2.0 / ((t_m * Math.pow((k * Math.sin(k)), 2.0)) / (Math.cos(k) * Math.pow(l, 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 <= 1.55e-138)
		tmp = Float64(2.0 / Float64((Float64(Float64((t_m ^ 1.5) / l) * sqrt(sin(k))) ^ 2.0) * Float64(2.0 * k)));
	elseif (k <= 1.66)
		tmp = Float64(2.0 / (Float64(Float64(t_m * (cbrt(l) ^ -2.0)) * cbrt(Float64(2.0 * (k ^ 2.0)))) ^ 3.0));
	else
		tmp = Float64(2.0 / Float64(Float64(t_m * (Float64(k * sin(k)) ^ 2.0)) / Float64(cos(k) * (l ^ 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, 1.55e-138], N[(2.0 / N[(N[Power[N[(N[(N[Power[t$95$m, 1.5], $MachinePrecision] / l), $MachinePrecision] * N[Sqrt[N[Sin[k], $MachinePrecision]], $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision] * N[(2.0 * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[k, 1.66], N[(2.0 / N[Power[N[(N[(t$95$m * N[Power[N[Power[l, 1/3], $MachinePrecision], -2.0], $MachinePrecision]), $MachinePrecision] * N[Power[N[(2.0 * N[Power[k, 2.0], $MachinePrecision]), $MachinePrecision], 1/3], $MachinePrecision]), $MachinePrecision], 3.0], $MachinePrecision]), $MachinePrecision], N[(2.0 / N[(N[(t$95$m * N[Power[N[(k * N[Sin[k], $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision] / N[(N[Cos[k], $MachinePrecision] * N[Power[l, 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 1.55 \cdot 10^{-138}:\\
\;\;\;\;\frac{2}{{\left(\frac{{t\_m}^{1.5}}{\ell} \cdot \sqrt{\sin k}\right)}^{2} \cdot \left(2 \cdot k\right)}\\

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

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


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

    1. Initial program 49.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. Simplified49.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 1.5499999999999999e-138 < k < 1.65999999999999992

    1. Initial program 65.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. Simplified69.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 69.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 1.65999999999999992 < k

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 12: 43.2% accurate, 1.0× speedup?

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

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

\mathbf{elif}\;k \leq 1.6 \cdot 10^{+159}:\\
\;\;\;\;\frac{2}{\frac{t\_m \cdot {\left(k \cdot \sin k\right)}^{2}}{t\_2}}\\

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

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


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

    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. Simplified51.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 0.28999999999999998 < k < 1.59999999999999992e159

    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. Simplified59.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 1.59999999999999992e159 < k < 1.85000000000000011e199

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

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

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

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

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

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

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

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

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

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

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

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

    if 1.85000000000000011e199 < k

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;k \leq 0.29:\\ \;\;\;\;\frac{2}{{\left(\frac{{t}^{1.5}}{\ell} \cdot \sqrt{\sin k}\right)}^{2} \cdot \left(2 \cdot k\right)}\\ \mathbf{elif}\;k \leq 1.6 \cdot 10^{+159}:\\ \;\;\;\;\frac{2}{\frac{t \cdot {\left(k \cdot \sin k\right)}^{2}}{\cos k \cdot {\ell}^{2}}}\\ \mathbf{elif}\;k \leq 1.85 \cdot 10^{+199}:\\ \;\;\;\;\frac{2}{\frac{{t}^{3}}{\ell} \cdot \frac{\sin k \cdot \left(\left(2 + {\left(\frac{k}{t}\right)}^{2}\right) \cdot \tan k\right)}{\ell}}\\ \mathbf{else}:\\ \;\;\;\;\frac{2}{\frac{t \cdot {k}^{4}}{\cos k \cdot {\ell}^{2}}}\\ \end{array} \]
  5. Add Preprocessing

Alternative 13: 43.2% accurate, 1.0× speedup?

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

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

\mathbf{elif}\;k \leq 6.8 \cdot 10^{+159}:\\
\;\;\;\;\frac{2}{\frac{t\_m \cdot {\left(k \cdot \sin k\right)}^{2}}{t\_2}}\\

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

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


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

    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. Simplified51.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 0.71999999999999997 < k < 6.79999999999999983e159

    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. Simplified59.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 6.79999999999999983e159 < k < 3.9000000000000002e199

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

      \[\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. div-inv50.6%

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

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

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

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

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

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

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

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

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

    if 3.9000000000000002e199 < k

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;k \leq 0.72:\\ \;\;\;\;\frac{2}{{\left(\frac{{t}^{1.5}}{\ell} \cdot \sqrt{\sin k}\right)}^{2} \cdot \left(2 \cdot k\right)}\\ \mathbf{elif}\;k \leq 6.8 \cdot 10^{+159}:\\ \;\;\;\;\frac{2}{\frac{t \cdot {\left(k \cdot \sin k\right)}^{2}}{\cos k \cdot {\ell}^{2}}}\\ \mathbf{elif}\;k \leq 3.9 \cdot 10^{+199}:\\ \;\;\;\;\left(\ell \cdot \frac{\frac{2}{{t}^{3}}}{\sin k \cdot \tan k}\right) \cdot \frac{\ell}{2 + {\left(\frac{k}{t}\right)}^{2}}\\ \mathbf{else}:\\ \;\;\;\;\frac{2}{\frac{t \cdot {k}^{4}}{\cos k \cdot {\ell}^{2}}}\\ \end{array} \]
  5. Add Preprocessing

Alternative 14: 72.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 1.1 \cdot 10^{-81}:\\ \;\;\;\;\left(\cos k \cdot {\ell}^{2}\right) \cdot \frac{2}{t\_m \cdot {\left(k \cdot \sin k\right)}^{2}}\\ \mathbf{elif}\;t\_m \leq 3.2 \cdot 10^{+145}:\\ \;\;\;\;\frac{2}{\frac{{t\_m}^{2} \cdot \frac{t\_m}{\ell}}{\ell} \cdot \left(\left(\sin k \cdot \tan k\right) \cdot \left(2 + \frac{\frac{k}{t\_m}}{\frac{t\_m}{k}}\right)\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{2}{\left(2 \cdot {k}^{2}\right) \cdot {\left(t\_m \cdot {\left(\sqrt[3]{\ell}\right)}^{-2}\right)}^{3}}\\ \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 1.1e-81)
    (* (* (cos k) (pow l 2.0)) (/ 2.0 (* t_m (pow (* k (sin k)) 2.0))))
    (if (<= t_m 3.2e+145)
      (/
       2.0
       (*
        (/ (* (pow t_m 2.0) (/ t_m l)) l)
        (* (* (sin k) (tan k)) (+ 2.0 (/ (/ k t_m) (/ t_m k))))))
      (/ 2.0 (* (* 2.0 (pow k 2.0)) (pow (* t_m (pow (cbrt l) -2.0)) 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 tmp;
	if (t_m <= 1.1e-81) {
		tmp = (cos(k) * pow(l, 2.0)) * (2.0 / (t_m * pow((k * sin(k)), 2.0)));
	} else if (t_m <= 3.2e+145) {
		tmp = 2.0 / (((pow(t_m, 2.0) * (t_m / l)) / l) * ((sin(k) * tan(k)) * (2.0 + ((k / t_m) / (t_m / k)))));
	} else {
		tmp = 2.0 / ((2.0 * pow(k, 2.0)) * pow((t_m * pow(cbrt(l), -2.0)), 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 tmp;
	if (t_m <= 1.1e-81) {
		tmp = (Math.cos(k) * Math.pow(l, 2.0)) * (2.0 / (t_m * Math.pow((k * Math.sin(k)), 2.0)));
	} else if (t_m <= 3.2e+145) {
		tmp = 2.0 / (((Math.pow(t_m, 2.0) * (t_m / l)) / l) * ((Math.sin(k) * Math.tan(k)) * (2.0 + ((k / t_m) / (t_m / k)))));
	} else {
		tmp = 2.0 / ((2.0 * Math.pow(k, 2.0)) * Math.pow((t_m * Math.pow(Math.cbrt(l), -2.0)), 3.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 <= 1.1e-81)
		tmp = Float64(Float64(cos(k) * (l ^ 2.0)) * Float64(2.0 / Float64(t_m * (Float64(k * sin(k)) ^ 2.0))));
	elseif (t_m <= 3.2e+145)
		tmp = Float64(2.0 / Float64(Float64(Float64((t_m ^ 2.0) * Float64(t_m / l)) / l) * Float64(Float64(sin(k) * tan(k)) * Float64(2.0 + Float64(Float64(k / t_m) / Float64(t_m / k))))));
	else
		tmp = Float64(2.0 / Float64(Float64(2.0 * (k ^ 2.0)) * (Float64(t_m * (cbrt(l) ^ -2.0)) ^ 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_] := N[(t$95$s * If[LessEqual[t$95$m, 1.1e-81], N[(N[(N[Cos[k], $MachinePrecision] * N[Power[l, 2.0], $MachinePrecision]), $MachinePrecision] * N[(2.0 / N[(t$95$m * N[Power[N[(k * N[Sin[k], $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$m, 3.2e+145], 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[(N[Sin[k], $MachinePrecision] * N[Tan[k], $MachinePrecision]), $MachinePrecision] * N[(2.0 + N[(N[(k / t$95$m), $MachinePrecision] / N[(t$95$m / k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(2.0 / N[(N[(2.0 * N[Power[k, 2.0], $MachinePrecision]), $MachinePrecision] * N[Power[N[(t$95$m * N[Power[N[Power[l, 1/3], $MachinePrecision], -2.0], $MachinePrecision]), $MachinePrecision], 3.0], $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}\;t\_m \leq 1.1 \cdot 10^{-81}:\\
\;\;\;\;\left(\cos k \cdot {\ell}^{2}\right) \cdot \frac{2}{t\_m \cdot {\left(k \cdot \sin k\right)}^{2}}\\

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

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


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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 1.1e-81 < t < 3.20000000000000008e145

    1. Initial program 67.0%

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

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

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

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

      \[\leadsto \frac{2}{\frac{\frac{{t}^{3}}{\ell}}{\ell} \cdot \left(\left(\sin k \cdot \tan k\right) \cdot \left(2 + \color{blue}{\frac{\frac{k}{t}}{\frac{t}{k}}}\right)\right)} \]
    6. Step-by-step derivation
      1. unpow370.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 + \frac{\frac{k}{t}}{\frac{t}{k}}\right)\right)} \]
      2. *-un-lft-identity70.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 + \frac{\frac{k}{t}}{\frac{t}{k}}\right)\right)} \]
      3. times-frac76.7%

        \[\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 + \frac{\frac{k}{t}}{\frac{t}{k}}\right)\right)} \]
      4. pow276.7%

        \[\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 + \frac{\frac{k}{t}}{\frac{t}{k}}\right)\right)} \]
    7. Applied egg-rr76.7%

      \[\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 + \frac{\frac{k}{t}}{\frac{t}{k}}\right)\right)} \]

    if 3.20000000000000008e145 < t

    1. Initial program 62.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. Simplified63.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. Taylor expanded in k around 0 63.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 15: 68.2% 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 3.5 \cdot 10^{-155}:\\ \;\;\;\;\frac{2}{\frac{t\_m \cdot {k}^{4}}{\cos k \cdot {\ell}^{2}}}\\ \mathbf{elif}\;t\_m \leq 3.2 \cdot 10^{+145}:\\ \;\;\;\;\frac{2}{\frac{{t\_m}^{2} \cdot \frac{t\_m}{\ell}}{\ell} \cdot \left(\left(\sin k \cdot \tan k\right) \cdot \left(2 + \frac{\frac{k}{t\_m}}{\frac{t\_m}{k}}\right)\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{2}{\left(2 \cdot {k}^{2}\right) \cdot {\left(t\_m \cdot {\left(\sqrt[3]{\ell}\right)}^{-2}\right)}^{3}}\\ \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.5e-155)
    (/ 2.0 (/ (* t_m (pow k 4.0)) (* (cos k) (pow l 2.0))))
    (if (<= t_m 3.2e+145)
      (/
       2.0
       (*
        (/ (* (pow t_m 2.0) (/ t_m l)) l)
        (* (* (sin k) (tan k)) (+ 2.0 (/ (/ k t_m) (/ t_m k))))))
      (/ 2.0 (* (* 2.0 (pow k 2.0)) (pow (* t_m (pow (cbrt l) -2.0)) 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 tmp;
	if (t_m <= 3.5e-155) {
		tmp = 2.0 / ((t_m * pow(k, 4.0)) / (cos(k) * pow(l, 2.0)));
	} else if (t_m <= 3.2e+145) {
		tmp = 2.0 / (((pow(t_m, 2.0) * (t_m / l)) / l) * ((sin(k) * tan(k)) * (2.0 + ((k / t_m) / (t_m / k)))));
	} else {
		tmp = 2.0 / ((2.0 * pow(k, 2.0)) * pow((t_m * pow(cbrt(l), -2.0)), 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 tmp;
	if (t_m <= 3.5e-155) {
		tmp = 2.0 / ((t_m * Math.pow(k, 4.0)) / (Math.cos(k) * Math.pow(l, 2.0)));
	} else if (t_m <= 3.2e+145) {
		tmp = 2.0 / (((Math.pow(t_m, 2.0) * (t_m / l)) / l) * ((Math.sin(k) * Math.tan(k)) * (2.0 + ((k / t_m) / (t_m / k)))));
	} else {
		tmp = 2.0 / ((2.0 * Math.pow(k, 2.0)) * Math.pow((t_m * Math.pow(Math.cbrt(l), -2.0)), 3.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.5e-155)
		tmp = Float64(2.0 / Float64(Float64(t_m * (k ^ 4.0)) / Float64(cos(k) * (l ^ 2.0))));
	elseif (t_m <= 3.2e+145)
		tmp = Float64(2.0 / Float64(Float64(Float64((t_m ^ 2.0) * Float64(t_m / l)) / l) * Float64(Float64(sin(k) * tan(k)) * Float64(2.0 + Float64(Float64(k / t_m) / Float64(t_m / k))))));
	else
		tmp = Float64(2.0 / Float64(Float64(2.0 * (k ^ 2.0)) * (Float64(t_m * (cbrt(l) ^ -2.0)) ^ 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_] := N[(t$95$s * If[LessEqual[t$95$m, 3.5e-155], N[(2.0 / N[(N[(t$95$m * N[Power[k, 4.0], $MachinePrecision]), $MachinePrecision] / N[(N[Cos[k], $MachinePrecision] * N[Power[l, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$m, 3.2e+145], 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[(N[Sin[k], $MachinePrecision] * N[Tan[k], $MachinePrecision]), $MachinePrecision] * N[(2.0 + N[(N[(k / t$95$m), $MachinePrecision] / N[(t$95$m / k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(2.0 / N[(N[(2.0 * N[Power[k, 2.0], $MachinePrecision]), $MachinePrecision] * N[Power[N[(t$95$m * N[Power[N[Power[l, 1/3], $MachinePrecision], -2.0], $MachinePrecision]), $MachinePrecision], 3.0], $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}\;t\_m \leq 3.5 \cdot 10^{-155}:\\
\;\;\;\;\frac{2}{\frac{t\_m \cdot {k}^{4}}{\cos k \cdot {\ell}^{2}}}\\

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

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


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

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

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

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

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

    if 3.50000000000000015e-155 < t < 3.20000000000000008e145

    1. Initial program 63.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. Simplified68.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. Step-by-step derivation
      1. unpow268.2%

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

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

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

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

        \[\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 + \frac{\frac{k}{t}}{\frac{t}{k}}\right)\right)} \]
      2. *-un-lft-identity68.2%

        \[\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 + \frac{\frac{k}{t}}{\frac{t}{k}}\right)\right)} \]
      3. times-frac73.1%

        \[\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 + \frac{\frac{k}{t}}{\frac{t}{k}}\right)\right)} \]
      4. pow273.1%

        \[\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 + \frac{\frac{k}{t}}{\frac{t}{k}}\right)\right)} \]
    7. Applied egg-rr73.1%

      \[\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 + \frac{\frac{k}{t}}{\frac{t}{k}}\right)\right)} \]

    if 3.20000000000000008e145 < t

    1. Initial program 62.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. Simplified63.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. Taylor expanded in k around 0 63.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 16: 43.1% 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.37:\\ \;\;\;\;\frac{2}{{\left(\frac{{t\_m}^{1.5}}{\ell} \cdot \sqrt{\sin k}\right)}^{2} \cdot \left(2 \cdot k\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{2}{\frac{t\_m \cdot {\left(k \cdot \sin k\right)}^{2}}{\cos k \cdot {\ell}^{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 (<= k 0.37)
    (/ 2.0 (* (pow (* (/ (pow t_m 1.5) l) (sqrt (sin k))) 2.0) (* 2.0 k)))
    (/ 2.0 (/ (* t_m (pow (* k (sin k)) 2.0)) (* (cos k) (pow l 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.37) {
		tmp = 2.0 / (pow(((pow(t_m, 1.5) / l) * sqrt(sin(k))), 2.0) * (2.0 * k));
	} else {
		tmp = 2.0 / ((t_m * pow((k * sin(k)), 2.0)) / (cos(k) * pow(l, 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 (k <= 0.37d0) then
        tmp = 2.0d0 / (((((t_m ** 1.5d0) / l) * sqrt(sin(k))) ** 2.0d0) * (2.0d0 * k))
    else
        tmp = 2.0d0 / ((t_m * ((k * sin(k)) ** 2.0d0)) / (cos(k) * (l ** 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 (k <= 0.37) {
		tmp = 2.0 / (Math.pow(((Math.pow(t_m, 1.5) / l) * Math.sqrt(Math.sin(k))), 2.0) * (2.0 * k));
	} else {
		tmp = 2.0 / ((t_m * Math.pow((k * Math.sin(k)), 2.0)) / (Math.cos(k) * Math.pow(l, 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 k <= 0.37:
		tmp = 2.0 / (math.pow(((math.pow(t_m, 1.5) / l) * math.sqrt(math.sin(k))), 2.0) * (2.0 * k))
	else:
		tmp = 2.0 / ((t_m * math.pow((k * math.sin(k)), 2.0)) / (math.cos(k) * math.pow(l, 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.37)
		tmp = Float64(2.0 / Float64((Float64(Float64((t_m ^ 1.5) / l) * sqrt(sin(k))) ^ 2.0) * Float64(2.0 * k)));
	else
		tmp = Float64(2.0 / Float64(Float64(t_m * (Float64(k * sin(k)) ^ 2.0)) / Float64(cos(k) * (l ^ 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 (k <= 0.37)
		tmp = 2.0 / (((((t_m ^ 1.5) / l) * sqrt(sin(k))) ^ 2.0) * (2.0 * k));
	else
		tmp = 2.0 / ((t_m * ((k * sin(k)) ^ 2.0)) / (cos(k) * (l ^ 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[k, 0.37], N[(2.0 / N[(N[Power[N[(N[(N[Power[t$95$m, 1.5], $MachinePrecision] / l), $MachinePrecision] * N[Sqrt[N[Sin[k], $MachinePrecision]], $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision] * N[(2.0 * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(2.0 / N[(N[(t$95$m * N[Power[N[(k * N[Sin[k], $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision] / N[(N[Cos[k], $MachinePrecision] * N[Power[l, 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.37:\\
\;\;\;\;\frac{2}{{\left(\frac{{t\_m}^{1.5}}{\ell} \cdot \sqrt{\sin k}\right)}^{2} \cdot \left(2 \cdot k\right)}\\

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


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

    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. Simplified51.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 0.37 < k

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 17: 43.2% 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.21:\\ \;\;\;\;\frac{2}{{\left(\frac{{t\_m}^{1.5}}{\ell} \cdot \sqrt{\sin k}\right)}^{2} \cdot \left(2 \cdot k\right)}\\ \mathbf{else}:\\ \;\;\;\;\left(\cos k \cdot {\ell}^{2}\right) \cdot \frac{2}{t\_m \cdot {\left(k \cdot \sin k\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 (<= k 0.21)
    (/ 2.0 (* (pow (* (/ (pow t_m 1.5) l) (sqrt (sin k))) 2.0) (* 2.0 k)))
    (* (* (cos k) (pow l 2.0)) (/ 2.0 (* t_m (pow (* k (sin 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.21) {
		tmp = 2.0 / (pow(((pow(t_m, 1.5) / l) * sqrt(sin(k))), 2.0) * (2.0 * k));
	} else {
		tmp = (cos(k) * pow(l, 2.0)) * (2.0 / (t_m * pow((k * sin(k)), 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 (k <= 0.21d0) then
        tmp = 2.0d0 / (((((t_m ** 1.5d0) / l) * sqrt(sin(k))) ** 2.0d0) * (2.0d0 * k))
    else
        tmp = (cos(k) * (l ** 2.0d0)) * (2.0d0 / (t_m * ((k * sin(k)) ** 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 (k <= 0.21) {
		tmp = 2.0 / (Math.pow(((Math.pow(t_m, 1.5) / l) * Math.sqrt(Math.sin(k))), 2.0) * (2.0 * k));
	} else {
		tmp = (Math.cos(k) * Math.pow(l, 2.0)) * (2.0 / (t_m * Math.pow((k * Math.sin(k)), 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 k <= 0.21:
		tmp = 2.0 / (math.pow(((math.pow(t_m, 1.5) / l) * math.sqrt(math.sin(k))), 2.0) * (2.0 * k))
	else:
		tmp = (math.cos(k) * math.pow(l, 2.0)) * (2.0 / (t_m * math.pow((k * math.sin(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.21)
		tmp = Float64(2.0 / Float64((Float64(Float64((t_m ^ 1.5) / l) * sqrt(sin(k))) ^ 2.0) * Float64(2.0 * k)));
	else
		tmp = Float64(Float64(cos(k) * (l ^ 2.0)) * Float64(2.0 / Float64(t_m * (Float64(k * sin(k)) ^ 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 (k <= 0.21)
		tmp = 2.0 / (((((t_m ^ 1.5) / l) * sqrt(sin(k))) ^ 2.0) * (2.0 * k));
	else
		tmp = (cos(k) * (l ^ 2.0)) * (2.0 / (t_m * ((k * sin(k)) ^ 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[k, 0.21], N[(2.0 / N[(N[Power[N[(N[(N[Power[t$95$m, 1.5], $MachinePrecision] / l), $MachinePrecision] * N[Sqrt[N[Sin[k], $MachinePrecision]], $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision] * N[(2.0 * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[Cos[k], $MachinePrecision] * N[Power[l, 2.0], $MachinePrecision]), $MachinePrecision] * N[(2.0 / N[(t$95$m * N[Power[N[(k * N[Sin[k], $MachinePrecision]), $MachinePrecision], 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.21:\\
\;\;\;\;\frac{2}{{\left(\frac{{t\_m}^{1.5}}{\ell} \cdot \sqrt{\sin k}\right)}^{2} \cdot \left(2 \cdot k\right)}\\

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


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

    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. Simplified51.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 0.209999999999999992 < k

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 18: 65.1% 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}\;t\_m \leq 6.8 \cdot 10^{-83}:\\ \;\;\;\;\frac{2}{\frac{t\_m \cdot {k}^{4}}{\cos k \cdot {\ell}^{2}}}\\ \mathbf{elif}\;t\_m \leq 5.5 \cdot 10^{+102}:\\ \;\;\;\;\frac{2}{\left(\left(\sin k \cdot \tan k\right) \cdot \left(2 + \frac{k}{t\_m} \cdot \frac{k}{t\_m}\right)\right) \cdot \frac{\frac{{t\_m}^{3}}{\ell}}{\ell}}\\ \mathbf{else}:\\ \;\;\;\;\frac{2}{\left(2 \cdot {k}^{2}\right) \cdot \frac{{t\_m}^{1.5} \cdot \left({t\_m}^{1.5} \cdot \frac{1}{\ell}\right)}{\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 (<= t_m 6.8e-83)
    (/ 2.0 (/ (* t_m (pow k 4.0)) (* (cos k) (pow l 2.0))))
    (if (<= t_m 5.5e+102)
      (/
       2.0
       (*
        (* (* (sin k) (tan k)) (+ 2.0 (* (/ k t_m) (/ k t_m))))
        (/ (/ (pow t_m 3.0) l) l)))
      (/
       2.0
       (*
        (* 2.0 (pow k 2.0))
        (/ (* (pow t_m 1.5) (* (pow t_m 1.5) (/ 1.0 l))) 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 (t_m <= 6.8e-83) {
		tmp = 2.0 / ((t_m * pow(k, 4.0)) / (cos(k) * pow(l, 2.0)));
	} else if (t_m <= 5.5e+102) {
		tmp = 2.0 / (((sin(k) * tan(k)) * (2.0 + ((k / t_m) * (k / t_m)))) * ((pow(t_m, 3.0) / l) / l));
	} else {
		tmp = 2.0 / ((2.0 * pow(k, 2.0)) * ((pow(t_m, 1.5) * (pow(t_m, 1.5) * (1.0 / l))) / l));
	}
	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.8d-83) then
        tmp = 2.0d0 / ((t_m * (k ** 4.0d0)) / (cos(k) * (l ** 2.0d0)))
    else if (t_m <= 5.5d+102) then
        tmp = 2.0d0 / (((sin(k) * tan(k)) * (2.0d0 + ((k / t_m) * (k / t_m)))) * (((t_m ** 3.0d0) / l) / l))
    else
        tmp = 2.0d0 / ((2.0d0 * (k ** 2.0d0)) * (((t_m ** 1.5d0) * ((t_m ** 1.5d0) * (1.0d0 / l))) / l))
    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.8e-83) {
		tmp = 2.0 / ((t_m * Math.pow(k, 4.0)) / (Math.cos(k) * Math.pow(l, 2.0)));
	} else if (t_m <= 5.5e+102) {
		tmp = 2.0 / (((Math.sin(k) * Math.tan(k)) * (2.0 + ((k / t_m) * (k / t_m)))) * ((Math.pow(t_m, 3.0) / l) / l));
	} else {
		tmp = 2.0 / ((2.0 * Math.pow(k, 2.0)) * ((Math.pow(t_m, 1.5) * (Math.pow(t_m, 1.5) * (1.0 / l))) / l));
	}
	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.8e-83:
		tmp = 2.0 / ((t_m * math.pow(k, 4.0)) / (math.cos(k) * math.pow(l, 2.0)))
	elif t_m <= 5.5e+102:
		tmp = 2.0 / (((math.sin(k) * math.tan(k)) * (2.0 + ((k / t_m) * (k / t_m)))) * ((math.pow(t_m, 3.0) / l) / l))
	else:
		tmp = 2.0 / ((2.0 * math.pow(k, 2.0)) * ((math.pow(t_m, 1.5) * (math.pow(t_m, 1.5) * (1.0 / l))) / 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 (t_m <= 6.8e-83)
		tmp = Float64(2.0 / Float64(Float64(t_m * (k ^ 4.0)) / Float64(cos(k) * (l ^ 2.0))));
	elseif (t_m <= 5.5e+102)
		tmp = Float64(2.0 / Float64(Float64(Float64(sin(k) * tan(k)) * Float64(2.0 + Float64(Float64(k / t_m) * Float64(k / t_m)))) * Float64(Float64((t_m ^ 3.0) / l) / l)));
	else
		tmp = Float64(2.0 / Float64(Float64(2.0 * (k ^ 2.0)) * Float64(Float64((t_m ^ 1.5) * Float64((t_m ^ 1.5) * Float64(1.0 / l))) / l)));
	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.8e-83)
		tmp = 2.0 / ((t_m * (k ^ 4.0)) / (cos(k) * (l ^ 2.0)));
	elseif (t_m <= 5.5e+102)
		tmp = 2.0 / (((sin(k) * tan(k)) * (2.0 + ((k / t_m) * (k / t_m)))) * (((t_m ^ 3.0) / l) / l));
	else
		tmp = 2.0 / ((2.0 * (k ^ 2.0)) * (((t_m ^ 1.5) * ((t_m ^ 1.5) * (1.0 / l))) / l));
	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.8e-83], N[(2.0 / N[(N[(t$95$m * N[Power[k, 4.0], $MachinePrecision]), $MachinePrecision] / N[(N[Cos[k], $MachinePrecision] * N[Power[l, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$m, 5.5e+102], N[(2.0 / N[(N[(N[(N[Sin[k], $MachinePrecision] * N[Tan[k], $MachinePrecision]), $MachinePrecision] * N[(2.0 + N[(N[(k / t$95$m), $MachinePrecision] * N[(k / t$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(N[(N[Power[t$95$m, 3.0], $MachinePrecision] / l), $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(2.0 / N[(N[(2.0 * N[Power[k, 2.0], $MachinePrecision]), $MachinePrecision] * N[(N[(N[Power[t$95$m, 1.5], $MachinePrecision] * N[(N[Power[t$95$m, 1.5], $MachinePrecision] * N[(1.0 / l), $MachinePrecision]), $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}\;t\_m \leq 6.8 \cdot 10^{-83}:\\
\;\;\;\;\frac{2}{\frac{t\_m \cdot {k}^{4}}{\cos k \cdot {\ell}^{2}}}\\

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

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


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

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

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

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

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

    if 6.7999999999999995e-83 < t < 5.49999999999999981e102

    1. Initial program 71.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. Simplified75.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. unpow275.9%

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

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

    if 5.49999999999999981e102 < t

    1. Initial program 60.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. Simplified60.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. Taylor expanded in k around 0 60.0%

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

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

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

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

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

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

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

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

Alternative 19: 66.5% 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}\;t\_m \leq 1.05 \cdot 10^{-154}:\\ \;\;\;\;\frac{2}{\frac{t\_m \cdot {k}^{4}}{\cos k \cdot {\ell}^{2}}}\\ \mathbf{else}:\\ \;\;\;\;\frac{2}{\frac{{t\_m}^{2} \cdot \frac{t\_m}{\ell}}{\ell} \cdot \left(\left(\sin k \cdot \tan k\right) \cdot \left(2 + \frac{\frac{k}{t\_m}}{\frac{t\_m}{k}}\right)\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 (<= t_m 1.05e-154)
    (/ 2.0 (/ (* t_m (pow k 4.0)) (* (cos k) (pow l 2.0))))
    (/
     2.0
     (*
      (/ (* (pow t_m 2.0) (/ t_m l)) l)
      (* (* (sin k) (tan k)) (+ 2.0 (/ (/ k t_m) (/ t_m 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 (t_m <= 1.05e-154) {
		tmp = 2.0 / ((t_m * pow(k, 4.0)) / (cos(k) * pow(l, 2.0)));
	} else {
		tmp = 2.0 / (((pow(t_m, 2.0) * (t_m / l)) / l) * ((sin(k) * tan(k)) * (2.0 + ((k / t_m) / (t_m / 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 (t_m <= 1.05d-154) then
        tmp = 2.0d0 / ((t_m * (k ** 4.0d0)) / (cos(k) * (l ** 2.0d0)))
    else
        tmp = 2.0d0 / ((((t_m ** 2.0d0) * (t_m / l)) / l) * ((sin(k) * tan(k)) * (2.0d0 + ((k / t_m) / (t_m / 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 (t_m <= 1.05e-154) {
		tmp = 2.0 / ((t_m * Math.pow(k, 4.0)) / (Math.cos(k) * Math.pow(l, 2.0)));
	} else {
		tmp = 2.0 / (((Math.pow(t_m, 2.0) * (t_m / l)) / l) * ((Math.sin(k) * Math.tan(k)) * (2.0 + ((k / t_m) / (t_m / 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 t_m <= 1.05e-154:
		tmp = 2.0 / ((t_m * math.pow(k, 4.0)) / (math.cos(k) * math.pow(l, 2.0)))
	else:
		tmp = 2.0 / (((math.pow(t_m, 2.0) * (t_m / l)) / l) * ((math.sin(k) * math.tan(k)) * (2.0 + ((k / t_m) / (t_m / 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 (t_m <= 1.05e-154)
		tmp = Float64(2.0 / Float64(Float64(t_m * (k ^ 4.0)) / Float64(cos(k) * (l ^ 2.0))));
	else
		tmp = Float64(2.0 / Float64(Float64(Float64((t_m ^ 2.0) * Float64(t_m / l)) / l) * Float64(Float64(sin(k) * tan(k)) * Float64(2.0 + Float64(Float64(k / t_m) / Float64(t_m / 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 (t_m <= 1.05e-154)
		tmp = 2.0 / ((t_m * (k ^ 4.0)) / (cos(k) * (l ^ 2.0)));
	else
		tmp = 2.0 / ((((t_m ^ 2.0) * (t_m / l)) / l) * ((sin(k) * tan(k)) * (2.0 + ((k / t_m) / (t_m / 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[t$95$m, 1.05e-154], N[(2.0 / N[(N[(t$95$m * N[Power[k, 4.0], $MachinePrecision]), $MachinePrecision] / N[(N[Cos[k], $MachinePrecision] * N[Power[l, 2.0], $MachinePrecision]), $MachinePrecision]), $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[(N[Sin[k], $MachinePrecision] * N[Tan[k], $MachinePrecision]), $MachinePrecision] * N[(2.0 + N[(N[(k / t$95$m), $MachinePrecision] / N[(t$95$m / k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]), $MachinePrecision]
\begin{array}{l}
t\_m = \left|t\right|
\\
t\_s = \mathsf{copysign}\left(1, t\right)

\\
t\_s \cdot \begin{array}{l}
\mathbf{if}\;t\_m \leq 1.05 \cdot 10^{-154}:\\
\;\;\;\;\frac{2}{\frac{t\_m \cdot {k}^{4}}{\cos k \cdot {\ell}^{2}}}\\

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


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

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

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

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

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

    if 1.04999999999999992e-154 < t

    1. Initial program 63.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. Simplified66.4%

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

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

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

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

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

        \[\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 + \frac{\frac{k}{t}}{\frac{t}{k}}\right)\right)} \]
      2. *-un-lft-identity66.4%

        \[\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 + \frac{\frac{k}{t}}{\frac{t}{k}}\right)\right)} \]
      3. times-frac70.7%

        \[\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 + \frac{\frac{k}{t}}{\frac{t}{k}}\right)\right)} \]
      4. pow270.7%

        \[\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 + \frac{\frac{k}{t}}{\frac{t}{k}}\right)\right)} \]
    7. Applied egg-rr70.7%

      \[\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 + \frac{\frac{k}{t}}{\frac{t}{k}}\right)\right)} \]
  3. Recombined 2 regimes into one program.
  4. Final simplification61.8%

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

Alternative 20: 66.4% 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}\;t\_m \leq 8 \cdot 10^{-155}:\\ \;\;\;\;\frac{2}{\frac{t\_m \cdot {k}^{4}}{\cos k \cdot {\ell}^{2}}}\\ \mathbf{else}:\\ \;\;\;\;\frac{2}{\frac{{t\_m}^{2} \cdot \frac{t\_m}{\ell}}{\ell} \cdot \left(\left(\sin k \cdot \tan k\right) \cdot \left(2 + \frac{k}{t\_m} \cdot \frac{k}{t\_m}\right)\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 (<= t_m 8e-155)
    (/ 2.0 (/ (* t_m (pow k 4.0)) (* (cos k) (pow l 2.0))))
    (/
     2.0
     (*
      (/ (* (pow t_m 2.0) (/ t_m l)) l)
      (* (* (sin k) (tan k)) (+ 2.0 (* (/ k t_m) (/ k t_m)))))))))
t\_m = fabs(t);
t\_s = copysign(1.0, t);
double code(double t_s, double t_m, double l, double k) {
	double tmp;
	if (t_m <= 8e-155) {
		tmp = 2.0 / ((t_m * pow(k, 4.0)) / (cos(k) * pow(l, 2.0)));
	} else {
		tmp = 2.0 / (((pow(t_m, 2.0) * (t_m / l)) / l) * ((sin(k) * tan(k)) * (2.0 + ((k / t_m) * (k / t_m)))));
	}
	return t_s * tmp;
}
t\_m = abs(t)
t\_s = copysign(1.0d0, t)
real(8) function code(t_s, t_m, l, k)
    real(8), intent (in) :: t_s
    real(8), intent (in) :: t_m
    real(8), intent (in) :: l
    real(8), intent (in) :: k
    real(8) :: tmp
    if (t_m <= 8d-155) then
        tmp = 2.0d0 / ((t_m * (k ** 4.0d0)) / (cos(k) * (l ** 2.0d0)))
    else
        tmp = 2.0d0 / ((((t_m ** 2.0d0) * (t_m / l)) / l) * ((sin(k) * tan(k)) * (2.0d0 + ((k / t_m) * (k / t_m)))))
    end if
    code = t_s * tmp
end function
t\_m = Math.abs(t);
t\_s = Math.copySign(1.0, t);
public static double code(double t_s, double t_m, double l, double k) {
	double tmp;
	if (t_m <= 8e-155) {
		tmp = 2.0 / ((t_m * Math.pow(k, 4.0)) / (Math.cos(k) * Math.pow(l, 2.0)));
	} else {
		tmp = 2.0 / (((Math.pow(t_m, 2.0) * (t_m / l)) / l) * ((Math.sin(k) * Math.tan(k)) * (2.0 + ((k / t_m) * (k / t_m)))));
	}
	return t_s * tmp;
}
t\_m = math.fabs(t)
t\_s = math.copysign(1.0, t)
def code(t_s, t_m, l, k):
	tmp = 0
	if t_m <= 8e-155:
		tmp = 2.0 / ((t_m * math.pow(k, 4.0)) / (math.cos(k) * math.pow(l, 2.0)))
	else:
		tmp = 2.0 / (((math.pow(t_m, 2.0) * (t_m / l)) / l) * ((math.sin(k) * math.tan(k)) * (2.0 + ((k / t_m) * (k / t_m)))))
	return t_s * tmp
t\_m = abs(t)
t\_s = copysign(1.0, t)
function code(t_s, t_m, l, k)
	tmp = 0.0
	if (t_m <= 8e-155)
		tmp = Float64(2.0 / Float64(Float64(t_m * (k ^ 4.0)) / Float64(cos(k) * (l ^ 2.0))));
	else
		tmp = Float64(2.0 / Float64(Float64(Float64((t_m ^ 2.0) * Float64(t_m / l)) / l) * Float64(Float64(sin(k) * tan(k)) * Float64(2.0 + Float64(Float64(k / t_m) * Float64(k / t_m))))));
	end
	return Float64(t_s * tmp)
end
t\_m = abs(t);
t\_s = sign(t) * abs(1.0);
function tmp_2 = code(t_s, t_m, l, k)
	tmp = 0.0;
	if (t_m <= 8e-155)
		tmp = 2.0 / ((t_m * (k ^ 4.0)) / (cos(k) * (l ^ 2.0)));
	else
		tmp = 2.0 / ((((t_m ^ 2.0) * (t_m / l)) / l) * ((sin(k) * tan(k)) * (2.0 + ((k / t_m) * (k / t_m)))));
	end
	tmp_2 = t_s * tmp;
end
t\_m = N[Abs[t], $MachinePrecision]
t\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[t]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[t$95$s_, t$95$m_, l_, k_] := N[(t$95$s * If[LessEqual[t$95$m, 8e-155], N[(2.0 / N[(N[(t$95$m * N[Power[k, 4.0], $MachinePrecision]), $MachinePrecision] / N[(N[Cos[k], $MachinePrecision] * N[Power[l, 2.0], $MachinePrecision]), $MachinePrecision]), $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[(N[Sin[k], $MachinePrecision] * N[Tan[k], $MachinePrecision]), $MachinePrecision] * N[(2.0 + N[(N[(k / t$95$m), $MachinePrecision] * N[(k / t$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]), $MachinePrecision]
\begin{array}{l}
t\_m = \left|t\right|
\\
t\_s = \mathsf{copysign}\left(1, t\right)

\\
t\_s \cdot \begin{array}{l}
\mathbf{if}\;t\_m \leq 8 \cdot 10^{-155}:\\
\;\;\;\;\frac{2}{\frac{t\_m \cdot {k}^{4}}{\cos k \cdot {\ell}^{2}}}\\

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


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

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

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

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

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

    if 8.00000000000000011e-155 < t

    1. Initial program 63.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. Simplified66.4%

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

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

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

        \[\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 + \frac{\frac{k}{t}}{\frac{t}{k}}\right)\right)} \]
      2. *-un-lft-identity66.4%

        \[\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 + \frac{\frac{k}{t}}{\frac{t}{k}}\right)\right)} \]
      3. times-frac70.7%

        \[\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 + \frac{\frac{k}{t}}{\frac{t}{k}}\right)\right)} \]
      4. pow270.7%

        \[\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 + \frac{\frac{k}{t}}{\frac{t}{k}}\right)\right)} \]
    7. Applied egg-rr70.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 + \frac{k}{t} \cdot \frac{k}{t}\right)\right)} \]
  3. Recombined 2 regimes into one program.
  4. Final simplification61.8%

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

Alternative 21: 61.1% 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}\;t\_m \leq 3.5 \cdot 10^{-72}:\\ \;\;\;\;\frac{2}{\frac{t\_m \cdot {k}^{4}}{\cos k \cdot {\ell}^{2}}}\\ \mathbf{else}:\\ \;\;\;\;\frac{2}{\left(2 \cdot {k}^{2}\right) \cdot \frac{{t\_m}^{1.5} \cdot \left({t\_m}^{1.5} \cdot \frac{1}{\ell}\right)}{\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 (<= t_m 3.5e-72)
    (/ 2.0 (/ (* t_m (pow k 4.0)) (* (cos k) (pow l 2.0))))
    (/
     2.0
     (*
      (* 2.0 (pow k 2.0))
      (/ (* (pow t_m 1.5) (* (pow t_m 1.5) (/ 1.0 l))) 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 (t_m <= 3.5e-72) {
		tmp = 2.0 / ((t_m * pow(k, 4.0)) / (cos(k) * pow(l, 2.0)));
	} else {
		tmp = 2.0 / ((2.0 * pow(k, 2.0)) * ((pow(t_m, 1.5) * (pow(t_m, 1.5) * (1.0 / l))) / l));
	}
	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.5d-72) then
        tmp = 2.0d0 / ((t_m * (k ** 4.0d0)) / (cos(k) * (l ** 2.0d0)))
    else
        tmp = 2.0d0 / ((2.0d0 * (k ** 2.0d0)) * (((t_m ** 1.5d0) * ((t_m ** 1.5d0) * (1.0d0 / l))) / l))
    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.5e-72) {
		tmp = 2.0 / ((t_m * Math.pow(k, 4.0)) / (Math.cos(k) * Math.pow(l, 2.0)));
	} else {
		tmp = 2.0 / ((2.0 * Math.pow(k, 2.0)) * ((Math.pow(t_m, 1.5) * (Math.pow(t_m, 1.5) * (1.0 / l))) / l));
	}
	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.5e-72:
		tmp = 2.0 / ((t_m * math.pow(k, 4.0)) / (math.cos(k) * math.pow(l, 2.0)))
	else:
		tmp = 2.0 / ((2.0 * math.pow(k, 2.0)) * ((math.pow(t_m, 1.5) * (math.pow(t_m, 1.5) * (1.0 / l))) / 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 (t_m <= 3.5e-72)
		tmp = Float64(2.0 / Float64(Float64(t_m * (k ^ 4.0)) / Float64(cos(k) * (l ^ 2.0))));
	else
		tmp = Float64(2.0 / Float64(Float64(2.0 * (k ^ 2.0)) * Float64(Float64((t_m ^ 1.5) * Float64((t_m ^ 1.5) * Float64(1.0 / l))) / l)));
	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.5e-72)
		tmp = 2.0 / ((t_m * (k ^ 4.0)) / (cos(k) * (l ^ 2.0)));
	else
		tmp = 2.0 / ((2.0 * (k ^ 2.0)) * (((t_m ^ 1.5) * ((t_m ^ 1.5) * (1.0 / l))) / l));
	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.5e-72], N[(2.0 / N[(N[(t$95$m * N[Power[k, 4.0], $MachinePrecision]), $MachinePrecision] / N[(N[Cos[k], $MachinePrecision] * N[Power[l, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(2.0 / N[(N[(2.0 * N[Power[k, 2.0], $MachinePrecision]), $MachinePrecision] * N[(N[(N[Power[t$95$m, 1.5], $MachinePrecision] * N[(N[Power[t$95$m, 1.5], $MachinePrecision] * N[(1.0 / l), $MachinePrecision]), $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}\;t\_m \leq 3.5 \cdot 10^{-72}:\\
\;\;\;\;\frac{2}{\frac{t\_m \cdot {k}^{4}}{\cos k \cdot {\ell}^{2}}}\\

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


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

    1. Initial program 47.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. Simplified47.2%

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

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

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

    if 3.5e-72 < 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. Simplified66.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. Taylor expanded in k around 0 60.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. div-inv60.2%

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

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

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

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

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

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

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

Alternative 22: 61.1% 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}\;t\_m \leq 4.8 \cdot 10^{-72}:\\ \;\;\;\;\frac{2}{\frac{t\_m \cdot {k}^{4}}{\cos k \cdot {\ell}^{2}}}\\ \mathbf{else}:\\ \;\;\;\;\frac{2}{\left(2 \cdot {k}^{2}\right) \cdot \frac{{\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 (<= t_m 4.8e-72)
    (/ 2.0 (/ (* t_m (pow k 4.0)) (* (cos k) (pow l 2.0))))
    (/ 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 (t_m <= 4.8e-72) {
		tmp = 2.0 / ((t_m * pow(k, 4.0)) / (cos(k) * pow(l, 2.0)));
	} 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 (t_m <= 4.8e-72) {
		tmp = 2.0 / ((t_m * Math.pow(k, 4.0)) / (Math.cos(k) * Math.pow(l, 2.0)));
	} 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 (t_m <= 4.8e-72)
		tmp = Float64(2.0 / Float64(Float64(t_m * (k ^ 4.0)) / Float64(cos(k) * (l ^ 2.0))));
	else
		tmp = Float64(2.0 / Float64(Float64(2.0 * (k ^ 2.0)) * Float64((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[t$95$m, 4.8e-72], N[(2.0 / N[(N[(t$95$m * N[Power[k, 4.0], $MachinePrecision]), $MachinePrecision] / N[(N[Cos[k], $MachinePrecision] * N[Power[l, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(2.0 / N[(N[(2.0 * N[Power[k, 2.0], $MachinePrecision]), $MachinePrecision] * N[(N[Power[N[(t$95$m / N[Power[l, 1/3], $MachinePrecision]), $MachinePrecision], 3.0], $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}\;t\_m \leq 4.8 \cdot 10^{-72}:\\
\;\;\;\;\frac{2}{\frac{t\_m \cdot {k}^{4}}{\cos k \cdot {\ell}^{2}}}\\

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


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

    1. Initial program 47.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. Simplified47.2%

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

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

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

    if 4.8e-72 < 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. Simplified66.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. Taylor expanded in k around 0 60.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. add-cube-cbrt60.1%

        \[\leadsto \frac{2}{\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 \left(2 \cdot {k}^{2}\right)} \]
      2. pow360.1%

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

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

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

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

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

Alternative 23: 60.7% 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}\;t\_m \leq 4.8 \cdot 10^{-72}:\\ \;\;\;\;\frac{2}{\frac{t\_m \cdot {k}^{4}}{\cos k \cdot {\ell}^{2}}}\\ \mathbf{else}:\\ \;\;\;\;\frac{2}{\left(2 \cdot {k}^{2}\right) \cdot \frac{{t\_m}^{2} \cdot \left(t\_m \cdot \frac{1}{\ell}\right)}{\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 (<= t_m 4.8e-72)
    (/ 2.0 (/ (* t_m (pow k 4.0)) (* (cos k) (pow l 2.0))))
    (/
     2.0
     (* (* 2.0 (pow k 2.0)) (/ (* (pow t_m 2.0) (* t_m (/ 1.0 l))) 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 (t_m <= 4.8e-72) {
		tmp = 2.0 / ((t_m * pow(k, 4.0)) / (cos(k) * pow(l, 2.0)));
	} else {
		tmp = 2.0 / ((2.0 * pow(k, 2.0)) * ((pow(t_m, 2.0) * (t_m * (1.0 / l))) / l));
	}
	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 <= 4.8d-72) then
        tmp = 2.0d0 / ((t_m * (k ** 4.0d0)) / (cos(k) * (l ** 2.0d0)))
    else
        tmp = 2.0d0 / ((2.0d0 * (k ** 2.0d0)) * (((t_m ** 2.0d0) * (t_m * (1.0d0 / l))) / l))
    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 <= 4.8e-72) {
		tmp = 2.0 / ((t_m * Math.pow(k, 4.0)) / (Math.cos(k) * Math.pow(l, 2.0)));
	} else {
		tmp = 2.0 / ((2.0 * Math.pow(k, 2.0)) * ((Math.pow(t_m, 2.0) * (t_m * (1.0 / l))) / l));
	}
	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 <= 4.8e-72:
		tmp = 2.0 / ((t_m * math.pow(k, 4.0)) / (math.cos(k) * math.pow(l, 2.0)))
	else:
		tmp = 2.0 / ((2.0 * math.pow(k, 2.0)) * ((math.pow(t_m, 2.0) * (t_m * (1.0 / l))) / 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 (t_m <= 4.8e-72)
		tmp = Float64(2.0 / Float64(Float64(t_m * (k ^ 4.0)) / Float64(cos(k) * (l ^ 2.0))));
	else
		tmp = Float64(2.0 / Float64(Float64(2.0 * (k ^ 2.0)) * Float64(Float64((t_m ^ 2.0) * Float64(t_m * Float64(1.0 / l))) / l)));
	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 <= 4.8e-72)
		tmp = 2.0 / ((t_m * (k ^ 4.0)) / (cos(k) * (l ^ 2.0)));
	else
		tmp = 2.0 / ((2.0 * (k ^ 2.0)) * (((t_m ^ 2.0) * (t_m * (1.0 / l))) / l));
	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, 4.8e-72], N[(2.0 / N[(N[(t$95$m * N[Power[k, 4.0], $MachinePrecision]), $MachinePrecision] / N[(N[Cos[k], $MachinePrecision] * N[Power[l, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(2.0 / N[(N[(2.0 * N[Power[k, 2.0], $MachinePrecision]), $MachinePrecision] * N[(N[(N[Power[t$95$m, 2.0], $MachinePrecision] * N[(t$95$m * N[(1.0 / l), $MachinePrecision]), $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}\;t\_m \leq 4.8 \cdot 10^{-72}:\\
\;\;\;\;\frac{2}{\frac{t\_m \cdot {k}^{4}}{\cos k \cdot {\ell}^{2}}}\\

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


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

    1. Initial program 47.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. Simplified47.2%

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

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

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

    if 4.8e-72 < 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. Simplified66.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. Taylor expanded in k around 0 60.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. div-inv60.2%

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

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

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

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

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

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

Alternative 24: 54.9% accurate, 1.9× 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 2.3 \cdot 10^{-181} \lor \neg \left(k \leq 1300000000000\right):\\ \;\;\;\;2 \cdot \frac{{\ell}^{2}}{t\_m \cdot {k}^{4}}\\ \mathbf{else}:\\ \;\;\;\;\frac{2}{\frac{\frac{{t\_m}^{3}}{\ell} \cdot \left(2 \cdot {k}^{2}\right)}{\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 (or (<= k 2.3e-181) (not (<= k 1300000000000.0)))
    (* 2.0 (/ (pow l 2.0) (* t_m (pow k 4.0))))
    (/ 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) {
	double tmp;
	if ((k <= 2.3e-181) || !(k <= 1300000000000.0)) {
		tmp = 2.0 * (pow(l, 2.0) / (t_m * pow(k, 4.0)));
	} else {
		tmp = 2.0 / (((pow(t_m, 3.0) / l) * (2.0 * pow(k, 2.0))) / l);
	}
	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 <= 2.3d-181) .or. (.not. (k <= 1300000000000.0d0))) then
        tmp = 2.0d0 * ((l ** 2.0d0) / (t_m * (k ** 4.0d0)))
    else
        tmp = 2.0d0 / ((((t_m ** 3.0d0) / l) * (2.0d0 * (k ** 2.0d0))) / l)
    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 <= 2.3e-181) || !(k <= 1300000000000.0)) {
		tmp = 2.0 * (Math.pow(l, 2.0) / (t_m * Math.pow(k, 4.0)));
	} else {
		tmp = 2.0 / (((Math.pow(t_m, 3.0) / l) * (2.0 * Math.pow(k, 2.0))) / l);
	}
	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 <= 2.3e-181) or not (k <= 1300000000000.0):
		tmp = 2.0 * (math.pow(l, 2.0) / (t_m * math.pow(k, 4.0)))
	else:
		tmp = 2.0 / (((math.pow(t_m, 3.0) / l) * (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 <= 2.3e-181) || !(k <= 1300000000000.0))
		tmp = Float64(2.0 * Float64((l ^ 2.0) / Float64(t_m * (k ^ 4.0))));
	else
		tmp = Float64(2.0 / Float64(Float64(Float64((t_m ^ 3.0) / l) * Float64(2.0 * (k ^ 2.0))) / l));
	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 <= 2.3e-181) || ~((k <= 1300000000000.0)))
		tmp = 2.0 * ((l ^ 2.0) / (t_m * (k ^ 4.0)));
	else
		tmp = 2.0 / ((((t_m ^ 3.0) / l) * (2.0 * (k ^ 2.0))) / l);
	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[Or[LessEqual[k, 2.3e-181], N[Not[LessEqual[k, 1300000000000.0]], $MachinePrecision]], N[(2.0 * N[(N[Power[l, 2.0], $MachinePrecision] / N[(t$95$m * N[Power[k, 4.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 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 \begin{array}{l}
\mathbf{if}\;k \leq 2.3 \cdot 10^{-181} \lor \neg \left(k \leq 1300000000000\right):\\
\;\;\;\;2 \cdot \frac{{\ell}^{2}}{t\_m \cdot {k}^{4}}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if k < 2.29999999999999991e-181 or 1.3e12 < k

    1. Initial program 49.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. Simplified49.8%

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

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

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

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

      \[\leadsto \frac{2}{\color{blue}{{k}^{4} \cdot \frac{t}{{\ell}^{2}}}} \]
    8. Taylor expanded in k around 0 53.7%

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

    if 2.29999999999999991e-181 < k < 1.3e12

    1. Initial program 65.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. Simplified72.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. Taylor expanded in k around 0 70.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/75.0%

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

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

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

Alternative 25: 54.6% accurate, 1.9× 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 2.05 \cdot 10^{-181} \lor \neg \left(k \leq 1500000000000\right):\\ \;\;\;\;2 \cdot \frac{{\ell}^{2}}{t\_m \cdot {k}^{4}}\\ \mathbf{else}:\\ \;\;\;\;\frac{2}{\left(2 \cdot {k}^{2}\right) \cdot \frac{\frac{{t\_m}^{3}}{\ell}}{\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 (or (<= k 2.05e-181) (not (<= k 1500000000000.0)))
    (* 2.0 (/ (pow l 2.0) (* t_m (pow k 4.0))))
    (/ 2.0 (* (* 2.0 (pow k 2.0)) (/ (/ (pow t_m 3.0) l) 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 <= 2.05e-181) || !(k <= 1500000000000.0)) {
		tmp = 2.0 * (pow(l, 2.0) / (t_m * pow(k, 4.0)));
	} else {
		tmp = 2.0 / ((2.0 * pow(k, 2.0)) * ((pow(t_m, 3.0) / l) / l));
	}
	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 <= 2.05d-181) .or. (.not. (k <= 1500000000000.0d0))) then
        tmp = 2.0d0 * ((l ** 2.0d0) / (t_m * (k ** 4.0d0)))
    else
        tmp = 2.0d0 / ((2.0d0 * (k ** 2.0d0)) * (((t_m ** 3.0d0) / l) / l))
    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 <= 2.05e-181) || !(k <= 1500000000000.0)) {
		tmp = 2.0 * (Math.pow(l, 2.0) / (t_m * Math.pow(k, 4.0)));
	} else {
		tmp = 2.0 / ((2.0 * Math.pow(k, 2.0)) * ((Math.pow(t_m, 3.0) / l) / l));
	}
	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 <= 2.05e-181) or not (k <= 1500000000000.0):
		tmp = 2.0 * (math.pow(l, 2.0) / (t_m * math.pow(k, 4.0)))
	else:
		tmp = 2.0 / ((2.0 * math.pow(k, 2.0)) * ((math.pow(t_m, 3.0) / l) / 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 <= 2.05e-181) || !(k <= 1500000000000.0))
		tmp = Float64(2.0 * Float64((l ^ 2.0) / Float64(t_m * (k ^ 4.0))));
	else
		tmp = Float64(2.0 / Float64(Float64(2.0 * (k ^ 2.0)) * Float64(Float64((t_m ^ 3.0) / l) / l)));
	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 <= 2.05e-181) || ~((k <= 1500000000000.0)))
		tmp = 2.0 * ((l ^ 2.0) / (t_m * (k ^ 4.0)));
	else
		tmp = 2.0 / ((2.0 * (k ^ 2.0)) * (((t_m ^ 3.0) / l) / l));
	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[Or[LessEqual[k, 2.05e-181], N[Not[LessEqual[k, 1500000000000.0]], $MachinePrecision]], N[(2.0 * N[(N[Power[l, 2.0], $MachinePrecision] / N[(t$95$m * N[Power[k, 4.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(2.0 / N[(N[(2.0 * N[Power[k, 2.0], $MachinePrecision]), $MachinePrecision] * N[(N[(N[Power[t$95$m, 3.0], $MachinePrecision] / l), $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 2.05 \cdot 10^{-181} \lor \neg \left(k \leq 1500000000000\right):\\
\;\;\;\;2 \cdot \frac{{\ell}^{2}}{t\_m \cdot {k}^{4}}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if k < 2.0500000000000001e-181 or 1.5e12 < k

    1. Initial program 49.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. Simplified49.8%

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

      \[\leadsto \frac{2}{\color{blue}{\frac{{k}^{2} \cdot \left(t \cdot {\sin k}^{2}\right)}{{\ell}^{2} \cdot \cos k}}} \]
    5. Taylor expanded in k around 0 53.7%

      \[\leadsto \frac{2}{\color{blue}{\frac{{k}^{4} \cdot t}{{\ell}^{2}}}} \]
    6. Step-by-step derivation
      1. associate-/l*53.7%

        \[\leadsto \frac{2}{\color{blue}{{k}^{4} \cdot \frac{t}{{\ell}^{2}}}} \]
    7. Simplified53.7%

      \[\leadsto \frac{2}{\color{blue}{{k}^{4} \cdot \frac{t}{{\ell}^{2}}}} \]
    8. Taylor expanded in k around 0 53.7%

      \[\leadsto \color{blue}{2 \cdot \frac{{\ell}^{2}}{{k}^{4} \cdot t}} \]

    if 2.0500000000000001e-181 < k < 1.5e12

    1. Initial program 65.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. Simplified72.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. Taylor expanded in k around 0 70.5%

      \[\leadsto \frac{2}{\frac{\frac{{t}^{3}}{\ell}}{\ell} \cdot \color{blue}{\left(2 \cdot {k}^{2}\right)}} \]
  3. Recombined 2 regimes into one program.
  4. Final simplification56.5%

    \[\leadsto \begin{array}{l} \mathbf{if}\;k \leq 2.05 \cdot 10^{-181} \lor \neg \left(k \leq 1500000000000\right):\\ \;\;\;\;2 \cdot \frac{{\ell}^{2}}{t \cdot {k}^{4}}\\ \mathbf{else}:\\ \;\;\;\;\frac{2}{\left(2 \cdot {k}^{2}\right) \cdot \frac{\frac{{t}^{3}}{\ell}}{\ell}}\\ \end{array} \]
  5. Add Preprocessing

Alternative 26: 60.3% accurate, 1.9× 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 \cdot 10^{-72}:\\ \;\;\;\;\frac{2}{{k}^{4} \cdot \frac{1}{\frac{{\ell}^{2}}{t\_m}}}\\ \mathbf{else}:\\ \;\;\;\;\frac{2}{\left(2 \cdot {k}^{2}\right) \cdot \frac{{t\_m}^{2} \cdot \left(t\_m \cdot \frac{1}{\ell}\right)}{\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 (<= t_m 3e-72)
    (/ 2.0 (* (pow k 4.0) (/ 1.0 (/ (pow l 2.0) t_m))))
    (/
     2.0
     (* (* 2.0 (pow k 2.0)) (/ (* (pow t_m 2.0) (* t_m (/ 1.0 l))) 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 (t_m <= 3e-72) {
		tmp = 2.0 / (pow(k, 4.0) * (1.0 / (pow(l, 2.0) / t_m)));
	} else {
		tmp = 2.0 / ((2.0 * pow(k, 2.0)) * ((pow(t_m, 2.0) * (t_m * (1.0 / l))) / l));
	}
	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 <= 3d-72) then
        tmp = 2.0d0 / ((k ** 4.0d0) * (1.0d0 / ((l ** 2.0d0) / t_m)))
    else
        tmp = 2.0d0 / ((2.0d0 * (k ** 2.0d0)) * (((t_m ** 2.0d0) * (t_m * (1.0d0 / l))) / l))
    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 <= 3e-72) {
		tmp = 2.0 / (Math.pow(k, 4.0) * (1.0 / (Math.pow(l, 2.0) / t_m)));
	} else {
		tmp = 2.0 / ((2.0 * Math.pow(k, 2.0)) * ((Math.pow(t_m, 2.0) * (t_m * (1.0 / l))) / l));
	}
	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 <= 3e-72:
		tmp = 2.0 / (math.pow(k, 4.0) * (1.0 / (math.pow(l, 2.0) / t_m)))
	else:
		tmp = 2.0 / ((2.0 * math.pow(k, 2.0)) * ((math.pow(t_m, 2.0) * (t_m * (1.0 / l))) / 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 (t_m <= 3e-72)
		tmp = Float64(2.0 / Float64((k ^ 4.0) * Float64(1.0 / Float64((l ^ 2.0) / t_m))));
	else
		tmp = Float64(2.0 / Float64(Float64(2.0 * (k ^ 2.0)) * Float64(Float64((t_m ^ 2.0) * Float64(t_m * Float64(1.0 / l))) / l)));
	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 <= 3e-72)
		tmp = 2.0 / ((k ^ 4.0) * (1.0 / ((l ^ 2.0) / t_m)));
	else
		tmp = 2.0 / ((2.0 * (k ^ 2.0)) * (((t_m ^ 2.0) * (t_m * (1.0 / l))) / l));
	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, 3e-72], N[(2.0 / N[(N[Power[k, 4.0], $MachinePrecision] * N[(1.0 / N[(N[Power[l, 2.0], $MachinePrecision] / t$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(2.0 / N[(N[(2.0 * N[Power[k, 2.0], $MachinePrecision]), $MachinePrecision] * N[(N[(N[Power[t$95$m, 2.0], $MachinePrecision] * N[(t$95$m * N[(1.0 / l), $MachinePrecision]), $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}\;t\_m \leq 3 \cdot 10^{-72}:\\
\;\;\;\;\frac{2}{{k}^{4} \cdot \frac{1}{\frac{{\ell}^{2}}{t\_m}}}\\

\mathbf{else}:\\
\;\;\;\;\frac{2}{\left(2 \cdot {k}^{2}\right) \cdot \frac{{t\_m}^{2} \cdot \left(t\_m \cdot \frac{1}{\ell}\right)}{\ell}}\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t < 3e-72

    1. Initial program 47.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. Simplified47.2%

      \[\leadsto \color{blue}{\frac{2}{\left(\frac{{t}^{3}}{\ell \cdot \ell} \cdot \sin k\right) \cdot \left(\tan k \cdot \left(1 + \left(1 + {\left(\frac{k}{t}\right)}^{2}\right)\right)\right)}} \]
    3. Add Preprocessing
    4. Taylor expanded in t around 0 65.6%

      \[\leadsto \frac{2}{\color{blue}{\frac{{k}^{2} \cdot \left(t \cdot {\sin k}^{2}\right)}{{\ell}^{2} \cdot \cos k}}} \]
    5. Taylor expanded in k around 0 54.4%

      \[\leadsto \frac{2}{\color{blue}{\frac{{k}^{4} \cdot t}{{\ell}^{2}}}} \]
    6. Step-by-step derivation
      1. associate-/l*54.9%

        \[\leadsto \frac{2}{\color{blue}{{k}^{4} \cdot \frac{t}{{\ell}^{2}}}} \]
    7. Simplified54.9%

      \[\leadsto \frac{2}{\color{blue}{{k}^{4} \cdot \frac{t}{{\ell}^{2}}}} \]
    8. Step-by-step derivation
      1. clear-num54.9%

        \[\leadsto \frac{2}{{k}^{4} \cdot \color{blue}{\frac{1}{\frac{{\ell}^{2}}{t}}}} \]
      2. inv-pow54.9%

        \[\leadsto \frac{2}{{k}^{4} \cdot \color{blue}{{\left(\frac{{\ell}^{2}}{t}\right)}^{-1}}} \]
    9. Applied egg-rr54.9%

      \[\leadsto \frac{2}{{k}^{4} \cdot \color{blue}{{\left(\frac{{\ell}^{2}}{t}\right)}^{-1}}} \]
    10. Step-by-step derivation
      1. unpow-154.9%

        \[\leadsto \frac{2}{{k}^{4} \cdot \color{blue}{\frac{1}{\frac{{\ell}^{2}}{t}}}} \]
    11. Simplified54.9%

      \[\leadsto \frac{2}{{k}^{4} \cdot \color{blue}{\frac{1}{\frac{{\ell}^{2}}{t}}}} \]

    if 3e-72 < 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. Simplified66.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. Taylor expanded in k around 0 60.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. div-inv60.2%

        \[\leadsto \frac{2}{\frac{\color{blue}{{t}^{3} \cdot \frac{1}{\ell}}}{\ell} \cdot \left(2 \cdot {k}^{2}\right)} \]
      2. unpow360.2%

        \[\leadsto \frac{2}{\frac{\color{blue}{\left(\left(t \cdot t\right) \cdot t\right)} \cdot \frac{1}{\ell}}{\ell} \cdot \left(2 \cdot {k}^{2}\right)} \]
      3. associate-*l*64.2%

        \[\leadsto \frac{2}{\frac{\color{blue}{\left(t \cdot t\right) \cdot \left(t \cdot \frac{1}{\ell}\right)}}{\ell} \cdot \left(2 \cdot {k}^{2}\right)} \]
      4. pow264.2%

        \[\leadsto \frac{2}{\frac{\color{blue}{{t}^{2}} \cdot \left(t \cdot \frac{1}{\ell}\right)}{\ell} \cdot \left(2 \cdot {k}^{2}\right)} \]
    6. Applied egg-rr64.2%

      \[\leadsto \frac{2}{\frac{\color{blue}{{t}^{2} \cdot \left(t \cdot \frac{1}{\ell}\right)}}{\ell} \cdot \left(2 \cdot {k}^{2}\right)} \]
  3. Recombined 2 regimes into one program.
  4. Final simplification57.6%

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq 3 \cdot 10^{-72}:\\ \;\;\;\;\frac{2}{{k}^{4} \cdot \frac{1}{\frac{{\ell}^{2}}{t}}}\\ \mathbf{else}:\\ \;\;\;\;\frac{2}{\left(2 \cdot {k}^{2}\right) \cdot \frac{{t}^{2} \cdot \left(t \cdot \frac{1}{\ell}\right)}{\ell}}\\ \end{array} \]
  5. Add Preprocessing

Alternative 27: 52.4% 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}{{k}^{4} \cdot \frac{1}{\frac{{\ell}^{2}}{t\_m}}} \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 k 4.0) (/ 1.0 (/ (pow l 2.0) t_m))))))
t\_m = fabs(t);
t\_s = copysign(1.0, t);
double code(double t_s, double t_m, double l, double k) {
	return t_s * (2.0 / (pow(k, 4.0) * (1.0 / (pow(l, 2.0) / t_m))));
}
t\_m = abs(t)
t\_s = copysign(1.0d0, t)
real(8) function code(t_s, t_m, l, k)
    real(8), intent (in) :: t_s
    real(8), intent (in) :: t_m
    real(8), intent (in) :: l
    real(8), intent (in) :: k
    code = t_s * (2.0d0 / ((k ** 4.0d0) * (1.0d0 / ((l ** 2.0d0) / t_m))))
end function
t\_m = Math.abs(t);
t\_s = Math.copySign(1.0, t);
public static double code(double t_s, double t_m, double l, double k) {
	return t_s * (2.0 / (Math.pow(k, 4.0) * (1.0 / (Math.pow(l, 2.0) / t_m))));
}
t\_m = math.fabs(t)
t\_s = math.copysign(1.0, t)
def code(t_s, t_m, l, k):
	return t_s * (2.0 / (math.pow(k, 4.0) * (1.0 / (math.pow(l, 2.0) / t_m))))
t\_m = abs(t)
t\_s = copysign(1.0, t)
function code(t_s, t_m, l, k)
	return Float64(t_s * Float64(2.0 / Float64((k ^ 4.0) * Float64(1.0 / Float64((l ^ 2.0) / t_m)))))
end
t\_m = abs(t);
t\_s = sign(t) * abs(1.0);
function tmp = code(t_s, t_m, l, k)
	tmp = t_s * (2.0 / ((k ^ 4.0) * (1.0 / ((l ^ 2.0) / t_m))));
end
t\_m = N[Abs[t], $MachinePrecision]
t\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[t]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[t$95$s_, t$95$m_, l_, k_] := N[(t$95$s * N[(2.0 / N[(N[Power[k, 4.0], $MachinePrecision] * N[(1.0 / N[(N[Power[l, 2.0], $MachinePrecision] / t$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
t\_m = \left|t\right|
\\
t\_s = \mathsf{copysign}\left(1, t\right)

\\
t\_s \cdot \frac{2}{{k}^{4} \cdot \frac{1}{\frac{{\ell}^{2}}{t\_m}}}
\end{array}
Derivation
  1. Initial program 52.4%

    \[\frac{2}{\left(\left(\frac{{t}^{3}}{\ell \cdot \ell} \cdot \sin k\right) \cdot \tan k\right) \cdot \left(\left(1 + {\left(\frac{k}{t}\right)}^{2}\right) + 1\right)} \]
  2. Simplified52.4%

    \[\leadsto \color{blue}{\frac{2}{\left(\frac{{t}^{3}}{\ell \cdot \ell} \cdot \sin k\right) \cdot \left(\tan k \cdot \left(1 + \left(1 + {\left(\frac{k}{t}\right)}^{2}\right)\right)\right)}} \]
  3. Add Preprocessing
  4. Taylor expanded in t around 0 61.6%

    \[\leadsto \frac{2}{\color{blue}{\frac{{k}^{2} \cdot \left(t \cdot {\sin k}^{2}\right)}{{\ell}^{2} \cdot \cos k}}} \]
  5. Taylor expanded in k around 0 52.4%

    \[\leadsto \frac{2}{\color{blue}{\frac{{k}^{4} \cdot t}{{\ell}^{2}}}} \]
  6. Step-by-step derivation
    1. associate-/l*52.7%

      \[\leadsto \frac{2}{\color{blue}{{k}^{4} \cdot \frac{t}{{\ell}^{2}}}} \]
  7. Simplified52.7%

    \[\leadsto \frac{2}{\color{blue}{{k}^{4} \cdot \frac{t}{{\ell}^{2}}}} \]
  8. Step-by-step derivation
    1. clear-num52.7%

      \[\leadsto \frac{2}{{k}^{4} \cdot \color{blue}{\frac{1}{\frac{{\ell}^{2}}{t}}}} \]
    2. inv-pow52.7%

      \[\leadsto \frac{2}{{k}^{4} \cdot \color{blue}{{\left(\frac{{\ell}^{2}}{t}\right)}^{-1}}} \]
  9. Applied egg-rr52.7%

    \[\leadsto \frac{2}{{k}^{4} \cdot \color{blue}{{\left(\frac{{\ell}^{2}}{t}\right)}^{-1}}} \]
  10. Step-by-step derivation
    1. unpow-152.7%

      \[\leadsto \frac{2}{{k}^{4} \cdot \color{blue}{\frac{1}{\frac{{\ell}^{2}}{t}}}} \]
  11. Simplified52.7%

    \[\leadsto \frac{2}{{k}^{4} \cdot \color{blue}{\frac{1}{\frac{{\ell}^{2}}{t}}}} \]
  12. Add Preprocessing

Alternative 28: 52.4% 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}{{k}^{4} \cdot \frac{t\_m}{{\ell}^{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 k 4.0) (/ t_m (pow l 2.0))))))
t\_m = fabs(t);
t\_s = copysign(1.0, t);
double code(double t_s, double t_m, double l, double k) {
	return t_s * (2.0 / (pow(k, 4.0) * (t_m / pow(l, 2.0))));
}
t\_m = abs(t)
t\_s = copysign(1.0d0, t)
real(8) function code(t_s, t_m, l, k)
    real(8), intent (in) :: t_s
    real(8), intent (in) :: t_m
    real(8), intent (in) :: l
    real(8), intent (in) :: k
    code = t_s * (2.0d0 / ((k ** 4.0d0) * (t_m / (l ** 2.0d0))))
end function
t\_m = Math.abs(t);
t\_s = Math.copySign(1.0, t);
public static double code(double t_s, double t_m, double l, double k) {
	return t_s * (2.0 / (Math.pow(k, 4.0) * (t_m / Math.pow(l, 2.0))));
}
t\_m = math.fabs(t)
t\_s = math.copysign(1.0, t)
def code(t_s, t_m, l, k):
	return t_s * (2.0 / (math.pow(k, 4.0) * (t_m / math.pow(l, 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((k ^ 4.0) * Float64(t_m / (l ^ 2.0)))))
end
t\_m = abs(t);
t\_s = sign(t) * abs(1.0);
function tmp = code(t_s, t_m, l, k)
	tmp = t_s * (2.0 / ((k ^ 4.0) * (t_m / (l ^ 2.0))));
end
t\_m = N[Abs[t], $MachinePrecision]
t\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[t]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[t$95$s_, t$95$m_, l_, k_] := N[(t$95$s * N[(2.0 / N[(N[Power[k, 4.0], $MachinePrecision] * N[(t$95$m / N[Power[l, 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 \frac{2}{{k}^{4} \cdot \frac{t\_m}{{\ell}^{2}}}
\end{array}
Derivation
  1. Initial program 52.4%

    \[\frac{2}{\left(\left(\frac{{t}^{3}}{\ell \cdot \ell} \cdot \sin k\right) \cdot \tan k\right) \cdot \left(\left(1 + {\left(\frac{k}{t}\right)}^{2}\right) + 1\right)} \]
  2. Simplified52.4%

    \[\leadsto \color{blue}{\frac{2}{\left(\frac{{t}^{3}}{\ell \cdot \ell} \cdot \sin k\right) \cdot \left(\tan k \cdot \left(1 + \left(1 + {\left(\frac{k}{t}\right)}^{2}\right)\right)\right)}} \]
  3. Add Preprocessing
  4. Taylor expanded in t around 0 61.6%

    \[\leadsto \frac{2}{\color{blue}{\frac{{k}^{2} \cdot \left(t \cdot {\sin k}^{2}\right)}{{\ell}^{2} \cdot \cos k}}} \]
  5. Taylor expanded in k around 0 52.4%

    \[\leadsto \frac{2}{\color{blue}{\frac{{k}^{4} \cdot t}{{\ell}^{2}}}} \]
  6. Step-by-step derivation
    1. associate-/l*52.7%

      \[\leadsto \frac{2}{\color{blue}{{k}^{4} \cdot \frac{t}{{\ell}^{2}}}} \]
  7. Simplified52.7%

    \[\leadsto \frac{2}{\color{blue}{{k}^{4} \cdot \frac{t}{{\ell}^{2}}}} \]
  8. Add Preprocessing

Alternative 29: 52.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}{{k}^{4} \cdot \left(t\_m \cdot {\ell}^{-2}\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 (* (pow k 4.0) (* t_m (pow l -2.0))))))
t\_m = fabs(t);
t\_s = copysign(1.0, t);
double code(double t_s, double t_m, double l, double k) {
	return t_s * (2.0 / (pow(k, 4.0) * (t_m * pow(l, -2.0))));
}
t\_m = abs(t)
t\_s = copysign(1.0d0, t)
real(8) function code(t_s, t_m, l, k)
    real(8), intent (in) :: t_s
    real(8), intent (in) :: t_m
    real(8), intent (in) :: l
    real(8), intent (in) :: k
    code = t_s * (2.0d0 / ((k ** 4.0d0) * (t_m * (l ** (-2.0d0)))))
end function
t\_m = Math.abs(t);
t\_s = Math.copySign(1.0, t);
public static double code(double t_s, double t_m, double l, double k) {
	return t_s * (2.0 / (Math.pow(k, 4.0) * (t_m * Math.pow(l, -2.0))));
}
t\_m = math.fabs(t)
t\_s = math.copysign(1.0, t)
def code(t_s, t_m, l, k):
	return t_s * (2.0 / (math.pow(k, 4.0) * (t_m * math.pow(l, -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((k ^ 4.0) * Float64(t_m * (l ^ -2.0)))))
end
t\_m = abs(t);
t\_s = sign(t) * abs(1.0);
function tmp = code(t_s, t_m, l, k)
	tmp = t_s * (2.0 / ((k ^ 4.0) * (t_m * (l ^ -2.0))));
end
t\_m = N[Abs[t], $MachinePrecision]
t\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[t]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[t$95$s_, t$95$m_, l_, k_] := N[(t$95$s * N[(2.0 / N[(N[Power[k, 4.0], $MachinePrecision] * N[(t$95$m * N[Power[l, -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 \frac{2}{{k}^{4} \cdot \left(t\_m \cdot {\ell}^{-2}\right)}
\end{array}
Derivation
  1. Initial program 52.4%

    \[\frac{2}{\left(\left(\frac{{t}^{3}}{\ell \cdot \ell} \cdot \sin k\right) \cdot \tan k\right) \cdot \left(\left(1 + {\left(\frac{k}{t}\right)}^{2}\right) + 1\right)} \]
  2. Simplified52.4%

    \[\leadsto \color{blue}{\frac{2}{\left(\frac{{t}^{3}}{\ell \cdot \ell} \cdot \sin k\right) \cdot \left(\tan k \cdot \left(1 + \left(1 + {\left(\frac{k}{t}\right)}^{2}\right)\right)\right)}} \]
  3. Add Preprocessing
  4. Taylor expanded in t around 0 61.6%

    \[\leadsto \frac{2}{\color{blue}{\frac{{k}^{2} \cdot \left(t \cdot {\sin k}^{2}\right)}{{\ell}^{2} \cdot \cos k}}} \]
  5. Taylor expanded in k around 0 52.4%

    \[\leadsto \frac{2}{\color{blue}{\frac{{k}^{4} \cdot t}{{\ell}^{2}}}} \]
  6. Step-by-step derivation
    1. associate-/l*52.7%

      \[\leadsto \frac{2}{\color{blue}{{k}^{4} \cdot \frac{t}{{\ell}^{2}}}} \]
  7. Simplified52.7%

    \[\leadsto \frac{2}{\color{blue}{{k}^{4} \cdot \frac{t}{{\ell}^{2}}}} \]
  8. Step-by-step derivation
    1. pow152.7%

      \[\leadsto \frac{2}{\color{blue}{{\left({k}^{4} \cdot \frac{t}{{\ell}^{2}}\right)}^{1}}} \]
    2. div-inv52.7%

      \[\leadsto \frac{2}{{\left({k}^{4} \cdot \color{blue}{\left(t \cdot \frac{1}{{\ell}^{2}}\right)}\right)}^{1}} \]
    3. pow-flip52.7%

      \[\leadsto \frac{2}{{\left({k}^{4} \cdot \left(t \cdot \color{blue}{{\ell}^{\left(-2\right)}}\right)\right)}^{1}} \]
    4. metadata-eval52.7%

      \[\leadsto \frac{2}{{\left({k}^{4} \cdot \left(t \cdot {\ell}^{\color{blue}{-2}}\right)\right)}^{1}} \]
  9. Applied egg-rr52.7%

    \[\leadsto \frac{2}{\color{blue}{{\left({k}^{4} \cdot \left(t \cdot {\ell}^{-2}\right)\right)}^{1}}} \]
  10. Step-by-step derivation
    1. unpow152.7%

      \[\leadsto \frac{2}{\color{blue}{{k}^{4} \cdot \left(t \cdot {\ell}^{-2}\right)}} \]
  11. Simplified52.7%

    \[\leadsto \frac{2}{\color{blue}{{k}^{4} \cdot \left(t \cdot {\ell}^{-2}\right)}} \]
  12. Add Preprocessing

Alternative 30: 51.7% accurate, 2.0× speedup?

\[\begin{array}{l} t\_m = \left|t\right| \\ t\_s = \mathsf{copysign}\left(1, t\right) \\ t\_s \cdot \left(2 \cdot \frac{{\ell}^{2}}{t\_m \cdot {k}^{4}}\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 (/ (pow l 2.0) (* t_m (pow k 4.0))))))
t\_m = fabs(t);
t\_s = copysign(1.0, t);
double code(double t_s, double t_m, double l, double k) {
	return t_s * (2.0 * (pow(l, 2.0) / (t_m * pow(k, 4.0))));
}
t\_m = abs(t)
t\_s = copysign(1.0d0, t)
real(8) function code(t_s, t_m, l, k)
    real(8), intent (in) :: t_s
    real(8), intent (in) :: t_m
    real(8), intent (in) :: l
    real(8), intent (in) :: k
    code = t_s * (2.0d0 * ((l ** 2.0d0) / (t_m * (k ** 4.0d0))))
end function
t\_m = Math.abs(t);
t\_s = Math.copySign(1.0, t);
public static double code(double t_s, double t_m, double l, double k) {
	return t_s * (2.0 * (Math.pow(l, 2.0) / (t_m * Math.pow(k, 4.0))));
}
t\_m = math.fabs(t)
t\_s = math.copysign(1.0, t)
def code(t_s, t_m, l, k):
	return t_s * (2.0 * (math.pow(l, 2.0) / (t_m * math.pow(k, 4.0))))
t\_m = abs(t)
t\_s = copysign(1.0, t)
function code(t_s, t_m, l, k)
	return Float64(t_s * Float64(2.0 * Float64((l ^ 2.0) / Float64(t_m * (k ^ 4.0)))))
end
t\_m = abs(t);
t\_s = sign(t) * abs(1.0);
function tmp = code(t_s, t_m, l, k)
	tmp = t_s * (2.0 * ((l ^ 2.0) / (t_m * (k ^ 4.0))));
end
t\_m = N[Abs[t], $MachinePrecision]
t\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[t]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[t$95$s_, t$95$m_, l_, k_] := N[(t$95$s * N[(2.0 * N[(N[Power[l, 2.0], $MachinePrecision] / N[(t$95$m * N[Power[k, 4.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
t\_m = \left|t\right|
\\
t\_s = \mathsf{copysign}\left(1, t\right)

\\
t\_s \cdot \left(2 \cdot \frac{{\ell}^{2}}{t\_m \cdot {k}^{4}}\right)
\end{array}
Derivation
  1. Initial program 52.4%

    \[\frac{2}{\left(\left(\frac{{t}^{3}}{\ell \cdot \ell} \cdot \sin k\right) \cdot \tan k\right) \cdot \left(\left(1 + {\left(\frac{k}{t}\right)}^{2}\right) + 1\right)} \]
  2. Simplified52.4%

    \[\leadsto \color{blue}{\frac{2}{\left(\frac{{t}^{3}}{\ell \cdot \ell} \cdot \sin k\right) \cdot \left(\tan k \cdot \left(1 + \left(1 + {\left(\frac{k}{t}\right)}^{2}\right)\right)\right)}} \]
  3. Add Preprocessing
  4. Taylor expanded in t around 0 61.6%

    \[\leadsto \frac{2}{\color{blue}{\frac{{k}^{2} \cdot \left(t \cdot {\sin k}^{2}\right)}{{\ell}^{2} \cdot \cos k}}} \]
  5. Taylor expanded in k around 0 52.4%

    \[\leadsto \frac{2}{\color{blue}{\frac{{k}^{4} \cdot t}{{\ell}^{2}}}} \]
  6. Step-by-step derivation
    1. associate-/l*52.7%

      \[\leadsto \frac{2}{\color{blue}{{k}^{4} \cdot \frac{t}{{\ell}^{2}}}} \]
  7. Simplified52.7%

    \[\leadsto \frac{2}{\color{blue}{{k}^{4} \cdot \frac{t}{{\ell}^{2}}}} \]
  8. Taylor expanded in k around 0 52.4%

    \[\leadsto \color{blue}{2 \cdot \frac{{\ell}^{2}}{{k}^{4} \cdot t}} \]
  9. Final simplification52.4%

    \[\leadsto 2 \cdot \frac{{\ell}^{2}}{t \cdot {k}^{4}} \]
  10. Add Preprocessing

Reproduce

?
herbie shell --seed 2024088 
(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))))