Toniolo and Linder, Equation (10+)

Percentage Accurate: 54.6% → 93.2%
Time: 17.3s
Alternatives: 18
Speedup: 3.7×

Specification

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

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

Sampling outcomes in binary64 precision:

Local Percentage Accuracy vs ?

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

Accuracy vs Speed?

Herbie found 18 alternatives:

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

Initial Program: 54.6% accurate, 1.0× speedup?

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

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

Alternative 1: 93.2% accurate, 0.6× speedup?

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

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

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


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

    1. Initial program 47.8%

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

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

        \[\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*53.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+53.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-eval53.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*53.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-sqrt23.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. pow223.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-rr19.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 7.20000000000000016e-34 < t

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 2: 77.6% accurate, 0.6× speedup?

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

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

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

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


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

    1. Initial program 58.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 2.9e-141 < k < 8.4999999999999999e-6

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

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

        \[\leadsto \frac{2}{\color{blue}{\frac{{t}^{3}}{\ell \cdot \ell} \cdot \left(\sin k \cdot \left(\tan k \cdot \left(1 + \left(1 + {\left(\frac{k}{t}\right)}^{2}\right)\right)\right)\right)}} \]
      2. associate-/r*61.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+61.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-eval61.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*61.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-sqrt39.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. pow239.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-rr52.6%

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

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

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

    if 8.4999999999999999e-6 < k

    1. Initial program 40.8%

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

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

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

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

        \[\leadsto \frac{2}{\frac{\frac{{t}^{3}}{\ell}}{\ell} \cdot \color{blue}{\left(\left(\sin k \cdot \tan k\right) \cdot \left(2 + {\left(\frac{k}{t}\right)}^{2}\right)\right)}} \]
      6. add-sqr-sqrt22.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. pow222.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-rr15.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*15.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. Simplified15.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. Taylor expanded in t around 0 17.1%

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

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

      \[\leadsto \frac{2}{{\left(\color{blue}{\frac{k \cdot \sqrt{t}}{\ell}} \cdot \sqrt{\sin k \cdot \tan k}\right)}^{2}} \]
    11. Step-by-step derivation
      1. add-cbrt-cube17.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;k \leq 2.9 \cdot 10^{-141}:\\ \;\;\;\;\frac{2}{{\left(\frac{t \cdot \sqrt[3]{\sin k}}{{\left(\sqrt[3]{\ell}\right)}^{2}}\right)}^{3} \cdot \left(2 \cdot k\right)}\\ \mathbf{elif}\;k \leq 8.5 \cdot 10^{-6}:\\ \;\;\;\;\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}}\\ \mathbf{else}:\\ \;\;\;\;\frac{2}{\left(\sin k \cdot \tan k\right) \cdot {\left(\frac{k}{\ell} \cdot \sqrt{t}\right)}^{2}}\\ \end{array} \]
  5. Add Preprocessing

