Toniolo and Linder, Equation (10+)

Percentage Accurate: 54.8% → 89.6%
Time: 25.1s
Alternatives: 20
Speedup: 2.0×

Specification

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

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

Sampling outcomes in binary64 precision:

Local Percentage Accuracy vs ?

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

Accuracy vs Speed?

Herbie found 20 alternatives:

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

Initial Program: 54.8% accurate, 1.0× speedup?

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

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

Alternative 1: 89.6% accurate, 0.5× speedup?

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

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

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


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

    1. Initial program 49.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. Simplified52.9%

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

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

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

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

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

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

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

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

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

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

    if 5.7999999999999997e-77 < t

    1. Initial program 66.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 2: 79.5% accurate, 0.3× speedup?

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

\\
\begin{array}{l}
t_2 := 1 + \left({\left(\frac{k}{t\_m}\right)}^{2} + 1\right)\\
t_3 := t\_2 \cdot \left(\tan k \cdot \left(\sin k \cdot \frac{{t\_m}^{3}}{\ell \cdot \ell}\right)\right)\\
t\_s \cdot \begin{array}{l}
\mathbf{if}\;t\_3 \leq 4 \cdot 10^{+263}:\\
\;\;\;\;\frac{2}{\left(\tan k \cdot \left(\sin k \cdot \left(\frac{{t\_m}^{2}}{\ell} \cdot \frac{t\_m}{\ell}\right)\right)\right) \cdot t\_2}\\

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

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


