Toniolo and Linder, Equation (10+)

Percentage Accurate: 54.8% → 89.7%
Time: 1.4min
Alternatives: 16
Speedup: 3.8×

Specification

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

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

Sampling outcomes in binary64 precision:

Local Percentage Accuracy vs ?

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

Accuracy vs Speed?

Herbie found 16 alternatives:

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

Initial Program: 54.8% 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: 89.7% 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 := \tan k \cdot \left(2 + {\left(\frac{k}{t\_m}\right)}^{2}\right)\\ t_3 := \sin k \cdot \tan k\\ t\_s \cdot \begin{array}{l} \mathbf{if}\;t\_m \leq 3.2 \cdot 10^{-86}:\\ \;\;\;\;\frac{2}{{\left(\frac{k}{\ell} \cdot \sqrt{t\_m}\right)}^{2} \cdot t\_3}\\ \mathbf{elif}\;t\_m \leq 1.15 \cdot 10^{-21}:\\ \;\;\;\;\frac{2}{\left(\sin k \cdot \frac{{t\_m}^{3}}{\ell}\right) \cdot \frac{t\_2}{\ell}}\\ \mathbf{elif}\;t\_m \leq 7.4:\\ \;\;\;\;\frac{2}{t\_3 \cdot {\left(\mathsf{hypot}\left(1, \mathsf{hypot}\left(1, \frac{k}{t\_m}\right)\right) \cdot \frac{{t\_m}^{1.5}}{\ell}\right)}^{2}}\\ \mathbf{else}:\\ \;\;\;\;\frac{2}{\frac{t\_2 \cdot {\left(\frac{t\_m}{\sqrt[3]{\ell}} \cdot \sqrt[3]{\sin k}\right)}^{3}}{\ell}}\\ \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 (* (tan k) (+ 2.0 (pow (/ k t_m) 2.0))))
        (t_3 (* (sin k) (tan k))))
   (*
    t_s
    (if (<= t_m 3.2e-86)
      (/ 2.0 (* (pow (* (/ k l) (sqrt t_m)) 2.0) t_3))
      (if (<= t_m 1.15e-21)
        (/ 2.0 (* (* (sin k) (/ (pow t_m 3.0) l)) (/ t_2 l)))
        (if (<= t_m 7.4)
          (/
           2.0
           (*
            t_3
            (pow
             (* (hypot 1.0 (hypot 1.0 (/ k t_m))) (/ (pow t_m 1.5) l))
             2.0)))
          (/
           2.0
           (/ (* t_2 (pow (* (/ t_m (cbrt l)) (cbrt (sin k))) 3.0)) l))))))))
t\_m = fabs(t);
t\_s = copysign(1.0, t);
double code(double t_s, double t_m, double l, double k) {
	double t_2 = tan(k) * (2.0 + pow((k / t_m), 2.0));
	double t_3 = sin(k) * tan(k);
	double tmp;
	if (t_m <= 3.2e-86) {
		tmp = 2.0 / (pow(((k / l) * sqrt(t_m)), 2.0) * t_3);
	} else if (t_m <= 1.15e-21) {
		tmp = 2.0 / ((sin(k) * (pow(t_m, 3.0) / l)) * (t_2 / l));
	} else if (t_m <= 7.4) {
		tmp = 2.0 / (t_3 * pow((hypot(1.0, hypot(1.0, (k / t_m))) * (pow(t_m, 1.5) / l)), 2.0));
	} else {
		tmp = 2.0 / ((t_2 * pow(((t_m / cbrt(l)) * cbrt(sin(k))), 3.0)) / l);
	}
	return t_s * tmp;
}
t\_m = Math.abs(t);
t\_s = Math.copySign(1.0, t);
public static double code(double t_s, double t_m, double l, double k) {
	double t_2 = Math.tan(k) * (2.0 + Math.pow((k / t_m), 2.0));
	double t_3 = Math.sin(k) * Math.tan(k);
	double tmp;
	if (t_m <= 3.2e-86) {
		tmp = 2.0 / (Math.pow(((k / l) * Math.sqrt(t_m)), 2.0) * t_3);
	} else if (t_m <= 1.15e-21) {
		tmp = 2.0 / ((Math.sin(k) * (Math.pow(t_m, 3.0) / l)) * (t_2 / l));
	} else if (t_m <= 7.4) {
		tmp = 2.0 / (t_3 * Math.pow((Math.hypot(1.0, Math.hypot(1.0, (k / t_m))) * (Math.pow(t_m, 1.5) / l)), 2.0));
	} else {
		tmp = 2.0 / ((t_2 * Math.pow(((t_m / Math.cbrt(l)) * Math.cbrt(Math.sin(k))), 3.0)) / l);
	}
	return t_s * tmp;
}
t\_m = abs(t)
t\_s = copysign(1.0, t)
function code(t_s, t_m, l, k)
	t_2 = Float64(tan(k) * Float64(2.0 + (Float64(k / t_m) ^ 2.0)))
	t_3 = Float64(sin(k) * tan(k))
	tmp = 0.0
	if (t_m <= 3.2e-86)
		tmp = Float64(2.0 / Float64((Float64(Float64(k / l) * sqrt(t_m)) ^ 2.0) * t_3));
	elseif (t_m <= 1.15e-21)
		tmp = Float64(2.0 / Float64(Float64(sin(k) * Float64((t_m ^ 3.0) / l)) * Float64(t_2 / l)));
	elseif (t_m <= 7.4)
		tmp = Float64(2.0 / Float64(t_3 * (Float64(hypot(1.0, hypot(1.0, Float64(k / t_m))) * Float64((t_m ^ 1.5) / l)) ^ 2.0)));
	else
		tmp = Float64(2.0 / Float64(Float64(t_2 * (Float64(Float64(t_m / cbrt(l)) * cbrt(sin(k))) ^ 3.0)) / l));
	end
	return Float64(t_s * tmp)
