Toniolo and Linder, Equation (10+)

Percentage Accurate: 53.8% → 92.4%
Time: 20.4s
Alternatives: 22
Speedup: 2.0×

Specification

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

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

Sampling outcomes in binary64 precision:

Local Percentage Accuracy vs ?

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

Accuracy vs Speed?

Herbie found 22 alternatives:

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

Initial Program: 53.8% accurate, 1.0× speedup?

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

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

Alternative 1: 92.4% accurate, 0.5× speedup?

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

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


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

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

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

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

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

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

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

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

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

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

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

    if 1.8e-46 < t

    1. Initial program 64.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 2: 92.2% accurate, 0.5× speedup?

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

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

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


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

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

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

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

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

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

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

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

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

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

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

    if 1.8999999999999998e-46 < t

    1. Initial program 64.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 3: 78.1% accurate, 0.6× speedup?

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

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

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

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


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

    1. Initial program 56.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 3.4999999999999999e-162 < k < 1.3199999999999999e37

    1. Initial program 50.9%

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

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

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

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

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

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

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

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

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

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

    if 1.3199999999999999e37 < k

    1. Initial program 47.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 4: 89.1% accurate, 0.6× speedup?

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

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

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


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

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

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

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

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

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

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

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

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

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

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

    if 1.8999999999999998e-46 < t

    1. Initial program 64.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 5: 89.4% accurate, 0.6× speedup?

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

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

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


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

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

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

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

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

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

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

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

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

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

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

    if 2.00000000000000005e-46 < t

    1. Initial program 64.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 6: 78.0% accurate, 0.6× speedup?

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

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

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

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


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

    1. Initial program 56.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 3.4999999999999999e-162 < k < 8.50000000000000038e-14

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 8.50000000000000038e-14 < k

    1. Initial program 48.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. Simplified48.8%

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

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

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

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

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

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

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

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

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

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

Alternative 7: 86.6% accurate, 0.7× speedup?

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

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

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

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


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

    1. Initial program 50.1%

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

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

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

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

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

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

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

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

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

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

    if 9.79999999999999944e-12 < t < 5.50000000000000053e92

    1. Initial program 76.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. Simplified79.3%

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

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

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

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

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

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

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

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

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

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

    if 5.50000000000000053e92 < t

    1. Initial program 55.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. Simplified45.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 8: 78.7% accurate, 1.0× speedup?

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

\\
t\_s \cdot \begin{array}{l}
\mathbf{if}\;k \leq 10^{-8}:\\
\;\;\;\;\frac{2}{{\left(\frac{{t\_m}^{1.5}}{\ell} \cdot \left(k \cdot \mathsf{hypot}\left(1, \mathsf{hypot}\left(1, \frac{k}{t\_m}\right)\right)\right)\right)}^{2}}\\

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


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

    1. Initial program 55.5%

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

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

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

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

    if 1e-8 < k

    1. Initial program 47.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. Simplified47.9%

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

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

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

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

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

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

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

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

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

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

Alternative 9: 75.5% accurate, 1.3× speedup?

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

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

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


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

    1. Initial program 55.4%

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

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

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

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

    if 3.40000000000000016e-44 < k

    1. Initial program 48.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. Simplified48.9%

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

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

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

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

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

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

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

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

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

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

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

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

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


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

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

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

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

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

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

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

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

    if 2.20000000000000009e-52 < t

    1. Initial program 64.1%

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

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

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

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

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

Alternative 11: 63.7% accurate, 1.3× speedup?