\end{array}
\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if (*.f64 (*.f64 (*.f64 (/.f64 (pow.f64 t 3) (*.f64 l l)) (sin.f64 k)) (tan.f64 k)) (+.f64 (+.f64 1 (pow.f64 (/.f64 k t) 2)) 1)) < 4.00000000000000006e263

    1. Initial program 88.1%

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

        \[\leadsto \frac{2}{\left(\left(\frac{\color{blue}{\left(t \cdot t\right) \cdot t}}{\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. times-frac92.8%

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

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

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

    if 4.00000000000000006e263 < (*.f64 (*.f64 (*.f64 (/.f64 (pow.f64 t 3) (*.f64 l l)) (sin.f64 k)) (tan.f64 k)) (+.f64 (+.f64 1 (pow.f64 (/.f64 k t) 2)) 1)) < +inf.0

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if +inf.0 < (*.f64 (*.f64 (*.f64 (/.f64 (pow.f64 t 3) (*.f64 l l)) (sin.f64 k)) (tan.f64 k)) (+.f64 (+.f64 1 (pow.f64 (/.f64 k t) 2)) 1))

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

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

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

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

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

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

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

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

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

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

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

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

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

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

\mathbf{elif}\;t\_m \leq 6.4 \cdot 10^{+195}:\\
\;\;\;\;t\_2 \cdot \frac{{\left(\frac{\sqrt[3]{\ell \cdot t\_3}}{t\_m}\right)}^{3}}{2 + {\left(\frac{k}{t\_m}\right)}^{2}}\\

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


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

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

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

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

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

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

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

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

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

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

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

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

    if 7.2e-77 < t < 6.39999999999999965e195

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 6.39999999999999965e195 < t

    1. Initial program 71.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. Simplified75.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 4: 86.6% 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^{-77}:\\ \;\;\;\;\left(2 \cdot \frac{\ell}{{k}^{2} \cdot \left(t\_m \cdot \sin k\right)}\right) \cdot \frac{\ell}{\tan k}\\ \mathbf{else}:\\ \;\;\;\;\frac{{\left(\sqrt[3]{\frac{2}{\sin k}} \cdot \frac{\frac{1}{t\_m}}{{\left(\sqrt[3]{\ell}\right)}^{-2}}\right)}^{3}}{\tan k \cdot \left(2 + {\left(\frac{k}{t\_m}\right)}^{2}\right)}\\ \end{array} \end{array} \]
t_m = (fabs.f64 t)
t_s = (copysign.f64 1 t)
(FPCore (t_s t_m l k)
 :precision binary64
 (*
  t_s
  (if (<= t_m 7.2e-77)
    (* (* 2.0 (/ l (* (pow k 2.0) (* t_m (sin k))))) (/ l (tan k)))
    (/
     (pow (* (cbrt (/ 2.0 (sin k))) (/ (/ 1.0 t_m) (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-77) {
		tmp = (2.0 * (l / (pow(k, 2.0) * (t_m * sin(k))))) * (l / tan(k));
	} else {
		tmp = pow((cbrt((2.0 / sin(k))) * ((1.0 / t_m) / 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-77) {
		tmp = (2.0 * (l / (Math.pow(k, 2.0) * (t_m * Math.sin(k))))) * (l / Math.tan(k));
	} else {
		tmp = Math.pow((Math.cbrt((2.0 / Math.sin(k))) * ((1.0 / t_m) / 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-77)
		tmp = Float64(Float64(2.0 * Float64(l / Float64((k ^ 2.0) * Float64(t_m * sin(k))))) * Float64(l / tan(k)));
	else
		tmp = Float64((Float64(cbrt(Float64(2.0 / sin(k))) * Float64(Float64(1.0 / t_m) / (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-77], N[(N[(2.0 * N[(l / N[(N[Power[k, 2.0], $MachinePrecision] * N[(t$95$m * N[Sin[k], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(l / N[Tan[k], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[Power[N[(N[Power[N[(2.0 / N[Sin[k], $MachinePrecision]), $MachinePrecision], 1/3], $MachinePrecision] * N[(N[(1.0 / t$95$m), $MachinePrecision] / N[Power[N[Power[l, 1/3], $MachinePrecision], -2.0], $MachinePrecision]), $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]
\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^{-77}:\\
\;\;\;\;\left(2 \cdot \frac{\ell}{{k}^{2} \cdot \left(t\_m \cdot \sin k\right)}\right) \cdot \frac{\ell}{\tan k}\\

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


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

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

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

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

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

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

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

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

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

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

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

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

    if 7.2e-77 < t

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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


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

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

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

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

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

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

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

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

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

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

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

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

    if 7.2e-77 < t < 2.5000000000000002e181

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 2.5000000000000002e181 < t

    1. Initial program 69.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 6: 86.5% accurate, 0.6× speedup?

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

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

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


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

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

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

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

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

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

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

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

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

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

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

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

    if 7.2e-77 < t

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 7: 87.0% accurate, 0.7× speedup?

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

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

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

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


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

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

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

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

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

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

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

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

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

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

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

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

    if 7.2e-77 < t < 9.0000000000000004e172

    1. Initial program 65.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 9.0000000000000004e172 < t

    1. Initial program 70.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 8: 85.5% accurate, 0.8× speedup?

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

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

\mathbf{elif}\;t\_m \leq 6.5 \cdot 10^{+195}:\\
\;\;\;\;t\_2 \cdot \frac{{\left(\frac{\sqrt[3]{\ell \cdot t\_3}}{t\_m}\right)}^{3}}{2 + {\left(\frac{k}{t\_m}\right)}^{2}}\\

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


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

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

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

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

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

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

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

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

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

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

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

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

    if 7.2e-77 < t < 6.5000000000000003e195

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 6.5000000000000003e195 < t

    1. Initial program 71.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. Simplified75.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 9: 82.8% accurate, 0.8× speedup?

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

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

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


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

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

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

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

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

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

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

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

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

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

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

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

    if 7.2e-77 < t < 1.35000000000000003e154

    1. Initial program 64.2%

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

        \[\leadsto \frac{2}{\left(\left(\frac{\color{blue}{\left(t \cdot t\right) \cdot t}}{\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. times-frac82.4%

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

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

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

    if 1.35000000000000003e154 < t

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 10: 80.0% accurate, 0.8× speedup?

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

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

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

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


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

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

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

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

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

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

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

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

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

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

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

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

    if 7.2e-77 < t < 6.19999999999999976e172

    1. Initial program 65.0%

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

        \[\leadsto \frac{2}{\left(\left(\frac{\color{blue}{\left(t \cdot t\right) \cdot t}}{\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. times-frac81.9%

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

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

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

    if 6.19999999999999976e172 < t

    1. Initial program 70.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 11: 77.4% accurate, 1.0× speedup?

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

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

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

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


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

    1. Initial program 50.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. Simplified53.5%

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

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

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

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

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

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

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

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

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

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

    if 6.19999999999999989e-25 < t < 6.5999999999999999e163

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

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

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

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

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

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

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

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

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

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

    if 6.5999999999999999e163 < t

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 12: 80.8% accurate, 1.0× speedup?

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

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

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

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


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

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

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

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

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

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

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

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

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

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

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

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

    if 7.2e-77 < t < 5.6999999999999999e102

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

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

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

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

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

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

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

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

    if 5.6999999999999999e102 < t

    1. Initial program 61.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. Simplified64.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 13: 76.1% accurate, 1.0× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t < 4.59999999999999987e40

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

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

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

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

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

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

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

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

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

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

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

    if 4.59999999999999987e40 < t

    1. Initial program 65.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 14: 74.9% accurate, 1.3× speedup?

\[\begin{array}{l} t_m = \left|t\right| \\ t_s = \mathsf{copysign}\left(1, t\right) \\ \begin{array}{l} t_2 := \frac{\ell}{\tan k}\\ t\_s \cdot \begin{array}{l} \mathbf{if}\;t\_m \leq 3.9 \cdot 10^{-48}:\\ \;\;\;\;\left(2 \cdot \frac{\ell}{{k}^{2} \cdot \left(t\_m \cdot \sin k\right)}\right) \cdot t\_2\\ \mathbf{else}:\\ \;\;\;\;t\_2 \cdot \frac{\frac{2 \cdot \frac{\ell}{k}}{{t\_m}^{3}}}{2 + {\left(\frac{k}{t\_m}\right)}^{2}}\\ \end{array} \end{array} \end{array} \]
t_m = (fabs.f64 t)
t_s = (copysign.f64 1 t)
(FPCore (t_s t_m l k)
 :precision binary64
 (let* ((t_2 (/ l (tan k))))
   (*
    t_s
    (if (<= t_m 3.9e-48)
      (* (* 2.0 (/ l (* (pow k 2.0) (* t_m (sin k))))) t_2)
      (*
       t_2
       (/ (/ (* 2.0 (/ l k)) (pow t_m 3.0)) (+ 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 t_2 = l / tan(k);
	double tmp;
	if (t_m <= 3.9e-48) {
		tmp = (2.0 * (l / (pow(k, 2.0) * (t_m * sin(k))))) * t_2;
	} else {
		tmp = t_2 * (((2.0 * (l / k)) / pow(t_m, 3.0)) / (2.0 + pow((k / t_m), 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) :: t_2
    real(8) :: tmp
    t_2 = l / tan(k)
    if (t_m <= 3.9d-48) then
        tmp = (2.0d0 * (l / ((k ** 2.0d0) * (t_m * sin(k))))) * t_2
    else
        tmp = t_2 * (((2.0d0 * (l / k)) / (t_m ** 3.0d0)) / (2.0d0 + ((k / t_m) ** 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 t_2 = l / Math.tan(k);
	double tmp;
	if (t_m <= 3.9e-48) {
		tmp = (2.0 * (l / (Math.pow(k, 2.0) * (t_m * Math.sin(k))))) * t_2;
	} else {
		tmp = t_2 * (((2.0 * (l / k)) / Math.pow(t_m, 3.0)) / (2.0 + Math.pow((k / 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):
	t_2 = l / math.tan(k)
	tmp = 0
	if t_m <= 3.9e-48:
		tmp = (2.0 * (l / (math.pow(k, 2.0) * (t_m * math.sin(k))))) * t_2
	else:
		tmp = t_2 * (((2.0 * (l / k)) / math.pow(t_m, 3.0)) / (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)
	t_2 = Float64(l / tan(k))
	tmp = 0.0
	if (t_m <= 3.9e-48)
		tmp = Float64(Float64(2.0 * Float64(l / Float64((k ^ 2.0) * Float64(t_m * sin(k))))) * t_2);
	else
		tmp = Float64(t_2 * Float64(Float64(Float64(2.0 * Float64(l / k)) / (t_m ^ 3.0)) / Float64(2.0 + (Float64(k / 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)
	t_2 = l / tan(k);
	tmp = 0.0;
	if (t_m <= 3.9e-48)
		tmp = (2.0 * (l / ((k ^ 2.0) * (t_m * sin(k))))) * t_2;
	else
		tmp = t_2 * (((2.0 * (l / k)) / (t_m ^ 3.0)) / (2.0 + ((k / 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_] := Block[{t$95$2 = N[(l / N[Tan[k], $MachinePrecision]), $MachinePrecision]}, N[(t$95$s * If[LessEqual[t$95$m, 3.9e-48], N[(N[(2.0 * N[(l / N[(N[Power[k, 2.0], $MachinePrecision] * N[(t$95$m * N[Sin[k], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * t$95$2), $MachinePrecision], N[(t$95$2 * N[(N[(N[(2.0 * N[(l / k), $MachinePrecision]), $MachinePrecision] / N[Power[t$95$m, 3.0], $MachinePrecision]), $MachinePrecision] / N[(2.0 + N[Power[N[(k / t$95$m), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]), $MachinePrecision]]
\begin{array}{l}
t_m = \left|t\right|
\\
t_s = \mathsf{copysign}\left(1, t\right)

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

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


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

    1. Initial program 50.3%

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

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

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

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

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

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

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

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

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

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

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

    if 3.9e-48 < 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. Simplified71.0%

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 15: 67.4% accurate, 1.3× speedup?

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

\\
\begin{array}{l}
t_2 := \frac{\ell}{\tan k}\\
t\_s \cdot \begin{array}{l}
\mathbf{if}\;k \leq 3.7 \cdot 10^{-37}:\\
\;\;\;\;t\_2 \cdot \frac{\frac{\ell}{k}}{{t\_m}^{3}}\\

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


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

    1. Initial program 54.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. Simplified59.8%

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{\frac{\ell}{k \cdot {t}^{3}}} \cdot \frac{\ell}{\tan k} \]
    7. Step-by-step derivation
      1. associate-/r*59.3%

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

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

    if 3.7e-37 < k

    1. Initial program 53.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. Simplified56.4%

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

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

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

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

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

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

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

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

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

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

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

Alternative 16: 62.4% accurate, 1.3× speedup?

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

\\
t\_s \cdot \begin{array}{l}
\mathbf{if}\;k \leq 6.2 \cdot 10^{+63}:\\
\;\;\;\;\frac{\ell}{\tan k} \cdot \frac{\ell}{\sin k \cdot {t\_m}^{3}}\\

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


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

    1. Initial program 55.6%

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

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

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

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

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

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

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

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

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

    if 6.2000000000000001e63 < k

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \frac{2}{\color{blue}{{k}^{4} \cdot \frac{t}{{\ell}^{2}}}} \]
    12. Taylor expanded in k around 0 57.8%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;k \leq 6.2 \cdot 10^{+63}:\\ \;\;\;\;\frac{\ell}{\tan k} \cdot \frac{\ell}{\sin k \cdot {t}^{3}}\\ \mathbf{else}:\\ \;\;\;\;2 \cdot \frac{{\ell}^{2}}{t \cdot {k}^{4}}\\ \end{array} \]
  5. Add Preprocessing

Alternative 17: 62.4% accurate, 1.3× speedup?

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

\\
t\_s \cdot \begin{array}{l}
\mathbf{if}\;k \leq 1.16 \cdot 10^{+64}:\\
\;\;\;\;\frac{\ell}{\tan k} \cdot \frac{\frac{\ell}{{t\_m}^{3}}}{\sin k}\\

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


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

    1. Initial program 55.6%

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{\frac{\ell}{{t}^{3} \cdot \sin k}} \cdot \frac{\ell}{\tan k} \]
    7. Step-by-step derivation
      1. associate-/r*60.9%

        \[\leadsto \color{blue}{\frac{\frac{\ell}{{t}^{3}}}{\sin k}} \cdot \frac{\ell}{\tan k} \]
    8. Simplified60.9%

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

    if 1.16e64 < k

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \frac{2}{\color{blue}{{k}^{4} \cdot \frac{t}{{\ell}^{2}}}} \]
    12. Taylor expanded in k around 0 57.8%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;k \leq 1.16 \cdot 10^{+64}:\\ \;\;\;\;\frac{\ell}{\tan k} \cdot \frac{\frac{\ell}{{t}^{3}}}{\sin k}\\ \mathbf{else}:\\ \;\;\;\;2 \cdot \frac{{\ell}^{2}}{t \cdot {k}^{4}}\\ \end{array} \]
  5. Add Preprocessing

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t < 7.20000000000000018

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 7.20000000000000018 < t

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

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

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

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

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

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

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

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

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t < 7.20000000000000018

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 7.20000000000000018 < t

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{\frac{\ell}{k \cdot {t}^{3}}} \cdot \frac{\ell}{\tan k} \]
    7. Step-by-step derivation
      1. associate-/r*69.9%

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

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

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

Alternative 20: 51.9% accurate, 2.0× speedup?

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \frac{2}{\color{blue}{{k}^{4} \cdot \frac{t}{{\ell}^{2}}}} \]
  12. Taylor expanded in k around 0 55.0%

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

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

Reproduce

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