Alternative 3: 93.2% accurate, 0.6× speedup?

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

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

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


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

    1. Initial program 47.8%

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

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

        \[\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*53.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+53.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-eval53.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*53.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-sqrt23.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. pow223.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-rr19.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 6.8999999999999999e-34 < t

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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


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

    1. Initial program 58.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 1.45e-141 < k < 7.99999999999999964e-6

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

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

        \[\leadsto \frac{2}{\color{blue}{\frac{{t}^{3}}{\ell \cdot \ell} \cdot \left(\sin k \cdot \left(\tan k \cdot \left(1 + \left(1 + {\left(\frac{k}{t}\right)}^{2}\right)\right)\right)\right)}} \]
      2. associate-/r*61.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+61.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-eval61.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*61.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-sqrt39.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. pow239.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-rr52.6%

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

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

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

      \[\leadsto \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 \color{blue}{k}\right)}^{2}} \]

    if 7.99999999999999964e-6 < k

    1. Initial program 40.8%

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

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

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

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

        \[\leadsto \frac{2}{\frac{\frac{{t}^{3}}{\ell}}{\ell} \cdot \color{blue}{\left(\left(\sin k \cdot \tan k\right) \cdot \left(2 + {\left(\frac{k}{t}\right)}^{2}\right)\right)}} \]
      6. add-sqr-sqrt22.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. pow222.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-rr15.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*15.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. Simplified15.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. Taylor expanded in t around 0 17.1%

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

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

      \[\leadsto \frac{2}{{\left(\color{blue}{\frac{k \cdot \sqrt{t}}{\ell}} \cdot \sqrt{\sin k \cdot \tan k}\right)}^{2}} \]
    11. Step-by-step derivation
      1. add-cbrt-cube17.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;k \leq 1.45 \cdot 10^{-141}:\\ \;\;\;\;\frac{2}{{\left(\frac{t \cdot \sqrt[3]{\sin k}}{{\left(\sqrt[3]{\ell}\right)}^{2}}\right)}^{3} \cdot \left(2 \cdot k\right)}\\ \mathbf{elif}\;k \leq 8 \cdot 10^{-6}:\\ \;\;\;\;\frac{2}{{\left(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}}\\ \mathbf{else}:\\ \;\;\;\;\frac{2}{\left(\sin k \cdot \tan k\right) \cdot {\left(\frac{k}{\ell} \cdot \sqrt{t}\right)}^{2}}\\ \end{array} \]
  5. Add Preprocessing

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

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

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

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


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

    1. Initial program 58.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 6.0000000000000002e-142 < k < 3.59999999999999984e-6

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

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

        \[\leadsto \frac{2}{\color{blue}{\frac{{t}^{3}}{\ell \cdot \ell} \cdot \left(\sin k \cdot \left(\tan k \cdot \left(1 + \left(1 + {\left(\frac{k}{t}\right)}^{2}\right)\right)\right)\right)}} \]
      2. associate-/r*61.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+61.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-eval61.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*61.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-sqrt39.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. pow239.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-rr52.6%

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

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

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

      \[\leadsto \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 \color{blue}{k}\right)}^{2}} \]

    if 3.59999999999999984e-6 < k

    1. Initial program 40.8%

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

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

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

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

        \[\leadsto \frac{2}{\frac{\frac{{t}^{3}}{\ell}}{\ell} \cdot \color{blue}{\left(\left(\sin k \cdot \tan k\right) \cdot \left(2 + {\left(\frac{k}{t}\right)}^{2}\right)\right)}} \]
      6. add-sqr-sqrt22.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. pow222.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-rr15.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*15.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. Simplified15.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. Taylor expanded in t around 0 17.1%

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

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

      \[\leadsto \frac{2}{{\left(\color{blue}{\frac{k \cdot \sqrt{t}}{\ell}} \cdot \sqrt{\sin k \cdot \tan k}\right)}^{2}} \]
    11. Step-by-step derivation
      1. add-cbrt-cube17.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;k \leq 6 \cdot 10^{-142}:\\ \;\;\;\;\frac{2}{\left(2 \cdot k\right) \cdot {\left(\sqrt[3]{\sin k} \cdot \frac{t}{{\left(\sqrt[3]{\ell}\right)}^{2}}\right)}^{3}}\\ \mathbf{elif}\;k \leq 3.6 \cdot 10^{-6}:\\ \;\;\;\;\frac{2}{{\left(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}}\\ \mathbf{else}:\\ \;\;\;\;\frac{2}{\left(\sin k \cdot \tan k\right) \cdot {\left(\frac{k}{\ell} \cdot \sqrt{t}\right)}^{2}}\\ \end{array} \]
  5. Add Preprocessing

Alternative 6: 79.9% accurate, 1.0× speedup?

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

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

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


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

    1. Initial program 56.5%

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

        \[\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*58.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+58.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-eval58.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*58.2%

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

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

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

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

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

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

      \[\leadsto \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 \color{blue}{k}\right)}^{2}} \]

    if 3.59999999999999984e-6 < k

    1. Initial program 40.8%

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

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

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

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

        \[\leadsto \frac{2}{\frac{\frac{{t}^{3}}{\ell}}{\ell} \cdot \color{blue}{\left(\left(\sin k \cdot \tan k\right) \cdot \left(2 + {\left(\frac{k}{t}\right)}^{2}\right)\right)}} \]
      6. add-sqr-sqrt22.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. pow222.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-rr15.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*15.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. Simplified15.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. Taylor expanded in t around 0 17.1%

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

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

      \[\leadsto \frac{2}{{\left(\color{blue}{\frac{k \cdot \sqrt{t}}{\ell}} \cdot \sqrt{\sin k \cdot \tan k}\right)}^{2}} \]
    11. Step-by-step derivation
      1. add-cbrt-cube17.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;k \leq 3.6 \cdot 10^{-6}:\\ \;\;\;\;\frac{2}{{\left(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}}\\ \mathbf{else}:\\ \;\;\;\;\frac{2}{\left(\sin k \cdot \tan k\right) \cdot {\left(\frac{k}{\ell} \cdot \sqrt{t}\right)}^{2}}\\ \end{array} \]
  5. Add Preprocessing