\[\begin{array}{l} t\_m = \left|t\right| \\ t\_s = \mathsf{copysign}\left(1, t\right) \\ t\_s \cdot \begin{array}{l} \mathbf{if}\;t\_m \leq 8.5 \cdot 10^{-20}:\\ \;\;\;\;\frac{2}{{\left(\sqrt{t\_m} \cdot \frac{{k}^{2}}{\ell}\right)}^{2}}\\ \mathbf{else}:\\ \;\;\;\;\frac{2}{\frac{{t\_m}^{2} \cdot \left(t\_m \cdot \frac{1}{\ell}\right)}{\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 8.5e-20)
    (/ 2.0 (pow (* (sqrt t_m) (/ (pow k 2.0) l)) 2.0))
    (/
     2.0
     (* (/ (* (pow t_m 2.0) (* t_m (/ 1.0 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 <= 8.5e-20) {
		tmp = 2.0 / pow((sqrt(t_m) * (pow(k, 2.0) / l)), 2.0);
	} else {
		tmp = 2.0 / (((pow(t_m, 2.0) * (t_m * (1.0 / 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 <= 8.5d-20) then
        tmp = 2.0d0 / ((sqrt(t_m) * ((k ** 2.0d0) / l)) ** 2.0d0)
    else
        tmp = 2.0d0 / ((((t_m ** 2.0d0) * (t_m * (1.0d0 / 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 <= 8.5e-20) {
		tmp = 2.0 / Math.pow((Math.sqrt(t_m) * (Math.pow(k, 2.0) / l)), 2.0);
	} else {
		tmp = 2.0 / (((Math.pow(t_m, 2.0) * (t_m * (1.0 / 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 <= 8.5e-20:
		tmp = 2.0 / math.pow((math.sqrt(t_m) * (math.pow(k, 2.0) / l)), 2.0)
	else:
		tmp = 2.0 / (((math.pow(t_m, 2.0) * (t_m * (1.0 / 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 <= 8.5e-20)
		tmp = Float64(2.0 / (Float64(sqrt(t_m) * Float64((k ^ 2.0) / l)) ^ 2.0));
	else
		tmp = Float64(2.0 / Float64(Float64(Float64((t_m ^ 2.0) * Float64(t_m * Float64(1.0 / 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 <= 8.5e-20)
		tmp = 2.0 / ((sqrt(t_m) * ((k ^ 2.0) / l)) ^ 2.0);
	else
		tmp = 2.0 / ((((t_m ^ 2.0) * (t_m * (1.0 / 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, 8.5e-20], N[(2.0 / N[Power[N[(N[Sqrt[t$95$m], $MachinePrecision] * N[(N[Power[k, 2.0], $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision], N[(2.0 / N[(N[(N[(N[Power[t$95$m, 2.0], $MachinePrecision] * N[(t$95$m * N[(1.0 / l), $MachinePrecision]), $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 8.5 \cdot 10^{-20}:\\
\;\;\;\;\frac{2}{{\left(\sqrt{t\_m} \cdot \frac{{k}^{2}}{\ell}\right)}^{2}}\\

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


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

    1. Initial program 49.8%

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

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

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

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

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

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

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

    if 8.5000000000000005e-20 < t

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

      \[\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 53.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. div-inv64.4%

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

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

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

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

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

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

Alternative 12: 63.1% accurate, 1.8× speedup?

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

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

\mathbf{elif}\;t\_m \leq 4 \cdot 10^{+168}:\\
\;\;\;\;t\_2\\

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


\end{array}
\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if t < 1.32000000000000004e-20 or 5.60000000000000037e102 < t < 3.9999999999999997e168

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 1.32000000000000004e-20 < t < 5.60000000000000037e102

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

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

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

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

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

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

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

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

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

    if 3.9999999999999997e168 < t

    1. Initial program 69.5%

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq 1.32 \cdot 10^{-20}:\\ \;\;\;\;2 \cdot \frac{1}{\frac{t}{{\left(\frac{\ell}{{k}^{2}}\right)}^{2}}}\\ \mathbf{elif}\;t \leq 5.6 \cdot 10^{+102}:\\ \;\;\;\;\frac{2}{\frac{{t}^{3} \cdot \left(2 \cdot \frac{{k}^{2}}{\ell}\right)}{\ell}}\\ \mathbf{elif}\;t \leq 4 \cdot 10^{+168}:\\ \;\;\;\;2 \cdot \frac{1}{\frac{t}{{\left(\frac{\ell}{{k}^{2}}\right)}^{2}}}\\ \mathbf{else}:\\ \;\;\;\;\frac{2}{\left(\sin k \cdot \frac{{t}^{3}}{\ell \cdot \ell}\right) \cdot \left(2 \cdot k\right)}\\ \end{array} \]
  5. Add Preprocessing

Alternative 13: 61.6% accurate, 1.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.2 \cdot 10^{-20} \lor \neg \left(t\_m \leq 1.25 \cdot 10^{+91}\right) \land t\_m \leq 1.9 \cdot 10^{+172}:\\ \;\;\;\;2 \cdot \frac{1}{\frac{t\_m}{{\left(\frac{\ell}{{k}^{2}}\right)}^{2}}}\\ \mathbf{else}:\\ \;\;\;\;\frac{2}{\left(2 \cdot {k}^{2}\right) \cdot \frac{\frac{{t\_m}^{3}}{\ell}}{\ell}}\\ \end{array} \end{array} \]
t\_m = (fabs.f64 t)
t\_s = (copysign.f64 #s(literal 1 binary64) t)
(FPCore (t_s t_m l k)
 :precision binary64
 (*
  t_s
  (if (or (<= t_m 7.2e-20) (and (not (<= t_m 1.25e+91)) (<= t_m 1.9e+172)))
    (* 2.0 (/ 1.0 (/ t_m (pow (/ l (pow k 2.0)) 2.0))))
    (/ 2.0 (* (* 2.0 (pow k 2.0)) (/ (/ (pow t_m 3.0) l) l))))))
t\_m = fabs(t);
t\_s = copysign(1.0, t);
double code(double t_s, double t_m, double l, double k) {
	double tmp;
	if ((t_m <= 7.2e-20) || (!(t_m <= 1.25e+91) && (t_m <= 1.9e+172))) {
		tmp = 2.0 * (1.0 / (t_m / pow((l / pow(k, 2.0)), 2.0)));
	} else {
		tmp = 2.0 / ((2.0 * pow(k, 2.0)) * ((pow(t_m, 3.0) / l) / l));
	}
	return t_s * tmp;
}
t\_m = abs(t)
t\_s = copysign(1.0d0, t)
real(8) function code(t_s, t_m, l, k)
    real(8), intent (in) :: t_s
    real(8), intent (in) :: t_m
    real(8), intent (in) :: l
    real(8), intent (in) :: k
    real(8) :: tmp
    if ((t_m <= 7.2d-20) .or. (.not. (t_m <= 1.25d+91)) .and. (t_m <= 1.9d+172)) then
        tmp = 2.0d0 * (1.0d0 / (t_m / ((l / (k ** 2.0d0)) ** 2.0d0)))
    else
        tmp = 2.0d0 / ((2.0d0 * (k ** 2.0d0)) * (((t_m ** 3.0d0) / l) / l))
    end if
    code = t_s * tmp
end function
t\_m = Math.abs(t);
t\_s = Math.copySign(1.0, t);
public static double code(double t_s, double t_m, double l, double k) {
	double tmp;
	if ((t_m <= 7.2e-20) || (!(t_m <= 1.25e+91) && (t_m <= 1.9e+172))) {
		tmp = 2.0 * (1.0 / (t_m / Math.pow((l / Math.pow(k, 2.0)), 2.0)));
	} else {
		tmp = 2.0 / ((2.0 * Math.pow(k, 2.0)) * ((Math.pow(t_m, 3.0) / l) / l));
	}
	return t_s * tmp;
}
t\_m = math.fabs(t)
t\_s = math.copysign(1.0, t)
def code(t_s, t_m, l, k):
	tmp = 0
	if (t_m <= 7.2e-20) or (not (t_m <= 1.25e+91) and (t_m <= 1.9e+172)):
		tmp = 2.0 * (1.0 / (t_m / math.pow((l / math.pow(k, 2.0)), 2.0)))
	else:
		tmp = 2.0 / ((2.0 * math.pow(k, 2.0)) * ((math.pow(t_m, 3.0) / l) / l))
	return t_s * tmp
t\_m = abs(t)
t\_s = copysign(1.0, t)
function code(t_s, t_m, l, k)
	tmp = 0.0
	if ((t_m <= 7.2e-20) || (!(t_m <= 1.25e+91) && (t_m <= 1.9e+172)))
		tmp = Float64(2.0 * Float64(1.0 / Float64(t_m / (Float64(l / (k ^ 2.0)) ^ 2.0))));
	else
		tmp = Float64(2.0 / Float64(Float64(2.0 * (k ^ 2.0)) * Float64(Float64((t_m ^ 3.0) / l) / l)));
	end
	return Float64(t_s * tmp)
end
t\_m = abs(t);
t\_s = sign(t) * abs(1.0);
function tmp_2 = code(t_s, t_m, l, k)
	tmp = 0.0;
	if ((t_m <= 7.2e-20) || (~((t_m <= 1.25e+91)) && (t_m <= 1.9e+172)))
		tmp = 2.0 * (1.0 / (t_m / ((l / (k ^ 2.0)) ^ 2.0)));
	else
		tmp = 2.0 / ((2.0 * (k ^ 2.0)) * (((t_m ^ 3.0) / l) / l));
	end
	tmp_2 = t_s * tmp;
end
t\_m = N[Abs[t], $MachinePrecision]
t\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[t]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[t$95$s_, t$95$m_, l_, k_] := N[(t$95$s * If[Or[LessEqual[t$95$m, 7.2e-20], And[N[Not[LessEqual[t$95$m, 1.25e+91]], $MachinePrecision], LessEqual[t$95$m, 1.9e+172]]], N[(2.0 * N[(1.0 / N[(t$95$m / N[Power[N[(l / N[Power[k, 2.0], $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(2.0 / N[(N[(2.0 * N[Power[k, 2.0], $MachinePrecision]), $MachinePrecision] * N[(N[(N[Power[t$95$m, 3.0], $MachinePrecision] / l), $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]), $MachinePrecision]
\begin{array}{l}
t\_m = \left|t\right|
\\
t\_s = \mathsf{copysign}\left(1, t\right)

\\
t\_s \cdot \begin{array}{l}
\mathbf{if}\;t\_m \leq 7.2 \cdot 10^{-20} \lor \neg \left(t\_m \leq 1.25 \cdot 10^{+91}\right) \land t\_m \leq 1.9 \cdot 10^{+172}:\\
\;\;\;\;2 \cdot \frac{1}{\frac{t\_m}{{\left(\frac{\ell}{{k}^{2}}\right)}^{2}}}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t < 7.19999999999999948e-20 or 1.2500000000000001e91 < t < 1.89999999999999985e172

    1. Initial program 48.4%

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

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

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

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

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

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

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

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

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

        \[\leadsto 2 \cdot \color{blue}{\frac{1}{\frac{t}{\frac{{\ell}^{2}}{{k}^{4}}}}} \]
      2. inv-pow55.5%

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

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

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

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

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

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

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

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

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

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

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

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

    if 7.19999999999999948e-20 < t < 1.2500000000000001e91 or 1.89999999999999985e172 < t

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq 7.2 \cdot 10^{-20} \lor \neg \left(t \leq 1.25 \cdot 10^{+91}\right) \land t \leq 1.9 \cdot 10^{+172}:\\ \;\;\;\;2 \cdot \frac{1}{\frac{t}{{\left(\frac{\ell}{{k}^{2}}\right)}^{2}}}\\ \mathbf{else}:\\ \;\;\;\;\frac{2}{\left(2 \cdot {k}^{2}\right) \cdot \frac{\frac{{t}^{3}}{\ell}}{\ell}}\\ \end{array} \]
  5. Add Preprocessing

Alternative 14: 61.9% accurate, 1.8× speedup?

\[\begin{array}{l} t\_m = \left|t\right| \\ t\_s = \mathsf{copysign}\left(1, t\right) \\ \begin{array}{l} t_2 := \frac{{t\_m}^{3}}{\ell}\\ t_3 := 2 \cdot \frac{1}{\frac{t\_m}{{\left(\frac{\ell}{{k}^{2}}\right)}^{2}}}\\ t_4 := 2 \cdot {k}^{2}\\ t\_s \cdot \begin{array}{l} \mathbf{if}\;t\_m \leq 1.5 \cdot 10^{-20}:\\ \;\;\;\;t\_3\\ \mathbf{elif}\;t\_m \leq 1.25 \cdot 10^{+91}:\\ \;\;\;\;\frac{2}{t\_2 \cdot \frac{t\_4}{\ell}}\\ \mathbf{elif}\;t\_m \leq 1.9 \cdot 10^{+169}:\\ \;\;\;\;t\_3\\ \mathbf{else}:\\ \;\;\;\;\frac{2}{t\_4 \cdot \frac{t\_2}{\ell}}\\ \end{array} \end{array} \end{array} \]
t\_m = (fabs.f64 t)
t\_s = (copysign.f64 #s(literal 1 binary64) t)
(FPCore (t_s t_m l k)
 :precision binary64
 (let* ((t_2 (/ (pow t_m 3.0) l))
        (t_3 (* 2.0 (/ 1.0 (/ t_m (pow (/ l (pow k 2.0)) 2.0)))))
        (t_4 (* 2.0 (pow k 2.0))))
   (*
    t_s
    (if (<= t_m 1.5e-20)
      t_3
      (if (<= t_m 1.25e+91)
        (/ 2.0 (* t_2 (/ t_4 l)))
        (if (<= t_m 1.9e+169) t_3 (/ 2.0 (* t_4 (/ t_2 l)))))))))
t\_m = fabs(t);
t\_s = copysign(1.0, t);
double code(double t_s, double t_m, double l, double k) {
	double t_2 = pow(t_m, 3.0) / l;
	double t_3 = 2.0 * (1.0 / (t_m / pow((l / pow(k, 2.0)), 2.0)));
	double t_4 = 2.0 * pow(k, 2.0);
	double tmp;
	if (t_m <= 1.5e-20) {
		tmp = t_3;
	} else if (t_m <= 1.25e+91) {
		tmp = 2.0 / (t_2 * (t_4 / l));
	} else if (t_m <= 1.9e+169) {
		tmp = t_3;
	} else {
		tmp = 2.0 / (t_4 * (t_2 / 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) :: t_2
    real(8) :: t_3
    real(8) :: t_4
    real(8) :: tmp
    t_2 = (t_m ** 3.0d0) / l
    t_3 = 2.0d0 * (1.0d0 / (t_m / ((l / (k ** 2.0d0)) ** 2.0d0)))
    t_4 = 2.0d0 * (k ** 2.0d0)
    if (t_m <= 1.5d-20) then
        tmp = t_3
    else if (t_m <= 1.25d+91) then
        tmp = 2.0d0 / (t_2 * (t_4 / l))
    else if (t_m <= 1.9d+169) then
        tmp = t_3
    else
        tmp = 2.0d0 / (t_4 * (t_2 / 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 t_2 = Math.pow(t_m, 3.0) / l;
	double t_3 = 2.0 * (1.0 / (t_m / Math.pow((l / Math.pow(k, 2.0)), 2.0)));
	double t_4 = 2.0 * Math.pow(k, 2.0);
	double tmp;
	if (t_m <= 1.5e-20) {
		tmp = t_3;
	} else if (t_m <= 1.25e+91) {
		tmp = 2.0 / (t_2 * (t_4 / l));
	} else if (t_m <= 1.9e+169) {
		tmp = t_3;
	} else {
		tmp = 2.0 / (t_4 * (t_2 / 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):
	t_2 = math.pow(t_m, 3.0) / l
	t_3 = 2.0 * (1.0 / (t_m / math.pow((l / math.pow(k, 2.0)), 2.0)))
	t_4 = 2.0 * math.pow(k, 2.0)
	tmp = 0
	if t_m <= 1.5e-20:
		tmp = t_3
	elif t_m <= 1.25e+91:
		tmp = 2.0 / (t_2 * (t_4 / l))
	elif t_m <= 1.9e+169:
		tmp = t_3
	else:
		tmp = 2.0 / (t_4 * (t_2 / l))
	return t_s * tmp
t\_m = abs(t)
t\_s = copysign(1.0, t)
function code(t_s, t_m, l, k)
	t_2 = Float64((t_m ^ 3.0) / l)
	t_3 = Float64(2.0 * Float64(1.0 / Float64(t_m / (Float64(l / (k ^ 2.0)) ^ 2.0))))
	t_4 = Float64(2.0 * (k ^ 2.0))
	tmp = 0.0
	if (t_m <= 1.5e-20)
		tmp = t_3;
	elseif (t_m <= 1.25e+91)
		tmp = Float64(2.0 / Float64(t_2 * Float64(t_4 / l)));
	elseif (t_m <= 1.9e+169)
		tmp = t_3;
	else
		tmp = Float64(2.0 / Float64(t_4 * Float64(t_2 / 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)
	t_2 = (t_m ^ 3.0) / l;
	t_3 = 2.0 * (1.0 / (t_m / ((l / (k ^ 2.0)) ^ 2.0)));
	t_4 = 2.0 * (k ^ 2.0);
	tmp = 0.0;
	if (t_m <= 1.5e-20)
		tmp = t_3;
	elseif (t_m <= 1.25e+91)
		tmp = 2.0 / (t_2 * (t_4 / l));
	elseif (t_m <= 1.9e+169)
		tmp = t_3;
	else
		tmp = 2.0 / (t_4 * (t_2 / 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_] := Block[{t$95$2 = N[(N[Power[t$95$m, 3.0], $MachinePrecision] / l), $MachinePrecision]}, Block[{t$95$3 = N[(2.0 * N[(1.0 / N[(t$95$m / N[Power[N[(l / N[Power[k, 2.0], $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$4 = N[(2.0 * N[Power[k, 2.0], $MachinePrecision]), $MachinePrecision]}, N[(t$95$s * If[LessEqual[t$95$m, 1.5e-20], t$95$3, If[LessEqual[t$95$m, 1.25e+91], N[(2.0 / N[(t$95$2 * N[(t$95$4 / l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$m, 1.9e+169], t$95$3, N[(2.0 / N[(t$95$4 * N[(t$95$2 / l), $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}^{3}}{\ell}\\
t_3 := 2 \cdot \frac{1}{\frac{t\_m}{{\left(\frac{\ell}{{k}^{2}}\right)}^{2}}}\\
t_4 := 2 \cdot {k}^{2}\\
t\_s \cdot \begin{array}{l}
\mathbf{if}\;t\_m \leq 1.5 \cdot 10^{-20}:\\
\;\;\;\;t\_3\\

\mathbf{elif}\;t\_m \leq 1.25 \cdot 10^{+91}:\\
\;\;\;\;\frac{2}{t\_2 \cdot \frac{t\_4}{\ell}}\\

\mathbf{elif}\;t\_m \leq 1.9 \cdot 10^{+169}:\\
\;\;\;\;t\_3\\

\mathbf{else}:\\
\;\;\;\;\frac{2}{t\_4 \cdot \frac{t\_2}{\ell}}\\


\end{array}
\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if t < 1.50000000000000014e-20 or 1.2500000000000001e91 < t < 1.89999999999999996e169

    1. Initial program 48.4%

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

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

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

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

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

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

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

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

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

        \[\leadsto 2 \cdot \color{blue}{\frac{1}{\frac{t}{\frac{{\ell}^{2}}{{k}^{4}}}}} \]
      2. inv-pow55.5%

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

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

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

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

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

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

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

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

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

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

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

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

    if 1.50000000000000014e-20 < t < 1.2500000000000001e91

    1. Initial program 76.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. Simplified79.3%

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

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

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

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

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

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

    if 1.89999999999999996e169 < t

    1. Initial program 69.5%

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq 1.5 \cdot 10^{-20}:\\ \;\;\;\;2 \cdot \frac{1}{\frac{t}{{\left(\frac{\ell}{{k}^{2}}\right)}^{2}}}\\ \mathbf{elif}\;t \leq 1.25 \cdot 10^{+91}:\\ \;\;\;\;\frac{2}{\frac{{t}^{3}}{\ell} \cdot \frac{2 \cdot {k}^{2}}{\ell}}\\ \mathbf{elif}\;t \leq 1.9 \cdot 10^{+169}:\\ \;\;\;\;2 \cdot \frac{1}{\frac{t}{{\left(\frac{\ell}{{k}^{2}}\right)}^{2}}}\\ \mathbf{else}:\\ \;\;\;\;\frac{2}{\left(2 \cdot {k}^{2}\right) \cdot \frac{\frac{{t}^{3}}{\ell}}{\ell}}\\ \end{array} \]
  5. Add Preprocessing

Alternative 15: 62.4% accurate, 1.8× speedup?

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

\\
\begin{array}{l}
t_2 := 2 \cdot \frac{1}{\frac{t\_m}{{\left(\frac{\ell}{{k}^{2}}\right)}^{2}}}\\
t\_s \cdot \begin{array}{l}
\mathbf{if}\;t\_m \leq 1.32 \cdot 10^{-20}:\\
\;\;\;\;t\_2\\

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

\mathbf{elif}\;t\_m \leq 4.45 \cdot 10^{+170}:\\
\;\;\;\;t\_2\\

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


\end{array}
\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if t < 1.32000000000000004e-20 or 5.60000000000000037e102 < t < 4.45e170

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 1.32000000000000004e-20 < t < 5.60000000000000037e102

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

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

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

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

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

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

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

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

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

    if 4.45e170 < t

    1. Initial program 69.5%

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq 1.32 \cdot 10^{-20}:\\ \;\;\;\;2 \cdot \frac{1}{\frac{t}{{\left(\frac{\ell}{{k}^{2}}\right)}^{2}}}\\ \mathbf{elif}\;t \leq 5.6 \cdot 10^{+102}:\\ \;\;\;\;\frac{2}{\frac{{t}^{3} \cdot \left(2 \cdot \frac{{k}^{2}}{\ell}\right)}{\ell}}\\ \mathbf{elif}\;t \leq 4.45 \cdot 10^{+170}:\\ \;\;\;\;2 \cdot \frac{1}{\frac{t}{{\left(\frac{\ell}{{k}^{2}}\right)}^{2}}}\\ \mathbf{else}:\\ \;\;\;\;\frac{2}{\left(2 \cdot {k}^{2}\right) \cdot \frac{\frac{{t}^{3}}{\ell}}{\ell}}\\ \end{array} \]
  5. Add Preprocessing

Alternative 16: 63.3% accurate, 1.9× speedup?

\[\begin{array}{l} t\_m = \left|t\right| \\ t\_s = \mathsf{copysign}\left(1, t\right) \\ t\_s \cdot \begin{array}{l} \mathbf{if}\;t\_m \leq 6.5 \cdot 10^{-19}:\\ \;\;\;\;2 \cdot \frac{1}{\frac{t\_m}{{\left(\frac{\ell}{{k}^{2}}\right)}^{2}}}\\ \mathbf{else}:\\ \;\;\;\;\frac{2}{\frac{{t\_m}^{2} \cdot \left(t\_m \cdot \frac{1}{\ell}\right)}{\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-19)
    (* 2.0 (/ 1.0 (/ t_m (pow (/ l (pow k 2.0)) 2.0))))
    (/
     2.0
     (* (/ (* (pow t_m 2.0) (* t_m (/ 1.0 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-19) {
		tmp = 2.0 * (1.0 / (t_m / pow((l / pow(k, 2.0)), 2.0)));
	} else {
		tmp = 2.0 / (((pow(t_m, 2.0) * (t_m * (1.0 / 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-19) then
        tmp = 2.0d0 * (1.0d0 / (t_m / ((l / (k ** 2.0d0)) ** 2.0d0)))
    else
        tmp = 2.0d0 / ((((t_m ** 2.0d0) * (t_m * (1.0d0 / 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-19) {
		tmp = 2.0 * (1.0 / (t_m / Math.pow((l / Math.pow(k, 2.0)), 2.0)));
	} else {
		tmp = 2.0 / (((Math.pow(t_m, 2.0) * (t_m * (1.0 / 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-19:
		tmp = 2.0 * (1.0 / (t_m / math.pow((l / math.pow(k, 2.0)), 2.0)))
	else:
		tmp = 2.0 / (((math.pow(t_m, 2.0) * (t_m * (1.0 / 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-19)
		tmp = Float64(2.0 * Float64(1.0 / Float64(t_m / (Float64(l / (k ^ 2.0)) ^ 2.0))));
	else
		tmp = Float64(2.0 / Float64(Float64(Float64((t_m ^ 2.0) * Float64(t_m * Float64(1.0 / 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-19)
		tmp = 2.0 * (1.0 / (t_m / ((l / (k ^ 2.0)) ^ 2.0)));
	else
		tmp = 2.0 / ((((t_m ^ 2.0) * (t_m * (1.0 / 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-19], N[(2.0 * N[(1.0 / N[(t$95$m / N[Power[N[(l / N[Power[k, 2.0], $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(2.0 / N[(N[(N[(N[Power[t$95$m, 2.0], $MachinePrecision] * N[(t$95$m * N[(1.0 / l), $MachinePrecision]), $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^{-19}:\\
\;\;\;\;2 \cdot \frac{1}{\frac{t\_m}{{\left(\frac{\ell}{{k}^{2}}\right)}^{2}}}\\

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


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

    1. Initial program 49.8%

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

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

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

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

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

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

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

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

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

        \[\leadsto 2 \cdot \color{blue}{\frac{1}{\frac{t}{\frac{{\ell}^{2}}{{k}^{4}}}}} \]
      2. inv-pow57.4%

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

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

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

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

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

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

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

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

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

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

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

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

    if 6.5000000000000001e-19 < t

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

      \[\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 53.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. div-inv64.4%

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

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

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

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

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

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

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

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

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


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

    1. Initial program 49.8%

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

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

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

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

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

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

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

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

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

        \[\leadsto 2 \cdot \color{blue}{\frac{1}{\frac{t}{\frac{{\ell}^{2}}{{k}^{4}}}}} \]
      2. inv-pow57.4%

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

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

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

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

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

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

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

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

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

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

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

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

    if 6.19999999999999999e-20 < t

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 19: 50.9% accurate, 2.0× speedup?

\[\begin{array}{l} t\_m = \left|t\right| \\ t\_s = \mathsf{copysign}\left(1, t\right) \\ t\_s \cdot \left(2 \cdot \frac{{\ell}^{2} \cdot {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{{\ell}^{2} \cdot {k}^{-4}}{t\_m}\right)
\end{array}
Derivation
  1. Initial program 53.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. Simplified53.9%

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

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

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

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

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

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

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

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

      \[\leadsto 2 \cdot \frac{\color{blue}{{\ell}^{2} \cdot \frac{1}{{k}^{4}}}}{t} \]
    2. pow-flip52.4%

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

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

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

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

Alternative 20: 51.0% 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 53.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. Simplified53.9%

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

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

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

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

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

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

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

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

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

Alternative 21: 51.7% accurate, 2.0× speedup?

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

\\
t\_s \cdot \frac{2}{{k}^{4} \cdot \frac{t\_m}{{\ell}^{2}}}
\end{array}
Derivation
  1. Initial program 53.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. Simplified53.9%

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

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

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

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

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

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

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

    \[\leadsto \frac{2}{\color{blue}{{k}^{4} \cdot \frac{t}{{\ell}^{2}}}} \]
  11. Final simplification53.9%

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

Alternative 22: 55.9% accurate, 2.0× speedup?

\[\begin{array}{l} t\_m = \left|t\right| \\ t\_s = \mathsf{copysign}\left(1, t\right) \\ t\_s \cdot \frac{2 \cdot {\left(\frac{\ell}{{k}^{2}}\right)}^{2}}{t\_m} \end{array} \]
t\_m = (fabs.f64 t)
t\_s = (copysign.f64 #s(literal 1 binary64) t)
(FPCore (t_s t_m l k)
 :precision binary64
 (* t_s (/ (* 2.0 (pow (/ l (pow k 2.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 * ((2.0 * pow((l / pow(k, 2.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 * ((2.0d0 * ((l / (k ** 2.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 * ((2.0 * Math.pow((l / Math.pow(k, 2.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 * ((2.0 * math.pow((l / math.pow(k, 2.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(2.0 * (Float64(l / (k ^ 2.0)) ^ 2.0)) / t_m))
end
t\_m = abs(t);
t\_s = sign(t) * abs(1.0);
function tmp = code(t_s, t_m, l, k)
	tmp = t_s * ((2.0 * ((l / (k ^ 2.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[(2.0 * N[Power[N[(l / N[Power[k, 2.0], $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision] / t$95$m), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
t\_m = \left|t\right|
\\
t\_s = \mathsf{copysign}\left(1, t\right)

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Reproduce

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