end
t\_m = N[Abs[t], $MachinePrecision]
t\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[t]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[t$95$s_, t$95$m_, l_, k_] := Block[{t$95$2 = N[(N[Tan[k], $MachinePrecision] * N[(2.0 + N[Power[N[(k / t$95$m), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(N[Sin[k], $MachinePrecision] * N[Tan[k], $MachinePrecision]), $MachinePrecision]}, N[(t$95$s * If[LessEqual[t$95$m, 3.2e-86], N[(2.0 / N[(N[Power[N[(N[(k / l), $MachinePrecision] * N[Sqrt[t$95$m], $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision] * t$95$3), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$m, 1.15e-21], N[(2.0 / N[(N[(N[Sin[k], $MachinePrecision] * N[(N[Power[t$95$m, 3.0], $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision] * N[(t$95$2 / l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$m, 7.4], N[(2.0 / N[(t$95$3 * N[Power[N[(N[Sqrt[1.0 ^ 2 + N[Sqrt[1.0 ^ 2 + N[(k / t$95$m), $MachinePrecision] ^ 2], $MachinePrecision] ^ 2], $MachinePrecision] * N[(N[Power[t$95$m, 1.5], $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(2.0 / N[(N[(t$95$2 * N[Power[N[(N[(t$95$m / N[Power[l, 1/3], $MachinePrecision]), $MachinePrecision] * N[Power[N[Sin[k], $MachinePrecision], 1/3], $MachinePrecision]), $MachinePrecision], 3.0], $MachinePrecision]), $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision]]]]), $MachinePrecision]]]
\begin{array}{l}
t\_m = \left|t\right|
\\
t\_s = \mathsf{copysign}\left(1, t\right)

\\
\begin{array}{l}
t_2 := \tan k \cdot \left(2 + {\left(\frac{k}{t\_m}\right)}^{2}\right)\\
t_3 := \sin k \cdot \tan k\\
t\_s \cdot \begin{array}{l}
\mathbf{if}\;t\_m \leq 3.2 \cdot 10^{-86}:\\
\;\;\;\;\frac{2}{{\left(\frac{k}{\ell} \cdot \sqrt{t\_m}\right)}^{2} \cdot t\_3}\\

\mathbf{elif}\;t\_m \leq 1.15 \cdot 10^{-21}:\\
\;\;\;\;\frac{2}{\left(\sin k \cdot \frac{{t\_m}^{3}}{\ell}\right) \cdot \frac{t\_2}{\ell}}\\

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

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


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

    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. Add Preprocessing
    3. Step-by-step derivation
      1. pow150.9%

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

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

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

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

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

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

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

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

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

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

    if 3.20000000000000006e-86 < t < 1.15e-21

    1. Initial program 86.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. Simplified92.9%

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

        \[\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}}} \]
      2. associate-*l*89.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 1.15e-21 < t < 7.4000000000000004

    1. Initial program 61.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. Add Preprocessing
    3. Step-by-step derivation
      1. pow161.3%

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

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

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

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

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

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

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

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

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

    if 7.4000000000000004 < t

    1. Initial program 74.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.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. Step-by-step derivation
      1. associate-*l/69.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}}} \]
      2. associate-*l*69.7%

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 2: 80.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 := \frac{{t\_m}^{1.5}}{\ell}\\ t_3 := \sin k \cdot \tan k\\ t_4 := \mathsf{hypot}\left(1, \mathsf{hypot}\left(1, \frac{k}{t\_m}\right)\right)\\ t\_s \cdot \begin{array}{l} \mathbf{if}\;k \leq 1.8 \cdot 10^{-125}:\\ \;\;\;\;\frac{2}{{\left(t\_4 \cdot \left(k \cdot t\_2\right)\right)}^{2}}\\ \mathbf{elif}\;k \leq 3.5 \cdot 10^{+85}:\\ \;\;\;\;\frac{2}{t\_3 \cdot {\left(t\_4 \cdot t\_2\right)}^{2}}\\ \mathbf{else}:\\ \;\;\;\;\frac{2}{{\left(\frac{k}{\ell} \cdot \sqrt{t\_m}\right)}^{2} \cdot t\_3}\\ \end{array} \end{array} \end{array} \]
t\_m = (fabs.f64 t)
t\_s = (copysign.f64 #s(literal 1 binary64) t)
(FPCore (t_s t_m l k)
 :precision binary64
 (let* ((t_2 (/ (pow t_m 1.5) l))
        (t_3 (* (sin k) (tan k)))
        (t_4 (hypot 1.0 (hypot 1.0 (/ k t_m)))))
   (*
    t_s
    (if (<= k 1.8e-125)
      (/ 2.0 (pow (* t_4 (* k t_2)) 2.0))
      (if (<= k 3.5e+85)
        (/ 2.0 (* t_3 (pow (* t_4 t_2) 2.0)))
        (/ 2.0 (* (pow (* (/ k l) (sqrt t_m)) 2.0) t_3)))))))
t\_m = fabs(t);
t\_s = copysign(1.0, t);
double code(double t_s, double t_m, double l, double k) {
	double t_2 = pow(t_m, 1.5) / l;
	double t_3 = sin(k) * tan(k);
	double t_4 = hypot(1.0, hypot(1.0, (k / t_m)));
	double tmp;
	if (k <= 1.8e-125) {
		tmp = 2.0 / pow((t_4 * (k * t_2)), 2.0);
	} else if (k <= 3.5e+85) {
		tmp = 2.0 / (t_3 * pow((t_4 * t_2), 2.0));
	} else {
		tmp = 2.0 / (pow(((k / l) * sqrt(t_m)), 2.0) * t_3);
	}
	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.pow(t_m, 1.5) / l;
	double t_3 = Math.sin(k) * Math.tan(k);
	double t_4 = Math.hypot(1.0, Math.hypot(1.0, (k / t_m)));
	double tmp;
	if (k <= 1.8e-125) {
		tmp = 2.0 / Math.pow((t_4 * (k * t_2)), 2.0);
	} else if (k <= 3.5e+85) {
		tmp = 2.0 / (t_3 * Math.pow((t_4 * t_2), 2.0));
	} else {
		tmp = 2.0 / (Math.pow(((k / l) * Math.sqrt(t_m)), 2.0) * t_3);
	}
	return t_s * tmp;
}
t\_m = math.fabs(t)
t\_s = math.copysign(1.0, t)
def code(t_s, t_m, l, k):
	t_2 = math.pow(t_m, 1.5) / l
	t_3 = math.sin(k) * math.tan(k)
	t_4 = math.hypot(1.0, math.hypot(1.0, (k / t_m)))
	tmp = 0
	if k <= 1.8e-125:
		tmp = 2.0 / math.pow((t_4 * (k * t_2)), 2.0)
	elif k <= 3.5e+85:
		tmp = 2.0 / (t_3 * math.pow((t_4 * t_2), 2.0))
	else:
		tmp = 2.0 / (math.pow(((k / l) * math.sqrt(t_m)), 2.0) * t_3)
	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 ^ 1.5) / l)
	t_3 = Float64(sin(k) * tan(k))
	t_4 = hypot(1.0, hypot(1.0, Float64(k / t_m)))
	tmp = 0.0
	if (k <= 1.8e-125)
		tmp = Float64(2.0 / (Float64(t_4 * Float64(k * t_2)) ^ 2.0));
	elseif (k <= 3.5e+85)
		tmp = Float64(2.0 / Float64(t_3 * (Float64(t_4 * t_2) ^ 2.0)));
	else
		tmp = Float64(2.0 / Float64((Float64(Float64(k / l) * sqrt(t_m)) ^ 2.0) * t_3));
	end
	return Float64(t_s * tmp)
end
t\_m = abs(t);
t\_s = sign(t) * abs(1.0);
function tmp_2 = code(t_s, t_m, l, k)
	t_2 = (t_m ^ 1.5) / l;
	t_3 = sin(k) * tan(k);
	t_4 = hypot(1.0, hypot(1.0, (k / t_m)));
	tmp = 0.0;
	if (k <= 1.8e-125)
		tmp = 2.0 / ((t_4 * (k * t_2)) ^ 2.0);
	elseif (k <= 3.5e+85)
		tmp = 2.0 / (t_3 * ((t_4 * t_2) ^ 2.0));
	else
		tmp = 2.0 / ((((k / l) * sqrt(t_m)) ^ 2.0) * t_3);
	end
	tmp_2 = t_s * tmp;
end
t\_m = N[Abs[t], $MachinePrecision]
t\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[t]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[t$95$s_, t$95$m_, l_, k_] := Block[{t$95$2 = N[(N[Power[t$95$m, 1.5], $MachinePrecision] / l), $MachinePrecision]}, Block[{t$95$3 = N[(N[Sin[k], $MachinePrecision] * N[Tan[k], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$4 = N[Sqrt[1.0 ^ 2 + N[Sqrt[1.0 ^ 2 + N[(k / t$95$m), $MachinePrecision] ^ 2], $MachinePrecision] ^ 2], $MachinePrecision]}, N[(t$95$s * If[LessEqual[k, 1.8e-125], N[(2.0 / N[Power[N[(t$95$4 * N[(k * t$95$2), $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision], If[LessEqual[k, 3.5e+85], N[(2.0 / N[(t$95$3 * N[Power[N[(t$95$4 * t$95$2), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(2.0 / N[(N[Power[N[(N[(k / l), $MachinePrecision] * N[Sqrt[t$95$m], $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision] * t$95$3), $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}^{1.5}}{\ell}\\
t_3 := \sin k \cdot \tan k\\
t_4 := \mathsf{hypot}\left(1, \mathsf{hypot}\left(1, \frac{k}{t\_m}\right)\right)\\
t\_s \cdot \begin{array}{l}
\mathbf{if}\;k \leq 1.8 \cdot 10^{-125}:\\
\;\;\;\;\frac{2}{{\left(t\_4 \cdot \left(k \cdot t\_2\right)\right)}^{2}}\\

\mathbf{elif}\;k \leq 3.5 \cdot 10^{+85}:\\
\;\;\;\;\frac{2}{t\_3 \cdot {\left(t\_4 \cdot t\_2\right)}^{2}}\\

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


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

    1. Initial program 59.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. Add Preprocessing
    3. Step-by-step derivation
      1. pow159.2%

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

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

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

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

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

    if 1.8000000000000001e-125 < k < 3.50000000000000005e85

    1. Initial program 70.7%

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

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

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

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

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

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

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

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

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

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

    if 3.50000000000000005e85 < k

    1. Initial program 48.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. Add Preprocessing
    3. Step-by-step derivation
      1. pow148.5%

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

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

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

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

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

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

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

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

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

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

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

Alternative 3: 72.5% accurate, 1.0× speedup?

\[\begin{array}{l} t\_m = \left|t\right| \\ t\_s = \mathsf{copysign}\left(1, t\right) \\ t\_s \cdot \begin{array}{l} \mathbf{if}\;k \leq 2.4 \cdot 10^{-159}:\\ \;\;\;\;\frac{2}{{\left(\sqrt{{t\_m}^{3}} \cdot \left(k \cdot \frac{\sqrt{2}}{\ell}\right)\right)}^{2}}\\ \mathbf{elif}\;k \leq 7.5:\\ \;\;\;\;\frac{2}{{\left(\frac{t\_m}{{\left(\sqrt[3]{\ell}\right)}^{2}}\right)}^{3} \cdot \left(2 \cdot {k}^{2}\right)}\\ \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 2.4e-159)
    (/ 2.0 (pow (* (sqrt (pow t_m 3.0)) (* k (/ (sqrt 2.0) l))) 2.0))
    (if (<= k 7.5)
      (/ 2.0 (* (pow (/ t_m (pow (cbrt l) 2.0)) 3.0) (* 2.0 (pow k 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 <= 2.4e-159) {
		tmp = 2.0 / pow((sqrt(pow(t_m, 3.0)) * (k * (sqrt(2.0) / l))), 2.0);
	} else if (k <= 7.5) {
		tmp = 2.0 / (pow((t_m / pow(cbrt(l), 2.0)), 3.0) * (2.0 * pow(k, 2.0)));
	} else {
		tmp = 2.0 / (pow(((k / l) * sqrt(t_m)), 2.0) * (sin(k) * 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 tmp;
	if (k <= 2.4e-159) {
		tmp = 2.0 / Math.pow((Math.sqrt(Math.pow(t_m, 3.0)) * (k * (Math.sqrt(2.0) / l))), 2.0);
	} else if (k <= 7.5) {
		tmp = 2.0 / (Math.pow((t_m / Math.pow(Math.cbrt(l), 2.0)), 3.0) * (2.0 * Math.pow(k, 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 <= 2.4e-159)
		tmp = Float64(2.0 / (Float64(sqrt((t_m ^ 3.0)) * Float64(k * Float64(sqrt(2.0) / l))) ^ 2.0));
	elseif (k <= 7.5)
		tmp = Float64(2.0 / Float64((Float64(t_m / (cbrt(l) ^ 2.0)) ^ 3.0) * Float64(2.0 * (k ^ 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 = N[Abs[t], $MachinePrecision]
t\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[t]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[t$95$s_, t$95$m_, l_, k_] := N[(t$95$s * If[LessEqual[k, 2.4e-159], N[(2.0 / N[Power[N[(N[Sqrt[N[Power[t$95$m, 3.0], $MachinePrecision]], $MachinePrecision] * N[(k * N[(N[Sqrt[2.0], $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision], If[LessEqual[k, 7.5], N[(2.0 / N[(N[Power[N[(t$95$m / N[Power[N[Power[l, 1/3], $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision], 3.0], $MachinePrecision] * N[(2.0 * N[Power[k, 2.0], $MachinePrecision]), $MachinePrecision]), $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 2.4 \cdot 10^{-159}:\\
\;\;\;\;\frac{2}{{\left(\sqrt{{t\_m}^{3}} \cdot \left(k \cdot \frac{\sqrt{2}}{\ell}\right)\right)}^{2}}\\

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

\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 3 regimes
  2. if k < 2.39999999999999997e-159

    1. Initial program 57.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. Add Preprocessing
    3. Step-by-step derivation
      1. pow157.8%

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

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

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

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

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

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

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

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

    if 2.39999999999999997e-159 < k < 7.5

    1. Initial program 83.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. Simplified84.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 7.5 < k

    1. Initial program 52.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. Add Preprocessing
    3. Step-by-step derivation
      1. pow152.5%

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

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

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

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

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

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

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

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

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

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

Alternative 4: 80.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}\;k \leq 52000000000000:\\ \;\;\;\;\frac{2}{{\left(\mathsf{hypot}\left(1, \mathsf{hypot}\left(1, \frac{k}{t\_m}\right)\right) \cdot \left(k \cdot \frac{{t\_m}^{1.5}}{\ell}\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 52000000000000.0)
    (/
     2.0
     (pow (* (hypot 1.0 (hypot 1.0 (/ k t_m))) (* k (/ (pow t_m 1.5) l))) 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 <= 52000000000000.0) {
		tmp = 2.0 / pow((hypot(1.0, hypot(1.0, (k / t_m))) * (k * (pow(t_m, 1.5) / l))), 2.0);
	} else {
		tmp = 2.0 / (pow(((k / l) * sqrt(t_m)), 2.0) * (sin(k) * 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 tmp;
	if (k <= 52000000000000.0) {
		tmp = 2.0 / Math.pow((Math.hypot(1.0, Math.hypot(1.0, (k / t_m))) * (k * (Math.pow(t_m, 1.5) / l))), 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 <= 52000000000000.0:
		tmp = 2.0 / math.pow((math.hypot(1.0, math.hypot(1.0, (k / t_m))) * (k * (math.pow(t_m, 1.5) / l))), 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 <= 52000000000000.0)
		tmp = Float64(2.0 / (Float64(hypot(1.0, hypot(1.0, Float64(k / t_m))) * Float64(k * Float64((t_m ^ 1.5) / l))) ^ 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 <= 52000000000000.0)
		tmp = 2.0 / ((hypot(1.0, hypot(1.0, (k / t_m))) * (k * ((t_m ^ 1.5) / l))) ^ 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, 52000000000000.0], N[(2.0 / N[Power[N[(N[Sqrt[1.0 ^ 2 + N[Sqrt[1.0 ^ 2 + N[(k / t$95$m), $MachinePrecision] ^ 2], $MachinePrecision] ^ 2], $MachinePrecision] * N[(k * N[(N[Power[t$95$m, 1.5], $MachinePrecision] / l), $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 52000000000000:\\
\;\;\;\;\frac{2}{{\left(\mathsf{hypot}\left(1, \mathsf{hypot}\left(1, \frac{k}{t\_m}\right)\right) \cdot \left(k \cdot \frac{{t\_m}^{1.5}}{\ell}\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 < 5.2e13

    1. Initial program 62.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. Add Preprocessing
    3. Step-by-step derivation
      1. pow162.2%

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

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

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

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

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

    if 5.2e13 < k

    1. Initial program 48.4%

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 5: 71.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}\;k \leq 7.5:\\ \;\;\;\;\frac{2}{{\left(\sqrt{{t\_m}^{3}} \cdot \left(k \cdot \frac{\sqrt{2}}{\ell}\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 7.5)
    (/ 2.0 (pow (* (sqrt (pow t_m 3.0)) (* k (/ (sqrt 2.0) l))) 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 <= 7.5) {
		tmp = 2.0 / pow((sqrt(pow(t_m, 3.0)) * (k * (sqrt(2.0) / l))), 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 <= 7.5d0) then
        tmp = 2.0d0 / ((sqrt((t_m ** 3.0d0)) * (k * (sqrt(2.0d0) / l))) ** 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 <= 7.5) {
		tmp = 2.0 / Math.pow((Math.sqrt(Math.pow(t_m, 3.0)) * (k * (Math.sqrt(2.0) / l))), 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 <= 7.5:
		tmp = 2.0 / math.pow((math.sqrt(math.pow(t_m, 3.0)) * (k * (math.sqrt(2.0) / l))), 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 <= 7.5)
		tmp = Float64(2.0 / (Float64(sqrt((t_m ^ 3.0)) * Float64(k * Float64(sqrt(2.0) / l))) ^ 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 <= 7.5)
		tmp = 2.0 / ((sqrt((t_m ^ 3.0)) * (k * (sqrt(2.0) / l))) ^ 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, 7.5], N[(2.0 / N[Power[N[(N[Sqrt[N[Power[t$95$m, 3.0], $MachinePrecision]], $MachinePrecision] * N[(k * N[(N[Sqrt[2.0], $MachinePrecision] / l), $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 7.5:\\
\;\;\;\;\frac{2}{{\left(\sqrt{{t\_m}^{3}} \cdot \left(k \cdot \frac{\sqrt{2}}{\ell}\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 < 7.5

    1. Initial program 61.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. Add Preprocessing
    3. Step-by-step derivation
      1. pow161.2%

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

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

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

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

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

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

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

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

    if 7.5 < k

    1. Initial program 52.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. Add Preprocessing
    3. Step-by-step derivation
      1. pow152.5%

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

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

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

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

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

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

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

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

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

      \[\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 6: 64.6% accurate, 1.0× speedup?

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

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

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

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


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

    1. Initial program 60.6%

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

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

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

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

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

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

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

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

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

    if 1.70000000000000007e-26 < k < 5.00000000000000015e82

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

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

    if 5.00000000000000015e82 < k

    1. Initial program 47.4%

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

      \[\leadsto \color{blue}{\frac{2}{\frac{\frac{{t}^{3}}{\ell}}{\ell} \cdot \left(\left(\sin k \cdot \tan k\right) \cdot \left(2 + {\left(\frac{k}{t}\right)}^{2}\right)\right)}} \]
    3. Add Preprocessing
    4. Step-by-step derivation
      1. associate-*l/52.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}}} \]
      2. associate-*l*52.4%

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

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

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

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

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

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

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

Alternative 7: 60.5% accurate, 1.3× speedup?

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

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

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

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


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

    1. Initial program 60.6%

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

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

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

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

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

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

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

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

    if 2.10000000000000002e-25 < k < 2.8e82

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

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

    if 2.8e82 < k

    1. Initial program 47.4%

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

      \[\leadsto \color{blue}{\frac{2}{\frac{\frac{{t}^{3}}{\ell}}{\ell} \cdot \left(\left(\sin k \cdot \tan k\right) \cdot \left(2 + {\left(\frac{k}{t}\right)}^{2}\right)\right)}} \]
    3. Add Preprocessing
    4. Step-by-step derivation
      1. associate-*l/52.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}}} \]
      2. associate-*l*52.4%

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

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

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

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

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

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

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

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

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

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

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


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

    1. Initial program 60.6%

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

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

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

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

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

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

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

    if 2.49999999999999981e-25 < k < 2.04999999999999998e82

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

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

    if 2.04999999999999998e82 < k

    1. Initial program 47.4%

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

      \[\leadsto \color{blue}{\frac{2}{\frac{\frac{{t}^{3}}{\ell}}{\ell} \cdot \left(\left(\sin k \cdot \tan k\right) \cdot \left(2 + {\left(\frac{k}{t}\right)}^{2}\right)\right)}} \]
    3. Add Preprocessing
    4. Step-by-step derivation
      1. associate-*l/52.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}}} \]
      2. associate-*l*52.4%

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

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

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

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

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

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

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

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

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

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

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


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

    1. Initial program 60.6%

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

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

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

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

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

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

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

    if 2.10000000000000002e-25 < k < 4.79999999999999996e82

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

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

    if 4.79999999999999996e82 < k

    1. Initial program 47.4%

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

      \[\leadsto \color{blue}{\frac{2}{\frac{\frac{{t}^{3}}{\ell}}{\ell} \cdot \left(\left(\sin k \cdot \tan k\right) \cdot \left(2 + {\left(\frac{k}{t}\right)}^{2}\right)\right)}} \]
    3. Add Preprocessing
    4. Step-by-step derivation
      1. associate-*l/52.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}}} \]
      2. associate-*l*52.4%

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

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

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

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

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

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

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

Alternative 10: 67.5% accurate, 1.3× speedup?

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

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


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

    1. Initial program 51.2%

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

      \[\leadsto \color{blue}{\frac{2}{\frac{\frac{{t}^{3}}{\ell}}{\ell} \cdot \left(\left(\sin k \cdot \tan k\right) \cdot \left(2 + {\left(\frac{k}{t}\right)}^{2}\right)\right)}} \]
    3. Add Preprocessing
    4. Step-by-step derivation
      1. associate-*l/56.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}}} \]
      2. associate-*l*56.7%

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

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

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

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

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

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

    if 2.24999999999999997e-123 < t

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

      \[\leadsto \color{blue}{\frac{2}{\frac{\frac{{t}^{3}}{\ell}}{\ell} \cdot \left(\left(\sin k \cdot \tan k\right) \cdot \left(2 + {\left(\frac{k}{t}\right)}^{2}\right)\right)}} \]
    3. Add Preprocessing
    4. Step-by-step derivation
      1. associate-*l/72.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}}} \]
      2. associate-*l*72.5%

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

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

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

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

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

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

Alternative 11: 60.3% 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 27:\\ \;\;\;\;\frac{2}{\left(2 \cdot {k}^{2}\right) \cdot \frac{{\left(\frac{t\_m}{\sqrt[3]{\ell}}\right)}^{3}}{\ell}}\\ \mathbf{else}:\\ \;\;\;\;\frac{2}{\frac{\frac{t\_m \cdot {k}^{4}}{\ell \cdot \cos k}}{\ell}}\\ \end{array} \end{array} \]
t\_m = (fabs.f64 t)
t\_s = (copysign.f64 #s(literal 1 binary64) t)
(FPCore (t_s t_m l k)
 :precision binary64
 (*
  t_s
  (if (<= k 27.0)
    (/ 2.0 (* (* 2.0 (pow k 2.0)) (/ (pow (/ t_m (cbrt l)) 3.0) l)))
    (/ 2.0 (/ (/ (* t_m (pow k 4.0)) (* l (cos k))) 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 <= 27.0) {
		tmp = 2.0 / ((2.0 * pow(k, 2.0)) * (pow((t_m / cbrt(l)), 3.0) / l));
	} else {
		tmp = 2.0 / (((t_m * pow(k, 4.0)) / (l * cos(k))) / l);
	}
	return t_s * tmp;
}
t\_m = Math.abs(t);
t\_s = Math.copySign(1.0, t);
public static double code(double t_s, double t_m, double l, double k) {
	double tmp;
	if (k <= 27.0) {
		tmp = 2.0 / ((2.0 * Math.pow(k, 2.0)) * (Math.pow((t_m / Math.cbrt(l)), 3.0) / l));
	} else {
		tmp = 2.0 / (((t_m * Math.pow(k, 4.0)) / (l * Math.cos(k))) / 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 <= 27.0)
		tmp = Float64(2.0 / Float64(Float64(2.0 * (k ^ 2.0)) * Float64((Float64(t_m / cbrt(l)) ^ 3.0) / l)));
	else
		tmp = Float64(2.0 / Float64(Float64(Float64(t_m * (k ^ 4.0)) / Float64(l * cos(k))) / l));
	end
	return Float64(t_s * tmp)
end
t\_m = N[Abs[t], $MachinePrecision]
t\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[t]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[t$95$s_, t$95$m_, l_, k_] := N[(t$95$s * If[LessEqual[k, 27.0], N[(2.0 / N[(N[(2.0 * N[Power[k, 2.0], $MachinePrecision]), $MachinePrecision] * N[(N[Power[N[(t$95$m / N[Power[l, 1/3], $MachinePrecision]), $MachinePrecision], 3.0], $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(2.0 / N[(N[(N[(t$95$m * N[Power[k, 4.0], $MachinePrecision]), $MachinePrecision] / N[(l * N[Cos[k], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision]]), $MachinePrecision]
\begin{array}{l}
t\_m = \left|t\right|
\\
t\_s = \mathsf{copysign}\left(1, t\right)

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

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


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

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

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

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

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

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

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

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

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

    if 27 < k

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

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

        \[\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}}} \]
      2. associate-*l*55.9%

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

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

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

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

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

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

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

Alternative 12: 61.5% accurate, 1.9× speedup?

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

\\
t\_s \cdot \begin{array}{l}
\mathbf{if}\;t\_m \leq 2.5 \cdot 10^{-105}:\\
\;\;\;\;\frac{2}{\frac{\frac{t\_m \cdot {k}^{4}}{\ell \cdot \cos k}}{\ell}}\\

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


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

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

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

        \[\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}}} \]
      2. associate-*l*56.3%

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

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

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

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

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

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

    if 2.49999999999999982e-105 < t

    1. Initial program 76.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. Simplified73.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 67.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. associate-*l/66.6%

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

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

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

      \[\leadsto \frac{2}{\color{blue}{\frac{{t}^{3}}{\ell} \cdot \frac{2 \cdot {k}^{2}}{\ell}}} \]
    9. Step-by-step derivation
      1. associate-*l/67.5%

        \[\leadsto \frac{2}{\color{blue}{\frac{{t}^{3} \cdot \frac{2 \cdot {k}^{2}}{\ell}}{\ell}}} \]
      2. associate-/l*67.5%

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

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

        \[\leadsto \frac{2}{\color{blue}{{t}^{3} \cdot \frac{2 \cdot \frac{{k}^{2}}{\ell}}{\ell}}} \]
      2. associate-*r/69.9%

        \[\leadsto \frac{2}{{t}^{3} \cdot \frac{\color{blue}{\frac{2 \cdot {k}^{2}}{\ell}}}{\ell}} \]
    12. Simplified69.9%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq 2.5 \cdot 10^{-105}:\\ \;\;\;\;\frac{2}{\frac{\frac{t \cdot {k}^{4}}{\ell \cdot \cos k}}{\ell}}\\ \mathbf{else}:\\ \;\;\;\;\frac{2}{{t}^{3} \cdot \frac{\frac{2 \cdot {k}^{2}}{\ell}}{\ell}}\\ \end{array} \]
  5. Add Preprocessing

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

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

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


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

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

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

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

    if 22 < k

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

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

        \[\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}}} \]
      2. associate-*l*55.9%

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

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

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

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

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

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

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

Alternative 14: 56.7% accurate, 2.0× speedup?

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

\\
t\_s \cdot \frac{2}{\frac{\frac{t\_m \cdot {k}^{4}}{\ell \cdot \cos k}}{\ell}}
\end{array}
Derivation
  1. Initial program 59.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. 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. Step-by-step derivation
    1. associate-*l/62.3%

      \[\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}}} \]
    2. associate-*l*62.3%

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

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

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

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

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

    \[\leadsto \frac{2}{\frac{\frac{\color{blue}{{k}^{4} \cdot t}}{\ell \cdot \cos k}}{\ell}} \]
  10. Final simplification58.4%

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

Alternative 15: 56.3% accurate, 3.8× speedup?

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

\\
t\_s \cdot \frac{2}{\frac{{k}^{4} \cdot \frac{t\_m}{\ell}}{\ell}}
\end{array}
Derivation
  1. Initial program 59.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. 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. Step-by-step derivation
    1. associate-*l/62.3%

      \[\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}}} \]
    2. associate-*l*62.3%

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

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

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

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

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

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

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

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

Alternative 16: 51.8% accurate, 3.8× speedup?

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

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

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

    \[\leadsto \color{blue}{2 \cdot \frac{{\ell}^{2}}{{k}^{4} \cdot t}} \]
  6. Step-by-step derivation
    1. unpow252.5%

      \[\leadsto 2 \cdot \frac{\color{blue}{\ell \cdot \ell}}{{k}^{4} \cdot t} \]
  7. Applied egg-rr52.5%

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

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

Reproduce

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