Alternative 7: 86.7% accurate, 1.0× speedup?

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

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


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

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

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

        \[\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*53.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+53.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-eval53.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*53.2%

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

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

        \[\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-rr20.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*20.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. Simplified20.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. Taylor expanded in t around 0 24.2%

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \frac{2}{\color{blue}{\sqrt[3]{{\left(\left(\sin k \cdot \tan k\right) \cdot {\left(k \cdot \frac{\sqrt{t}}{\ell}\right)}^{2}\right)}^{3}}}} \]
    13. Step-by-step derivation
      1. rem-cbrt-cube32.4%

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

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

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

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

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

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

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

    if 1.15000000000000004e-26 < t

    1. Initial program 65.9%

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

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

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

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

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

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

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

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

        \[\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-rr52.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*52.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. Simplified52.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. Taylor expanded in k around 0 70.6%

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

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

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

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

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

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

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

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


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

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

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

        \[\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*53.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+53.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-eval53.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*53.2%

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

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

        \[\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-rr20.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*20.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. Simplified20.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. Taylor expanded in t around 0 24.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 9.1999999999999998e-27 < t

    1. Initial program 65.9%

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

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

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

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

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

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

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

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

        \[\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-rr52.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*52.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. Simplified52.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. Taylor expanded in k around 0 70.6%

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

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

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

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

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

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

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

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


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

    1. Initial program 48.3%

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

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

        \[\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*53.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+53.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-eval53.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*53.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-sqrt22.8%

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

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

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

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

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

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

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

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

      \[\leadsto \frac{2}{{\left(\frac{k \cdot \sqrt{t}}{\ell} \cdot \color{blue}{\left(k \cdot \left(1 + 0.08333333333333333 \cdot {k}^{2}\right)\right)}\right)}^{2}} \]
    12. Step-by-step derivation
      1. *-commutative24.0%

        \[\leadsto \frac{2}{{\left(\frac{k \cdot \sqrt{t}}{\ell} \cdot \left(k \cdot \left(1 + \color{blue}{{k}^{2} \cdot 0.08333333333333333}\right)\right)\right)}^{2}} \]
    13. Simplified24.0%

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

    if 9.20000000000000046e-55 < t

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

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

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

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

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

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

        \[\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-sqrt41.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. pow241.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-rr52.9%

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

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

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

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

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

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

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

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

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

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

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


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

    1. Initial program 48.3%

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

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

        \[\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*53.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+53.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-eval53.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*53.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-sqrt22.8%

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

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

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

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

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

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

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

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

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

    if 3.7999999999999997e-57 < t

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

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

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

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

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

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

        \[\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-sqrt41.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. pow241.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-rr52.9%

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

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

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

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

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

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

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

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

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

Alternative 11: 73.3% accurate, 1.3× speedup?

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

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

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


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

    1. Initial program 48.3%

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

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

        \[\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*53.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+53.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-eval53.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*53.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-sqrt22.8%

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

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

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

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

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

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

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

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

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

    if 4.80000000000000004e-50 < t

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

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

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

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

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

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

        \[\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-sqrt41.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. pow241.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-rr52.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 12: 65.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 5.3 \cdot 10^{-42}:\\ \;\;\;\;\frac{2}{{\left(k \cdot \frac{k \cdot \sqrt{t\_m}}{\ell}\right)}^{2}}\\ \mathbf{else}:\\ \;\;\;\;\frac{2}{{\left(\frac{{t\_m}^{1.5}}{\ell}\right)}^{2} \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 5.3e-42)
    (/ 2.0 (pow (* k (/ (* k (sqrt t_m)) l)) 2.0))
    (/ 2.0 (* (pow (/ (pow t_m 1.5) l) 2.0) (* 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 <= 5.3e-42) {
		tmp = 2.0 / pow((k * ((k * sqrt(t_m)) / l)), 2.0);
	} else {
		tmp = 2.0 / (pow((pow(t_m, 1.5) / l), 2.0) * (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 <= 5.3d-42) then
        tmp = 2.0d0 / ((k * ((k * sqrt(t_m)) / l)) ** 2.0d0)
    else
        tmp = 2.0d0 / ((((t_m ** 1.5d0) / l) ** 2.0d0) * (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 <= 5.3e-42) {
		tmp = 2.0 / Math.pow((k * ((k * Math.sqrt(t_m)) / l)), 2.0);
	} else {
		tmp = 2.0 / (Math.pow((Math.pow(t_m, 1.5) / l), 2.0) * (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 <= 5.3e-42:
		tmp = 2.0 / math.pow((k * ((k * math.sqrt(t_m)) / l)), 2.0)
	else:
		tmp = 2.0 / (math.pow((math.pow(t_m, 1.5) / l), 2.0) * (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 <= 5.3e-42)
		tmp = Float64(2.0 / (Float64(k * Float64(Float64(k * sqrt(t_m)) / l)) ^ 2.0));
	else
		tmp = Float64(2.0 / Float64((Float64((t_m ^ 1.5) / l) ^ 2.0) * 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 <= 5.3e-42)
		tmp = 2.0 / ((k * ((k * sqrt(t_m)) / l)) ^ 2.0);
	else
		tmp = 2.0 / ((((t_m ^ 1.5) / l) ^ 2.0) * (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, 5.3e-42], N[(2.0 / N[Power[N[(k * N[(N[(k * N[Sqrt[t$95$m], $MachinePrecision]), $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision], N[(2.0 / N[(N[Power[N[(N[Power[t$95$m, 1.5], $MachinePrecision] / l), $MachinePrecision], 2.0], $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 5.3 \cdot 10^{-42}:\\
\;\;\;\;\frac{2}{{\left(k \cdot \frac{k \cdot \sqrt{t\_m}}{\ell}\right)}^{2}}\\

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


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

    1. Initial program 48.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. Simplified48.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*45.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*52.7%

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

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

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

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

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

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

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

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

      \[\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. Taylor expanded in t around 0 24.1%

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

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

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

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

    if 5.3e-42 < t

    1. Initial program 64.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. Simplified60.6%

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

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

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

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

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

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

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

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

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

        \[\leadsto \frac{2}{{\left(\frac{{t}^{\color{blue}{1.5}}}{\sqrt{\ell \cdot \ell}}\right)}^{2} \cdot \left(2 \cdot \left(k \cdot k\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(2 \cdot \left(k \cdot k\right)\right)} \]
      8. add-sqr-sqrt62.2%

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

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

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

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

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

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


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

    1. Initial program 48.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. Simplified48.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*45.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*52.7%

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

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

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

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

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

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

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

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

      \[\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. Taylor expanded in t around 0 24.1%

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

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

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

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

    if 7.49999999999999972e-42 < t

    1. Initial program 64.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. Simplified60.6%

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

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

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

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

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

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

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

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

      \[\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. associate-*l/59.4%

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

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

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

Alternative 14: 60.5% accurate, 2.0× speedup?

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

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

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


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

    1. Initial program 48.3%

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

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

        \[\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*53.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+53.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-eval53.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*53.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-sqrt22.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 4.50000000000000001e-46 < t

    1. Initial program 63.2%

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

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

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

        \[\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-frac58.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. pow258.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-rr58.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. Step-by-step derivation
      1. associate-*l/58.7%

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

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

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

Alternative 15: 60.5% accurate, 2.0× speedup?

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

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

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


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

    1. Initial program 48.3%

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

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

        \[\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*53.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+53.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-eval53.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*53.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-sqrt22.8%

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

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

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

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

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

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

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

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

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

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

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

    if 3.7000000000000001e-50 < t

    1. Initial program 63.2%

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

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

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

        \[\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-frac58.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. pow258.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-rr58.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. Step-by-step derivation
      1. associate-*l/58.7%

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

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

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

Alternative 16: 58.4% accurate, 2.0× speedup?

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

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

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


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

    1. Initial program 54.7%

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

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

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

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

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

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

      \[\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. associate-*l/57.5%

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

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

    if 1.1000000000000001e119 < k

    1. Initial program 41.8%

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

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

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

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

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

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

        \[\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-rr8.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*8.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. Simplified8.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. Taylor expanded in t around 0 16.6%

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

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

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

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

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

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

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

Alternative 17: 57.4% accurate, 3.6× speedup?

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

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

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

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

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

      \[\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.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. pow256.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-rr56.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. Final simplification56.8%

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

Alternative 18: 55.0% accurate, 3.7× speedup?

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

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

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

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

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

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

Reproduce

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