Toniolo and Linder, Equation (10+)

Percentage Accurate: 54.6% → 86.5%
Time: 25.1s
Alternatives: 18
Speedup: 1.9×

Specification

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

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

Sampling outcomes in binary64 precision:

Local Percentage Accuracy vs ?

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

Accuracy vs Speed?

Herbie found 18 alternatives:

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

Initial Program: 54.6% accurate, 1.0× speedup?

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

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

Alternative 1: 86.5% accurate, 0.6× speedup?

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

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

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


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

    1. Initial program 50.9%

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{\frac{\frac{2}{{k}^{2} \cdot t}}{\frac{\frac{{\sin k}^{2}}{{\ell}^{2}}}{\cos k}}} \]
      4. associate-/l/66.1%

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

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

    if 5.50000000000000053e-66 < t

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 2: 79.8% accurate, 0.7× speedup?

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

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

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


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

    1. Initial program 50.9%

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{\frac{\frac{2}{{k}^{2} \cdot t}}{\frac{\frac{{\sin k}^{2}}{{\ell}^{2}}}{\cos k}}} \]
      4. associate-/l/66.1%

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

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

    if 2.5999999999999999e-62 < t

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

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

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

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

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

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

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

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

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

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

Alternative 3: 79.2% accurate, 0.7× speedup?

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

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

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


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

    1. Initial program 50.9%

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{\frac{\frac{2}{{k}^{2} \cdot t}}{\frac{\frac{{\sin k}^{2}}{{\ell}^{2}}}{\cos k}}} \]
      4. associate-/l/66.1%

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

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

    if 1.04999999999999996e-60 < t

    1. Initial program 66.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 4: 78.2% accurate, 0.8× speedup?

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

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

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


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

    1. Initial program 50.9%

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{\frac{\frac{2}{{k}^{2} \cdot t}}{\frac{\frac{{\sin k}^{2}}{{\ell}^{2}}}{\cos k}}} \]
      4. associate-/l/66.1%

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

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

    if 1.05000000000000001e-65 < t

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

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

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

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

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

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

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

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

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

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

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

Alternative 5: 75.0% accurate, 0.8× speedup?

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

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

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


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

    1. Initial program 50.3%

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

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

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

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

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

    if 1.4e-66 < t

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

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

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

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

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

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

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

Alternative 6: 75.2% accurate, 0.8× speedup?

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

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

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


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

    1. Initial program 50.3%

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

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

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

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

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

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

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

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

    if 1.2999999999999999e-66 < t

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

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

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

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

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

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

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

Alternative 7: 75.3% accurate, 0.8× speedup?

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

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

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


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

    1. Initial program 50.9%

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

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

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

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

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

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

    if 7.79999999999999965e-66 < t

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

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

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

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

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

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

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

Alternative 8: 75.9% accurate, 0.8× speedup?

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

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

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


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

    1. Initial program 50.3%

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{\frac{\frac{2}{{k}^{2} \cdot t}}{\frac{\frac{{\sin k}^{2}}{{\ell}^{2}}}{\cos k}}} \]
      4. associate-/l/65.7%

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

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

    if 1.01999999999999996e-66 < t

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

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

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

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

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

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

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

Alternative 9: 69.1% accurate, 1.0× speedup?

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

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

\mathbf{elif}\;t\_m \leq 6.5 \cdot 10^{+97} \lor \neg \left(t\_m \leq 4.7 \cdot 10^{+162}\right):\\
\;\;\;\;\left(\frac{2}{\sin k \cdot {t\_m}^{3}} \cdot \frac{\ell}{\tan k}\right) \cdot \frac{\ell}{2 + {\left(\frac{k}{t\_m}\right)}^{2}}\\

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


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

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

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

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

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

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

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

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

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

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

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

    if 6.49999999999999997e-150 < t < 6.4999999999999999e97 or 4.70000000000000003e162 < t

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

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

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

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

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

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

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

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

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

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

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

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

    if 6.4999999999999999e97 < t < 4.70000000000000003e162

    1. Initial program 30.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. Simplified20.8%

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

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

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

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

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

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

      \[\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)} \]
  3. Recombined 3 regimes into one program.
  4. Final simplification65.3%

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

Alternative 10: 71.7% accurate, 1.0× speedup?

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

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

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

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


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

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

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

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

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

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

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

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

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

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

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

    if 6.49999999999999997e-150 < t < 6.4999999999999999e97

    1. Initial program 71.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. Simplified71.5%

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

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

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

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

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

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

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

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

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

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

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

    if 6.4999999999999999e97 < t

    1. Initial program 58.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. Simplified58.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 11: 71.5% accurate, 1.0× speedup?

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

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

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


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

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

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

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

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

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

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

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

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

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

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

    if 4.30000000000000004e-150 < t

    1. Initial program 66.4%

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

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

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

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

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

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

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

Alternative 12: 63.3% accurate, 1.0× speedup?

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

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

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


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

    1. Initial program 50.9%

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

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

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

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

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

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

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

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

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

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

    if 1.40000000000000001e-62 < t

    1. Initial program 66.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 13: 63.3% accurate, 1.0× speedup?

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

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

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


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

    1. Initial program 50.9%

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

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

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

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

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

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

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

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

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

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

    if 1.3500000000000001e-63 < t

    1. Initial program 66.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 14: 63.4% accurate, 1.0× speedup?

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

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

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


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

    1. Initial program 50.9%

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

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

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

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

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

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

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

    if 1.69999999999999994e-62 < t

    1. Initial program 66.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 15: 61.0% accurate, 1.3× speedup?

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

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

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


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

    1. Initial program 50.9%

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

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

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

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

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

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

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

    if 1.25e-60 < t

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

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

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

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

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

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

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

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

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

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

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

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


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

    1. Initial program 50.9%

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \frac{{\ell}^{2} \cdot 2}{\color{blue}{{k}^{4} \cdot t}} \]
      3. times-frac56.5%

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

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

    if 1.2999999999999999e-60 < t

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

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

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

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

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

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

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

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

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

Alternative 17: 51.8% accurate, 2.0× speedup?

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

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

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

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

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

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

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

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

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

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

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

Alternative 18: 51.8% accurate, 2.0× speedup?

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

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

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

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

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

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

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

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

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

      \[\leadsto \frac{2 \cdot {\ell}^{2}}{\color{blue}{t \cdot {k}^{4}}} \]
  9. Applied egg-rr53.3%

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

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

      \[\leadsto \frac{{\ell}^{2} \cdot 2}{\color{blue}{{k}^{4} \cdot t}} \]
    3. times-frac54.5%

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

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

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

Reproduce

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