Toniolo and Linder, Equation (10+)

Percentage Accurate: 54.1% → 90.5%
Time: 18.2s
Alternatives: 21
Speedup: 3.6×

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 21 alternatives:

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

Initial Program: 54.1% accurate, 1.0× speedup?

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

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

Alternative 1: 90.5% accurate, 0.7× speedup?

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

\mathbf{elif}\;t\_m \leq 9 \cdot 10^{+100}:\\
\;\;\;\;\frac{1}{\sin k \cdot \frac{\tan k}{2 \cdot {\left({t\_m}^{1.5} \cdot \frac{\mathsf{hypot}\left(1, \mathsf{hypot}\left(1, \frac{k}{t\_m}\right)\right)}{\ell}\right)}^{-2}}}\\

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


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

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

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

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

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

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

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

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

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

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

    if 4.19999999999999982e-60 < t < 9.00000000000000073e100

    1. Initial program 78.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. Simplified78.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. Applied egg-rr61.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 9.00000000000000073e100 < t

    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. Step-by-step derivation
      1. associate-/r*64.0%

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

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

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

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

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

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

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

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

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

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

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

Alternative 2: 92.3% 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 1.25 \cdot 10^{-63}:\\ \;\;\;\;\frac{2}{{\left(\frac{k}{\ell} \cdot \sqrt{t\_m}\right)}^{2} \cdot \left(\sin k \cdot \tan k\right)}\\ \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(1 + {\left(\frac{k}{t\_m}\right)}^{2}\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 1.25e-63)
    (/ 2.0 (* (pow (* (/ k l) (sqrt t_m)) 2.0) (* (sin k) (tan k))))
    (/
     2.0
     (*
      (pow (* (/ t_m (pow (cbrt l) 2.0)) (cbrt (sin k))) 3.0)
      (* (tan k) (+ 1.0 (+ 1.0 (pow (/ k t_m) 2.0)))))))))
