Toniolo and Linder, Equation (10+)

Percentage Accurate: 54.4% → 89.4%
Time: 16.8s
Alternatives: 15
Speedup: 24.8×

Specification

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

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

Sampling outcomes in binary64 precision:

Local Percentage Accuracy vs ?

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

Accuracy vs Speed?

Herbie found 15 alternatives:

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

Initial Program: 54.4% accurate, 1.0× speedup?

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

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

Alternative 1: 89.4% accurate, 0.8× speedup?

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

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

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


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

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

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

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

        \[\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+50.2%

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

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

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

        \[\leadsto \frac{2}{\color{blue}{\sqrt{\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{\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. pow222.0%

        \[\leadsto \frac{2}{\color{blue}{{\left(\sqrt{\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)}^{2}}} \]
    5. Applied egg-rr22.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}}} \]
    6. Step-by-step derivation
      1. associate-*r*22.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 7.80000000000000021e-11 < 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. Simplified62.9%

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{\frac{{\ell}^{2}}{{t}^{3} \cdot {k}^{2}}} \]
    9. Step-by-step derivation
      1. add-cube-cbrt54.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 2: 85.9% accurate, 1.0× speedup?

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

\mathbf{else}:\\
\;\;\;\;{\left(\frac{\sqrt{2}}{\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 < 1.75e-9

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

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

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

        \[\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+50.2%

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

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

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

        \[\leadsto \frac{2}{\color{blue}{\sqrt{\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{\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. pow222.0%

        \[\leadsto \frac{2}{\color{blue}{{\left(\sqrt{\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)}^{2}}} \]
    5. Applied egg-rr22.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}}} \]
    6. Step-by-step derivation
      1. associate-*r*22.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 1.75e-9 < 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. Simplified62.9%

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

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

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

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

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

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

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

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

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

Alternative 3: 85.2% accurate, 1.0× speedup?

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

\mathbf{else}:\\
\;\;\;\;{\left(\frac{\sqrt{2}}{\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 < 5.99999999999999946e-8

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

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

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

        \[\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+50.2%

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

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

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

        \[\leadsto \frac{2}{\color{blue}{\sqrt{\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{\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. pow222.0%

        \[\leadsto \frac{2}{\color{blue}{{\left(\sqrt{\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)}^{2}}} \]
    5. Applied egg-rr22.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}}} \]
    6. Step-by-step derivation
      1. associate-*r*22.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 5.99999999999999946e-8 < 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. Simplified62.9%

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

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

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

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

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

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

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

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

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

Alternative 4: 82.1% accurate, 1.0× speedup?

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

\mathbf{else}:\\
\;\;\;\;{\left(\frac{\sqrt{2}}{\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.2000000000000002e-11

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

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

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

        \[\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+50.2%

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

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

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

        \[\leadsto \frac{2}{\color{blue}{\sqrt{\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{\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. pow222.0%

        \[\leadsto \frac{2}{\color{blue}{{\left(\sqrt{\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)}^{2}}} \]
    5. Applied egg-rr22.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}}} \]
    6. Step-by-step derivation
      1. associate-*r*22.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 2.2000000000000002e-11 < 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. Simplified62.9%

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

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

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

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

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

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

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

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

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

Alternative 5: 67.9% 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.2 \cdot 10^{-78}:\\ \;\;\;\;2 \cdot \frac{\frac{{\ell}^{2}}{{k}^{4}}}{t\_m}\\ \mathbf{elif}\;t\_m \leq 3.25 \cdot 10^{+100}:\\ \;\;\;\;\frac{2}{2 \cdot \left({\left(\frac{k}{\ell}\right)}^{2} \cdot {t\_m}^{3}\right)}\\ \mathbf{elif}\;t\_m \leq 3.2 \cdot 10^{+205}:\\ \;\;\;\;\frac{{\ell}^{2}}{{\left(k \cdot {t\_m}^{1.5}\right)}^{2}}\\ \mathbf{else}:\\ \;\;\;\;{\left(\ell \cdot \frac{\sqrt{\frac{1}{{t\_m}^{3}}}}{k}\right)}^{2}\\ \end{array} \end{array} \]
t\_m = (fabs.f64 t)
t\_s = (copysign.f64 #s(literal 1 binary64) t)
(FPCore (t_s t_m l k)
 :precision binary64
 (*
  t_s
  (if (<= t_m 8.2e-78)
    (* 2.0 (/ (/ (pow l 2.0) (pow k 4.0)) t_m))
    (if (<= t_m 3.25e+100)
      (/ 2.0 (* 2.0 (* (pow (/ k l) 2.0) (pow t_m 3.0))))
      (if (<= t_m 3.2e+205)
        (/ (pow l 2.0) (pow (* k (pow t_m 1.5)) 2.0))
        (pow (* l (/ (sqrt (/ 1.0 (pow t_m 3.0))) 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.2e-78) {
		tmp = 2.0 * ((pow(l, 2.0) / pow(k, 4.0)) / t_m);
	} else if (t_m <= 3.25e+100) {
		tmp = 2.0 / (2.0 * (pow((k / l), 2.0) * pow(t_m, 3.0)));
	} else if (t_m <= 3.2e+205) {
		tmp = pow(l, 2.0) / pow((k * pow(t_m, 1.5)), 2.0);
	} else {
		tmp = pow((l * (sqrt((1.0 / pow(t_m, 3.0))) / 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.2d-78) then
        tmp = 2.0d0 * (((l ** 2.0d0) / (k ** 4.0d0)) / t_m)
    else if (t_m <= 3.25d+100) then
        tmp = 2.0d0 / (2.0d0 * (((k / l) ** 2.0d0) * (t_m ** 3.0d0)))
    else if (t_m <= 3.2d+205) then
        tmp = (l ** 2.0d0) / ((k * (t_m ** 1.5d0)) ** 2.0d0)
    else
        tmp = (l * (sqrt((1.0d0 / (t_m ** 3.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.2e-78) {
		tmp = 2.0 * ((Math.pow(l, 2.0) / Math.pow(k, 4.0)) / t_m);
	} else if (t_m <= 3.25e+100) {
		tmp = 2.0 / (2.0 * (Math.pow((k / l), 2.0) * Math.pow(t_m, 3.0)));
	} else if (t_m <= 3.2e+205) {
		tmp = Math.pow(l, 2.0) / Math.pow((k * Math.pow(t_m, 1.5)), 2.0);
	} else {
		tmp = Math.pow((l * (Math.sqrt((1.0 / Math.pow(t_m, 3.0))) / 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.2e-78:
		tmp = 2.0 * ((math.pow(l, 2.0) / math.pow(k, 4.0)) / t_m)
	elif t_m <= 3.25e+100:
		tmp = 2.0 / (2.0 * (math.pow((k / l), 2.0) * math.pow(t_m, 3.0)))
	elif t_m <= 3.2e+205:
		tmp = math.pow(l, 2.0) / math.pow((k * math.pow(t_m, 1.5)), 2.0)
	else:
		tmp = math.pow((l * (math.sqrt((1.0 / math.pow(t_m, 3.0))) / 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.2e-78)
		tmp = Float64(2.0 * Float64(Float64((l ^ 2.0) / (k ^ 4.0)) / t_m));
	elseif (t_m <= 3.25e+100)
		tmp = Float64(2.0 / Float64(2.0 * Float64((Float64(k / l) ^ 2.0) * (t_m ^ 3.0))));
	elseif (t_m <= 3.2e+205)
		tmp = Float64((l ^ 2.0) / (Float64(k * (t_m ^ 1.5)) ^ 2.0));
	else
		tmp = Float64(l * Float64(sqrt(Float64(1.0 / (t_m ^ 3.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.2e-78)
		tmp = 2.0 * (((l ^ 2.0) / (k ^ 4.0)) / t_m);
	elseif (t_m <= 3.25e+100)
		tmp = 2.0 / (2.0 * (((k / l) ^ 2.0) * (t_m ^ 3.0)));
	elseif (t_m <= 3.2e+205)
		tmp = (l ^ 2.0) / ((k * (t_m ^ 1.5)) ^ 2.0);
	else
		tmp = (l * (sqrt((1.0 / (t_m ^ 3.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.2e-78], N[(2.0 * N[(N[(N[Power[l, 2.0], $MachinePrecision] / N[Power[k, 4.0], $MachinePrecision]), $MachinePrecision] / t$95$m), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$m, 3.25e+100], N[(2.0 / N[(2.0 * N[(N[Power[N[(k / l), $MachinePrecision], 2.0], $MachinePrecision] * N[Power[t$95$m, 3.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$m, 3.2e+205], N[(N[Power[l, 2.0], $MachinePrecision] / N[Power[N[(k * N[Power[t$95$m, 1.5], $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision], N[Power[N[(l * N[(N[Sqrt[N[(1.0 / N[Power[t$95$m, 3.0], $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / k), $MachinePrecision]), $MachinePrecision], 2.0], $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.2 \cdot 10^{-78}:\\
\;\;\;\;2 \cdot \frac{\frac{{\ell}^{2}}{{k}^{4}}}{t\_m}\\

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

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

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


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

    1. Initial program 44.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. Simplified44.6%

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

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

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

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

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

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

        \[\leadsto \frac{2}{\color{blue}{\sqrt{\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{\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. pow218.4%

        \[\leadsto \frac{2}{\color{blue}{{\left(\sqrt{\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)}^{2}}} \]
    5. Applied egg-rr16.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}}} \]
    6. Step-by-step derivation
      1. associate-*r*16.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 8.1999999999999996e-78 < t < 3.25e100

    1. Initial program 75.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 3.25e100 < t < 3.19999999999999996e205

    1. Initial program 57.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. Simplified57.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 3.19999999999999996e205 < t

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

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{{\left(\frac{\frac{\sqrt{2}}{\frac{{t}^{1.5}}{\ell}}}{k \cdot \sqrt{2}}\right)}^{2}} \]
    11. Taylor expanded in t around 0 62.2%

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq 8.2 \cdot 10^{-78}:\\ \;\;\;\;2 \cdot \frac{\frac{{\ell}^{2}}{{k}^{4}}}{t}\\ \mathbf{elif}\;t \leq 3.25 \cdot 10^{+100}:\\ \;\;\;\;\frac{2}{2 \cdot \left({\left(\frac{k}{\ell}\right)}^{2} \cdot {t}^{3}\right)}\\ \mathbf{elif}\;t \leq 3.2 \cdot 10^{+205}:\\ \;\;\;\;\frac{{\ell}^{2}}{{\left(k \cdot {t}^{1.5}\right)}^{2}}\\ \mathbf{else}:\\ \;\;\;\;{\left(\ell \cdot \frac{\sqrt{\frac{1}{{t}^{3}}}}{k}\right)}^{2}\\ \end{array} \]
  5. Add Preprocessing

Alternative 6: 82.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 4 \cdot 10^{-9}:\\ \;\;\;\;\frac{1}{t\_m \cdot \frac{{\left(\frac{k}{\ell}\right)}^{2}}{\frac{\frac{2}{\sin k}}{\tan k}}}\\ \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 4e-9)
    (/ 1.0 (* t_m (/ (pow (/ k l) 2.0) (/ (/ 2.0 (sin k)) (tan k)))))
    (/ 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 <= 4e-9) {
		tmp = 1.0 / (t_m * (pow((k / l), 2.0) / ((2.0 / sin(k)) / tan(k))));
	} 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 <= 4d-9) then
        tmp = 1.0d0 / (t_m * (((k / l) ** 2.0d0) / ((2.0d0 / sin(k)) / tan(k))))
    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 <= 4e-9) {
		tmp = 1.0 / (t_m * (Math.pow((k / l), 2.0) / ((2.0 / Math.sin(k)) / Math.tan(k))));
	} 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 <= 4e-9:
		tmp = 1.0 / (t_m * (math.pow((k / l), 2.0) / ((2.0 / math.sin(k)) / math.tan(k))))
	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 <= 4e-9)
		tmp = Float64(1.0 / Float64(t_m * Float64((Float64(k / l) ^ 2.0) / Float64(Float64(2.0 / sin(k)) / tan(k)))));
	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 <= 4e-9)
		tmp = 1.0 / (t_m * (((k / l) ^ 2.0) / ((2.0 / sin(k)) / tan(k))));
	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, 4e-9], N[(1.0 / N[(t$95$m * N[(N[Power[N[(k / l), $MachinePrecision], 2.0], $MachinePrecision] / N[(N[(2.0 / N[Sin[k], $MachinePrecision]), $MachinePrecision] / N[Tan[k], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $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 4 \cdot 10^{-9}:\\
\;\;\;\;\frac{1}{t\_m \cdot \frac{{\left(\frac{k}{\ell}\right)}^{2}}{\frac{\frac{2}{\sin k}}{\tan k}}}\\

\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 < 4.00000000000000025e-9

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

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

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

        \[\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+50.2%

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

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

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

        \[\leadsto \frac{2}{\color{blue}{\sqrt{\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{\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. pow222.0%

        \[\leadsto \frac{2}{\color{blue}{{\left(\sqrt{\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)}^{2}}} \]
    5. Applied egg-rr22.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}}} \]
    6. Step-by-step derivation
      1. associate-*r*22.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 4.00000000000000025e-9 < 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. Simplified62.9%

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 7: 82.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 \cdot 10^{-10}:\\ \;\;\;\;\frac{\frac{2}{\sin k}}{\tan k} \cdot \frac{1}{t\_m \cdot {\left(\frac{k}{\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 2e-10)
    (* (/ (/ 2.0 (sin k)) (tan k)) (/ 1.0 (* t_m (pow (/ k 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 <= 2e-10) {
		tmp = ((2.0 / sin(k)) / tan(k)) * (1.0 / (t_m * pow((k / 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 <= 2d-10) then
        tmp = ((2.0d0 / sin(k)) / tan(k)) * (1.0d0 / (t_m * ((k / 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 <= 2e-10) {
		tmp = ((2.0 / Math.sin(k)) / Math.tan(k)) * (1.0 / (t_m * Math.pow((k / 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 <= 2e-10:
		tmp = ((2.0 / math.sin(k)) / math.tan(k)) * (1.0 / (t_m * math.pow((k / 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 <= 2e-10)
		tmp = Float64(Float64(Float64(2.0 / sin(k)) / tan(k)) * Float64(1.0 / Float64(t_m * (Float64(k / 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 <= 2e-10)
		tmp = ((2.0 / sin(k)) / tan(k)) * (1.0 / (t_m * ((k / 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, 2e-10], N[(N[(N[(2.0 / N[Sin[k], $MachinePrecision]), $MachinePrecision] / N[Tan[k], $MachinePrecision]), $MachinePrecision] * N[(1.0 / N[(t$95$m * N[Power[N[(k / l), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $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 \cdot 10^{-10}:\\
\;\;\;\;\frac{\frac{2}{\sin k}}{\tan k} \cdot \frac{1}{t\_m \cdot {\left(\frac{k}{\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.00000000000000007e-10

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

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

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

        \[\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+50.2%

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

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

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

        \[\leadsto \frac{2}{\color{blue}{\sqrt{\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{\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. pow222.0%

        \[\leadsto \frac{2}{\color{blue}{{\left(\sqrt{\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)}^{2}}} \]
    5. Applied egg-rr22.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}}} \]
    6. Step-by-step derivation
      1. associate-*r*22.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 2.00000000000000007e-10 < 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. Simplified62.9%

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq 2 \cdot 10^{-10}:\\ \;\;\;\;\frac{\frac{2}{\sin k}}{\tan k} \cdot \frac{1}{t \cdot {\left(\frac{k}{\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 8: 82.0% accurate, 1.3× speedup?

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

\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 < 1.3500000000000001e-9

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

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

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

        \[\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+50.2%

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

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

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

        \[\leadsto \frac{2}{\color{blue}{\sqrt{\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{\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. pow222.0%

        \[\leadsto \frac{2}{\color{blue}{{\left(\sqrt{\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)}^{2}}} \]
    5. Applied egg-rr22.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}}} \]
    6. Step-by-step derivation
      1. associate-*r*22.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 1.3500000000000001e-9 < 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. Simplified62.9%

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq 1.35 \cdot 10^{-9}:\\ \;\;\;\;\frac{2}{t \cdot \left(\left(\sin k \cdot \tan k\right) \cdot {\left(\frac{k}{\ell}\right)}^{2}\right)}\\ \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 9: 73.5% accurate, 1.3× speedup?

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

    1. Initial program 45.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. Simplified45.3%

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

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

        \[\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+48.9%

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

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

        \[\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-sqr-sqrt19.3%

        \[\leadsto \frac{2}{\color{blue}{\sqrt{\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{\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. pow219.3%

        \[\leadsto \frac{2}{\color{blue}{{\left(\sqrt{\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)}^{2}}} \]
    5. Applied egg-rr17.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}}} \]
    6. Step-by-step derivation
      1. associate-*r*17.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 3.80000000000000002e-72 < t

    1. Initial program 64.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

\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 < 7.50000000000000018e-81

    1. Initial program 44.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. Simplified44.3%

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

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

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

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

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

        \[\leadsto \frac{2}{\color{blue}{\sqrt{\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{\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. pow217.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 7.50000000000000018e-81 < t

    1. Initial program 65.4%

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

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

        \[\leadsto \frac{2}{\frac{\frac{\color{blue}{e^{\log \left({t}^{3}\right)}}}{\ell}}{\ell} \cdot \left(2 \cdot {k}^{2}\right)} \]
      2. log-pow55.2%

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

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

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

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

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

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

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

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

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

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

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

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


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

    1. Initial program 44.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. Simplified44.3%

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

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

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

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

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

        \[\leadsto \frac{2}{\color{blue}{\sqrt{\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{\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. pow217.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 3.99999999999999985e-80 < t

    1. Initial program 65.4%

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

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

        \[\leadsto \frac{2}{\frac{\frac{\color{blue}{e^{\log \left({t}^{3}\right)}}}{\ell}}{\ell} \cdot \left(2 \cdot {k}^{2}\right)} \]
      2. log-pow55.2%

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

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

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

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

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

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

      \[\leadsto \color{blue}{{\left(\frac{\frac{\sqrt{2}}{\frac{{t}^{1.5}}{\ell}}}{k \cdot \sqrt{2}}\right)}^{2}} \]
    11. Taylor expanded in t around 0 65.8%

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

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

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

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

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


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

    1. Initial program 45.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. Simplified45.3%

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

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

        \[\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+48.9%

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

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

        \[\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-sqr-sqrt19.3%

        \[\leadsto \frac{2}{\color{blue}{\sqrt{\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{\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. pow219.3%

        \[\leadsto \frac{2}{\color{blue}{{\left(\sqrt{\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)}^{2}}} \]
    5. Applied egg-rr17.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}}} \]
    6. Step-by-step derivation
      1. associate-*r*17.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 2.59999999999999996e-72 < t

    1. Initial program 64.2%

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

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{{\left(\frac{\frac{\sqrt{2}}{\frac{{t}^{1.5}}{\ell}}}{k \cdot \sqrt{2}}\right)}^{2}} \]
    11. Taylor expanded in t around 0 67.9%

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

Alternative 13: 62.9% accurate, 1.9× speedup?

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

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


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

    1. Initial program 44.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. Simplified44.6%

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

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

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

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

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

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

        \[\leadsto \frac{2}{\color{blue}{\sqrt{\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{\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. pow218.4%

        \[\leadsto \frac{2}{\color{blue}{{\left(\sqrt{\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)}^{2}}} \]
    5. Applied egg-rr16.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}}} \]
    6. Step-by-step derivation
      1. associate-*r*16.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 7.40000000000000011e-78 < t

    1. Initial program 65.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. Simplified63.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 14: 59.8% accurate, 2.0× speedup?

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

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

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


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

    1. Initial program 45.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. Simplified45.3%

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

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

        \[\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+48.9%

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

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

        \[\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-sqr-sqrt19.3%

        \[\leadsto \frac{2}{\color{blue}{\sqrt{\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{\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. pow219.3%

        \[\leadsto \frac{2}{\color{blue}{{\left(\sqrt{\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)}^{2}}} \]
    5. Applied egg-rr17.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}}} \]
    6. Step-by-step derivation
      1. associate-*r*17.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 3.3999999999999998e-72 < t

    1. Initial program 64.2%

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

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

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

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

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

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

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

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

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

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

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

Alternative 15: 57.0% accurate, 24.8× speedup?

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

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

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

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

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

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

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

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

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

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

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

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

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

Reproduce

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