t\_m = fabs(t);
t\_s = copysign(1.0, t);
double code(double t_s, double t_m, double l, double k) {
	double tmp;
	if (t_m <= 1.25e-63) {
		tmp = 2.0 / (pow(((k / l) * sqrt(t_m)), 2.0) * (sin(k) * tan(k)));
	} else {
		tmp = 2.0 / (pow(((t_m / pow(cbrt(l), 2.0)) * cbrt(sin(k))), 3.0) * (tan(k) * (1.0 + (1.0 + pow((k / t_m), 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 (t_m <= 1.25e-63) {
		tmp = 2.0 / (Math.pow(((k / l) * Math.sqrt(t_m)), 2.0) * (Math.sin(k) * Math.tan(k)));
	} 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 + (1.0 + Math.pow((k / t_m), 2.0)))));
	}
	return t_s * tmp;
}
t\_m = abs(t)
t\_s = copysign(1.0, t)
function code(t_s, t_m, l, k)
	tmp = 0.0
	if (t_m <= 1.25e-63)
		tmp = Float64(2.0 / Float64((Float64(Float64(k / l) * sqrt(t_m)) ^ 2.0) * Float64(sin(k) * tan(k))));
	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(1.0 + (Float64(k / t_m) ^ 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[t$95$m, 1.25e-63], N[(2.0 / N[(N[Power[N[(N[(k / l), $MachinePrecision] * N[Sqrt[t$95$m], $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision] * N[(N[Sin[k], $MachinePrecision] * N[Tan[k], $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[(1.0 + N[Power[N[(k / t$95$m), $MachinePrecision], 2.0], $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.25 \cdot 10^{-63}:\\
\;\;\;\;\frac{2}{{\left(\frac{k}{\ell} \cdot \sqrt{t\_m}\right)}^{2} \cdot \left(\sin k \cdot \tan k\right)}\\

\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(1 + {\left(\frac{k}{t\_m}\right)}^{2}\right)\right)\right)}\\


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

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

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

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

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

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

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

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

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

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

    if 1.25e-63 < t

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\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)} \]
    8. Step-by-step derivation
      1. *-commutative92.4%

        \[\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)} \]
    9. Simplified92.4%

      \[\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. Add Preprocessing

Alternative 3: 87.6% accurate, 0.7× speedup?

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

\mathbf{elif}\;t\_m \leq 4.4 \cdot 10^{+105}:\\
\;\;\;\;\left(2 \cdot {\left(\frac{{t\_m}^{1.5} \cdot \mathsf{hypot}\left(1, \mathsf{hypot}\left(1, \frac{k}{t\_m}\right)\right)}{\ell}\right)}^{-2}\right) \cdot \frac{1}{t\_2}\\

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


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

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

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

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

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

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

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

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

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

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

    if 1e-59 < t < 4.40000000000000014e105

    1. Initial program 78.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. Simplified78.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. Applied egg-rr61.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 4.40000000000000014e105 < t

    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. Taylor expanded in k around 0 60.9%

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 4: 87.8% accurate, 0.7× speedup?

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

\mathbf{elif}\;t\_m \leq 1.05 \cdot 10^{+108}:\\
\;\;\;\;\frac{\frac{2}{{\left({t\_m}^{1.5} \cdot \frac{\mathsf{hypot}\left(1, \mathsf{hypot}\left(1, \frac{k}{t\_m}\right)\right)}{\ell}\right)}^{2}}}{t\_2}\\

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


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

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

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

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

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

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

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

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

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

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

    if 2.5000000000000001e-60 < t < 1.05000000000000005e108

    1. Initial program 78.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. Simplified78.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. Applied egg-rr61.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 1.05000000000000005e108 < t

    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. Taylor expanded in k around 0 60.9%

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 5: 89.6% 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}\;t\_m \leq 9.5 \cdot 10^{-60}:\\ \;\;\;\;\frac{2}{{\left(\frac{k}{\ell} \cdot \sqrt{t\_m}\right)}^{2} \cdot \left(\sin k \cdot \tan k\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{1}{\sin k \cdot \frac{\tan k}{2 \cdot {\left({t\_m}^{1.5} \cdot \frac{\mathsf{hypot}\left(1, \mathsf{hypot}\left(1, \frac{k}{t\_m}\right)\right)}{\ell}\right)}^{-2}}}\\ \end{array} \end{array} \]
t\_m = (fabs.f64 t)
t\_s = (copysign.f64 #s(literal 1 binary64) t)
(FPCore (t_s t_m l k)
 :precision binary64
 (*
  t_s
  (if (<= t_m 9.5e-60)
    (/ 2.0 (* (pow (* (/ k l) (sqrt t_m)) 2.0) (* (sin k) (tan k))))
    (/
     1.0
     (*
      (sin k)
      (/
       (tan k)
       (*
        2.0
        (pow
         (* (pow t_m 1.5) (/ (hypot 1.0 (hypot 1.0 (/ k t_m))) 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 (t_m <= 9.5e-60) {
		tmp = 2.0 / (pow(((k / l) * sqrt(t_m)), 2.0) * (sin(k) * tan(k)));
	} else {
		tmp = 1.0 / (sin(k) * (tan(k) / (2.0 * pow((pow(t_m, 1.5) * (hypot(1.0, hypot(1.0, (k / t_m))) / 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 (t_m <= 9.5e-60) {
		tmp = 2.0 / (Math.pow(((k / l) * Math.sqrt(t_m)), 2.0) * (Math.sin(k) * Math.tan(k)));
	} else {
		tmp = 1.0 / (Math.sin(k) * (Math.tan(k) / (2.0 * Math.pow((Math.pow(t_m, 1.5) * (Math.hypot(1.0, Math.hypot(1.0, (k / t_m))) / 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 t_m <= 9.5e-60:
		tmp = 2.0 / (math.pow(((k / l) * math.sqrt(t_m)), 2.0) * (math.sin(k) * math.tan(k)))
	else:
		tmp = 1.0 / (math.sin(k) * (math.tan(k) / (2.0 * math.pow((math.pow(t_m, 1.5) * (math.hypot(1.0, math.hypot(1.0, (k / t_m))) / 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 (t_m <= 9.5e-60)
		tmp = Float64(2.0 / Float64((Float64(Float64(k / l) * sqrt(t_m)) ^ 2.0) * Float64(sin(k) * tan(k))));
	else
		tmp = Float64(1.0 / Float64(sin(k) * Float64(tan(k) / Float64(2.0 * (Float64((t_m ^ 1.5) * Float64(hypot(1.0, hypot(1.0, Float64(k / t_m))) / 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 (t_m <= 9.5e-60)
		tmp = 2.0 / ((((k / l) * sqrt(t_m)) ^ 2.0) * (sin(k) * tan(k)));
	else
		tmp = 1.0 / (sin(k) * (tan(k) / (2.0 * (((t_m ^ 1.5) * (hypot(1.0, hypot(1.0, (k / t_m))) / 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[t$95$m, 9.5e-60], N[(2.0 / N[(N[Power[N[(N[(k / l), $MachinePrecision] * N[Sqrt[t$95$m], $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision] * N[(N[Sin[k], $MachinePrecision] * N[Tan[k], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(1.0 / N[(N[Sin[k], $MachinePrecision] * N[(N[Tan[k], $MachinePrecision] / N[(2.0 * N[Power[N[(N[Power[t$95$m, 1.5], $MachinePrecision] * N[(N[Sqrt[1.0 ^ 2 + N[Sqrt[1.0 ^ 2 + N[(k / t$95$m), $MachinePrecision] ^ 2], $MachinePrecision] ^ 2], $MachinePrecision] / l), $MachinePrecision]), $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)

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

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


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

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

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

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

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

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

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

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

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

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

    if 9.49999999999999958e-60 < t

    1. Initial program 69.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. Simplified69.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. Applied egg-rr60.8%

      \[\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}}} \]
    5. Step-by-step derivation
      1. associate-*r*60.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{\frac{1}{\sin k \cdot \frac{\tan k}{2 \cdot {\left({t}^{1.5} \cdot \frac{\mathsf{hypot}\left(1, \mathsf{hypot}\left(1, \frac{k}{t}\right)\right)}{\ell}\right)}^{-2}}}} \]
  3. Recombined 2 regimes into one program.
  4. Add Preprocessing

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

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

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


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

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

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

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

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

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

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

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

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

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

    if 1.85000000000000006e-63 < t < 1.32000000000000002e116

    1. Initial program 74.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. Simplified74.6%

      \[\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*74.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*79.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+79.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-eval79.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*79.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}}} \]
    6. Step-by-step derivation
      1. associate-/l*82.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*82.6%

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

      \[\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}}} \]
    8. Step-by-step derivation
      1. associate-*l/80.6%

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

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

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

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

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

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

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

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

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

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

    if 1.32000000000000002e116 < t

    1. Initial program 64.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. Simplified64.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 k around 0 64.8%

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 7: 87.4% accurate, 0.8× speedup?

\[\begin{array}{l} t\_m = \left|t\right| \\ t\_s = \mathsf{copysign}\left(1, t\right) \\ t\_s \cdot \begin{array}{l} \mathbf{if}\;t\_m \leq 1.95 \cdot 10^{-63}:\\ \;\;\;\;\frac{2}{{\left(\frac{k}{\ell} \cdot \sqrt{t\_m}\right)}^{2} \cdot \left(\sin k \cdot \tan k\right)}\\ \mathbf{elif}\;t\_m \leq 1.32 \cdot 10^{+116}:\\ \;\;\;\;\frac{2}{\frac{{\left(t\_m \cdot \sqrt[3]{\sin k \cdot \left(\tan k \cdot \frac{2 + {\left(\frac{k}{t\_m}\right)}^{2}}{\ell}\right)}\right)}^{3}}{\ell}}\\ \mathbf{else}:\\ \;\;\;\;\frac{2}{\left(2 \cdot \tan k\right) \cdot \left(\sin k \cdot {\left(\frac{{t\_m}^{1.5}}{\ell}\right)}^{2}\right)}\\ \end{array} \end{array} \]
t\_m = (fabs.f64 t)
t\_s = (copysign.f64 #s(literal 1 binary64) t)
(FPCore (t_s t_m l k)
 :precision binary64
 (*
  t_s
  (if (<= t_m 1.95e-63)
    (/ 2.0 (* (pow (* (/ k l) (sqrt t_m)) 2.0) (* (sin k) (tan k))))
    (if (<= t_m 1.32e+116)
      (/
       2.0
       (/
        (pow
         (*
          t_m
          (cbrt (* (sin k) (* (tan k) (/ (+ 2.0 (pow (/ k t_m) 2.0)) l)))))
         3.0)
        l))
      (/ 2.0 (* (* 2.0 (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 tmp;
	if (t_m <= 1.95e-63) {
		tmp = 2.0 / (pow(((k / l) * sqrt(t_m)), 2.0) * (sin(k) * tan(k)));
	} else if (t_m <= 1.32e+116) {
		tmp = 2.0 / (pow((t_m * cbrt((sin(k) * (tan(k) * ((2.0 + pow((k / t_m), 2.0)) / l))))), 3.0) / l);
	} else {
		tmp = 2.0 / ((2.0 * tan(k)) * (sin(k) * pow((pow(t_m, 1.5) / 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 (t_m <= 1.95e-63) {
		tmp = 2.0 / (Math.pow(((k / l) * Math.sqrt(t_m)), 2.0) * (Math.sin(k) * Math.tan(k)));
	} else if (t_m <= 1.32e+116) {
		tmp = 2.0 / (Math.pow((t_m * Math.cbrt((Math.sin(k) * (Math.tan(k) * ((2.0 + Math.pow((k / t_m), 2.0)) / l))))), 3.0) / l);
	} else {
		tmp = 2.0 / ((2.0 * 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)
	tmp = 0.0
	if (t_m <= 1.95e-63)
		tmp = Float64(2.0 / Float64((Float64(Float64(k / l) * sqrt(t_m)) ^ 2.0) * Float64(sin(k) * tan(k))));
	elseif (t_m <= 1.32e+116)
		tmp = Float64(2.0 / Float64((Float64(t_m * cbrt(Float64(sin(k) * Float64(tan(k) * Float64(Float64(2.0 + (Float64(k / t_m) ^ 2.0)) / l))))) ^ 3.0) / l));
	else
		tmp = Float64(2.0 / Float64(Float64(2.0 * tan(k)) * Float64(sin(k) * (Float64((t_m ^ 1.5) / 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[t$95$m, 1.95e-63], N[(2.0 / N[(N[Power[N[(N[(k / l), $MachinePrecision] * N[Sqrt[t$95$m], $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision] * N[(N[Sin[k], $MachinePrecision] * N[Tan[k], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$m, 1.32e+116], N[(2.0 / N[(N[Power[N[(t$95$m * N[Power[N[(N[Sin[k], $MachinePrecision] * N[(N[Tan[k], $MachinePrecision] * N[(N[(2.0 + N[Power[N[(k / t$95$m), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 1/3], $MachinePrecision]), $MachinePrecision], 3.0], $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision], N[(2.0 / N[(N[(2.0 * N[Tan[k], $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)

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

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

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


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

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

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

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

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

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

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

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

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

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

    if 1.95000000000000011e-63 < t < 1.32000000000000002e116

    1. Initial program 74.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. Simplified74.6%

      \[\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*74.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*79.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+79.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-eval79.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*79.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}}} \]
    6. Step-by-step derivation
      1. associate-/l*82.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*82.6%

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

      \[\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}}} \]
    8. Step-by-step derivation
      1. associate-*l/80.6%

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

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

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

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

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

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

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

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

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

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

    if 1.32000000000000002e116 < t

    1. Initial program 64.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. Simplified64.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 k around 0 64.8%

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

        \[\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 2\right)} \]
      2. pow264.8%

        \[\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 2\right)} \]
      3. sqrt-div64.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 2\right)} \]
      4. sqrt-pow183.7%

        \[\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 2\right)} \]
      5. metadata-eval83.7%

        \[\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 2\right)} \]
      6. sqrt-prod52.7%

        \[\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 2\right)} \]
      7. add-sqr-sqrt94.6%

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

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

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

Alternative 8: 86.9% 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.95 \cdot 10^{-63}:\\ \;\;\;\;\frac{2}{{\left(\frac{k}{\ell} \cdot \sqrt{t\_m}\right)}^{2} \cdot \left(\sin k \cdot \tan k\right)}\\ \mathbf{elif}\;t\_m \leq 1.95 \cdot 10^{+100}:\\ \;\;\;\;\frac{2}{\left(\sin k \cdot \left(\tan k \cdot \frac{2 + {\left(\frac{k}{t\_m}\right)}^{2}}{\ell}\right)\right) \cdot \frac{{t\_m}^{3}}{\ell}}\\ \mathbf{else}:\\ \;\;\;\;\frac{2}{\left(2 \cdot \tan k\right) \cdot \left(\sin k \cdot {\left(\frac{{t\_m}^{1.5}}{\ell}\right)}^{2}\right)}\\ \end{array} \end{array} \]
t\_m = (fabs.f64 t)
t\_s = (copysign.f64 #s(literal 1 binary64) t)
(FPCore (t_s t_m l k)
 :precision binary64
 (*
  t_s
  (if (<= t_m 1.95e-63)
    (/ 2.0 (* (pow (* (/ k l) (sqrt t_m)) 2.0) (* (sin k) (tan k))))
    (if (<= t_m 1.95e+100)
      (/
       2.0
       (*
        (* (sin k) (* (tan k) (/ (+ 2.0 (pow (/ k t_m) 2.0)) l)))
        (/ (pow t_m 3.0) l)))
      (/ 2.0 (* (* 2.0 (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 tmp;
	if (t_m <= 1.95e-63) {
		tmp = 2.0 / (pow(((k / l) * sqrt(t_m)), 2.0) * (sin(k) * tan(k)));
	} else if (t_m <= 1.95e+100) {
		tmp = 2.0 / ((sin(k) * (tan(k) * ((2.0 + pow((k / t_m), 2.0)) / l))) * (pow(t_m, 3.0) / l));
	} else {
		tmp = 2.0 / ((2.0 * 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) :: tmp
    if (t_m <= 1.95d-63) then
        tmp = 2.0d0 / ((((k / l) * sqrt(t_m)) ** 2.0d0) * (sin(k) * tan(k)))
    else if (t_m <= 1.95d+100) then
        tmp = 2.0d0 / ((sin(k) * (tan(k) * ((2.0d0 + ((k / t_m) ** 2.0d0)) / l))) * ((t_m ** 3.0d0) / l))
    else
        tmp = 2.0d0 / ((2.0d0 * 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 tmp;
	if (t_m <= 1.95e-63) {
		tmp = 2.0 / (Math.pow(((k / l) * Math.sqrt(t_m)), 2.0) * (Math.sin(k) * Math.tan(k)));
	} else if (t_m <= 1.95e+100) {
		tmp = 2.0 / ((Math.sin(k) * (Math.tan(k) * ((2.0 + Math.pow((k / t_m), 2.0)) / l))) * (Math.pow(t_m, 3.0) / l));
	} else {
		tmp = 2.0 / ((2.0 * 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):
	tmp = 0
	if t_m <= 1.95e-63:
		tmp = 2.0 / (math.pow(((k / l) * math.sqrt(t_m)), 2.0) * (math.sin(k) * math.tan(k)))
	elif t_m <= 1.95e+100:
		tmp = 2.0 / ((math.sin(k) * (math.tan(k) * ((2.0 + math.pow((k / t_m), 2.0)) / l))) * (math.pow(t_m, 3.0) / l))
	else:
		tmp = 2.0 / ((2.0 * 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)
	tmp = 0.0
	if (t_m <= 1.95e-63)
		tmp = Float64(2.0 / Float64((Float64(Float64(k / l) * sqrt(t_m)) ^ 2.0) * Float64(sin(k) * tan(k))));
	elseif (t_m <= 1.95e+100)
		tmp = Float64(2.0 / Float64(Float64(sin(k) * Float64(tan(k) * Float64(Float64(2.0 + (Float64(k / t_m) ^ 2.0)) / l))) * Float64((t_m ^ 3.0) / l)));
	else
		tmp = Float64(2.0 / Float64(Float64(2.0 * 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)
	tmp = 0.0;
	if (t_m <= 1.95e-63)
		tmp = 2.0 / ((((k / l) * sqrt(t_m)) ^ 2.0) * (sin(k) * tan(k)));
	elseif (t_m <= 1.95e+100)
		tmp = 2.0 / ((sin(k) * (tan(k) * ((2.0 + ((k / t_m) ^ 2.0)) / l))) * ((t_m ^ 3.0) / l));
	else
		tmp = 2.0 / ((2.0 * 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_] := N[(t$95$s * If[LessEqual[t$95$m, 1.95e-63], N[(2.0 / N[(N[Power[N[(N[(k / l), $MachinePrecision] * N[Sqrt[t$95$m], $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision] * N[(N[Sin[k], $MachinePrecision] * N[Tan[k], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$m, 1.95e+100], N[(2.0 / N[(N[(N[Sin[k], $MachinePrecision] * N[(N[Tan[k], $MachinePrecision] * N[(N[(2.0 + N[Power[N[(k / t$95$m), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(N[Power[t$95$m, 3.0], $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(2.0 / N[(N[(2.0 * N[Tan[k], $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)

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

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

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


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

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

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

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

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

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

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

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

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

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

    if 1.95000000000000011e-63 < t < 1.95e100

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

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

        \[\leadsto \frac{2}{\color{blue}{\frac{{t}^{3}}{\ell \cdot \ell} \cdot \left(\sin k \cdot \left(\tan k \cdot \left(1 + \left(1 + {\left(\frac{k}{t}\right)}^{2}\right)\right)\right)\right)}} \]
      2. associate-/r*85.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+85.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-eval85.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*85.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. associate-*l/86.4%

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

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

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

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

      \[\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}}} \]
    8. Step-by-step derivation
      1. associate-/l*94.2%

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

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

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

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

    if 1.95e100 < t

    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. Taylor expanded in k around 0 60.9%

      \[\leadsto \frac{2}{\left(\frac{{t}^{3}}{\ell \cdot \ell} \cdot \sin k\right) \cdot \left(\tan k \cdot \color{blue}{2}\right)} \]
    5. Step-by-step derivation
      1. add-sqr-sqrt60.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 2\right)} \]
      2. pow260.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 2\right)} \]
      3. sqrt-div60.9%

        \[\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 2\right)} \]
      4. sqrt-pow180.7%

        \[\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 2\right)} \]
      5. metadata-eval80.7%

        \[\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 2\right)} \]
      6. sqrt-prod52.5%

        \[\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 2\right)} \]
      7. add-sqr-sqrt92.7%

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

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

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

Alternative 9: 84.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.16 \cdot 10^{+89}:\\ \;\;\;\;\frac{2}{{\left(\frac{k}{\ell} \cdot \sqrt{t\_m}\right)}^{2} \cdot \left(\sin k \cdot \tan k\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{2}{\left(2 \cdot \tan k\right) \cdot \left(\sin k \cdot {\left(\frac{{t\_m}^{1.5}}{\ell}\right)}^{2}\right)}\\ \end{array} \end{array} \]
t\_m = (fabs.f64 t)
t\_s = (copysign.f64 #s(literal 1 binary64) t)
(FPCore (t_s t_m l k)
 :precision binary64
 (*
  t_s
  (if (<= t_m 1.16e+89)
    (/ 2.0 (* (pow (* (/ k l) (sqrt t_m)) 2.0) (* (sin k) (tan k))))
    (/ 2.0 (* (* 2.0 (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 tmp;
	if (t_m <= 1.16e+89) {
		tmp = 2.0 / (pow(((k / l) * sqrt(t_m)), 2.0) * (sin(k) * tan(k)));
	} else {
		tmp = 2.0 / ((2.0 * 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) :: tmp
    if (t_m <= 1.16d+89) then
        tmp = 2.0d0 / ((((k / l) * sqrt(t_m)) ** 2.0d0) * (sin(k) * tan(k)))
    else
        tmp = 2.0d0 / ((2.0d0 * 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 tmp;
	if (t_m <= 1.16e+89) {
		tmp = 2.0 / (Math.pow(((k / l) * Math.sqrt(t_m)), 2.0) * (Math.sin(k) * Math.tan(k)));
	} else {
		tmp = 2.0 / ((2.0 * 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):
	tmp = 0
	if t_m <= 1.16e+89:
		tmp = 2.0 / (math.pow(((k / l) * math.sqrt(t_m)), 2.0) * (math.sin(k) * math.tan(k)))
	else:
		tmp = 2.0 / ((2.0 * 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)
	tmp = 0.0
	if (t_m <= 1.16e+89)
		tmp = Float64(2.0 / Float64((Float64(Float64(k / l) * sqrt(t_m)) ^ 2.0) * Float64(sin(k) * tan(k))));
	else
		tmp = Float64(2.0 / Float64(Float64(2.0 * 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)
	tmp = 0.0;
	if (t_m <= 1.16e+89)
		tmp = 2.0 / ((((k / l) * sqrt(t_m)) ^ 2.0) * (sin(k) * tan(k)));
	else
		tmp = 2.0 / ((2.0 * 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_] := N[(t$95$s * If[LessEqual[t$95$m, 1.16e+89], N[(2.0 / N[(N[Power[N[(N[(k / l), $MachinePrecision] * N[Sqrt[t$95$m], $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision] * N[(N[Sin[k], $MachinePrecision] * N[Tan[k], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(2.0 / N[(N[(2.0 * N[Tan[k], $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)

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

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


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

    1. Initial program 54.4%

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

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

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

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

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

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

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

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

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

    if 1.16e89 < t

    1. Initial program 64.5%

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

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

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

        \[\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 2\right)} \]
      2. pow264.5%

        \[\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 2\right)} \]
      3. sqrt-div64.5%

        \[\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 2\right)} \]
      4. sqrt-pow182.4%

        \[\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 2\right)} \]
      5. metadata-eval82.4%

        \[\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 2\right)} \]
      6. sqrt-prod54.5%

        \[\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 2\right)} \]
      7. add-sqr-sqrt93.4%

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

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

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

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

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

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


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

    1. Initial program 58.4%

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

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

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

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

    if 1.3e-28 < k

    1. Initial program 50.2%

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

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

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

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

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

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

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

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

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

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

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

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


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

    1. Initial program 58.4%

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

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

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

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

    if 7.5000000000000003e-28 < k

    1. Initial program 50.2%

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

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

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

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

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

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

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

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

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

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

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

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


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

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

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

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

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

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

    if 2.44999999999999997e-67 < t

    1. Initial program 69.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. Simplified69.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. Applied egg-rr61.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}}} \]
    5. Taylor expanded in k around 0 80.4%

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

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

Alternative 13: 64.8% 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 2.12 \cdot 10^{-63}:\\ \;\;\;\;\frac{2}{{\left(\sqrt{t\_m} \cdot \frac{{k}^{2}}{\ell}\right)}^{2}}\\ \mathbf{else}:\\ \;\;\;\;\frac{2}{\frac{{t\_m}^{3} \cdot \left(\sin k \cdot \frac{2 \cdot k}{\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 2.12e-63)
    (/ 2.0 (pow (* (sqrt t_m) (/ (pow k 2.0) l)) 2.0))
    (/ 2.0 (/ (* (pow t_m 3.0) (* (sin k) (/ (* 2.0 k) 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 <= 2.12e-63) {
		tmp = 2.0 / pow((sqrt(t_m) * (pow(k, 2.0) / l)), 2.0);
	} else {
		tmp = 2.0 / ((pow(t_m, 3.0) * (sin(k) * ((2.0 * k) / 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 <= 2.12d-63) then
        tmp = 2.0d0 / ((sqrt(t_m) * ((k ** 2.0d0) / l)) ** 2.0d0)
    else
        tmp = 2.0d0 / (((t_m ** 3.0d0) * (sin(k) * ((2.0d0 * k) / 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 <= 2.12e-63) {
		tmp = 2.0 / Math.pow((Math.sqrt(t_m) * (Math.pow(k, 2.0) / l)), 2.0);
	} else {
		tmp = 2.0 / ((Math.pow(t_m, 3.0) * (Math.sin(k) * ((2.0 * k) / 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 <= 2.12e-63:
		tmp = 2.0 / math.pow((math.sqrt(t_m) * (math.pow(k, 2.0) / l)), 2.0)
	else:
		tmp = 2.0 / ((math.pow(t_m, 3.0) * (math.sin(k) * ((2.0 * k) / 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 <= 2.12e-63)
		tmp = Float64(2.0 / (Float64(sqrt(t_m) * Float64((k ^ 2.0) / l)) ^ 2.0));
	else
		tmp = Float64(2.0 / Float64(Float64((t_m ^ 3.0) * Float64(sin(k) * Float64(Float64(2.0 * k) / 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 <= 2.12e-63)
		tmp = 2.0 / ((sqrt(t_m) * ((k ^ 2.0) / l)) ^ 2.0);
	else
		tmp = 2.0 / (((t_m ^ 3.0) * (sin(k) * ((2.0 * k) / 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, 2.12e-63], N[(2.0 / N[Power[N[(N[Sqrt[t$95$m], $MachinePrecision] * N[(N[Power[k, 2.0], $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision], N[(2.0 / N[(N[(N[Power[t$95$m, 3.0], $MachinePrecision] * N[(N[Sin[k], $MachinePrecision] * N[(N[(2.0 * k), $MachinePrecision] / l), $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}\;t\_m \leq 2.12 \cdot 10^{-63}:\\
\;\;\;\;\frac{2}{{\left(\sqrt{t\_m} \cdot \frac{{k}^{2}}{\ell}\right)}^{2}}\\

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


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

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

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

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

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

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

    if 2.12000000000000008e-63 < t

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

      \[\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*65.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*69.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+69.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-eval69.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*69.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. associate-*l/70.2%

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

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

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

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

      \[\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}}} \]
    8. Step-by-step derivation
      1. associate-*l/70.1%

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

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

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

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

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

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

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

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

Alternative 14: 59.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 5 \cdot 10^{-156}:\\ \;\;\;\;\frac{2}{\left(\sin k \cdot \frac{\frac{{t\_m}^{3}}{\ell}}{\ell}\right) \cdot \left(2 \cdot k\right)}\\ \mathbf{elif}\;k \leq 6.2 \cdot 10^{-28}:\\ \;\;\;\;\frac{2}{\frac{{t\_m}^{2} \cdot \frac{t\_m}{\ell}}{\ell} \cdot \left(2 \cdot \left(k \cdot k\right)\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{2}{\frac{t\_m \cdot {k}^{4}}{\cos k \cdot \left(\ell \cdot \ell\right)}}\\ \end{array} \end{array} \]
t\_m = (fabs.f64 t)
t\_s = (copysign.f64 #s(literal 1 binary64) t)
(FPCore (t_s t_m l k)
 :precision binary64
 (*
  t_s
  (if (<= k 5e-156)
    (/ 2.0 (* (* (sin k) (/ (/ (pow t_m 3.0) l) l)) (* 2.0 k)))
    (if (<= k 6.2e-28)
      (/ 2.0 (* (/ (* (pow t_m 2.0) (/ t_m l)) l) (* 2.0 (* k k))))
      (/ 2.0 (/ (* t_m (pow k 4.0)) (* (cos k) (* 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 <= 5e-156) {
		tmp = 2.0 / ((sin(k) * ((pow(t_m, 3.0) / l) / l)) * (2.0 * k));
	} else if (k <= 6.2e-28) {
		tmp = 2.0 / (((pow(t_m, 2.0) * (t_m / l)) / l) * (2.0 * (k * k)));
	} else {
		tmp = 2.0 / ((t_m * pow(k, 4.0)) / (cos(k) * (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 <= 5d-156) then
        tmp = 2.0d0 / ((sin(k) * (((t_m ** 3.0d0) / l) / l)) * (2.0d0 * k))
    else if (k <= 6.2d-28) then
        tmp = 2.0d0 / ((((t_m ** 2.0d0) * (t_m / l)) / l) * (2.0d0 * (k * k)))
    else
        tmp = 2.0d0 / ((t_m * (k ** 4.0d0)) / (cos(k) * (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 <= 5e-156) {
		tmp = 2.0 / ((Math.sin(k) * ((Math.pow(t_m, 3.0) / l) / l)) * (2.0 * k));
	} else if (k <= 6.2e-28) {
		tmp = 2.0 / (((Math.pow(t_m, 2.0) * (t_m / l)) / l) * (2.0 * (k * k)));
	} else {
		tmp = 2.0 / ((t_m * Math.pow(k, 4.0)) / (Math.cos(k) * (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 <= 5e-156:
		tmp = 2.0 / ((math.sin(k) * ((math.pow(t_m, 3.0) / l) / l)) * (2.0 * k))
	elif k <= 6.2e-28:
		tmp = 2.0 / (((math.pow(t_m, 2.0) * (t_m / l)) / l) * (2.0 * (k * k)))
	else:
		tmp = 2.0 / ((t_m * math.pow(k, 4.0)) / (math.cos(k) * (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 <= 5e-156)
		tmp = Float64(2.0 / Float64(Float64(sin(k) * Float64(Float64((t_m ^ 3.0) / l) / l)) * Float64(2.0 * k)));
	elseif (k <= 6.2e-28)
		tmp = Float64(2.0 / Float64(Float64(Float64((t_m ^ 2.0) * Float64(t_m / l)) / l) * Float64(2.0 * Float64(k * k))));
	else
		tmp = Float64(2.0 / Float64(Float64(t_m * (k ^ 4.0)) / Float64(cos(k) * Float64(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 <= 5e-156)
		tmp = 2.0 / ((sin(k) * (((t_m ^ 3.0) / l) / l)) * (2.0 * k));
	elseif (k <= 6.2e-28)
		tmp = 2.0 / ((((t_m ^ 2.0) * (t_m / l)) / l) * (2.0 * (k * k)));
	else
		tmp = 2.0 / ((t_m * (k ^ 4.0)) / (cos(k) * (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[k, 5e-156], N[(2.0 / N[(N[(N[Sin[k], $MachinePrecision] * N[(N[(N[Power[t$95$m, 3.0], $MachinePrecision] / l), $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision] * N[(2.0 * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[k, 6.2e-28], N[(2.0 / N[(N[(N[(N[Power[t$95$m, 2.0], $MachinePrecision] * N[(t$95$m / l), $MachinePrecision]), $MachinePrecision] / l), $MachinePrecision] * N[(2.0 * N[(k * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(2.0 / N[(N[(t$95$m * N[Power[k, 4.0], $MachinePrecision]), $MachinePrecision] / N[(N[Cos[k], $MachinePrecision] * N[(l * l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]), $MachinePrecision]
\begin{array}{l}
t\_m = \left|t\right|
\\
t\_s = \mathsf{copysign}\left(1, t\right)

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

\mathbf{elif}\;k \leq 6.2 \cdot 10^{-28}:\\
\;\;\;\;\frac{2}{\frac{{t\_m}^{2} \cdot \frac{t\_m}{\ell}}{\ell} \cdot \left(2 \cdot \left(k \cdot k\right)\right)}\\

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


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

    1. Initial program 57.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 5.00000000000000007e-156 < k < 6.19999999999999984e-28

    1. Initial program 63.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. Simplified71.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 76.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. unpow276.2%

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

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

        \[\leadsto \frac{2}{\frac{\frac{\color{blue}{\left(t \cdot t\right) \cdot t}}{\ell}}{\ell} \cdot \left(2 \cdot \left(k \cdot k\right)\right)} \]
      2. *-un-lft-identity76.2%

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

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

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

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

    if 6.19999999999999984e-28 < k

    1. Initial program 50.2%

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

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

      \[\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. associate-*r*68.9%

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

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

      \[\leadsto \frac{2}{\frac{\color{blue}{{k}^{4} \cdot t}}{{\ell}^{2} \cdot \cos k}} \]
    8. Step-by-step derivation
      1. unpow259.3%

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

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

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

Alternative 15: 59.1% 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 7.5 \cdot 10^{-28}:\\ \;\;\;\;\frac{2}{\frac{{t\_m}^{3} \cdot \left(\sin k \cdot \frac{2 \cdot k}{\ell}\right)}{\ell}}\\ \mathbf{else}:\\ \;\;\;\;\frac{2}{\frac{t\_m \cdot {k}^{4}}{\cos k \cdot \left(\ell \cdot \ell\right)}}\\ \end{array} \end{array} \]
t\_m = (fabs.f64 t)
t\_s = (copysign.f64 #s(literal 1 binary64) t)
(FPCore (t_s t_m l k)
 :precision binary64
 (*
  t_s
  (if (<= k 7.5e-28)
    (/ 2.0 (/ (* (pow t_m 3.0) (* (sin k) (/ (* 2.0 k) l))) l))
    (/ 2.0 (/ (* t_m (pow k 4.0)) (* (cos k) (* 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 <= 7.5e-28) {
		tmp = 2.0 / ((pow(t_m, 3.0) * (sin(k) * ((2.0 * k) / l))) / l);
	} else {
		tmp = 2.0 / ((t_m * pow(k, 4.0)) / (cos(k) * (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 <= 7.5d-28) then
        tmp = 2.0d0 / (((t_m ** 3.0d0) * (sin(k) * ((2.0d0 * k) / l))) / l)
    else
        tmp = 2.0d0 / ((t_m * (k ** 4.0d0)) / (cos(k) * (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 <= 7.5e-28) {
		tmp = 2.0 / ((Math.pow(t_m, 3.0) * (Math.sin(k) * ((2.0 * k) / l))) / l);
	} else {
		tmp = 2.0 / ((t_m * Math.pow(k, 4.0)) / (Math.cos(k) * (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 <= 7.5e-28:
		tmp = 2.0 / ((math.pow(t_m, 3.0) * (math.sin(k) * ((2.0 * k) / l))) / l)
	else:
		tmp = 2.0 / ((t_m * math.pow(k, 4.0)) / (math.cos(k) * (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 <= 7.5e-28)
		tmp = Float64(2.0 / Float64(Float64((t_m ^ 3.0) * Float64(sin(k) * Float64(Float64(2.0 * k) / l))) / l));
	else
		tmp = Float64(2.0 / Float64(Float64(t_m * (k ^ 4.0)) / Float64(cos(k) * Float64(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 <= 7.5e-28)
		tmp = 2.0 / (((t_m ^ 3.0) * (sin(k) * ((2.0 * k) / l))) / l);
	else
		tmp = 2.0 / ((t_m * (k ^ 4.0)) / (cos(k) * (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[k, 7.5e-28], N[(2.0 / N[(N[(N[Power[t$95$m, 3.0], $MachinePrecision] * N[(N[Sin[k], $MachinePrecision] * N[(N[(2.0 * k), $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision], N[(2.0 / N[(N[(t$95$m * N[Power[k, 4.0], $MachinePrecision]), $MachinePrecision] / N[(N[Cos[k], $MachinePrecision] * N[(l * l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]), $MachinePrecision]
\begin{array}{l}
t\_m = \left|t\right|
\\
t\_s = \mathsf{copysign}\left(1, t\right)

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

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


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

    1. Initial program 58.4%

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

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

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

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

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

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

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

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

      \[\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*63.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*63.6%

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

      \[\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}}} \]
    8. Step-by-step derivation
      1. associate-*l/63.7%

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

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

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

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

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

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

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

    if 7.5000000000000003e-28 < k

    1. Initial program 50.2%

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

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

      \[\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. associate-*r*68.9%

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

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

      \[\leadsto \frac{2}{\frac{\color{blue}{{k}^{4} \cdot t}}{{\ell}^{2} \cdot \cos k}} \]
    8. Step-by-step derivation
      1. unpow259.3%

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

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

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

Alternative 16: 58.0% 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 6.2 \cdot 10^{-28}:\\ \;\;\;\;\frac{2}{\frac{{t\_m}^{2} \cdot \frac{t\_m}{\ell}}{\ell} \cdot \left(2 \cdot \left(k \cdot k\right)\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{2}{\frac{t\_m \cdot {k}^{4}}{\cos k \cdot \left(\ell \cdot \ell\right)}}\\ \end{array} \end{array} \]
t\_m = (fabs.f64 t)
t\_s = (copysign.f64 #s(literal 1 binary64) t)
(FPCore (t_s t_m l k)
 :precision binary64
 (*
  t_s
  (if (<= k 6.2e-28)
    (/ 2.0 (* (/ (* (pow t_m 2.0) (/ t_m l)) l) (* 2.0 (* k k))))
    (/ 2.0 (/ (* t_m (pow k 4.0)) (* (cos k) (* 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 <= 6.2e-28) {
		tmp = 2.0 / (((pow(t_m, 2.0) * (t_m / l)) / l) * (2.0 * (k * k)));
	} else {
		tmp = 2.0 / ((t_m * pow(k, 4.0)) / (cos(k) * (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 <= 6.2d-28) then
        tmp = 2.0d0 / ((((t_m ** 2.0d0) * (t_m / l)) / l) * (2.0d0 * (k * k)))
    else
        tmp = 2.0d0 / ((t_m * (k ** 4.0d0)) / (cos(k) * (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 <= 6.2e-28) {
		tmp = 2.0 / (((Math.pow(t_m, 2.0) * (t_m / l)) / l) * (2.0 * (k * k)));
	} else {
		tmp = 2.0 / ((t_m * Math.pow(k, 4.0)) / (Math.cos(k) * (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 <= 6.2e-28:
		tmp = 2.0 / (((math.pow(t_m, 2.0) * (t_m / l)) / l) * (2.0 * (k * k)))
	else:
		tmp = 2.0 / ((t_m * math.pow(k, 4.0)) / (math.cos(k) * (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 <= 6.2e-28)
		tmp = Float64(2.0 / Float64(Float64(Float64((t_m ^ 2.0) * Float64(t_m / l)) / l) * Float64(2.0 * Float64(k * k))));
	else
		tmp = Float64(2.0 / Float64(Float64(t_m * (k ^ 4.0)) / Float64(cos(k) * Float64(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 <= 6.2e-28)
		tmp = 2.0 / ((((t_m ^ 2.0) * (t_m / l)) / l) * (2.0 * (k * k)));
	else
		tmp = 2.0 / ((t_m * (k ^ 4.0)) / (cos(k) * (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[k, 6.2e-28], N[(2.0 / N[(N[(N[(N[Power[t$95$m, 2.0], $MachinePrecision] * N[(t$95$m / l), $MachinePrecision]), $MachinePrecision] / l), $MachinePrecision] * N[(2.0 * N[(k * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(2.0 / N[(N[(t$95$m * N[Power[k, 4.0], $MachinePrecision]), $MachinePrecision] / N[(N[Cos[k], $MachinePrecision] * N[(l * l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]), $MachinePrecision]
\begin{array}{l}
t\_m = \left|t\right|
\\
t\_s = \mathsf{copysign}\left(1, t\right)

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

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


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

    1. Initial program 58.4%

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

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

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

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

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

        \[\leadsto \frac{2}{\frac{\frac{\color{blue}{\left(t \cdot t\right) \cdot t}}{\ell}}{\ell} \cdot \left(2 \cdot \left(k \cdot k\right)\right)} \]
      2. *-un-lft-identity59.1%

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

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

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

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

    if 6.19999999999999984e-28 < k

    1. Initial program 50.2%

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

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

      \[\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. associate-*r*68.9%

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

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

      \[\leadsto \frac{2}{\frac{\color{blue}{{k}^{4} \cdot t}}{{\ell}^{2} \cdot \cos k}} \]
    8. Step-by-step derivation
      1. unpow259.3%

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

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

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

Alternative 17: 57.5% accurate, 2.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 7.5 \cdot 10^{-28}:\\ \;\;\;\;\frac{2}{\frac{{t\_m}^{2} \cdot \frac{t\_m}{\ell}}{\ell} \cdot \left(2 \cdot \left(k \cdot k\right)\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{2}{\frac{t\_m \cdot {k}^{4}}{{\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 7.5e-28)
    (/ 2.0 (* (/ (* (pow t_m 2.0) (/ t_m l)) l) (* 2.0 (* k k))))
    (/ 2.0 (/ (* t_m (pow k 4.0)) (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 <= 7.5e-28) {
		tmp = 2.0 / (((pow(t_m, 2.0) * (t_m / l)) / l) * (2.0 * (k * k)));
	} else {
		tmp = 2.0 / ((t_m * pow(k, 4.0)) / 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 <= 7.5d-28) then
        tmp = 2.0d0 / ((((t_m ** 2.0d0) * (t_m / l)) / l) * (2.0d0 * (k * k)))
    else
        tmp = 2.0d0 / ((t_m * (k ** 4.0d0)) / (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 <= 7.5e-28) {
		tmp = 2.0 / (((Math.pow(t_m, 2.0) * (t_m / l)) / l) * (2.0 * (k * k)));
	} else {
		tmp = 2.0 / ((t_m * Math.pow(k, 4.0)) / 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 <= 7.5e-28:
		tmp = 2.0 / (((math.pow(t_m, 2.0) * (t_m / l)) / l) * (2.0 * (k * k)))
	else:
		tmp = 2.0 / ((t_m * math.pow(k, 4.0)) / 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 <= 7.5e-28)
		tmp = Float64(2.0 / Float64(Float64(Float64((t_m ^ 2.0) * Float64(t_m / l)) / l) * Float64(2.0 * Float64(k * k))));
	else
		tmp = Float64(2.0 / Float64(Float64(t_m * (k ^ 4.0)) / (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 <= 7.5e-28)
		tmp = 2.0 / ((((t_m ^ 2.0) * (t_m / l)) / l) * (2.0 * (k * k)));
	else
		tmp = 2.0 / ((t_m * (k ^ 4.0)) / (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, 7.5e-28], N[(2.0 / N[(N[(N[(N[Power[t$95$m, 2.0], $MachinePrecision] * N[(t$95$m / l), $MachinePrecision]), $MachinePrecision] / l), $MachinePrecision] * N[(2.0 * N[(k * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(2.0 / N[(N[(t$95$m * N[Power[k, 4.0], $MachinePrecision]), $MachinePrecision] / N[Power[l, 2.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}\;k \leq 7.5 \cdot 10^{-28}:\\
\;\;\;\;\frac{2}{\frac{{t\_m}^{2} \cdot \frac{t\_m}{\ell}}{\ell} \cdot \left(2 \cdot \left(k \cdot k\right)\right)}\\

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


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

    1. Initial program 58.4%

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

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

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

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

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

        \[\leadsto \frac{2}{\frac{\frac{\color{blue}{\left(t \cdot t\right) \cdot t}}{\ell}}{\ell} \cdot \left(2 \cdot \left(k \cdot k\right)\right)} \]
      2. *-un-lft-identity59.1%

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

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

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

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

    if 7.5000000000000003e-28 < k

    1. Initial program 50.2%

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

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

      \[\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. associate-*r*68.9%

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

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

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

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

Alternative 18: 57.9% accurate, 2.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 1.8 \cdot 10^{+106}:\\ \;\;\;\;\frac{2}{\frac{{t\_m}^{2} \cdot \frac{t\_m}{\ell}}{\ell} \cdot \left(2 \cdot \left(k \cdot k\right)\right)}\\ \mathbf{else}:\\ \;\;\;\;2 \cdot \frac{\frac{{\ell}^{2}}{{k}^{4}}}{t\_m}\\ \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.8e+106)
    (/ 2.0 (* (/ (* (pow t_m 2.0) (/ t_m l)) l) (* 2.0 (* k k))))
    (* 2.0 (/ (/ (pow l 2.0) (pow k 4.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) {
	double tmp;
	if (k <= 1.8e+106) {
		tmp = 2.0 / (((pow(t_m, 2.0) * (t_m / l)) / l) * (2.0 * (k * k)));
	} else {
		tmp = 2.0 * ((pow(l, 2.0) / pow(k, 4.0)) / 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 (k <= 1.8d+106) then
        tmp = 2.0d0 / ((((t_m ** 2.0d0) * (t_m / l)) / l) * (2.0d0 * (k * k)))
    else
        tmp = 2.0d0 * (((l ** 2.0d0) / (k ** 4.0d0)) / 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 (k <= 1.8e+106) {
		tmp = 2.0 / (((Math.pow(t_m, 2.0) * (t_m / l)) / l) * (2.0 * (k * k)));
	} else {
		tmp = 2.0 * ((Math.pow(l, 2.0) / Math.pow(k, 4.0)) / 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 k <= 1.8e+106:
		tmp = 2.0 / (((math.pow(t_m, 2.0) * (t_m / l)) / l) * (2.0 * (k * k)))
	else:
		tmp = 2.0 * ((math.pow(l, 2.0) / math.pow(k, 4.0)) / 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 (k <= 1.8e+106)
		tmp = Float64(2.0 / Float64(Float64(Float64((t_m ^ 2.0) * Float64(t_m / l)) / l) * Float64(2.0 * Float64(k * k))));
	else
		tmp = Float64(2.0 * Float64(Float64((l ^ 2.0) / (k ^ 4.0)) / 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 (k <= 1.8e+106)
		tmp = 2.0 / ((((t_m ^ 2.0) * (t_m / l)) / l) * (2.0 * (k * k)));
	else
		tmp = 2.0 * (((l ^ 2.0) / (k ^ 4.0)) / 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[k, 1.8e+106], N[(2.0 / N[(N[(N[(N[Power[t$95$m, 2.0], $MachinePrecision] * N[(t$95$m / l), $MachinePrecision]), $MachinePrecision] / l), $MachinePrecision] * N[(2.0 * N[(k * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(2.0 * N[(N[(N[Power[l, 2.0], $MachinePrecision] / N[Power[k, 4.0], $MachinePrecision]), $MachinePrecision] / t$95$m), $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.8 \cdot 10^{+106}:\\
\;\;\;\;\frac{2}{\frac{{t\_m}^{2} \cdot \frac{t\_m}{\ell}}{\ell} \cdot \left(2 \cdot \left(k \cdot k\right)\right)}\\

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


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

    1. Initial program 56.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. Simplified60.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 58.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. unpow258.0%

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

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

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

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

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

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

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

    if 1.8e106 < k

    1. Initial program 52.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. Simplified52.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 63.3%

      \[\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. associate-*r*63.3%

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

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

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

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

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

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

Alternative 19: 56.6% accurate, 3.6× speedup?

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

\\
t\_s \cdot \frac{2}{\frac{{t\_m}^{2} \cdot \frac{t\_m}{\ell}}{\ell} \cdot \left(2 \cdot \left(k \cdot k\right)\right)}
\end{array}
Derivation
  1. Initial program 56.2%

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

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

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

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

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

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

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

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

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

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

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

Alternative 20: 53.8% accurate, 3.6× speedup?

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 21: 53.8% accurate, 3.7× speedup?

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

\\
t\_s \cdot \frac{2}{\frac{\frac{{t\_m}^{3}}{\ell}}{\ell} \cdot \left(2 \cdot \left(k \cdot k\right)\right)}
\end{array}
Derivation
  1. Initial program 56.2%

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

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

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

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

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

Reproduce

?
herbie shell --seed 2024135 
(FPCore (t l k)
  :name "Toniolo and Linder, Equation (10+)"
  :precision binary64
  (/ 2.0 (* (* (* (/ (pow t 3.0) (* l l)) (sin k)) (tan k)) (+ (+ 1.0 (pow (/ k t) 2.0)) 1.0))))