Toniolo and Linder, Equation (10+)

Percentage Accurate: 55.0% → 92.7%
Time: 18.1s
Alternatives: 14
Speedup: 32.4×

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 14 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: 55.0% accurate, 1.0× speedup?

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

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

Alternative 1: 92.7% accurate, 1.0× speedup?

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

\mathbf{elif}\;t\_m \leq 2.75 \cdot 10^{+132}:\\
\;\;\;\;\frac{\frac{\frac{2}{t\_m}}{\frac{k \cdot t\_3}{\frac{\ell}{k}} + \frac{2 \cdot \left(t\_m \cdot t\_m\right)}{\frac{\ell}{t\_3}}}}{\tan k}\\

\mathbf{else}:\\
\;\;\;\;\frac{\frac{\ell}{t\_m}}{t\_m \cdot k} \cdot t\_2\\


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

    1. Initial program 48.6%

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

        \[\leadsto \mathsf{/.f64}\left(2, \left(\left(\frac{{t}^{3}}{\ell \cdot \ell} \cdot \sin k\right) \cdot \color{blue}{\left(\tan k \cdot \left(\left(1 + {\left(\frac{k}{t}\right)}^{2}\right) + 1\right)\right)}\right)\right) \]
      2. *-commutativeN/A

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

        \[\leadsto \mathsf{/.f64}\left(2, \left(\left(\left(\frac{{t}^{3}}{\ell \cdot \ell} \cdot \sin k\right) \cdot \left(\left(1 + {\left(\frac{k}{t}\right)}^{2}\right) + 1\right)\right) \cdot \color{blue}{\tan k}\right)\right) \]
      4. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(2, \mathsf{*.f64}\left(\left(\left(\frac{{t}^{3}}{\ell \cdot \ell} \cdot \sin k\right) \cdot \left(\left(1 + {\left(\frac{k}{t}\right)}^{2}\right) + 1\right)\right), \color{blue}{\tan k}\right)\right) \]
    4. Applied egg-rr58.2%

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

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

        \[\leadsto \mathsf{/.f64}\left(2, \mathsf{*.f64}\left(\left({k}^{2} \cdot \frac{t \cdot \sin k}{{\ell}^{2}}\right), \mathsf{tan.f64}\left(\color{blue}{k}\right)\right)\right) \]
      2. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\left({k}^{2}\right), \left(\frac{t \cdot \sin k}{{\ell}^{2}}\right)\right), \mathsf{tan.f64}\left(\color{blue}{k}\right)\right)\right) \]
      3. unpow2N/A

        \[\leadsto \mathsf{/.f64}\left(2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\left(k \cdot k\right), \left(\frac{t \cdot \sin k}{{\ell}^{2}}\right)\right), \mathsf{tan.f64}\left(k\right)\right)\right) \]
      4. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(k, k\right), \left(\frac{t \cdot \sin k}{{\ell}^{2}}\right)\right), \mathsf{tan.f64}\left(k\right)\right)\right) \]
      5. /-lowering-/.f64N/A

        \[\leadsto \mathsf{/.f64}\left(2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(k, k\right), \mathsf{/.f64}\left(\left(t \cdot \sin k\right), \left({\ell}^{2}\right)\right)\right), \mathsf{tan.f64}\left(k\right)\right)\right) \]
      6. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(k, k\right), \mathsf{/.f64}\left(\mathsf{*.f64}\left(t, \sin k\right), \left({\ell}^{2}\right)\right)\right), \mathsf{tan.f64}\left(k\right)\right)\right) \]
      7. sin-lowering-sin.f64N/A

        \[\leadsto \mathsf{/.f64}\left(2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(k, k\right), \mathsf{/.f64}\left(\mathsf{*.f64}\left(t, \mathsf{sin.f64}\left(k\right)\right), \left({\ell}^{2}\right)\right)\right), \mathsf{tan.f64}\left(k\right)\right)\right) \]
      8. unpow2N/A

        \[\leadsto \mathsf{/.f64}\left(2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(k, k\right), \mathsf{/.f64}\left(\mathsf{*.f64}\left(t, \mathsf{sin.f64}\left(k\right)\right), \left(\ell \cdot \ell\right)\right)\right), \mathsf{tan.f64}\left(k\right)\right)\right) \]
      9. *-lowering-*.f6463.1%

        \[\leadsto \mathsf{/.f64}\left(2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(k, k\right), \mathsf{/.f64}\left(\mathsf{*.f64}\left(t, \mathsf{sin.f64}\left(k\right)\right), \mathsf{*.f64}\left(\ell, \ell\right)\right)\right), \mathsf{tan.f64}\left(k\right)\right)\right) \]
    7. Simplified63.1%

      \[\leadsto \frac{2}{\color{blue}{\left(\left(k \cdot k\right) \cdot \frac{t \cdot \sin k}{\ell \cdot \ell}\right)} \cdot \tan k} \]
    8. Step-by-step derivation
      1. *-commutativeN/A

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

        \[\leadsto \frac{2}{\tan k \cdot \frac{\left(k \cdot k\right) \cdot \left(t \cdot \sin k\right)}{\color{blue}{\ell \cdot \ell}}} \]
      3. *-commutativeN/A

        \[\leadsto \frac{2}{\tan k \cdot \frac{\left(k \cdot k\right) \cdot \left(\sin k \cdot t\right)}{\ell \cdot \ell}} \]
      4. associate-*r*N/A

        \[\leadsto \frac{2}{\tan k \cdot \frac{\left(\left(k \cdot k\right) \cdot \sin k\right) \cdot t}{\color{blue}{\ell} \cdot \ell}} \]
      5. associate-*l/N/A

        \[\leadsto \frac{2}{\tan k \cdot \left(\frac{\left(k \cdot k\right) \cdot \sin k}{\ell \cdot \ell} \cdot \color{blue}{t}\right)} \]
      6. frac-timesN/A

        \[\leadsto \frac{2}{\tan k \cdot \left(\left(\frac{k \cdot k}{\ell} \cdot \frac{\sin k}{\ell}\right) \cdot t\right)} \]
      7. associate-/r*N/A

        \[\leadsto \frac{\frac{2}{\tan k}}{\color{blue}{\left(\frac{k \cdot k}{\ell} \cdot \frac{\sin k}{\ell}\right) \cdot t}} \]
      8. /-lowering-/.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\left(\frac{2}{\tan k}\right), \color{blue}{\left(\left(\frac{k \cdot k}{\ell} \cdot \frac{\sin k}{\ell}\right) \cdot t\right)}\right) \]
      9. /-lowering-/.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(2, \tan k\right), \left(\color{blue}{\left(\frac{k \cdot k}{\ell} \cdot \frac{\sin k}{\ell}\right)} \cdot t\right)\right) \]
      10. tan-lowering-tan.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(2, \mathsf{tan.f64}\left(k\right)\right), \left(\left(\frac{k \cdot k}{\ell} \cdot \color{blue}{\frac{\sin k}{\ell}}\right) \cdot t\right)\right) \]
      11. frac-timesN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(2, \mathsf{tan.f64}\left(k\right)\right), \left(\frac{\left(k \cdot k\right) \cdot \sin k}{\ell \cdot \ell} \cdot t\right)\right) \]
      12. associate-*l/N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(2, \mathsf{tan.f64}\left(k\right)\right), \left(\frac{\left(\left(k \cdot k\right) \cdot \sin k\right) \cdot t}{\color{blue}{\ell \cdot \ell}}\right)\right) \]
      13. associate-*r*N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(2, \mathsf{tan.f64}\left(k\right)\right), \left(\frac{\left(k \cdot k\right) \cdot \left(\sin k \cdot t\right)}{\color{blue}{\ell} \cdot \ell}\right)\right) \]
      14. *-commutativeN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(2, \mathsf{tan.f64}\left(k\right)\right), \left(\frac{\left(k \cdot k\right) \cdot \left(t \cdot \sin k\right)}{\ell \cdot \ell}\right)\right) \]
    9. Applied egg-rr63.1%

      \[\leadsto \color{blue}{\frac{\frac{2}{\tan k}}{\frac{k \cdot k}{\frac{\ell \cdot \ell}{t \cdot \sin k}}}} \]
    10. Step-by-step derivation
      1. clear-numN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(2, \mathsf{tan.f64}\left(k\right)\right), \left(\frac{1}{\color{blue}{\frac{\frac{\ell \cdot \ell}{t \cdot \sin k}}{k \cdot k}}}\right)\right) \]
      2. inv-powN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(2, \mathsf{tan.f64}\left(k\right)\right), \left({\left(\frac{\frac{\ell \cdot \ell}{t \cdot \sin k}}{k \cdot k}\right)}^{\color{blue}{-1}}\right)\right) \]
      3. times-fracN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(2, \mathsf{tan.f64}\left(k\right)\right), \left({\left(\frac{\frac{\ell}{t} \cdot \frac{\ell}{\sin k}}{k \cdot k}\right)}^{-1}\right)\right) \]
      4. times-fracN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(2, \mathsf{tan.f64}\left(k\right)\right), \left({\left(\frac{\frac{\ell}{t}}{k} \cdot \frac{\frac{\ell}{\sin k}}{k}\right)}^{-1}\right)\right) \]
      5. associate-/r*N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(2, \mathsf{tan.f64}\left(k\right)\right), \left({\left(\frac{\ell}{t \cdot k} \cdot \frac{\frac{\ell}{\sin k}}{k}\right)}^{-1}\right)\right) \]
      6. unpow-prod-downN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(2, \mathsf{tan.f64}\left(k\right)\right), \left({\left(\frac{\ell}{t \cdot k}\right)}^{-1} \cdot \color{blue}{{\left(\frac{\frac{\ell}{\sin k}}{k}\right)}^{-1}}\right)\right) \]
      7. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(2, \mathsf{tan.f64}\left(k\right)\right), \mathsf{*.f64}\left(\left({\left(\frac{\ell}{t \cdot k}\right)}^{-1}\right), \color{blue}{\left({\left(\frac{\frac{\ell}{\sin k}}{k}\right)}^{-1}\right)}\right)\right) \]
      8. pow-lowering-pow.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(2, \mathsf{tan.f64}\left(k\right)\right), \mathsf{*.f64}\left(\mathsf{pow.f64}\left(\left(\frac{\ell}{t \cdot k}\right), -1\right), \left({\color{blue}{\left(\frac{\frac{\ell}{\sin k}}{k}\right)}}^{-1}\right)\right)\right) \]
      9. /-lowering-/.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(2, \mathsf{tan.f64}\left(k\right)\right), \mathsf{*.f64}\left(\mathsf{pow.f64}\left(\mathsf{/.f64}\left(\ell, \left(t \cdot k\right)\right), -1\right), \left({\left(\frac{\color{blue}{\frac{\ell}{\sin k}}}{k}\right)}^{-1}\right)\right)\right) \]
      10. *-commutativeN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(2, \mathsf{tan.f64}\left(k\right)\right), \mathsf{*.f64}\left(\mathsf{pow.f64}\left(\mathsf{/.f64}\left(\ell, \left(k \cdot t\right)\right), -1\right), \left({\left(\frac{\frac{\ell}{\color{blue}{\sin k}}}{k}\right)}^{-1}\right)\right)\right) \]
      11. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(2, \mathsf{tan.f64}\left(k\right)\right), \mathsf{*.f64}\left(\mathsf{pow.f64}\left(\mathsf{/.f64}\left(\ell, \mathsf{*.f64}\left(k, t\right)\right), -1\right), \left({\left(\frac{\frac{\ell}{\color{blue}{\sin k}}}{k}\right)}^{-1}\right)\right)\right) \]
      12. pow-lowering-pow.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(2, \mathsf{tan.f64}\left(k\right)\right), \mathsf{*.f64}\left(\mathsf{pow.f64}\left(\mathsf{/.f64}\left(\ell, \mathsf{*.f64}\left(k, t\right)\right), -1\right), \mathsf{pow.f64}\left(\left(\frac{\frac{\ell}{\sin k}}{k}\right), \color{blue}{-1}\right)\right)\right) \]
      13. /-lowering-/.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(2, \mathsf{tan.f64}\left(k\right)\right), \mathsf{*.f64}\left(\mathsf{pow.f64}\left(\mathsf{/.f64}\left(\ell, \mathsf{*.f64}\left(k, t\right)\right), -1\right), \mathsf{pow.f64}\left(\mathsf{/.f64}\left(\left(\frac{\ell}{\sin k}\right), k\right), -1\right)\right)\right) \]
      14. /-lowering-/.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(2, \mathsf{tan.f64}\left(k\right)\right), \mathsf{*.f64}\left(\mathsf{pow.f64}\left(\mathsf{/.f64}\left(\ell, \mathsf{*.f64}\left(k, t\right)\right), -1\right), \mathsf{pow.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(\ell, \sin k\right), k\right), -1\right)\right)\right) \]
      15. sin-lowering-sin.f6479.6%

        \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(2, \mathsf{tan.f64}\left(k\right)\right), \mathsf{*.f64}\left(\mathsf{pow.f64}\left(\mathsf{/.f64}\left(\ell, \mathsf{*.f64}\left(k, t\right)\right), -1\right), \mathsf{pow.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(\ell, \mathsf{sin.f64}\left(k\right)\right), k\right), -1\right)\right)\right) \]
    11. Applied egg-rr79.6%

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

    if 5.2000000000000001e-130 < t < 2.75e132

    1. Initial program 60.4%

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

        \[\leadsto \mathsf{/.f64}\left(2, \left(\left(\frac{{t}^{3}}{\ell \cdot \ell} \cdot \sin k\right) \cdot \color{blue}{\left(\tan k \cdot \left(\left(1 + {\left(\frac{k}{t}\right)}^{2}\right) + 1\right)\right)}\right)\right) \]
      2. *-commutativeN/A

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

        \[\leadsto \mathsf{/.f64}\left(2, \left(\left(\left(\frac{{t}^{3}}{\ell \cdot \ell} \cdot \sin k\right) \cdot \left(\left(1 + {\left(\frac{k}{t}\right)}^{2}\right) + 1\right)\right) \cdot \color{blue}{\tan k}\right)\right) \]
      4. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(2, \mathsf{*.f64}\left(\left(\left(\frac{{t}^{3}}{\ell \cdot \ell} \cdot \sin k\right) \cdot \left(\left(1 + {\left(\frac{k}{t}\right)}^{2}\right) + 1\right)\right), \color{blue}{\tan k}\right)\right) \]
    4. Applied egg-rr72.7%

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

      \[\leadsto \mathsf{/.f64}\left(2, \mathsf{*.f64}\left(\color{blue}{\left(t \cdot \left(2 \cdot \frac{{t}^{2} \cdot \sin k}{{\ell}^{2}} + \frac{{k}^{2} \cdot \sin k}{{\ell}^{2}}\right)\right)}, \mathsf{tan.f64}\left(k\right)\right)\right) \]
    6. Step-by-step derivation
      1. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(t, \left(2 \cdot \frac{{t}^{2} \cdot \sin k}{{\ell}^{2}} + \frac{{k}^{2} \cdot \sin k}{{\ell}^{2}}\right)\right), \mathsf{tan.f64}\left(\color{blue}{k}\right)\right)\right) \]
      2. +-lowering-+.f64N/A

        \[\leadsto \mathsf{/.f64}\left(2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(t, \mathsf{+.f64}\left(\left(2 \cdot \frac{{t}^{2} \cdot \sin k}{{\ell}^{2}}\right), \left(\frac{{k}^{2} \cdot \sin k}{{\ell}^{2}}\right)\right)\right), \mathsf{tan.f64}\left(k\right)\right)\right) \]
      3. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(t, \mathsf{+.f64}\left(\mathsf{*.f64}\left(2, \left(\frac{{t}^{2} \cdot \sin k}{{\ell}^{2}}\right)\right), \left(\frac{{k}^{2} \cdot \sin k}{{\ell}^{2}}\right)\right)\right), \mathsf{tan.f64}\left(k\right)\right)\right) \]
      4. associate-/l*N/A

        \[\leadsto \mathsf{/.f64}\left(2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(t, \mathsf{+.f64}\left(\mathsf{*.f64}\left(2, \left({t}^{2} \cdot \frac{\sin k}{{\ell}^{2}}\right)\right), \left(\frac{{k}^{2} \cdot \sin k}{{\ell}^{2}}\right)\right)\right), \mathsf{tan.f64}\left(k\right)\right)\right) \]
      5. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(t, \mathsf{+.f64}\left(\mathsf{*.f64}\left(2, \mathsf{*.f64}\left(\left({t}^{2}\right), \left(\frac{\sin k}{{\ell}^{2}}\right)\right)\right), \left(\frac{{k}^{2} \cdot \sin k}{{\ell}^{2}}\right)\right)\right), \mathsf{tan.f64}\left(k\right)\right)\right) \]
      6. unpow2N/A

        \[\leadsto \mathsf{/.f64}\left(2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(t, \mathsf{+.f64}\left(\mathsf{*.f64}\left(2, \mathsf{*.f64}\left(\left(t \cdot t\right), \left(\frac{\sin k}{{\ell}^{2}}\right)\right)\right), \left(\frac{{k}^{2} \cdot \sin k}{{\ell}^{2}}\right)\right)\right), \mathsf{tan.f64}\left(k\right)\right)\right) \]
      7. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(t, \mathsf{+.f64}\left(\mathsf{*.f64}\left(2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(t, t\right), \left(\frac{\sin k}{{\ell}^{2}}\right)\right)\right), \left(\frac{{k}^{2} \cdot \sin k}{{\ell}^{2}}\right)\right)\right), \mathsf{tan.f64}\left(k\right)\right)\right) \]
      8. /-lowering-/.f64N/A

        \[\leadsto \mathsf{/.f64}\left(2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(t, \mathsf{+.f64}\left(\mathsf{*.f64}\left(2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(t, t\right), \mathsf{/.f64}\left(\sin k, \left({\ell}^{2}\right)\right)\right)\right), \left(\frac{{k}^{2} \cdot \sin k}{{\ell}^{2}}\right)\right)\right), \mathsf{tan.f64}\left(k\right)\right)\right) \]
      9. sin-lowering-sin.f64N/A

        \[\leadsto \mathsf{/.f64}\left(2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(t, \mathsf{+.f64}\left(\mathsf{*.f64}\left(2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(t, t\right), \mathsf{/.f64}\left(\mathsf{sin.f64}\left(k\right), \left({\ell}^{2}\right)\right)\right)\right), \left(\frac{{k}^{2} \cdot \sin k}{{\ell}^{2}}\right)\right)\right), \mathsf{tan.f64}\left(k\right)\right)\right) \]
      10. unpow2N/A

        \[\leadsto \mathsf{/.f64}\left(2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(t, \mathsf{+.f64}\left(\mathsf{*.f64}\left(2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(t, t\right), \mathsf{/.f64}\left(\mathsf{sin.f64}\left(k\right), \left(\ell \cdot \ell\right)\right)\right)\right), \left(\frac{{k}^{2} \cdot \sin k}{{\ell}^{2}}\right)\right)\right), \mathsf{tan.f64}\left(k\right)\right)\right) \]
      11. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(t, \mathsf{+.f64}\left(\mathsf{*.f64}\left(2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(t, t\right), \mathsf{/.f64}\left(\mathsf{sin.f64}\left(k\right), \mathsf{*.f64}\left(\ell, \ell\right)\right)\right)\right), \left(\frac{{k}^{2} \cdot \sin k}{{\ell}^{2}}\right)\right)\right), \mathsf{tan.f64}\left(k\right)\right)\right) \]
      12. unpow2N/A

        \[\leadsto \mathsf{/.f64}\left(2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(t, \mathsf{+.f64}\left(\mathsf{*.f64}\left(2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(t, t\right), \mathsf{/.f64}\left(\mathsf{sin.f64}\left(k\right), \mathsf{*.f64}\left(\ell, \ell\right)\right)\right)\right), \left(\frac{{k}^{2} \cdot \sin k}{\ell \cdot \ell}\right)\right)\right), \mathsf{tan.f64}\left(k\right)\right)\right) \]
      13. times-fracN/A

        \[\leadsto \mathsf{/.f64}\left(2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(t, \mathsf{+.f64}\left(\mathsf{*.f64}\left(2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(t, t\right), \mathsf{/.f64}\left(\mathsf{sin.f64}\left(k\right), \mathsf{*.f64}\left(\ell, \ell\right)\right)\right)\right), \left(\frac{{k}^{2}}{\ell} \cdot \frac{\sin k}{\ell}\right)\right)\right), \mathsf{tan.f64}\left(k\right)\right)\right) \]
      14. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(t, \mathsf{+.f64}\left(\mathsf{*.f64}\left(2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(t, t\right), \mathsf{/.f64}\left(\mathsf{sin.f64}\left(k\right), \mathsf{*.f64}\left(\ell, \ell\right)\right)\right)\right), \mathsf{*.f64}\left(\left(\frac{{k}^{2}}{\ell}\right), \left(\frac{\sin k}{\ell}\right)\right)\right)\right), \mathsf{tan.f64}\left(k\right)\right)\right) \]
      15. /-lowering-/.f64N/A

        \[\leadsto \mathsf{/.f64}\left(2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(t, \mathsf{+.f64}\left(\mathsf{*.f64}\left(2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(t, t\right), \mathsf{/.f64}\left(\mathsf{sin.f64}\left(k\right), \mathsf{*.f64}\left(\ell, \ell\right)\right)\right)\right), \mathsf{*.f64}\left(\mathsf{/.f64}\left(\left({k}^{2}\right), \ell\right), \left(\frac{\sin k}{\ell}\right)\right)\right)\right), \mathsf{tan.f64}\left(k\right)\right)\right) \]
      16. unpow2N/A

        \[\leadsto \mathsf{/.f64}\left(2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(t, \mathsf{+.f64}\left(\mathsf{*.f64}\left(2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(t, t\right), \mathsf{/.f64}\left(\mathsf{sin.f64}\left(k\right), \mathsf{*.f64}\left(\ell, \ell\right)\right)\right)\right), \mathsf{*.f64}\left(\mathsf{/.f64}\left(\left(k \cdot k\right), \ell\right), \left(\frac{\sin k}{\ell}\right)\right)\right)\right), \mathsf{tan.f64}\left(k\right)\right)\right) \]
      17. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(t, \mathsf{+.f64}\left(\mathsf{*.f64}\left(2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(t, t\right), \mathsf{/.f64}\left(\mathsf{sin.f64}\left(k\right), \mathsf{*.f64}\left(\ell, \ell\right)\right)\right)\right), \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(k, k\right), \ell\right), \left(\frac{\sin k}{\ell}\right)\right)\right)\right), \mathsf{tan.f64}\left(k\right)\right)\right) \]
      18. /-lowering-/.f64N/A

        \[\leadsto \mathsf{/.f64}\left(2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(t, \mathsf{+.f64}\left(\mathsf{*.f64}\left(2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(t, t\right), \mathsf{/.f64}\left(\mathsf{sin.f64}\left(k\right), \mathsf{*.f64}\left(\ell, \ell\right)\right)\right)\right), \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(k, k\right), \ell\right), \mathsf{/.f64}\left(\sin k, \ell\right)\right)\right)\right), \mathsf{tan.f64}\left(k\right)\right)\right) \]
      19. sin-lowering-sin.f6478.8%

        \[\leadsto \mathsf{/.f64}\left(2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(t, \mathsf{+.f64}\left(\mathsf{*.f64}\left(2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(t, t\right), \mathsf{/.f64}\left(\mathsf{sin.f64}\left(k\right), \mathsf{*.f64}\left(\ell, \ell\right)\right)\right)\right), \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(k, k\right), \ell\right), \mathsf{/.f64}\left(\mathsf{sin.f64}\left(k\right), \ell\right)\right)\right)\right), \mathsf{tan.f64}\left(k\right)\right)\right) \]
    7. Simplified78.8%

      \[\leadsto \frac{2}{\color{blue}{\left(t \cdot \left(2 \cdot \left(\left(t \cdot t\right) \cdot \frac{\sin k}{\ell \cdot \ell}\right) + \frac{k \cdot k}{\ell} \cdot \frac{\sin k}{\ell}\right)\right)} \cdot \tan k} \]
    8. Step-by-step derivation
      1. +-commutativeN/A

        \[\leadsto \mathsf{/.f64}\left(2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(t, \left(\frac{k \cdot k}{\ell} \cdot \frac{\sin k}{\ell} + 2 \cdot \left(\left(t \cdot t\right) \cdot \frac{\sin k}{\ell \cdot \ell}\right)\right)\right), \mathsf{tan.f64}\left(k\right)\right)\right) \]
      2. *-commutativeN/A

        \[\leadsto \mathsf{/.f64}\left(2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(t, \left(\frac{\sin k}{\ell} \cdot \frac{k \cdot k}{\ell} + 2 \cdot \left(\left(t \cdot t\right) \cdot \frac{\sin k}{\ell \cdot \ell}\right)\right)\right), \mathsf{tan.f64}\left(k\right)\right)\right) \]
      3. associate-/l*N/A

        \[\leadsto \mathsf{/.f64}\left(2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(t, \left(\frac{\sin k}{\ell} \cdot \left(k \cdot \frac{k}{\ell}\right) + 2 \cdot \left(\left(t \cdot t\right) \cdot \frac{\sin k}{\ell \cdot \ell}\right)\right)\right), \mathsf{tan.f64}\left(k\right)\right)\right) \]
      4. associate-*r*N/A

        \[\leadsto \mathsf{/.f64}\left(2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(t, \left(\left(\frac{\sin k}{\ell} \cdot k\right) \cdot \frac{k}{\ell} + 2 \cdot \left(\left(t \cdot t\right) \cdot \frac{\sin k}{\ell \cdot \ell}\right)\right)\right), \mathsf{tan.f64}\left(k\right)\right)\right) \]
      5. accelerator-lowering-fma.f64N/A

        \[\leadsto \mathsf{/.f64}\left(2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(t, \mathsf{fma.f64}\left(\left(\frac{\sin k}{\ell} \cdot k\right), \left(\frac{k}{\ell}\right), \left(2 \cdot \left(\left(t \cdot t\right) \cdot \frac{\sin k}{\ell \cdot \ell}\right)\right)\right)\right), \mathsf{tan.f64}\left(k\right)\right)\right) \]
      6. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(t, \mathsf{fma.f64}\left(\mathsf{*.f64}\left(\left(\frac{\sin k}{\ell}\right), k\right), \left(\frac{k}{\ell}\right), \left(2 \cdot \left(\left(t \cdot t\right) \cdot \frac{\sin k}{\ell \cdot \ell}\right)\right)\right)\right), \mathsf{tan.f64}\left(k\right)\right)\right) \]
      7. /-lowering-/.f64N/A

        \[\leadsto \mathsf{/.f64}\left(2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(t, \mathsf{fma.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(\sin k, \ell\right), k\right), \left(\frac{k}{\ell}\right), \left(2 \cdot \left(\left(t \cdot t\right) \cdot \frac{\sin k}{\ell \cdot \ell}\right)\right)\right)\right), \mathsf{tan.f64}\left(k\right)\right)\right) \]
      8. sin-lowering-sin.f64N/A

        \[\leadsto \mathsf{/.f64}\left(2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(t, \mathsf{fma.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{sin.f64}\left(k\right), \ell\right), k\right), \left(\frac{k}{\ell}\right), \left(2 \cdot \left(\left(t \cdot t\right) \cdot \frac{\sin k}{\ell \cdot \ell}\right)\right)\right)\right), \mathsf{tan.f64}\left(k\right)\right)\right) \]
      9. /-lowering-/.f64N/A

        \[\leadsto \mathsf{/.f64}\left(2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(t, \mathsf{fma.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{sin.f64}\left(k\right), \ell\right), k\right), \mathsf{/.f64}\left(k, \ell\right), \left(2 \cdot \left(\left(t \cdot t\right) \cdot \frac{\sin k}{\ell \cdot \ell}\right)\right)\right)\right), \mathsf{tan.f64}\left(k\right)\right)\right) \]
      10. associate-*r*N/A

        \[\leadsto \mathsf{/.f64}\left(2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(t, \mathsf{fma.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{sin.f64}\left(k\right), \ell\right), k\right), \mathsf{/.f64}\left(k, \ell\right), \left(\left(2 \cdot \left(t \cdot t\right)\right) \cdot \frac{\sin k}{\ell \cdot \ell}\right)\right)\right), \mathsf{tan.f64}\left(k\right)\right)\right) \]
      11. clear-numN/A

        \[\leadsto \mathsf{/.f64}\left(2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(t, \mathsf{fma.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{sin.f64}\left(k\right), \ell\right), k\right), \mathsf{/.f64}\left(k, \ell\right), \left(\left(2 \cdot \left(t \cdot t\right)\right) \cdot \frac{1}{\frac{\ell \cdot \ell}{\sin k}}\right)\right)\right), \mathsf{tan.f64}\left(k\right)\right)\right) \]
      12. un-div-invN/A

        \[\leadsto \mathsf{/.f64}\left(2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(t, \mathsf{fma.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{sin.f64}\left(k\right), \ell\right), k\right), \mathsf{/.f64}\left(k, \ell\right), \left(\frac{2 \cdot \left(t \cdot t\right)}{\frac{\ell \cdot \ell}{\sin k}}\right)\right)\right), \mathsf{tan.f64}\left(k\right)\right)\right) \]
      13. /-lowering-/.f64N/A

        \[\leadsto \mathsf{/.f64}\left(2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(t, \mathsf{fma.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{sin.f64}\left(k\right), \ell\right), k\right), \mathsf{/.f64}\left(k, \ell\right), \mathsf{/.f64}\left(\left(2 \cdot \left(t \cdot t\right)\right), \left(\frac{\ell \cdot \ell}{\sin k}\right)\right)\right)\right), \mathsf{tan.f64}\left(k\right)\right)\right) \]
      14. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(t, \mathsf{fma.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{sin.f64}\left(k\right), \ell\right), k\right), \mathsf{/.f64}\left(k, \ell\right), \mathsf{/.f64}\left(\mathsf{*.f64}\left(2, \left(t \cdot t\right)\right), \left(\frac{\ell \cdot \ell}{\sin k}\right)\right)\right)\right), \mathsf{tan.f64}\left(k\right)\right)\right) \]
      15. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(t, \mathsf{fma.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{sin.f64}\left(k\right), \ell\right), k\right), \mathsf{/.f64}\left(k, \ell\right), \mathsf{/.f64}\left(\mathsf{*.f64}\left(2, \mathsf{*.f64}\left(t, t\right)\right), \left(\frac{\ell \cdot \ell}{\sin k}\right)\right)\right)\right), \mathsf{tan.f64}\left(k\right)\right)\right) \]
      16. associate-/l*N/A

        \[\leadsto \mathsf{/.f64}\left(2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(t, \mathsf{fma.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{sin.f64}\left(k\right), \ell\right), k\right), \mathsf{/.f64}\left(k, \ell\right), \mathsf{/.f64}\left(\mathsf{*.f64}\left(2, \mathsf{*.f64}\left(t, t\right)\right), \left(\ell \cdot \frac{\ell}{\sin k}\right)\right)\right)\right), \mathsf{tan.f64}\left(k\right)\right)\right) \]
      17. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(t, \mathsf{fma.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{sin.f64}\left(k\right), \ell\right), k\right), \mathsf{/.f64}\left(k, \ell\right), \mathsf{/.f64}\left(\mathsf{*.f64}\left(2, \mathsf{*.f64}\left(t, t\right)\right), \mathsf{*.f64}\left(\ell, \left(\frac{\ell}{\sin k}\right)\right)\right)\right)\right), \mathsf{tan.f64}\left(k\right)\right)\right) \]
      18. /-lowering-/.f64N/A

        \[\leadsto \mathsf{/.f64}\left(2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(t, \mathsf{fma.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{sin.f64}\left(k\right), \ell\right), k\right), \mathsf{/.f64}\left(k, \ell\right), \mathsf{/.f64}\left(\mathsf{*.f64}\left(2, \mathsf{*.f64}\left(t, t\right)\right), \mathsf{*.f64}\left(\ell, \mathsf{/.f64}\left(\ell, \sin k\right)\right)\right)\right)\right), \mathsf{tan.f64}\left(k\right)\right)\right) \]
      19. sin-lowering-sin.f6492.6%

        \[\leadsto \mathsf{/.f64}\left(2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(t, \mathsf{fma.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{sin.f64}\left(k\right), \ell\right), k\right), \mathsf{/.f64}\left(k, \ell\right), \mathsf{/.f64}\left(\mathsf{*.f64}\left(2, \mathsf{*.f64}\left(t, t\right)\right), \mathsf{*.f64}\left(\ell, \mathsf{/.f64}\left(\ell, \mathsf{sin.f64}\left(k\right)\right)\right)\right)\right)\right), \mathsf{tan.f64}\left(k\right)\right)\right) \]
    9. Applied egg-rr92.6%

      \[\leadsto \frac{2}{\left(t \cdot \color{blue}{\mathsf{fma}\left(\frac{\sin k}{\ell} \cdot k, \frac{k}{\ell}, \frac{2 \cdot \left(t \cdot t\right)}{\ell \cdot \frac{\ell}{\sin k}}\right)}\right) \cdot \tan k} \]
    10. Step-by-step derivation
      1. associate-/r*N/A

        \[\leadsto \frac{\frac{2}{t \cdot \left(\left(\frac{\sin k}{\ell} \cdot k\right) \cdot \frac{k}{\ell} + \frac{2 \cdot \left(t \cdot t\right)}{\ell \cdot \frac{\ell}{\sin k}}\right)}}{\color{blue}{\tan k}} \]
      2. /-lowering-/.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\left(\frac{2}{t \cdot \left(\left(\frac{\sin k}{\ell} \cdot k\right) \cdot \frac{k}{\ell} + \frac{2 \cdot \left(t \cdot t\right)}{\ell \cdot \frac{\ell}{\sin k}}\right)}\right), \color{blue}{\tan k}\right) \]
    11. Applied egg-rr92.7%

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

    if 2.75e132 < t

    1. Initial program 62.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. Add Preprocessing
    3. Taylor expanded in k around 0

      \[\leadsto \color{blue}{\frac{{\ell}^{2}}{{k}^{2} \cdot {t}^{3}}} \]
    4. Step-by-step derivation
      1. /-lowering-/.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\left({\ell}^{2}\right), \color{blue}{\left({k}^{2} \cdot {t}^{3}\right)}\right) \]
      2. unpow2N/A

        \[\leadsto \mathsf{/.f64}\left(\left(\ell \cdot \ell\right), \left(\color{blue}{{k}^{2}} \cdot {t}^{3}\right)\right) \]
      3. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\ell, \ell\right), \left(\color{blue}{{k}^{2}} \cdot {t}^{3}\right)\right) \]
      4. *-commutativeN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\ell, \ell\right), \left({t}^{3} \cdot \color{blue}{{k}^{2}}\right)\right) \]
      5. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\ell, \ell\right), \mathsf{*.f64}\left(\left({t}^{3}\right), \color{blue}{\left({k}^{2}\right)}\right)\right) \]
      6. cube-multN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\ell, \ell\right), \mathsf{*.f64}\left(\left(t \cdot \left(t \cdot t\right)\right), \left({\color{blue}{k}}^{2}\right)\right)\right) \]
      7. unpow2N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\ell, \ell\right), \mathsf{*.f64}\left(\left(t \cdot {t}^{2}\right), \left({k}^{2}\right)\right)\right) \]
      8. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\ell, \ell\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(t, \left({t}^{2}\right)\right), \left({\color{blue}{k}}^{2}\right)\right)\right) \]
      9. unpow2N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\ell, \ell\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(t, \left(t \cdot t\right)\right), \left({k}^{2}\right)\right)\right) \]
      10. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\ell, \ell\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(t, \mathsf{*.f64}\left(t, t\right)\right), \left({k}^{2}\right)\right)\right) \]
      11. unpow2N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\ell, \ell\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(t, \mathsf{*.f64}\left(t, t\right)\right), \left(k \cdot \color{blue}{k}\right)\right)\right) \]
      12. *-lowering-*.f6461.8%

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\ell, \ell\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(t, \mathsf{*.f64}\left(t, t\right)\right), \mathsf{*.f64}\left(k, \color{blue}{k}\right)\right)\right) \]
    5. Simplified61.8%

      \[\leadsto \color{blue}{\frac{\ell \cdot \ell}{\left(t \cdot \left(t \cdot t\right)\right) \cdot \left(k \cdot k\right)}} \]
    6. Step-by-step derivation
      1. associate-*l*N/A

        \[\leadsto \frac{\ell \cdot \ell}{t \cdot \color{blue}{\left(\left(t \cdot t\right) \cdot \left(k \cdot k\right)\right)}} \]
      2. times-fracN/A

        \[\leadsto \frac{\ell}{t} \cdot \color{blue}{\frac{\ell}{\left(t \cdot t\right) \cdot \left(k \cdot k\right)}} \]
      3. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\left(\frac{\ell}{t}\right), \color{blue}{\left(\frac{\ell}{\left(t \cdot t\right) \cdot \left(k \cdot k\right)}\right)}\right) \]
      4. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(\ell, t\right), \left(\frac{\color{blue}{\ell}}{\left(t \cdot t\right) \cdot \left(k \cdot k\right)}\right)\right) \]
      5. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(\ell, t\right), \mathsf{/.f64}\left(\ell, \color{blue}{\left(\left(t \cdot t\right) \cdot \left(k \cdot k\right)\right)}\right)\right) \]
      6. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(\ell, t\right), \mathsf{/.f64}\left(\ell, \mathsf{*.f64}\left(\left(t \cdot t\right), \color{blue}{\left(k \cdot k\right)}\right)\right)\right) \]
      7. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(\ell, t\right), \mathsf{/.f64}\left(\ell, \mathsf{*.f64}\left(\mathsf{*.f64}\left(t, t\right), \left(\color{blue}{k} \cdot k\right)\right)\right)\right) \]
      8. *-lowering-*.f6470.7%

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(\ell, t\right), \mathsf{/.f64}\left(\ell, \mathsf{*.f64}\left(\mathsf{*.f64}\left(t, t\right), \mathsf{*.f64}\left(k, \color{blue}{k}\right)\right)\right)\right) \]
    7. Applied egg-rr70.7%

      \[\leadsto \color{blue}{\frac{\ell}{t} \cdot \frac{\ell}{\left(t \cdot t\right) \cdot \left(k \cdot k\right)}} \]
    8. Step-by-step derivation
      1. associate-*r/N/A

        \[\leadsto \frac{\frac{\ell}{t} \cdot \ell}{\color{blue}{\left(t \cdot t\right) \cdot \left(k \cdot k\right)}} \]
      2. unswap-sqrN/A

        \[\leadsto \frac{\frac{\ell}{t} \cdot \ell}{\left(t \cdot k\right) \cdot \color{blue}{\left(t \cdot k\right)}} \]
      3. times-fracN/A

        \[\leadsto \frac{\frac{\ell}{t}}{t \cdot k} \cdot \color{blue}{\frac{\ell}{t \cdot k}} \]
      4. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\left(\frac{\frac{\ell}{t}}{t \cdot k}\right), \color{blue}{\left(\frac{\ell}{t \cdot k}\right)}\right) \]
      5. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(\left(\frac{\ell}{t}\right), \left(t \cdot k\right)\right), \left(\frac{\color{blue}{\ell}}{t \cdot k}\right)\right) \]
      6. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(\ell, t\right), \left(t \cdot k\right)\right), \left(\frac{\ell}{t \cdot k}\right)\right) \]
      7. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(\ell, t\right), \mathsf{*.f64}\left(t, k\right)\right), \left(\frac{\ell}{t \cdot k}\right)\right) \]
      8. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(\ell, t\right), \mathsf{*.f64}\left(t, k\right)\right), \mathsf{/.f64}\left(\ell, \color{blue}{\left(t \cdot k\right)}\right)\right) \]
      9. *-lowering-*.f6492.6%

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(\ell, t\right), \mathsf{*.f64}\left(t, k\right)\right), \mathsf{/.f64}\left(\ell, \mathsf{*.f64}\left(t, \color{blue}{k}\right)\right)\right) \]
    9. Applied egg-rr92.6%

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

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

Alternative 2: 91.0% accurate, 1.2× speedup?

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

\mathbf{elif}\;t\_m \leq 2.9 \cdot 10^{+132}:\\
\;\;\;\;\frac{\frac{\frac{2}{t\_m}}{\frac{t\_3}{\frac{\ell}{k}} + \frac{2 \cdot \left(t\_m \cdot t\_m\right)}{\frac{\ell}{t\_2}}}}{\tan k}\\

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


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

    1. Initial program 48.8%

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

        \[\leadsto \mathsf{/.f64}\left(2, \left(\left(\frac{{t}^{3}}{\ell \cdot \ell} \cdot \sin k\right) \cdot \color{blue}{\left(\tan k \cdot \left(\left(1 + {\left(\frac{k}{t}\right)}^{2}\right) + 1\right)\right)}\right)\right) \]
      2. *-commutativeN/A

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

        \[\leadsto \mathsf{/.f64}\left(2, \left(\left(\left(\frac{{t}^{3}}{\ell \cdot \ell} \cdot \sin k\right) \cdot \left(\left(1 + {\left(\frac{k}{t}\right)}^{2}\right) + 1\right)\right) \cdot \color{blue}{\tan k}\right)\right) \]
      4. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(2, \mathsf{*.f64}\left(\left(\left(\frac{{t}^{3}}{\ell \cdot \ell} \cdot \sin k\right) \cdot \left(\left(1 + {\left(\frac{k}{t}\right)}^{2}\right) + 1\right)\right), \color{blue}{\tan k}\right)\right) \]
    4. Applied egg-rr57.7%

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

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

        \[\leadsto \mathsf{/.f64}\left(2, \mathsf{*.f64}\left(\left({k}^{2} \cdot \frac{t \cdot \sin k}{{\ell}^{2}}\right), \mathsf{tan.f64}\left(\color{blue}{k}\right)\right)\right) \]
      2. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\left({k}^{2}\right), \left(\frac{t \cdot \sin k}{{\ell}^{2}}\right)\right), \mathsf{tan.f64}\left(\color{blue}{k}\right)\right)\right) \]
      3. unpow2N/A

        \[\leadsto \mathsf{/.f64}\left(2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\left(k \cdot k\right), \left(\frac{t \cdot \sin k}{{\ell}^{2}}\right)\right), \mathsf{tan.f64}\left(k\right)\right)\right) \]
      4. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(k, k\right), \left(\frac{t \cdot \sin k}{{\ell}^{2}}\right)\right), \mathsf{tan.f64}\left(k\right)\right)\right) \]
      5. /-lowering-/.f64N/A

        \[\leadsto \mathsf{/.f64}\left(2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(k, k\right), \mathsf{/.f64}\left(\left(t \cdot \sin k\right), \left({\ell}^{2}\right)\right)\right), \mathsf{tan.f64}\left(k\right)\right)\right) \]
      6. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(k, k\right), \mathsf{/.f64}\left(\mathsf{*.f64}\left(t, \sin k\right), \left({\ell}^{2}\right)\right)\right), \mathsf{tan.f64}\left(k\right)\right)\right) \]
      7. sin-lowering-sin.f64N/A

        \[\leadsto \mathsf{/.f64}\left(2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(k, k\right), \mathsf{/.f64}\left(\mathsf{*.f64}\left(t, \mathsf{sin.f64}\left(k\right)\right), \left({\ell}^{2}\right)\right)\right), \mathsf{tan.f64}\left(k\right)\right)\right) \]
      8. unpow2N/A

        \[\leadsto \mathsf{/.f64}\left(2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(k, k\right), \mathsf{/.f64}\left(\mathsf{*.f64}\left(t, \mathsf{sin.f64}\left(k\right)\right), \left(\ell \cdot \ell\right)\right)\right), \mathsf{tan.f64}\left(k\right)\right)\right) \]
      9. *-lowering-*.f6462.9%

        \[\leadsto \mathsf{/.f64}\left(2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(k, k\right), \mathsf{/.f64}\left(\mathsf{*.f64}\left(t, \mathsf{sin.f64}\left(k\right)\right), \mathsf{*.f64}\left(\ell, \ell\right)\right)\right), \mathsf{tan.f64}\left(k\right)\right)\right) \]
    7. Simplified62.9%

      \[\leadsto \frac{2}{\color{blue}{\left(\left(k \cdot k\right) \cdot \frac{t \cdot \sin k}{\ell \cdot \ell}\right)} \cdot \tan k} \]
    8. Step-by-step derivation
      1. *-commutativeN/A

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

        \[\leadsto \frac{2}{\tan k \cdot \frac{\left(k \cdot k\right) \cdot \left(t \cdot \sin k\right)}{\color{blue}{\ell \cdot \ell}}} \]
      3. *-commutativeN/A

        \[\leadsto \frac{2}{\tan k \cdot \frac{\left(k \cdot k\right) \cdot \left(\sin k \cdot t\right)}{\ell \cdot \ell}} \]
      4. associate-*r*N/A

        \[\leadsto \frac{2}{\tan k \cdot \frac{\left(\left(k \cdot k\right) \cdot \sin k\right) \cdot t}{\color{blue}{\ell} \cdot \ell}} \]
      5. associate-*l/N/A

        \[\leadsto \frac{2}{\tan k \cdot \left(\frac{\left(k \cdot k\right) \cdot \sin k}{\ell \cdot \ell} \cdot \color{blue}{t}\right)} \]
      6. frac-timesN/A

        \[\leadsto \frac{2}{\tan k \cdot \left(\left(\frac{k \cdot k}{\ell} \cdot \frac{\sin k}{\ell}\right) \cdot t\right)} \]
      7. associate-/r*N/A

        \[\leadsto \frac{\frac{2}{\tan k}}{\color{blue}{\left(\frac{k \cdot k}{\ell} \cdot \frac{\sin k}{\ell}\right) \cdot t}} \]
      8. /-lowering-/.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\left(\frac{2}{\tan k}\right), \color{blue}{\left(\left(\frac{k \cdot k}{\ell} \cdot \frac{\sin k}{\ell}\right) \cdot t\right)}\right) \]
      9. /-lowering-/.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(2, \tan k\right), \left(\color{blue}{\left(\frac{k \cdot k}{\ell} \cdot \frac{\sin k}{\ell}\right)} \cdot t\right)\right) \]
      10. tan-lowering-tan.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(2, \mathsf{tan.f64}\left(k\right)\right), \left(\left(\frac{k \cdot k}{\ell} \cdot \color{blue}{\frac{\sin k}{\ell}}\right) \cdot t\right)\right) \]
      11. frac-timesN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(2, \mathsf{tan.f64}\left(k\right)\right), \left(\frac{\left(k \cdot k\right) \cdot \sin k}{\ell \cdot \ell} \cdot t\right)\right) \]
      12. associate-*l/N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(2, \mathsf{tan.f64}\left(k\right)\right), \left(\frac{\left(\left(k \cdot k\right) \cdot \sin k\right) \cdot t}{\color{blue}{\ell \cdot \ell}}\right)\right) \]
      13. associate-*r*N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(2, \mathsf{tan.f64}\left(k\right)\right), \left(\frac{\left(k \cdot k\right) \cdot \left(\sin k \cdot t\right)}{\color{blue}{\ell} \cdot \ell}\right)\right) \]
      14. *-commutativeN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(2, \mathsf{tan.f64}\left(k\right)\right), \left(\frac{\left(k \cdot k\right) \cdot \left(t \cdot \sin k\right)}{\ell \cdot \ell}\right)\right) \]
    9. Applied egg-rr62.9%

      \[\leadsto \color{blue}{\frac{\frac{2}{\tan k}}{\frac{k \cdot k}{\frac{\ell \cdot \ell}{t \cdot \sin k}}}} \]
    10. Step-by-step derivation
      1. times-fracN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(2, \mathsf{tan.f64}\left(k\right)\right), \left(\frac{k \cdot k}{\frac{\ell}{t} \cdot \color{blue}{\frac{\ell}{\sin k}}}\right)\right) \]
      2. times-fracN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(2, \mathsf{tan.f64}\left(k\right)\right), \left(\frac{k}{\frac{\ell}{t}} \cdot \color{blue}{\frac{k}{\frac{\ell}{\sin k}}}\right)\right) \]
      3. un-div-invN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(2, \mathsf{tan.f64}\left(k\right)\right), \left(\frac{k}{\frac{\ell}{t}} \cdot \left(k \cdot \color{blue}{\frac{1}{\frac{\ell}{\sin k}}}\right)\right)\right) \]
      4. clear-numN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(2, \mathsf{tan.f64}\left(k\right)\right), \left(\frac{k}{\frac{\ell}{t}} \cdot \left(k \cdot \frac{\sin k}{\color{blue}{\ell}}\right)\right)\right) \]
      5. *-commutativeN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(2, \mathsf{tan.f64}\left(k\right)\right), \left(\frac{k}{\frac{\ell}{t}} \cdot \left(\frac{\sin k}{\ell} \cdot \color{blue}{k}\right)\right)\right) \]
      6. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(2, \mathsf{tan.f64}\left(k\right)\right), \mathsf{*.f64}\left(\left(\frac{k}{\frac{\ell}{t}}\right), \color{blue}{\left(\frac{\sin k}{\ell} \cdot k\right)}\right)\right) \]
      7. /-lowering-/.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(2, \mathsf{tan.f64}\left(k\right)\right), \mathsf{*.f64}\left(\mathsf{/.f64}\left(k, \left(\frac{\ell}{t}\right)\right), \left(\color{blue}{\frac{\sin k}{\ell}} \cdot k\right)\right)\right) \]
      8. /-lowering-/.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(2, \mathsf{tan.f64}\left(k\right)\right), \mathsf{*.f64}\left(\mathsf{/.f64}\left(k, \mathsf{/.f64}\left(\ell, t\right)\right), \left(\frac{\sin k}{\color{blue}{\ell}} \cdot k\right)\right)\right) \]
      9. *-commutativeN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(2, \mathsf{tan.f64}\left(k\right)\right), \mathsf{*.f64}\left(\mathsf{/.f64}\left(k, \mathsf{/.f64}\left(\ell, t\right)\right), \left(k \cdot \color{blue}{\frac{\sin k}{\ell}}\right)\right)\right) \]
      10. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(2, \mathsf{tan.f64}\left(k\right)\right), \mathsf{*.f64}\left(\mathsf{/.f64}\left(k, \mathsf{/.f64}\left(\ell, t\right)\right), \mathsf{*.f64}\left(k, \color{blue}{\left(\frac{\sin k}{\ell}\right)}\right)\right)\right) \]
      11. /-lowering-/.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(2, \mathsf{tan.f64}\left(k\right)\right), \mathsf{*.f64}\left(\mathsf{/.f64}\left(k, \mathsf{/.f64}\left(\ell, t\right)\right), \mathsf{*.f64}\left(k, \mathsf{/.f64}\left(\sin k, \color{blue}{\ell}\right)\right)\right)\right) \]
      12. sin-lowering-sin.f6478.1%

        \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(2, \mathsf{tan.f64}\left(k\right)\right), \mathsf{*.f64}\left(\mathsf{/.f64}\left(k, \mathsf{/.f64}\left(\ell, t\right)\right), \mathsf{*.f64}\left(k, \mathsf{/.f64}\left(\mathsf{sin.f64}\left(k\right), \ell\right)\right)\right)\right) \]
    11. Applied egg-rr78.1%

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

    if 1.07999999999999998e-145 < t < 2.8999999999999999e132

    1. Initial program 58.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. associate-*l*N/A

        \[\leadsto \mathsf{/.f64}\left(2, \left(\left(\frac{{t}^{3}}{\ell \cdot \ell} \cdot \sin k\right) \cdot \color{blue}{\left(\tan k \cdot \left(\left(1 + {\left(\frac{k}{t}\right)}^{2}\right) + 1\right)\right)}\right)\right) \]
      2. *-commutativeN/A

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

        \[\leadsto \mathsf{/.f64}\left(2, \left(\left(\left(\frac{{t}^{3}}{\ell \cdot \ell} \cdot \sin k\right) \cdot \left(\left(1 + {\left(\frac{k}{t}\right)}^{2}\right) + 1\right)\right) \cdot \color{blue}{\tan k}\right)\right) \]
      4. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(2, \mathsf{*.f64}\left(\left(\left(\frac{{t}^{3}}{\ell \cdot \ell} \cdot \sin k\right) \cdot \left(\left(1 + {\left(\frac{k}{t}\right)}^{2}\right) + 1\right)\right), \color{blue}{\tan k}\right)\right) \]
    4. Applied egg-rr71.8%

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

      \[\leadsto \mathsf{/.f64}\left(2, \mathsf{*.f64}\left(\color{blue}{\left(t \cdot \left(2 \cdot \frac{{t}^{2} \cdot \sin k}{{\ell}^{2}} + \frac{{k}^{2} \cdot \sin k}{{\ell}^{2}}\right)\right)}, \mathsf{tan.f64}\left(k\right)\right)\right) \]
    6. Step-by-step derivation
      1. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(t, \left(2 \cdot \frac{{t}^{2} \cdot \sin k}{{\ell}^{2}} + \frac{{k}^{2} \cdot \sin k}{{\ell}^{2}}\right)\right), \mathsf{tan.f64}\left(\color{blue}{k}\right)\right)\right) \]
      2. +-lowering-+.f64N/A

        \[\leadsto \mathsf{/.f64}\left(2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(t, \mathsf{+.f64}\left(\left(2 \cdot \frac{{t}^{2} \cdot \sin k}{{\ell}^{2}}\right), \left(\frac{{k}^{2} \cdot \sin k}{{\ell}^{2}}\right)\right)\right), \mathsf{tan.f64}\left(k\right)\right)\right) \]
      3. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(t, \mathsf{+.f64}\left(\mathsf{*.f64}\left(2, \left(\frac{{t}^{2} \cdot \sin k}{{\ell}^{2}}\right)\right), \left(\frac{{k}^{2} \cdot \sin k}{{\ell}^{2}}\right)\right)\right), \mathsf{tan.f64}\left(k\right)\right)\right) \]
      4. associate-/l*N/A

        \[\leadsto \mathsf{/.f64}\left(2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(t, \mathsf{+.f64}\left(\mathsf{*.f64}\left(2, \left({t}^{2} \cdot \frac{\sin k}{{\ell}^{2}}\right)\right), \left(\frac{{k}^{2} \cdot \sin k}{{\ell}^{2}}\right)\right)\right), \mathsf{tan.f64}\left(k\right)\right)\right) \]
      5. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(t, \mathsf{+.f64}\left(\mathsf{*.f64}\left(2, \mathsf{*.f64}\left(\left({t}^{2}\right), \left(\frac{\sin k}{{\ell}^{2}}\right)\right)\right), \left(\frac{{k}^{2} \cdot \sin k}{{\ell}^{2}}\right)\right)\right), \mathsf{tan.f64}\left(k\right)\right)\right) \]
      6. unpow2N/A

        \[\leadsto \mathsf{/.f64}\left(2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(t, \mathsf{+.f64}\left(\mathsf{*.f64}\left(2, \mathsf{*.f64}\left(\left(t \cdot t\right), \left(\frac{\sin k}{{\ell}^{2}}\right)\right)\right), \left(\frac{{k}^{2} \cdot \sin k}{{\ell}^{2}}\right)\right)\right), \mathsf{tan.f64}\left(k\right)\right)\right) \]
      7. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(t, \mathsf{+.f64}\left(\mathsf{*.f64}\left(2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(t, t\right), \left(\frac{\sin k}{{\ell}^{2}}\right)\right)\right), \left(\frac{{k}^{2} \cdot \sin k}{{\ell}^{2}}\right)\right)\right), \mathsf{tan.f64}\left(k\right)\right)\right) \]
      8. /-lowering-/.f64N/A

        \[\leadsto \mathsf{/.f64}\left(2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(t, \mathsf{+.f64}\left(\mathsf{*.f64}\left(2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(t, t\right), \mathsf{/.f64}\left(\sin k, \left({\ell}^{2}\right)\right)\right)\right), \left(\frac{{k}^{2} \cdot \sin k}{{\ell}^{2}}\right)\right)\right), \mathsf{tan.f64}\left(k\right)\right)\right) \]
      9. sin-lowering-sin.f64N/A

        \[\leadsto \mathsf{/.f64}\left(2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(t, \mathsf{+.f64}\left(\mathsf{*.f64}\left(2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(t, t\right), \mathsf{/.f64}\left(\mathsf{sin.f64}\left(k\right), \left({\ell}^{2}\right)\right)\right)\right), \left(\frac{{k}^{2} \cdot \sin k}{{\ell}^{2}}\right)\right)\right), \mathsf{tan.f64}\left(k\right)\right)\right) \]
      10. unpow2N/A

        \[\leadsto \mathsf{/.f64}\left(2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(t, \mathsf{+.f64}\left(\mathsf{*.f64}\left(2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(t, t\right), \mathsf{/.f64}\left(\mathsf{sin.f64}\left(k\right), \left(\ell \cdot \ell\right)\right)\right)\right), \left(\frac{{k}^{2} \cdot \sin k}{{\ell}^{2}}\right)\right)\right), \mathsf{tan.f64}\left(k\right)\right)\right) \]
      11. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(t, \mathsf{+.f64}\left(\mathsf{*.f64}\left(2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(t, t\right), \mathsf{/.f64}\left(\mathsf{sin.f64}\left(k\right), \mathsf{*.f64}\left(\ell, \ell\right)\right)\right)\right), \left(\frac{{k}^{2} \cdot \sin k}{{\ell}^{2}}\right)\right)\right), \mathsf{tan.f64}\left(k\right)\right)\right) \]
      12. unpow2N/A

        \[\leadsto \mathsf{/.f64}\left(2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(t, \mathsf{+.f64}\left(\mathsf{*.f64}\left(2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(t, t\right), \mathsf{/.f64}\left(\mathsf{sin.f64}\left(k\right), \mathsf{*.f64}\left(\ell, \ell\right)\right)\right)\right), \left(\frac{{k}^{2} \cdot \sin k}{\ell \cdot \ell}\right)\right)\right), \mathsf{tan.f64}\left(k\right)\right)\right) \]
      13. times-fracN/A

        \[\leadsto \mathsf{/.f64}\left(2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(t, \mathsf{+.f64}\left(\mathsf{*.f64}\left(2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(t, t\right), \mathsf{/.f64}\left(\mathsf{sin.f64}\left(k\right), \mathsf{*.f64}\left(\ell, \ell\right)\right)\right)\right), \left(\frac{{k}^{2}}{\ell} \cdot \frac{\sin k}{\ell}\right)\right)\right), \mathsf{tan.f64}\left(k\right)\right)\right) \]
      14. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(t, \mathsf{+.f64}\left(\mathsf{*.f64}\left(2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(t, t\right), \mathsf{/.f64}\left(\mathsf{sin.f64}\left(k\right), \mathsf{*.f64}\left(\ell, \ell\right)\right)\right)\right), \mathsf{*.f64}\left(\left(\frac{{k}^{2}}{\ell}\right), \left(\frac{\sin k}{\ell}\right)\right)\right)\right), \mathsf{tan.f64}\left(k\right)\right)\right) \]
      15. /-lowering-/.f64N/A

        \[\leadsto \mathsf{/.f64}\left(2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(t, \mathsf{+.f64}\left(\mathsf{*.f64}\left(2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(t, t\right), \mathsf{/.f64}\left(\mathsf{sin.f64}\left(k\right), \mathsf{*.f64}\left(\ell, \ell\right)\right)\right)\right), \mathsf{*.f64}\left(\mathsf{/.f64}\left(\left({k}^{2}\right), \ell\right), \left(\frac{\sin k}{\ell}\right)\right)\right)\right), \mathsf{tan.f64}\left(k\right)\right)\right) \]
      16. unpow2N/A

        \[\leadsto \mathsf{/.f64}\left(2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(t, \mathsf{+.f64}\left(\mathsf{*.f64}\left(2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(t, t\right), \mathsf{/.f64}\left(\mathsf{sin.f64}\left(k\right), \mathsf{*.f64}\left(\ell, \ell\right)\right)\right)\right), \mathsf{*.f64}\left(\mathsf{/.f64}\left(\left(k \cdot k\right), \ell\right), \left(\frac{\sin k}{\ell}\right)\right)\right)\right), \mathsf{tan.f64}\left(k\right)\right)\right) \]
      17. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(t, \mathsf{+.f64}\left(\mathsf{*.f64}\left(2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(t, t\right), \mathsf{/.f64}\left(\mathsf{sin.f64}\left(k\right), \mathsf{*.f64}\left(\ell, \ell\right)\right)\right)\right), \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(k, k\right), \ell\right), \left(\frac{\sin k}{\ell}\right)\right)\right)\right), \mathsf{tan.f64}\left(k\right)\right)\right) \]
      18. /-lowering-/.f64N/A

        \[\leadsto \mathsf{/.f64}\left(2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(t, \mathsf{+.f64}\left(\mathsf{*.f64}\left(2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(t, t\right), \mathsf{/.f64}\left(\mathsf{sin.f64}\left(k\right), \mathsf{*.f64}\left(\ell, \ell\right)\right)\right)\right), \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(k, k\right), \ell\right), \mathsf{/.f64}\left(\sin k, \ell\right)\right)\right)\right), \mathsf{tan.f64}\left(k\right)\right)\right) \]
      19. sin-lowering-sin.f6477.1%

        \[\leadsto \mathsf{/.f64}\left(2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(t, \mathsf{+.f64}\left(\mathsf{*.f64}\left(2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(t, t\right), \mathsf{/.f64}\left(\mathsf{sin.f64}\left(k\right), \mathsf{*.f64}\left(\ell, \ell\right)\right)\right)\right), \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(k, k\right), \ell\right), \mathsf{/.f64}\left(\mathsf{sin.f64}\left(k\right), \ell\right)\right)\right)\right), \mathsf{tan.f64}\left(k\right)\right)\right) \]
    7. Simplified77.1%

      \[\leadsto \frac{2}{\color{blue}{\left(t \cdot \left(2 \cdot \left(\left(t \cdot t\right) \cdot \frac{\sin k}{\ell \cdot \ell}\right) + \frac{k \cdot k}{\ell} \cdot \frac{\sin k}{\ell}\right)\right)} \cdot \tan k} \]
    8. Step-by-step derivation
      1. +-commutativeN/A

        \[\leadsto \mathsf{/.f64}\left(2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(t, \left(\frac{k \cdot k}{\ell} \cdot \frac{\sin k}{\ell} + 2 \cdot \left(\left(t \cdot t\right) \cdot \frac{\sin k}{\ell \cdot \ell}\right)\right)\right), \mathsf{tan.f64}\left(k\right)\right)\right) \]
      2. *-commutativeN/A

        \[\leadsto \mathsf{/.f64}\left(2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(t, \left(\frac{\sin k}{\ell} \cdot \frac{k \cdot k}{\ell} + 2 \cdot \left(\left(t \cdot t\right) \cdot \frac{\sin k}{\ell \cdot \ell}\right)\right)\right), \mathsf{tan.f64}\left(k\right)\right)\right) \]
      3. associate-/l*N/A

        \[\leadsto \mathsf{/.f64}\left(2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(t, \left(\frac{\sin k}{\ell} \cdot \left(k \cdot \frac{k}{\ell}\right) + 2 \cdot \left(\left(t \cdot t\right) \cdot \frac{\sin k}{\ell \cdot \ell}\right)\right)\right), \mathsf{tan.f64}\left(k\right)\right)\right) \]
      4. associate-*r*N/A

        \[\leadsto \mathsf{/.f64}\left(2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(t, \left(\left(\frac{\sin k}{\ell} \cdot k\right) \cdot \frac{k}{\ell} + 2 \cdot \left(\left(t \cdot t\right) \cdot \frac{\sin k}{\ell \cdot \ell}\right)\right)\right), \mathsf{tan.f64}\left(k\right)\right)\right) \]
      5. accelerator-lowering-fma.f64N/A

        \[\leadsto \mathsf{/.f64}\left(2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(t, \mathsf{fma.f64}\left(\left(\frac{\sin k}{\ell} \cdot k\right), \left(\frac{k}{\ell}\right), \left(2 \cdot \left(\left(t \cdot t\right) \cdot \frac{\sin k}{\ell \cdot \ell}\right)\right)\right)\right), \mathsf{tan.f64}\left(k\right)\right)\right) \]
      6. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(t, \mathsf{fma.f64}\left(\mathsf{*.f64}\left(\left(\frac{\sin k}{\ell}\right), k\right), \left(\frac{k}{\ell}\right), \left(2 \cdot \left(\left(t \cdot t\right) \cdot \frac{\sin k}{\ell \cdot \ell}\right)\right)\right)\right), \mathsf{tan.f64}\left(k\right)\right)\right) \]
      7. /-lowering-/.f64N/A

        \[\leadsto \mathsf{/.f64}\left(2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(t, \mathsf{fma.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(\sin k, \ell\right), k\right), \left(\frac{k}{\ell}\right), \left(2 \cdot \left(\left(t \cdot t\right) \cdot \frac{\sin k}{\ell \cdot \ell}\right)\right)\right)\right), \mathsf{tan.f64}\left(k\right)\right)\right) \]
      8. sin-lowering-sin.f64N/A

        \[\leadsto \mathsf{/.f64}\left(2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(t, \mathsf{fma.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{sin.f64}\left(k\right), \ell\right), k\right), \left(\frac{k}{\ell}\right), \left(2 \cdot \left(\left(t \cdot t\right) \cdot \frac{\sin k}{\ell \cdot \ell}\right)\right)\right)\right), \mathsf{tan.f64}\left(k\right)\right)\right) \]
      9. /-lowering-/.f64N/A

        \[\leadsto \mathsf{/.f64}\left(2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(t, \mathsf{fma.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{sin.f64}\left(k\right), \ell\right), k\right), \mathsf{/.f64}\left(k, \ell\right), \left(2 \cdot \left(\left(t \cdot t\right) \cdot \frac{\sin k}{\ell \cdot \ell}\right)\right)\right)\right), \mathsf{tan.f64}\left(k\right)\right)\right) \]
      10. associate-*r*N/A

        \[\leadsto \mathsf{/.f64}\left(2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(t, \mathsf{fma.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{sin.f64}\left(k\right), \ell\right), k\right), \mathsf{/.f64}\left(k, \ell\right), \left(\left(2 \cdot \left(t \cdot t\right)\right) \cdot \frac{\sin k}{\ell \cdot \ell}\right)\right)\right), \mathsf{tan.f64}\left(k\right)\right)\right) \]
      11. clear-numN/A

        \[\leadsto \mathsf{/.f64}\left(2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(t, \mathsf{fma.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{sin.f64}\left(k\right), \ell\right), k\right), \mathsf{/.f64}\left(k, \ell\right), \left(\left(2 \cdot \left(t \cdot t\right)\right) \cdot \frac{1}{\frac{\ell \cdot \ell}{\sin k}}\right)\right)\right), \mathsf{tan.f64}\left(k\right)\right)\right) \]
      12. un-div-invN/A

        \[\leadsto \mathsf{/.f64}\left(2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(t, \mathsf{fma.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{sin.f64}\left(k\right), \ell\right), k\right), \mathsf{/.f64}\left(k, \ell\right), \left(\frac{2 \cdot \left(t \cdot t\right)}{\frac{\ell \cdot \ell}{\sin k}}\right)\right)\right), \mathsf{tan.f64}\left(k\right)\right)\right) \]
      13. /-lowering-/.f64N/A

        \[\leadsto \mathsf{/.f64}\left(2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(t, \mathsf{fma.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{sin.f64}\left(k\right), \ell\right), k\right), \mathsf{/.f64}\left(k, \ell\right), \mathsf{/.f64}\left(\left(2 \cdot \left(t \cdot t\right)\right), \left(\frac{\ell \cdot \ell}{\sin k}\right)\right)\right)\right), \mathsf{tan.f64}\left(k\right)\right)\right) \]
      14. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(t, \mathsf{fma.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{sin.f64}\left(k\right), \ell\right), k\right), \mathsf{/.f64}\left(k, \ell\right), \mathsf{/.f64}\left(\mathsf{*.f64}\left(2, \left(t \cdot t\right)\right), \left(\frac{\ell \cdot \ell}{\sin k}\right)\right)\right)\right), \mathsf{tan.f64}\left(k\right)\right)\right) \]
      15. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(t, \mathsf{fma.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{sin.f64}\left(k\right), \ell\right), k\right), \mathsf{/.f64}\left(k, \ell\right), \mathsf{/.f64}\left(\mathsf{*.f64}\left(2, \mathsf{*.f64}\left(t, t\right)\right), \left(\frac{\ell \cdot \ell}{\sin k}\right)\right)\right)\right), \mathsf{tan.f64}\left(k\right)\right)\right) \]
      16. associate-/l*N/A

        \[\leadsto \mathsf{/.f64}\left(2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(t, \mathsf{fma.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{sin.f64}\left(k\right), \ell\right), k\right), \mathsf{/.f64}\left(k, \ell\right), \mathsf{/.f64}\left(\mathsf{*.f64}\left(2, \mathsf{*.f64}\left(t, t\right)\right), \left(\ell \cdot \frac{\ell}{\sin k}\right)\right)\right)\right), \mathsf{tan.f64}\left(k\right)\right)\right) \]
      17. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(t, \mathsf{fma.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{sin.f64}\left(k\right), \ell\right), k\right), \mathsf{/.f64}\left(k, \ell\right), \mathsf{/.f64}\left(\mathsf{*.f64}\left(2, \mathsf{*.f64}\left(t, t\right)\right), \mathsf{*.f64}\left(\ell, \left(\frac{\ell}{\sin k}\right)\right)\right)\right)\right), \mathsf{tan.f64}\left(k\right)\right)\right) \]
      18. /-lowering-/.f64N/A

        \[\leadsto \mathsf{/.f64}\left(2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(t, \mathsf{fma.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{sin.f64}\left(k\right), \ell\right), k\right), \mathsf{/.f64}\left(k, \ell\right), \mathsf{/.f64}\left(\mathsf{*.f64}\left(2, \mathsf{*.f64}\left(t, t\right)\right), \mathsf{*.f64}\left(\ell, \mathsf{/.f64}\left(\ell, \sin k\right)\right)\right)\right)\right), \mathsf{tan.f64}\left(k\right)\right)\right) \]
      19. sin-lowering-sin.f6493.5%

        \[\leadsto \mathsf{/.f64}\left(2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(t, \mathsf{fma.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{sin.f64}\left(k\right), \ell\right), k\right), \mathsf{/.f64}\left(k, \ell\right), \mathsf{/.f64}\left(\mathsf{*.f64}\left(2, \mathsf{*.f64}\left(t, t\right)\right), \mathsf{*.f64}\left(\ell, \mathsf{/.f64}\left(\ell, \mathsf{sin.f64}\left(k\right)\right)\right)\right)\right)\right), \mathsf{tan.f64}\left(k\right)\right)\right) \]
    9. Applied egg-rr93.5%

      \[\leadsto \frac{2}{\left(t \cdot \color{blue}{\mathsf{fma}\left(\frac{\sin k}{\ell} \cdot k, \frac{k}{\ell}, \frac{2 \cdot \left(t \cdot t\right)}{\ell \cdot \frac{\ell}{\sin k}}\right)}\right) \cdot \tan k} \]
    10. Step-by-step derivation
      1. associate-/r*N/A

        \[\leadsto \frac{\frac{2}{t \cdot \left(\left(\frac{\sin k}{\ell} \cdot k\right) \cdot \frac{k}{\ell} + \frac{2 \cdot \left(t \cdot t\right)}{\ell \cdot \frac{\ell}{\sin k}}\right)}}{\color{blue}{\tan k}} \]
      2. /-lowering-/.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\left(\frac{2}{t \cdot \left(\left(\frac{\sin k}{\ell} \cdot k\right) \cdot \frac{k}{\ell} + \frac{2 \cdot \left(t \cdot t\right)}{\ell \cdot \frac{\ell}{\sin k}}\right)}\right), \color{blue}{\tan k}\right) \]
    11. Applied egg-rr93.7%

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

    if 2.8999999999999999e132 < t

    1. Initial program 62.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. Add Preprocessing
    3. Taylor expanded in k around 0

      \[\leadsto \color{blue}{\frac{{\ell}^{2}}{{k}^{2} \cdot {t}^{3}}} \]
    4. Step-by-step derivation
      1. /-lowering-/.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\left({\ell}^{2}\right), \color{blue}{\left({k}^{2} \cdot {t}^{3}\right)}\right) \]
      2. unpow2N/A

        \[\leadsto \mathsf{/.f64}\left(\left(\ell \cdot \ell\right), \left(\color{blue}{{k}^{2}} \cdot {t}^{3}\right)\right) \]
      3. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\ell, \ell\right), \left(\color{blue}{{k}^{2}} \cdot {t}^{3}\right)\right) \]
      4. *-commutativeN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\ell, \ell\right), \left({t}^{3} \cdot \color{blue}{{k}^{2}}\right)\right) \]
      5. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\ell, \ell\right), \mathsf{*.f64}\left(\left({t}^{3}\right), \color{blue}{\left({k}^{2}\right)}\right)\right) \]
      6. cube-multN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\ell, \ell\right), \mathsf{*.f64}\left(\left(t \cdot \left(t \cdot t\right)\right), \left({\color{blue}{k}}^{2}\right)\right)\right) \]
      7. unpow2N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\ell, \ell\right), \mathsf{*.f64}\left(\left(t \cdot {t}^{2}\right), \left({k}^{2}\right)\right)\right) \]
      8. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\ell, \ell\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(t, \left({t}^{2}\right)\right), \left({\color{blue}{k}}^{2}\right)\right)\right) \]
      9. unpow2N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\ell, \ell\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(t, \left(t \cdot t\right)\right), \left({k}^{2}\right)\right)\right) \]
      10. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\ell, \ell\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(t, \mathsf{*.f64}\left(t, t\right)\right), \left({k}^{2}\right)\right)\right) \]
      11. unpow2N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\ell, \ell\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(t, \mathsf{*.f64}\left(t, t\right)\right), \left(k \cdot \color{blue}{k}\right)\right)\right) \]
      12. *-lowering-*.f6461.8%

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\ell, \ell\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(t, \mathsf{*.f64}\left(t, t\right)\right), \mathsf{*.f64}\left(k, \color{blue}{k}\right)\right)\right) \]
    5. Simplified61.8%

      \[\leadsto \color{blue}{\frac{\ell \cdot \ell}{\left(t \cdot \left(t \cdot t\right)\right) \cdot \left(k \cdot k\right)}} \]
    6. Step-by-step derivation
      1. associate-*l*N/A

        \[\leadsto \frac{\ell \cdot \ell}{t \cdot \color{blue}{\left(\left(t \cdot t\right) \cdot \left(k \cdot k\right)\right)}} \]
      2. times-fracN/A

        \[\leadsto \frac{\ell}{t} \cdot \color{blue}{\frac{\ell}{\left(t \cdot t\right) \cdot \left(k \cdot k\right)}} \]
      3. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\left(\frac{\ell}{t}\right), \color{blue}{\left(\frac{\ell}{\left(t \cdot t\right) \cdot \left(k \cdot k\right)}\right)}\right) \]
      4. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(\ell, t\right), \left(\frac{\color{blue}{\ell}}{\left(t \cdot t\right) \cdot \left(k \cdot k\right)}\right)\right) \]
      5. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(\ell, t\right), \mathsf{/.f64}\left(\ell, \color{blue}{\left(\left(t \cdot t\right) \cdot \left(k \cdot k\right)\right)}\right)\right) \]
      6. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(\ell, t\right), \mathsf{/.f64}\left(\ell, \mathsf{*.f64}\left(\left(t \cdot t\right), \color{blue}{\left(k \cdot k\right)}\right)\right)\right) \]
      7. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(\ell, t\right), \mathsf{/.f64}\left(\ell, \mathsf{*.f64}\left(\mathsf{*.f64}\left(t, t\right), \left(\color{blue}{k} \cdot k\right)\right)\right)\right) \]
      8. *-lowering-*.f6470.7%

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(\ell, t\right), \mathsf{/.f64}\left(\ell, \mathsf{*.f64}\left(\mathsf{*.f64}\left(t, t\right), \mathsf{*.f64}\left(k, \color{blue}{k}\right)\right)\right)\right) \]
    7. Applied egg-rr70.7%

      \[\leadsto \color{blue}{\frac{\ell}{t} \cdot \frac{\ell}{\left(t \cdot t\right) \cdot \left(k \cdot k\right)}} \]
    8. Step-by-step derivation
      1. associate-*r/N/A

        \[\leadsto \frac{\frac{\ell}{t} \cdot \ell}{\color{blue}{\left(t \cdot t\right) \cdot \left(k \cdot k\right)}} \]
      2. unswap-sqrN/A

        \[\leadsto \frac{\frac{\ell}{t} \cdot \ell}{\left(t \cdot k\right) \cdot \color{blue}{\left(t \cdot k\right)}} \]
      3. times-fracN/A

        \[\leadsto \frac{\frac{\ell}{t}}{t \cdot k} \cdot \color{blue}{\frac{\ell}{t \cdot k}} \]
      4. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\left(\frac{\frac{\ell}{t}}{t \cdot k}\right), \color{blue}{\left(\frac{\ell}{t \cdot k}\right)}\right) \]
      5. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(\left(\frac{\ell}{t}\right), \left(t \cdot k\right)\right), \left(\frac{\color{blue}{\ell}}{t \cdot k}\right)\right) \]
      6. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(\ell, t\right), \left(t \cdot k\right)\right), \left(\frac{\ell}{t \cdot k}\right)\right) \]
      7. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(\ell, t\right), \mathsf{*.f64}\left(t, k\right)\right), \left(\frac{\ell}{t \cdot k}\right)\right) \]
      8. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(\ell, t\right), \mathsf{*.f64}\left(t, k\right)\right), \mathsf{/.f64}\left(\ell, \color{blue}{\left(t \cdot k\right)}\right)\right) \]
      9. *-lowering-*.f6492.6%

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(\ell, t\right), \mathsf{*.f64}\left(t, k\right)\right), \mathsf{/.f64}\left(\ell, \mathsf{*.f64}\left(t, \color{blue}{k}\right)\right)\right) \]
    9. Applied egg-rr92.6%

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

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

Alternative 3: 72.2% accurate, 1.9× speedup?

\[\begin{array}{l} t\_m = \left|t\right| \\ t\_s = \mathsf{copysign}\left(1, t\right) \\ \begin{array}{l} t_2 := \frac{t\_m}{\ell \cdot \ell}\\ t\_s \cdot \begin{array}{l} \mathbf{if}\;k \leq 1.32 \cdot 10^{-14}:\\ \;\;\;\;\frac{\frac{\ell}{t\_m}}{t\_m \cdot k} \cdot \frac{\ell}{t\_m \cdot k}\\ \mathbf{elif}\;k \leq 1.55 \cdot 10^{+99}:\\ \;\;\;\;\frac{\frac{\ell \cdot \ell}{\sin k \cdot \left(t\_m \cdot \left(t\_m \cdot t\_m\right)\right)}}{\tan k}\\ \mathbf{else}:\\ \;\;\;\;\frac{2}{{k}^{4} \cdot \left(t\_2 + \left(k \cdot k\right) \cdot \left(\frac{0.08611111111111111}{\ell} \cdot \frac{t\_m \cdot \left(k \cdot k\right)}{\ell} + t\_2 \cdot 0.16666666666666666\right)\right)}\\ \end{array} \end{array} \end{array} \]
t\_m = (fabs.f64 t)
t\_s = (copysign.f64 #s(literal 1 binary64) t)
(FPCore (t_s t_m l k)
 :precision binary64
 (let* ((t_2 (/ t_m (* l l))))
   (*
    t_s
    (if (<= k 1.32e-14)
      (* (/ (/ l t_m) (* t_m k)) (/ l (* t_m k)))
      (if (<= k 1.55e+99)
        (/ (/ (* l l) (* (sin k) (* t_m (* t_m t_m)))) (tan k))
        (/
         2.0
         (*
          (pow k 4.0)
          (+
           t_2
           (*
            (* k k)
            (+
             (* (/ 0.08611111111111111 l) (/ (* t_m (* k k)) l))
             (* t_2 0.16666666666666666)))))))))))
t\_m = fabs(t);
t\_s = copysign(1.0, t);
double code(double t_s, double t_m, double l, double k) {
	double t_2 = t_m / (l * l);
	double tmp;
	if (k <= 1.32e-14) {
		tmp = ((l / t_m) / (t_m * k)) * (l / (t_m * k));
	} else if (k <= 1.55e+99) {
		tmp = ((l * l) / (sin(k) * (t_m * (t_m * t_m)))) / tan(k);
	} else {
		tmp = 2.0 / (pow(k, 4.0) * (t_2 + ((k * k) * (((0.08611111111111111 / l) * ((t_m * (k * k)) / l)) + (t_2 * 0.16666666666666666)))));
	}
	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 = t_m / (l * l)
    if (k <= 1.32d-14) then
        tmp = ((l / t_m) / (t_m * k)) * (l / (t_m * k))
    else if (k <= 1.55d+99) then
        tmp = ((l * l) / (sin(k) * (t_m * (t_m * t_m)))) / tan(k)
    else
        tmp = 2.0d0 / ((k ** 4.0d0) * (t_2 + ((k * k) * (((0.08611111111111111d0 / l) * ((t_m * (k * k)) / l)) + (t_2 * 0.16666666666666666d0)))))
    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 = t_m / (l * l);
	double tmp;
	if (k <= 1.32e-14) {
		tmp = ((l / t_m) / (t_m * k)) * (l / (t_m * k));
	} else if (k <= 1.55e+99) {
		tmp = ((l * l) / (Math.sin(k) * (t_m * (t_m * t_m)))) / Math.tan(k);
	} else {
		tmp = 2.0 / (Math.pow(k, 4.0) * (t_2 + ((k * k) * (((0.08611111111111111 / l) * ((t_m * (k * k)) / l)) + (t_2 * 0.16666666666666666)))));
	}
	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 = t_m / (l * l)
	tmp = 0
	if k <= 1.32e-14:
		tmp = ((l / t_m) / (t_m * k)) * (l / (t_m * k))
	elif k <= 1.55e+99:
		tmp = ((l * l) / (math.sin(k) * (t_m * (t_m * t_m)))) / math.tan(k)
	else:
		tmp = 2.0 / (math.pow(k, 4.0) * (t_2 + ((k * k) * (((0.08611111111111111 / l) * ((t_m * (k * k)) / l)) + (t_2 * 0.16666666666666666)))))
	return t_s * tmp
t\_m = abs(t)
t\_s = copysign(1.0, t)
function code(t_s, t_m, l, k)
	t_2 = Float64(t_m / Float64(l * l))
	tmp = 0.0
	if (k <= 1.32e-14)
		tmp = Float64(Float64(Float64(l / t_m) / Float64(t_m * k)) * Float64(l / Float64(t_m * k)));
	elseif (k <= 1.55e+99)
		tmp = Float64(Float64(Float64(l * l) / Float64(sin(k) * Float64(t_m * Float64(t_m * t_m)))) / tan(k));
	else
		tmp = Float64(2.0 / Float64((k ^ 4.0) * Float64(t_2 + Float64(Float64(k * k) * Float64(Float64(Float64(0.08611111111111111 / l) * Float64(Float64(t_m * Float64(k * k)) / l)) + Float64(t_2 * 0.16666666666666666))))));
	end
	return Float64(t_s * tmp)
end
t\_m = abs(t);
t\_s = sign(t) * abs(1.0);
function tmp_2 = code(t_s, t_m, l, k)
	t_2 = t_m / (l * l);
	tmp = 0.0;
	if (k <= 1.32e-14)
		tmp = ((l / t_m) / (t_m * k)) * (l / (t_m * k));
	elseif (k <= 1.55e+99)
		tmp = ((l * l) / (sin(k) * (t_m * (t_m * t_m)))) / tan(k);
	else
		tmp = 2.0 / ((k ^ 4.0) * (t_2 + ((k * k) * (((0.08611111111111111 / l) * ((t_m * (k * k)) / l)) + (t_2 * 0.16666666666666666)))));
	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[(t$95$m / N[(l * l), $MachinePrecision]), $MachinePrecision]}, N[(t$95$s * If[LessEqual[k, 1.32e-14], N[(N[(N[(l / t$95$m), $MachinePrecision] / N[(t$95$m * k), $MachinePrecision]), $MachinePrecision] * N[(l / N[(t$95$m * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[k, 1.55e+99], N[(N[(N[(l * l), $MachinePrecision] / N[(N[Sin[k], $MachinePrecision] * N[(t$95$m * N[(t$95$m * t$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[Tan[k], $MachinePrecision]), $MachinePrecision], N[(2.0 / N[(N[Power[k, 4.0], $MachinePrecision] * N[(t$95$2 + N[(N[(k * k), $MachinePrecision] * N[(N[(N[(0.08611111111111111 / l), $MachinePrecision] * N[(N[(t$95$m * N[(k * k), $MachinePrecision]), $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision] + N[(t$95$2 * 0.16666666666666666), $MachinePrecision]), $MachinePrecision]), $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{t\_m}{\ell \cdot \ell}\\
t\_s \cdot \begin{array}{l}
\mathbf{if}\;k \leq 1.32 \cdot 10^{-14}:\\
\;\;\;\;\frac{\frac{\ell}{t\_m}}{t\_m \cdot k} \cdot \frac{\ell}{t\_m \cdot k}\\

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

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


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

    1. Initial program 53.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. Taylor expanded in k around 0

      \[\leadsto \color{blue}{\frac{{\ell}^{2}}{{k}^{2} \cdot {t}^{3}}} \]
    4. Step-by-step derivation
      1. /-lowering-/.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\left({\ell}^{2}\right), \color{blue}{\left({k}^{2} \cdot {t}^{3}\right)}\right) \]
      2. unpow2N/A

        \[\leadsto \mathsf{/.f64}\left(\left(\ell \cdot \ell\right), \left(\color{blue}{{k}^{2}} \cdot {t}^{3}\right)\right) \]
      3. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\ell, \ell\right), \left(\color{blue}{{k}^{2}} \cdot {t}^{3}\right)\right) \]
      4. *-commutativeN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\ell, \ell\right), \left({t}^{3} \cdot \color{blue}{{k}^{2}}\right)\right) \]
      5. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\ell, \ell\right), \mathsf{*.f64}\left(\left({t}^{3}\right), \color{blue}{\left({k}^{2}\right)}\right)\right) \]
      6. cube-multN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\ell, \ell\right), \mathsf{*.f64}\left(\left(t \cdot \left(t \cdot t\right)\right), \left({\color{blue}{k}}^{2}\right)\right)\right) \]
      7. unpow2N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\ell, \ell\right), \mathsf{*.f64}\left(\left(t \cdot {t}^{2}\right), \left({k}^{2}\right)\right)\right) \]
      8. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\ell, \ell\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(t, \left({t}^{2}\right)\right), \left({\color{blue}{k}}^{2}\right)\right)\right) \]
      9. unpow2N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\ell, \ell\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(t, \left(t \cdot t\right)\right), \left({k}^{2}\right)\right)\right) \]
      10. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\ell, \ell\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(t, \mathsf{*.f64}\left(t, t\right)\right), \left({k}^{2}\right)\right)\right) \]
      11. unpow2N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\ell, \ell\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(t, \mathsf{*.f64}\left(t, t\right)\right), \left(k \cdot \color{blue}{k}\right)\right)\right) \]
      12. *-lowering-*.f6448.2%

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\ell, \ell\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(t, \mathsf{*.f64}\left(t, t\right)\right), \mathsf{*.f64}\left(k, \color{blue}{k}\right)\right)\right) \]
    5. Simplified48.2%

      \[\leadsto \color{blue}{\frac{\ell \cdot \ell}{\left(t \cdot \left(t \cdot t\right)\right) \cdot \left(k \cdot k\right)}} \]
    6. Step-by-step derivation
      1. associate-*l*N/A

        \[\leadsto \frac{\ell \cdot \ell}{t \cdot \color{blue}{\left(\left(t \cdot t\right) \cdot \left(k \cdot k\right)\right)}} \]
      2. times-fracN/A

        \[\leadsto \frac{\ell}{t} \cdot \color{blue}{\frac{\ell}{\left(t \cdot t\right) \cdot \left(k \cdot k\right)}} \]
      3. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\left(\frac{\ell}{t}\right), \color{blue}{\left(\frac{\ell}{\left(t \cdot t\right) \cdot \left(k \cdot k\right)}\right)}\right) \]
      4. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(\ell, t\right), \left(\frac{\color{blue}{\ell}}{\left(t \cdot t\right) \cdot \left(k \cdot k\right)}\right)\right) \]
      5. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(\ell, t\right), \mathsf{/.f64}\left(\ell, \color{blue}{\left(\left(t \cdot t\right) \cdot \left(k \cdot k\right)\right)}\right)\right) \]
      6. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(\ell, t\right), \mathsf{/.f64}\left(\ell, \mathsf{*.f64}\left(\left(t \cdot t\right), \color{blue}{\left(k \cdot k\right)}\right)\right)\right) \]
      7. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(\ell, t\right), \mathsf{/.f64}\left(\ell, \mathsf{*.f64}\left(\mathsf{*.f64}\left(t, t\right), \left(\color{blue}{k} \cdot k\right)\right)\right)\right) \]
      8. *-lowering-*.f6458.9%

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(\ell, t\right), \mathsf{/.f64}\left(\ell, \mathsf{*.f64}\left(\mathsf{*.f64}\left(t, t\right), \mathsf{*.f64}\left(k, \color{blue}{k}\right)\right)\right)\right) \]
    7. Applied egg-rr58.9%

      \[\leadsto \color{blue}{\frac{\ell}{t} \cdot \frac{\ell}{\left(t \cdot t\right) \cdot \left(k \cdot k\right)}} \]
    8. Step-by-step derivation
      1. associate-*r/N/A

        \[\leadsto \frac{\frac{\ell}{t} \cdot \ell}{\color{blue}{\left(t \cdot t\right) \cdot \left(k \cdot k\right)}} \]
      2. unswap-sqrN/A

        \[\leadsto \frac{\frac{\ell}{t} \cdot \ell}{\left(t \cdot k\right) \cdot \color{blue}{\left(t \cdot k\right)}} \]
      3. times-fracN/A

        \[\leadsto \frac{\frac{\ell}{t}}{t \cdot k} \cdot \color{blue}{\frac{\ell}{t \cdot k}} \]
      4. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\left(\frac{\frac{\ell}{t}}{t \cdot k}\right), \color{blue}{\left(\frac{\ell}{t \cdot k}\right)}\right) \]
      5. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(\left(\frac{\ell}{t}\right), \left(t \cdot k\right)\right), \left(\frac{\color{blue}{\ell}}{t \cdot k}\right)\right) \]
      6. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(\ell, t\right), \left(t \cdot k\right)\right), \left(\frac{\ell}{t \cdot k}\right)\right) \]
      7. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(\ell, t\right), \mathsf{*.f64}\left(t, k\right)\right), \left(\frac{\ell}{t \cdot k}\right)\right) \]
      8. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(\ell, t\right), \mathsf{*.f64}\left(t, k\right)\right), \mathsf{/.f64}\left(\ell, \color{blue}{\left(t \cdot k\right)}\right)\right) \]
      9. *-lowering-*.f6476.0%

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(\ell, t\right), \mathsf{*.f64}\left(t, k\right)\right), \mathsf{/.f64}\left(\ell, \mathsf{*.f64}\left(t, \color{blue}{k}\right)\right)\right) \]
    9. Applied egg-rr76.0%

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

    if 1.32e-14 < k < 1.55e99

    1. Initial program 54.4%

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

        \[\leadsto \mathsf{/.f64}\left(2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\left(\frac{e^{\log t \cdot 3}}{\ell \cdot \ell}\right), \mathsf{sin.f64}\left(k\right)\right), \mathsf{tan.f64}\left(k\right)\right), \mathsf{+.f64}\left(\mathsf{+.f64}\left(1, \mathsf{pow.f64}\left(\mathsf{/.f64}\left(k, t\right), 2\right)\right), 1\right)\right)\right) \]
      2. pow2N/A

        \[\leadsto \mathsf{/.f64}\left(2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\left(\frac{e^{\log t \cdot 3}}{{\ell}^{2}}\right), \mathsf{sin.f64}\left(k\right)\right), \mathsf{tan.f64}\left(k\right)\right), \mathsf{+.f64}\left(\mathsf{+.f64}\left(1, \mathsf{pow.f64}\left(\mathsf{/.f64}\left(k, t\right), 2\right)\right), 1\right)\right)\right) \]
      3. pow-to-expN/A

        \[\leadsto \mathsf{/.f64}\left(2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\left(\frac{e^{\log t \cdot 3}}{e^{\log \ell \cdot 2}}\right), \mathsf{sin.f64}\left(k\right)\right), \mathsf{tan.f64}\left(k\right)\right), \mathsf{+.f64}\left(\mathsf{+.f64}\left(1, \mathsf{pow.f64}\left(\mathsf{/.f64}\left(k, t\right), 2\right)\right), 1\right)\right)\right) \]
      4. div-expN/A

        \[\leadsto \mathsf{/.f64}\left(2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\left(e^{\log t \cdot 3 - \log \ell \cdot 2}\right), \mathsf{sin.f64}\left(k\right)\right), \mathsf{tan.f64}\left(k\right)\right), \mathsf{+.f64}\left(\mathsf{+.f64}\left(1, \mathsf{pow.f64}\left(\mathsf{/.f64}\left(k, t\right), 2\right)\right), 1\right)\right)\right) \]
      5. exp-lowering-exp.f64N/A

        \[\leadsto \mathsf{/.f64}\left(2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{exp.f64}\left(\left(\log t \cdot 3 - \log \ell \cdot 2\right)\right), \mathsf{sin.f64}\left(k\right)\right), \mathsf{tan.f64}\left(k\right)\right), \mathsf{+.f64}\left(\mathsf{+.f64}\left(1, \mathsf{pow.f64}\left(\mathsf{/.f64}\left(k, t\right), 2\right)\right), 1\right)\right)\right) \]
      6. --lowering--.f64N/A

        \[\leadsto \mathsf{/.f64}\left(2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{exp.f64}\left(\mathsf{\_.f64}\left(\left(\log t \cdot 3\right), \left(\log \ell \cdot 2\right)\right)\right), \mathsf{sin.f64}\left(k\right)\right), \mathsf{tan.f64}\left(k\right)\right), \mathsf{+.f64}\left(\mathsf{+.f64}\left(1, \mathsf{pow.f64}\left(\mathsf{/.f64}\left(k, t\right), 2\right)\right), 1\right)\right)\right) \]
      7. *-commutativeN/A

        \[\leadsto \mathsf{/.f64}\left(2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{exp.f64}\left(\mathsf{\_.f64}\left(\left(3 \cdot \log t\right), \left(\log \ell \cdot 2\right)\right)\right), \mathsf{sin.f64}\left(k\right)\right), \mathsf{tan.f64}\left(k\right)\right), \mathsf{+.f64}\left(\mathsf{+.f64}\left(1, \mathsf{pow.f64}\left(\mathsf{/.f64}\left(k, t\right), 2\right)\right), 1\right)\right)\right) \]
      8. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{exp.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(3, \log t\right), \left(\log \ell \cdot 2\right)\right)\right), \mathsf{sin.f64}\left(k\right)\right), \mathsf{tan.f64}\left(k\right)\right), \mathsf{+.f64}\left(\mathsf{+.f64}\left(1, \mathsf{pow.f64}\left(\mathsf{/.f64}\left(k, t\right), 2\right)\right), 1\right)\right)\right) \]
      9. log-lowering-log.f64N/A

        \[\leadsto \mathsf{/.f64}\left(2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{exp.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(3, \mathsf{log.f64}\left(t\right)\right), \left(\log \ell \cdot 2\right)\right)\right), \mathsf{sin.f64}\left(k\right)\right), \mathsf{tan.f64}\left(k\right)\right), \mathsf{+.f64}\left(\mathsf{+.f64}\left(1, \mathsf{pow.f64}\left(\mathsf{/.f64}\left(k, t\right), 2\right)\right), 1\right)\right)\right) \]
      10. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{exp.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(3, \mathsf{log.f64}\left(t\right)\right), \mathsf{*.f64}\left(\log \ell, 2\right)\right)\right), \mathsf{sin.f64}\left(k\right)\right), \mathsf{tan.f64}\left(k\right)\right), \mathsf{+.f64}\left(\mathsf{+.f64}\left(1, \mathsf{pow.f64}\left(\mathsf{/.f64}\left(k, t\right), 2\right)\right), 1\right)\right)\right) \]
      11. log-lowering-log.f640.0%

        \[\leadsto \mathsf{/.f64}\left(2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{exp.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(3, \mathsf{log.f64}\left(t\right)\right), \mathsf{*.f64}\left(\mathsf{log.f64}\left(\ell\right), 2\right)\right)\right), \mathsf{sin.f64}\left(k\right)\right), \mathsf{tan.f64}\left(k\right)\right), \mathsf{+.f64}\left(\mathsf{+.f64}\left(1, \mathsf{pow.f64}\left(\mathsf{/.f64}\left(k, t\right), 2\right)\right), 1\right)\right)\right) \]
    4. Applied egg-rr0.0%

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

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

      \[\leadsto \mathsf{/.f64}\left(\color{blue}{\left(\frac{{\ell}^{2}}{{t}^{3} \cdot \sin k}\right)}, \mathsf{tan.f64}\left(k\right)\right) \]
    7. Step-by-step derivation
      1. /-lowering-/.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\left({\ell}^{2}\right), \left({t}^{3} \cdot \sin k\right)\right), \mathsf{tan.f64}\left(\color{blue}{k}\right)\right) \]
      2. unpow2N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\left(\ell \cdot \ell\right), \left({t}^{3} \cdot \sin k\right)\right), \mathsf{tan.f64}\left(k\right)\right) \]
      3. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\ell, \ell\right), \left({t}^{3} \cdot \sin k\right)\right), \mathsf{tan.f64}\left(k\right)\right) \]
      4. *-commutativeN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\ell, \ell\right), \left(\sin k \cdot {t}^{3}\right)\right), \mathsf{tan.f64}\left(k\right)\right) \]
      5. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\ell, \ell\right), \mathsf{*.f64}\left(\sin k, \left({t}^{3}\right)\right)\right), \mathsf{tan.f64}\left(k\right)\right) \]
      6. sin-lowering-sin.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\ell, \ell\right), \mathsf{*.f64}\left(\mathsf{sin.f64}\left(k\right), \left({t}^{3}\right)\right)\right), \mathsf{tan.f64}\left(k\right)\right) \]
      7. cube-multN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\ell, \ell\right), \mathsf{*.f64}\left(\mathsf{sin.f64}\left(k\right), \left(t \cdot \left(t \cdot t\right)\right)\right)\right), \mathsf{tan.f64}\left(k\right)\right) \]
      8. unpow2N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\ell, \ell\right), \mathsf{*.f64}\left(\mathsf{sin.f64}\left(k\right), \left(t \cdot {t}^{2}\right)\right)\right), \mathsf{tan.f64}\left(k\right)\right) \]
      9. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\ell, \ell\right), \mathsf{*.f64}\left(\mathsf{sin.f64}\left(k\right), \mathsf{*.f64}\left(t, \left({t}^{2}\right)\right)\right)\right), \mathsf{tan.f64}\left(k\right)\right) \]
      10. unpow2N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\ell, \ell\right), \mathsf{*.f64}\left(\mathsf{sin.f64}\left(k\right), \mathsf{*.f64}\left(t, \left(t \cdot t\right)\right)\right)\right), \mathsf{tan.f64}\left(k\right)\right) \]
      11. *-lowering-*.f6452.2%

        \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\ell, \ell\right), \mathsf{*.f64}\left(\mathsf{sin.f64}\left(k\right), \mathsf{*.f64}\left(t, \mathsf{*.f64}\left(t, t\right)\right)\right)\right), \mathsf{tan.f64}\left(k\right)\right) \]
    8. Simplified52.2%

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

    if 1.55e99 < k

    1. Initial program 49.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. associate-*l*N/A

        \[\leadsto \mathsf{/.f64}\left(2, \left(\left(\frac{{t}^{3}}{\ell \cdot \ell} \cdot \sin k\right) \cdot \color{blue}{\left(\tan k \cdot \left(\left(1 + {\left(\frac{k}{t}\right)}^{2}\right) + 1\right)\right)}\right)\right) \]
      2. *-commutativeN/A

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

        \[\leadsto \mathsf{/.f64}\left(2, \left(\left(\left(\frac{{t}^{3}}{\ell \cdot \ell} \cdot \sin k\right) \cdot \left(\left(1 + {\left(\frac{k}{t}\right)}^{2}\right) + 1\right)\right) \cdot \color{blue}{\tan k}\right)\right) \]
      4. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(2, \mathsf{*.f64}\left(\left(\left(\frac{{t}^{3}}{\ell \cdot \ell} \cdot \sin k\right) \cdot \left(\left(1 + {\left(\frac{k}{t}\right)}^{2}\right) + 1\right)\right), \color{blue}{\tan k}\right)\right) \]
    4. Applied egg-rr55.2%

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

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

        \[\leadsto \mathsf{/.f64}\left(2, \mathsf{*.f64}\left(\left({k}^{2} \cdot \frac{t \cdot \sin k}{{\ell}^{2}}\right), \mathsf{tan.f64}\left(\color{blue}{k}\right)\right)\right) \]
      2. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\left({k}^{2}\right), \left(\frac{t \cdot \sin k}{{\ell}^{2}}\right)\right), \mathsf{tan.f64}\left(\color{blue}{k}\right)\right)\right) \]
      3. unpow2N/A

        \[\leadsto \mathsf{/.f64}\left(2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\left(k \cdot k\right), \left(\frac{t \cdot \sin k}{{\ell}^{2}}\right)\right), \mathsf{tan.f64}\left(k\right)\right)\right) \]
      4. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(k, k\right), \left(\frac{t \cdot \sin k}{{\ell}^{2}}\right)\right), \mathsf{tan.f64}\left(k\right)\right)\right) \]
      5. /-lowering-/.f64N/A

        \[\leadsto \mathsf{/.f64}\left(2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(k, k\right), \mathsf{/.f64}\left(\left(t \cdot \sin k\right), \left({\ell}^{2}\right)\right)\right), \mathsf{tan.f64}\left(k\right)\right)\right) \]
      6. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(k, k\right), \mathsf{/.f64}\left(\mathsf{*.f64}\left(t, \sin k\right), \left({\ell}^{2}\right)\right)\right), \mathsf{tan.f64}\left(k\right)\right)\right) \]
      7. sin-lowering-sin.f64N/A

        \[\leadsto \mathsf{/.f64}\left(2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(k, k\right), \mathsf{/.f64}\left(\mathsf{*.f64}\left(t, \mathsf{sin.f64}\left(k\right)\right), \left({\ell}^{2}\right)\right)\right), \mathsf{tan.f64}\left(k\right)\right)\right) \]
      8. unpow2N/A

        \[\leadsto \mathsf{/.f64}\left(2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(k, k\right), \mathsf{/.f64}\left(\mathsf{*.f64}\left(t, \mathsf{sin.f64}\left(k\right)\right), \left(\ell \cdot \ell\right)\right)\right), \mathsf{tan.f64}\left(k\right)\right)\right) \]
      9. *-lowering-*.f6469.6%

        \[\leadsto \mathsf{/.f64}\left(2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(k, k\right), \mathsf{/.f64}\left(\mathsf{*.f64}\left(t, \mathsf{sin.f64}\left(k\right)\right), \mathsf{*.f64}\left(\ell, \ell\right)\right)\right), \mathsf{tan.f64}\left(k\right)\right)\right) \]
    7. Simplified69.6%

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

      \[\leadsto \mathsf{/.f64}\left(2, \color{blue}{\left({k}^{4} \cdot \left({k}^{2} \cdot \left(\frac{31}{360} \cdot \frac{{k}^{2} \cdot t}{{\ell}^{2}} + \frac{1}{6} \cdot \frac{t}{{\ell}^{2}}\right) + \frac{t}{{\ell}^{2}}\right)\right)}\right) \]
    9. Step-by-step derivation
      1. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(2, \mathsf{*.f64}\left(\left({k}^{4}\right), \color{blue}{\left({k}^{2} \cdot \left(\frac{31}{360} \cdot \frac{{k}^{2} \cdot t}{{\ell}^{2}} + \frac{1}{6} \cdot \frac{t}{{\ell}^{2}}\right) + \frac{t}{{\ell}^{2}}\right)}\right)\right) \]
      2. pow-lowering-pow.f64N/A

        \[\leadsto \mathsf{/.f64}\left(2, \mathsf{*.f64}\left(\mathsf{pow.f64}\left(k, 4\right), \left(\color{blue}{{k}^{2} \cdot \left(\frac{31}{360} \cdot \frac{{k}^{2} \cdot t}{{\ell}^{2}} + \frac{1}{6} \cdot \frac{t}{{\ell}^{2}}\right)} + \frac{t}{{\ell}^{2}}\right)\right)\right) \]
      3. +-commutativeN/A

        \[\leadsto \mathsf{/.f64}\left(2, \mathsf{*.f64}\left(\mathsf{pow.f64}\left(k, 4\right), \left(\frac{t}{{\ell}^{2}} + \color{blue}{{k}^{2} \cdot \left(\frac{31}{360} \cdot \frac{{k}^{2} \cdot t}{{\ell}^{2}} + \frac{1}{6} \cdot \frac{t}{{\ell}^{2}}\right)}\right)\right)\right) \]
      4. +-lowering-+.f64N/A

        \[\leadsto \mathsf{/.f64}\left(2, \mathsf{*.f64}\left(\mathsf{pow.f64}\left(k, 4\right), \mathsf{+.f64}\left(\left(\frac{t}{{\ell}^{2}}\right), \color{blue}{\left({k}^{2} \cdot \left(\frac{31}{360} \cdot \frac{{k}^{2} \cdot t}{{\ell}^{2}} + \frac{1}{6} \cdot \frac{t}{{\ell}^{2}}\right)\right)}\right)\right)\right) \]
      5. /-lowering-/.f64N/A

        \[\leadsto \mathsf{/.f64}\left(2, \mathsf{*.f64}\left(\mathsf{pow.f64}\left(k, 4\right), \mathsf{+.f64}\left(\mathsf{/.f64}\left(t, \left({\ell}^{2}\right)\right), \left(\color{blue}{{k}^{2}} \cdot \left(\frac{31}{360} \cdot \frac{{k}^{2} \cdot t}{{\ell}^{2}} + \frac{1}{6} \cdot \frac{t}{{\ell}^{2}}\right)\right)\right)\right)\right) \]
      6. unpow2N/A

        \[\leadsto \mathsf{/.f64}\left(2, \mathsf{*.f64}\left(\mathsf{pow.f64}\left(k, 4\right), \mathsf{+.f64}\left(\mathsf{/.f64}\left(t, \left(\ell \cdot \ell\right)\right), \left({k}^{\color{blue}{2}} \cdot \left(\frac{31}{360} \cdot \frac{{k}^{2} \cdot t}{{\ell}^{2}} + \frac{1}{6} \cdot \frac{t}{{\ell}^{2}}\right)\right)\right)\right)\right) \]
      7. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(2, \mathsf{*.f64}\left(\mathsf{pow.f64}\left(k, 4\right), \mathsf{+.f64}\left(\mathsf{/.f64}\left(t, \mathsf{*.f64}\left(\ell, \ell\right)\right), \left({k}^{\color{blue}{2}} \cdot \left(\frac{31}{360} \cdot \frac{{k}^{2} \cdot t}{{\ell}^{2}} + \frac{1}{6} \cdot \frac{t}{{\ell}^{2}}\right)\right)\right)\right)\right) \]
      8. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(2, \mathsf{*.f64}\left(\mathsf{pow.f64}\left(k, 4\right), \mathsf{+.f64}\left(\mathsf{/.f64}\left(t, \mathsf{*.f64}\left(\ell, \ell\right)\right), \mathsf{*.f64}\left(\left({k}^{2}\right), \color{blue}{\left(\frac{31}{360} \cdot \frac{{k}^{2} \cdot t}{{\ell}^{2}} + \frac{1}{6} \cdot \frac{t}{{\ell}^{2}}\right)}\right)\right)\right)\right) \]
      9. unpow2N/A

        \[\leadsto \mathsf{/.f64}\left(2, \mathsf{*.f64}\left(\mathsf{pow.f64}\left(k, 4\right), \mathsf{+.f64}\left(\mathsf{/.f64}\left(t, \mathsf{*.f64}\left(\ell, \ell\right)\right), \mathsf{*.f64}\left(\left(k \cdot k\right), \left(\color{blue}{\frac{31}{360} \cdot \frac{{k}^{2} \cdot t}{{\ell}^{2}}} + \frac{1}{6} \cdot \frac{t}{{\ell}^{2}}\right)\right)\right)\right)\right) \]
      10. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(2, \mathsf{*.f64}\left(\mathsf{pow.f64}\left(k, 4\right), \mathsf{+.f64}\left(\mathsf{/.f64}\left(t, \mathsf{*.f64}\left(\ell, \ell\right)\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(k, k\right), \left(\color{blue}{\frac{31}{360} \cdot \frac{{k}^{2} \cdot t}{{\ell}^{2}}} + \frac{1}{6} \cdot \frac{t}{{\ell}^{2}}\right)\right)\right)\right)\right) \]
      11. +-lowering-+.f64N/A

        \[\leadsto \mathsf{/.f64}\left(2, \mathsf{*.f64}\left(\mathsf{pow.f64}\left(k, 4\right), \mathsf{+.f64}\left(\mathsf{/.f64}\left(t, \mathsf{*.f64}\left(\ell, \ell\right)\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(k, k\right), \mathsf{+.f64}\left(\left(\frac{31}{360} \cdot \frac{{k}^{2} \cdot t}{{\ell}^{2}}\right), \color{blue}{\left(\frac{1}{6} \cdot \frac{t}{{\ell}^{2}}\right)}\right)\right)\right)\right)\right) \]
    10. Simplified64.5%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;k \leq 1.32 \cdot 10^{-14}:\\ \;\;\;\;\frac{\frac{\ell}{t}}{t \cdot k} \cdot \frac{\ell}{t \cdot k}\\ \mathbf{elif}\;k \leq 1.55 \cdot 10^{+99}:\\ \;\;\;\;\frac{\frac{\ell \cdot \ell}{\sin k \cdot \left(t \cdot \left(t \cdot t\right)\right)}}{\tan k}\\ \mathbf{else}:\\ \;\;\;\;\frac{2}{{k}^{4} \cdot \left(\frac{t}{\ell \cdot \ell} + \left(k \cdot k\right) \cdot \left(\frac{0.08611111111111111}{\ell} \cdot \frac{t \cdot \left(k \cdot k\right)}{\ell} + \frac{t}{\ell \cdot \ell} \cdot 0.16666666666666666\right)\right)}\\ \end{array} \]
  5. Add Preprocessing

Alternative 4: 79.2% accurate, 1.9× speedup?

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

\\
t\_s \cdot \begin{array}{l}
\mathbf{if}\;k \leq 0.00185:\\
\;\;\;\;\frac{\frac{\ell}{t\_m}}{t\_m \cdot k} \cdot \frac{\ell}{t\_m \cdot k}\\

\mathbf{else}:\\
\;\;\;\;\frac{\frac{2}{\tan k}}{\frac{k}{\ell} \cdot \frac{k}{\frac{\ell}{t\_m \cdot \sin k}}}\\


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

    1. Initial program 54.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. Taylor expanded in k around 0

      \[\leadsto \color{blue}{\frac{{\ell}^{2}}{{k}^{2} \cdot {t}^{3}}} \]
    4. Step-by-step derivation
      1. /-lowering-/.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\left({\ell}^{2}\right), \color{blue}{\left({k}^{2} \cdot {t}^{3}\right)}\right) \]
      2. unpow2N/A

        \[\leadsto \mathsf{/.f64}\left(\left(\ell \cdot \ell\right), \left(\color{blue}{{k}^{2}} \cdot {t}^{3}\right)\right) \]
      3. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\ell, \ell\right), \left(\color{blue}{{k}^{2}} \cdot {t}^{3}\right)\right) \]
      4. *-commutativeN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\ell, \ell\right), \left({t}^{3} \cdot \color{blue}{{k}^{2}}\right)\right) \]
      5. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\ell, \ell\right), \mathsf{*.f64}\left(\left({t}^{3}\right), \color{blue}{\left({k}^{2}\right)}\right)\right) \]
      6. cube-multN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\ell, \ell\right), \mathsf{*.f64}\left(\left(t \cdot \left(t \cdot t\right)\right), \left({\color{blue}{k}}^{2}\right)\right)\right) \]
      7. unpow2N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\ell, \ell\right), \mathsf{*.f64}\left(\left(t \cdot {t}^{2}\right), \left({k}^{2}\right)\right)\right) \]
      8. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\ell, \ell\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(t, \left({t}^{2}\right)\right), \left({\color{blue}{k}}^{2}\right)\right)\right) \]
      9. unpow2N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\ell, \ell\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(t, \left(t \cdot t\right)\right), \left({k}^{2}\right)\right)\right) \]
      10. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\ell, \ell\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(t, \mathsf{*.f64}\left(t, t\right)\right), \left({k}^{2}\right)\right)\right) \]
      11. unpow2N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\ell, \ell\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(t, \mathsf{*.f64}\left(t, t\right)\right), \left(k \cdot \color{blue}{k}\right)\right)\right) \]
      12. *-lowering-*.f6448.4%

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\ell, \ell\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(t, \mathsf{*.f64}\left(t, t\right)\right), \mathsf{*.f64}\left(k, \color{blue}{k}\right)\right)\right) \]
    5. Simplified48.4%

      \[\leadsto \color{blue}{\frac{\ell \cdot \ell}{\left(t \cdot \left(t \cdot t\right)\right) \cdot \left(k \cdot k\right)}} \]
    6. Step-by-step derivation
      1. associate-*l*N/A

        \[\leadsto \frac{\ell \cdot \ell}{t \cdot \color{blue}{\left(\left(t \cdot t\right) \cdot \left(k \cdot k\right)\right)}} \]
      2. times-fracN/A

        \[\leadsto \frac{\ell}{t} \cdot \color{blue}{\frac{\ell}{\left(t \cdot t\right) \cdot \left(k \cdot k\right)}} \]
      3. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\left(\frac{\ell}{t}\right), \color{blue}{\left(\frac{\ell}{\left(t \cdot t\right) \cdot \left(k \cdot k\right)}\right)}\right) \]
      4. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(\ell, t\right), \left(\frac{\color{blue}{\ell}}{\left(t \cdot t\right) \cdot \left(k \cdot k\right)}\right)\right) \]
      5. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(\ell, t\right), \mathsf{/.f64}\left(\ell, \color{blue}{\left(\left(t \cdot t\right) \cdot \left(k \cdot k\right)\right)}\right)\right) \]
      6. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(\ell, t\right), \mathsf{/.f64}\left(\ell, \mathsf{*.f64}\left(\left(t \cdot t\right), \color{blue}{\left(k \cdot k\right)}\right)\right)\right) \]
      7. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(\ell, t\right), \mathsf{/.f64}\left(\ell, \mathsf{*.f64}\left(\mathsf{*.f64}\left(t, t\right), \left(\color{blue}{k} \cdot k\right)\right)\right)\right) \]
      8. *-lowering-*.f6459.1%

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(\ell, t\right), \mathsf{/.f64}\left(\ell, \mathsf{*.f64}\left(\mathsf{*.f64}\left(t, t\right), \mathsf{*.f64}\left(k, \color{blue}{k}\right)\right)\right)\right) \]
    7. Applied egg-rr59.1%

      \[\leadsto \color{blue}{\frac{\ell}{t} \cdot \frac{\ell}{\left(t \cdot t\right) \cdot \left(k \cdot k\right)}} \]
    8. Step-by-step derivation
      1. associate-*r/N/A

        \[\leadsto \frac{\frac{\ell}{t} \cdot \ell}{\color{blue}{\left(t \cdot t\right) \cdot \left(k \cdot k\right)}} \]
      2. unswap-sqrN/A

        \[\leadsto \frac{\frac{\ell}{t} \cdot \ell}{\left(t \cdot k\right) \cdot \color{blue}{\left(t \cdot k\right)}} \]
      3. times-fracN/A

        \[\leadsto \frac{\frac{\ell}{t}}{t \cdot k} \cdot \color{blue}{\frac{\ell}{t \cdot k}} \]
      4. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\left(\frac{\frac{\ell}{t}}{t \cdot k}\right), \color{blue}{\left(\frac{\ell}{t \cdot k}\right)}\right) \]
      5. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(\left(\frac{\ell}{t}\right), \left(t \cdot k\right)\right), \left(\frac{\color{blue}{\ell}}{t \cdot k}\right)\right) \]
      6. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(\ell, t\right), \left(t \cdot k\right)\right), \left(\frac{\ell}{t \cdot k}\right)\right) \]
      7. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(\ell, t\right), \mathsf{*.f64}\left(t, k\right)\right), \left(\frac{\ell}{t \cdot k}\right)\right) \]
      8. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(\ell, t\right), \mathsf{*.f64}\left(t, k\right)\right), \mathsf{/.f64}\left(\ell, \color{blue}{\left(t \cdot k\right)}\right)\right) \]
      9. *-lowering-*.f6476.2%

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(\ell, t\right), \mathsf{*.f64}\left(t, k\right)\right), \mathsf{/.f64}\left(\ell, \mathsf{*.f64}\left(t, \color{blue}{k}\right)\right)\right) \]
    9. Applied egg-rr76.2%

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

    if 0.0018500000000000001 < k

    1. Initial program 49.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. Add Preprocessing
    3. Step-by-step derivation
      1. associate-*l*N/A

        \[\leadsto \mathsf{/.f64}\left(2, \left(\left(\frac{{t}^{3}}{\ell \cdot \ell} \cdot \sin k\right) \cdot \color{blue}{\left(\tan k \cdot \left(\left(1 + {\left(\frac{k}{t}\right)}^{2}\right) + 1\right)\right)}\right)\right) \]
      2. *-commutativeN/A

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

        \[\leadsto \mathsf{/.f64}\left(2, \left(\left(\left(\frac{{t}^{3}}{\ell \cdot \ell} \cdot \sin k\right) \cdot \left(\left(1 + {\left(\frac{k}{t}\right)}^{2}\right) + 1\right)\right) \cdot \color{blue}{\tan k}\right)\right) \]
      4. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(2, \mathsf{*.f64}\left(\left(\left(\frac{{t}^{3}}{\ell \cdot \ell} \cdot \sin k\right) \cdot \left(\left(1 + {\left(\frac{k}{t}\right)}^{2}\right) + 1\right)\right), \color{blue}{\tan k}\right)\right) \]
    4. Applied egg-rr56.9%

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

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

        \[\leadsto \mathsf{/.f64}\left(2, \mathsf{*.f64}\left(\left({k}^{2} \cdot \frac{t \cdot \sin k}{{\ell}^{2}}\right), \mathsf{tan.f64}\left(\color{blue}{k}\right)\right)\right) \]
      2. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\left({k}^{2}\right), \left(\frac{t \cdot \sin k}{{\ell}^{2}}\right)\right), \mathsf{tan.f64}\left(\color{blue}{k}\right)\right)\right) \]
      3. unpow2N/A

        \[\leadsto \mathsf{/.f64}\left(2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\left(k \cdot k\right), \left(\frac{t \cdot \sin k}{{\ell}^{2}}\right)\right), \mathsf{tan.f64}\left(k\right)\right)\right) \]
      4. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(k, k\right), \left(\frac{t \cdot \sin k}{{\ell}^{2}}\right)\right), \mathsf{tan.f64}\left(k\right)\right)\right) \]
      5. /-lowering-/.f64N/A

        \[\leadsto \mathsf{/.f64}\left(2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(k, k\right), \mathsf{/.f64}\left(\left(t \cdot \sin k\right), \left({\ell}^{2}\right)\right)\right), \mathsf{tan.f64}\left(k\right)\right)\right) \]
      6. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(k, k\right), \mathsf{/.f64}\left(\mathsf{*.f64}\left(t, \sin k\right), \left({\ell}^{2}\right)\right)\right), \mathsf{tan.f64}\left(k\right)\right)\right) \]
      7. sin-lowering-sin.f64N/A

        \[\leadsto \mathsf{/.f64}\left(2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(k, k\right), \mathsf{/.f64}\left(\mathsf{*.f64}\left(t, \mathsf{sin.f64}\left(k\right)\right), \left({\ell}^{2}\right)\right)\right), \mathsf{tan.f64}\left(k\right)\right)\right) \]
      8. unpow2N/A

        \[\leadsto \mathsf{/.f64}\left(2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(k, k\right), \mathsf{/.f64}\left(\mathsf{*.f64}\left(t, \mathsf{sin.f64}\left(k\right)\right), \left(\ell \cdot \ell\right)\right)\right), \mathsf{tan.f64}\left(k\right)\right)\right) \]
      9. *-lowering-*.f6469.8%

        \[\leadsto \mathsf{/.f64}\left(2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(k, k\right), \mathsf{/.f64}\left(\mathsf{*.f64}\left(t, \mathsf{sin.f64}\left(k\right)\right), \mathsf{*.f64}\left(\ell, \ell\right)\right)\right), \mathsf{tan.f64}\left(k\right)\right)\right) \]
    7. Simplified69.8%

      \[\leadsto \frac{2}{\color{blue}{\left(\left(k \cdot k\right) \cdot \frac{t \cdot \sin k}{\ell \cdot \ell}\right)} \cdot \tan k} \]
    8. Step-by-step derivation
      1. *-commutativeN/A

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

        \[\leadsto \frac{2}{\tan k \cdot \frac{\left(k \cdot k\right) \cdot \left(t \cdot \sin k\right)}{\color{blue}{\ell \cdot \ell}}} \]
      3. *-commutativeN/A

        \[\leadsto \frac{2}{\tan k \cdot \frac{\left(k \cdot k\right) \cdot \left(\sin k \cdot t\right)}{\ell \cdot \ell}} \]
      4. associate-*r*N/A

        \[\leadsto \frac{2}{\tan k \cdot \frac{\left(\left(k \cdot k\right) \cdot \sin k\right) \cdot t}{\color{blue}{\ell} \cdot \ell}} \]
      5. associate-*l/N/A

        \[\leadsto \frac{2}{\tan k \cdot \left(\frac{\left(k \cdot k\right) \cdot \sin k}{\ell \cdot \ell} \cdot \color{blue}{t}\right)} \]
      6. frac-timesN/A

        \[\leadsto \frac{2}{\tan k \cdot \left(\left(\frac{k \cdot k}{\ell} \cdot \frac{\sin k}{\ell}\right) \cdot t\right)} \]
      7. associate-/r*N/A

        \[\leadsto \frac{\frac{2}{\tan k}}{\color{blue}{\left(\frac{k \cdot k}{\ell} \cdot \frac{\sin k}{\ell}\right) \cdot t}} \]
      8. /-lowering-/.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\left(\frac{2}{\tan k}\right), \color{blue}{\left(\left(\frac{k \cdot k}{\ell} \cdot \frac{\sin k}{\ell}\right) \cdot t\right)}\right) \]
      9. /-lowering-/.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(2, \tan k\right), \left(\color{blue}{\left(\frac{k \cdot k}{\ell} \cdot \frac{\sin k}{\ell}\right)} \cdot t\right)\right) \]
      10. tan-lowering-tan.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(2, \mathsf{tan.f64}\left(k\right)\right), \left(\left(\frac{k \cdot k}{\ell} \cdot \color{blue}{\frac{\sin k}{\ell}}\right) \cdot t\right)\right) \]
      11. frac-timesN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(2, \mathsf{tan.f64}\left(k\right)\right), \left(\frac{\left(k \cdot k\right) \cdot \sin k}{\ell \cdot \ell} \cdot t\right)\right) \]
      12. associate-*l/N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(2, \mathsf{tan.f64}\left(k\right)\right), \left(\frac{\left(\left(k \cdot k\right) \cdot \sin k\right) \cdot t}{\color{blue}{\ell \cdot \ell}}\right)\right) \]
      13. associate-*r*N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(2, \mathsf{tan.f64}\left(k\right)\right), \left(\frac{\left(k \cdot k\right) \cdot \left(\sin k \cdot t\right)}{\color{blue}{\ell} \cdot \ell}\right)\right) \]
      14. *-commutativeN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(2, \mathsf{tan.f64}\left(k\right)\right), \left(\frac{\left(k \cdot k\right) \cdot \left(t \cdot \sin k\right)}{\ell \cdot \ell}\right)\right) \]
    9. Applied egg-rr69.8%

      \[\leadsto \color{blue}{\frac{\frac{2}{\tan k}}{\frac{k \cdot k}{\frac{\ell \cdot \ell}{t \cdot \sin k}}}} \]
    10. Step-by-step derivation
      1. associate-/l*N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(2, \mathsf{tan.f64}\left(k\right)\right), \left(\frac{k \cdot k}{\ell \cdot \color{blue}{\frac{\ell}{t \cdot \sin k}}}\right)\right) \]
      2. times-fracN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(2, \mathsf{tan.f64}\left(k\right)\right), \left(\frac{k}{\ell} \cdot \color{blue}{\frac{k}{\frac{\ell}{t \cdot \sin k}}}\right)\right) \]
      3. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(2, \mathsf{tan.f64}\left(k\right)\right), \mathsf{*.f64}\left(\left(\frac{k}{\ell}\right), \color{blue}{\left(\frac{k}{\frac{\ell}{t \cdot \sin k}}\right)}\right)\right) \]
      4. /-lowering-/.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(2, \mathsf{tan.f64}\left(k\right)\right), \mathsf{*.f64}\left(\mathsf{/.f64}\left(k, \ell\right), \left(\frac{\color{blue}{k}}{\frac{\ell}{t \cdot \sin k}}\right)\right)\right) \]
      5. /-lowering-/.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(2, \mathsf{tan.f64}\left(k\right)\right), \mathsf{*.f64}\left(\mathsf{/.f64}\left(k, \ell\right), \mathsf{/.f64}\left(k, \color{blue}{\left(\frac{\ell}{t \cdot \sin k}\right)}\right)\right)\right) \]
      6. /-lowering-/.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(2, \mathsf{tan.f64}\left(k\right)\right), \mathsf{*.f64}\left(\mathsf{/.f64}\left(k, \ell\right), \mathsf{/.f64}\left(k, \mathsf{/.f64}\left(\ell, \color{blue}{\left(t \cdot \sin k\right)}\right)\right)\right)\right) \]
      7. *-commutativeN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(2, \mathsf{tan.f64}\left(k\right)\right), \mathsf{*.f64}\left(\mathsf{/.f64}\left(k, \ell\right), \mathsf{/.f64}\left(k, \mathsf{/.f64}\left(\ell, \left(\sin k \cdot \color{blue}{t}\right)\right)\right)\right)\right) \]
      8. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(2, \mathsf{tan.f64}\left(k\right)\right), \mathsf{*.f64}\left(\mathsf{/.f64}\left(k, \ell\right), \mathsf{/.f64}\left(k, \mathsf{/.f64}\left(\ell, \mathsf{*.f64}\left(\sin k, \color{blue}{t}\right)\right)\right)\right)\right) \]
      9. sin-lowering-sin.f6485.9%

        \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(2, \mathsf{tan.f64}\left(k\right)\right), \mathsf{*.f64}\left(\mathsf{/.f64}\left(k, \ell\right), \mathsf{/.f64}\left(k, \mathsf{/.f64}\left(\ell, \mathsf{*.f64}\left(\mathsf{sin.f64}\left(k\right), t\right)\right)\right)\right)\right) \]
    11. Applied egg-rr85.9%

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

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

Alternative 5: 77.1% accurate, 1.9× speedup?

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

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

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


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

    1. Initial program 54.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. Taylor expanded in k around 0

      \[\leadsto \color{blue}{\frac{{\ell}^{2}}{{k}^{2} \cdot {t}^{3}}} \]
    4. Step-by-step derivation
      1. /-lowering-/.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\left({\ell}^{2}\right), \color{blue}{\left({k}^{2} \cdot {t}^{3}\right)}\right) \]
      2. unpow2N/A

        \[\leadsto \mathsf{/.f64}\left(\left(\ell \cdot \ell\right), \left(\color{blue}{{k}^{2}} \cdot {t}^{3}\right)\right) \]
      3. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\ell, \ell\right), \left(\color{blue}{{k}^{2}} \cdot {t}^{3}\right)\right) \]
      4. *-commutativeN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\ell, \ell\right), \left({t}^{3} \cdot \color{blue}{{k}^{2}}\right)\right) \]
      5. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\ell, \ell\right), \mathsf{*.f64}\left(\left({t}^{3}\right), \color{blue}{\left({k}^{2}\right)}\right)\right) \]
      6. cube-multN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\ell, \ell\right), \mathsf{*.f64}\left(\left(t \cdot \left(t \cdot t\right)\right), \left({\color{blue}{k}}^{2}\right)\right)\right) \]
      7. unpow2N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\ell, \ell\right), \mathsf{*.f64}\left(\left(t \cdot {t}^{2}\right), \left({k}^{2}\right)\right)\right) \]
      8. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\ell, \ell\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(t, \left({t}^{2}\right)\right), \left({\color{blue}{k}}^{2}\right)\right)\right) \]
      9. unpow2N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\ell, \ell\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(t, \left(t \cdot t\right)\right), \left({k}^{2}\right)\right)\right) \]
      10. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\ell, \ell\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(t, \mathsf{*.f64}\left(t, t\right)\right), \left({k}^{2}\right)\right)\right) \]
      11. unpow2N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\ell, \ell\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(t, \mathsf{*.f64}\left(t, t\right)\right), \left(k \cdot \color{blue}{k}\right)\right)\right) \]
      12. *-lowering-*.f6448.4%

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\ell, \ell\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(t, \mathsf{*.f64}\left(t, t\right)\right), \mathsf{*.f64}\left(k, \color{blue}{k}\right)\right)\right) \]
    5. Simplified48.4%

      \[\leadsto \color{blue}{\frac{\ell \cdot \ell}{\left(t \cdot \left(t \cdot t\right)\right) \cdot \left(k \cdot k\right)}} \]
    6. Step-by-step derivation
      1. associate-*l*N/A

        \[\leadsto \frac{\ell \cdot \ell}{t \cdot \color{blue}{\left(\left(t \cdot t\right) \cdot \left(k \cdot k\right)\right)}} \]
      2. times-fracN/A

        \[\leadsto \frac{\ell}{t} \cdot \color{blue}{\frac{\ell}{\left(t \cdot t\right) \cdot \left(k \cdot k\right)}} \]
      3. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\left(\frac{\ell}{t}\right), \color{blue}{\left(\frac{\ell}{\left(t \cdot t\right) \cdot \left(k \cdot k\right)}\right)}\right) \]
      4. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(\ell, t\right), \left(\frac{\color{blue}{\ell}}{\left(t \cdot t\right) \cdot \left(k \cdot k\right)}\right)\right) \]
      5. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(\ell, t\right), \mathsf{/.f64}\left(\ell, \color{blue}{\left(\left(t \cdot t\right) \cdot \left(k \cdot k\right)\right)}\right)\right) \]
      6. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(\ell, t\right), \mathsf{/.f64}\left(\ell, \mathsf{*.f64}\left(\left(t \cdot t\right), \color{blue}{\left(k \cdot k\right)}\right)\right)\right) \]
      7. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(\ell, t\right), \mathsf{/.f64}\left(\ell, \mathsf{*.f64}\left(\mathsf{*.f64}\left(t, t\right), \left(\color{blue}{k} \cdot k\right)\right)\right)\right) \]
      8. *-lowering-*.f6459.1%

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(\ell, t\right), \mathsf{/.f64}\left(\ell, \mathsf{*.f64}\left(\mathsf{*.f64}\left(t, t\right), \mathsf{*.f64}\left(k, \color{blue}{k}\right)\right)\right)\right) \]
    7. Applied egg-rr59.1%

      \[\leadsto \color{blue}{\frac{\ell}{t} \cdot \frac{\ell}{\left(t \cdot t\right) \cdot \left(k \cdot k\right)}} \]
    8. Step-by-step derivation
      1. associate-*r/N/A

        \[\leadsto \frac{\frac{\ell}{t} \cdot \ell}{\color{blue}{\left(t \cdot t\right) \cdot \left(k \cdot k\right)}} \]
      2. unswap-sqrN/A

        \[\leadsto \frac{\frac{\ell}{t} \cdot \ell}{\left(t \cdot k\right) \cdot \color{blue}{\left(t \cdot k\right)}} \]
      3. times-fracN/A

        \[\leadsto \frac{\frac{\ell}{t}}{t \cdot k} \cdot \color{blue}{\frac{\ell}{t \cdot k}} \]
      4. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\left(\frac{\frac{\ell}{t}}{t \cdot k}\right), \color{blue}{\left(\frac{\ell}{t \cdot k}\right)}\right) \]
      5. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(\left(\frac{\ell}{t}\right), \left(t \cdot k\right)\right), \left(\frac{\color{blue}{\ell}}{t \cdot k}\right)\right) \]
      6. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(\ell, t\right), \left(t \cdot k\right)\right), \left(\frac{\ell}{t \cdot k}\right)\right) \]
      7. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(\ell, t\right), \mathsf{*.f64}\left(t, k\right)\right), \left(\frac{\ell}{t \cdot k}\right)\right) \]
      8. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(\ell, t\right), \mathsf{*.f64}\left(t, k\right)\right), \mathsf{/.f64}\left(\ell, \color{blue}{\left(t \cdot k\right)}\right)\right) \]
      9. *-lowering-*.f6476.2%

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(\ell, t\right), \mathsf{*.f64}\left(t, k\right)\right), \mathsf{/.f64}\left(\ell, \mathsf{*.f64}\left(t, \color{blue}{k}\right)\right)\right) \]
    9. Applied egg-rr76.2%

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

    if 6.8e-8 < k

    1. Initial program 49.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. Add Preprocessing
    3. Step-by-step derivation
      1. associate-*l*N/A

        \[\leadsto \mathsf{/.f64}\left(2, \left(\left(\frac{{t}^{3}}{\ell \cdot \ell} \cdot \sin k\right) \cdot \color{blue}{\left(\tan k \cdot \left(\left(1 + {\left(\frac{k}{t}\right)}^{2}\right) + 1\right)\right)}\right)\right) \]
      2. *-commutativeN/A

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

        \[\leadsto \mathsf{/.f64}\left(2, \left(\left(\left(\frac{{t}^{3}}{\ell \cdot \ell} \cdot \sin k\right) \cdot \left(\left(1 + {\left(\frac{k}{t}\right)}^{2}\right) + 1\right)\right) \cdot \color{blue}{\tan k}\right)\right) \]
      4. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(2, \mathsf{*.f64}\left(\left(\left(\frac{{t}^{3}}{\ell \cdot \ell} \cdot \sin k\right) \cdot \left(\left(1 + {\left(\frac{k}{t}\right)}^{2}\right) + 1\right)\right), \color{blue}{\tan k}\right)\right) \]
    4. Applied egg-rr56.9%

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

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

        \[\leadsto \mathsf{/.f64}\left(2, \mathsf{*.f64}\left(\left({k}^{2} \cdot \frac{t \cdot \sin k}{{\ell}^{2}}\right), \mathsf{tan.f64}\left(\color{blue}{k}\right)\right)\right) \]
      2. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\left({k}^{2}\right), \left(\frac{t \cdot \sin k}{{\ell}^{2}}\right)\right), \mathsf{tan.f64}\left(\color{blue}{k}\right)\right)\right) \]
      3. unpow2N/A

        \[\leadsto \mathsf{/.f64}\left(2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\left(k \cdot k\right), \left(\frac{t \cdot \sin k}{{\ell}^{2}}\right)\right), \mathsf{tan.f64}\left(k\right)\right)\right) \]
      4. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(k, k\right), \left(\frac{t \cdot \sin k}{{\ell}^{2}}\right)\right), \mathsf{tan.f64}\left(k\right)\right)\right) \]
      5. /-lowering-/.f64N/A

        \[\leadsto \mathsf{/.f64}\left(2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(k, k\right), \mathsf{/.f64}\left(\left(t \cdot \sin k\right), \left({\ell}^{2}\right)\right)\right), \mathsf{tan.f64}\left(k\right)\right)\right) \]
      6. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(k, k\right), \mathsf{/.f64}\left(\mathsf{*.f64}\left(t, \sin k\right), \left({\ell}^{2}\right)\right)\right), \mathsf{tan.f64}\left(k\right)\right)\right) \]
      7. sin-lowering-sin.f64N/A

        \[\leadsto \mathsf{/.f64}\left(2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(k, k\right), \mathsf{/.f64}\left(\mathsf{*.f64}\left(t, \mathsf{sin.f64}\left(k\right)\right), \left({\ell}^{2}\right)\right)\right), \mathsf{tan.f64}\left(k\right)\right)\right) \]
      8. unpow2N/A

        \[\leadsto \mathsf{/.f64}\left(2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(k, k\right), \mathsf{/.f64}\left(\mathsf{*.f64}\left(t, \mathsf{sin.f64}\left(k\right)\right), \left(\ell \cdot \ell\right)\right)\right), \mathsf{tan.f64}\left(k\right)\right)\right) \]
      9. *-lowering-*.f6469.8%

        \[\leadsto \mathsf{/.f64}\left(2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(k, k\right), \mathsf{/.f64}\left(\mathsf{*.f64}\left(t, \mathsf{sin.f64}\left(k\right)\right), \mathsf{*.f64}\left(\ell, \ell\right)\right)\right), \mathsf{tan.f64}\left(k\right)\right)\right) \]
    7. Simplified69.8%

      \[\leadsto \frac{2}{\color{blue}{\left(\left(k \cdot k\right) \cdot \frac{t \cdot \sin k}{\ell \cdot \ell}\right)} \cdot \tan k} \]
    8. Step-by-step derivation
      1. associate-*l*N/A

        \[\leadsto \mathsf{/.f64}\left(2, \mathsf{*.f64}\left(\left(k \cdot \left(k \cdot \frac{t \cdot \sin k}{\ell \cdot \ell}\right)\right), \mathsf{tan.f64}\left(\color{blue}{k}\right)\right)\right) \]
      2. *-commutativeN/A

        \[\leadsto \mathsf{/.f64}\left(2, \mathsf{*.f64}\left(\left(\left(k \cdot \frac{t \cdot \sin k}{\ell \cdot \ell}\right) \cdot k\right), \mathsf{tan.f64}\left(\color{blue}{k}\right)\right)\right) \]
      3. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\left(k \cdot \frac{t \cdot \sin k}{\ell \cdot \ell}\right), k\right), \mathsf{tan.f64}\left(\color{blue}{k}\right)\right)\right) \]
      4. associate-/l*N/A

        \[\leadsto \mathsf{/.f64}\left(2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\left(k \cdot \left(t \cdot \frac{\sin k}{\ell \cdot \ell}\right)\right), k\right), \mathsf{tan.f64}\left(k\right)\right)\right) \]
      5. associate-*r*N/A

        \[\leadsto \mathsf{/.f64}\left(2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\left(\left(k \cdot t\right) \cdot \frac{\sin k}{\ell \cdot \ell}\right), k\right), \mathsf{tan.f64}\left(k\right)\right)\right) \]
      6. *-commutativeN/A

        \[\leadsto \mathsf{/.f64}\left(2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\left(\left(t \cdot k\right) \cdot \frac{\sin k}{\ell \cdot \ell}\right), k\right), \mathsf{tan.f64}\left(k\right)\right)\right) \]
      7. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\left(t \cdot k\right), \left(\frac{\sin k}{\ell \cdot \ell}\right)\right), k\right), \mathsf{tan.f64}\left(k\right)\right)\right) \]
      8. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(t, k\right), \left(\frac{\sin k}{\ell \cdot \ell}\right)\right), k\right), \mathsf{tan.f64}\left(k\right)\right)\right) \]
      9. /-lowering-/.f64N/A

        \[\leadsto \mathsf{/.f64}\left(2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(t, k\right), \mathsf{/.f64}\left(\sin k, \left(\ell \cdot \ell\right)\right)\right), k\right), \mathsf{tan.f64}\left(k\right)\right)\right) \]
      10. sin-lowering-sin.f64N/A

        \[\leadsto \mathsf{/.f64}\left(2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(t, k\right), \mathsf{/.f64}\left(\mathsf{sin.f64}\left(k\right), \left(\ell \cdot \ell\right)\right)\right), k\right), \mathsf{tan.f64}\left(k\right)\right)\right) \]
      11. *-lowering-*.f6482.8%

        \[\leadsto \mathsf{/.f64}\left(2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(t, k\right), \mathsf{/.f64}\left(\mathsf{sin.f64}\left(k\right), \mathsf{*.f64}\left(\ell, \ell\right)\right)\right), k\right), \mathsf{tan.f64}\left(k\right)\right)\right) \]
    9. Applied egg-rr82.8%

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

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

Alternative 6: 76.0% accurate, 1.9× speedup?

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

\\
t\_s \cdot \begin{array}{l}
\mathbf{if}\;k \leq 0.0013:\\
\;\;\;\;\frac{\frac{\ell}{t\_m}}{t\_m \cdot k} \cdot \frac{\ell}{t\_m \cdot k}\\

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


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

    1. Initial program 54.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. Taylor expanded in k around 0

      \[\leadsto \color{blue}{\frac{{\ell}^{2}}{{k}^{2} \cdot {t}^{3}}} \]
    4. Step-by-step derivation
      1. /-lowering-/.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\left({\ell}^{2}\right), \color{blue}{\left({k}^{2} \cdot {t}^{3}\right)}\right) \]
      2. unpow2N/A

        \[\leadsto \mathsf{/.f64}\left(\left(\ell \cdot \ell\right), \left(\color{blue}{{k}^{2}} \cdot {t}^{3}\right)\right) \]
      3. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\ell, \ell\right), \left(\color{blue}{{k}^{2}} \cdot {t}^{3}\right)\right) \]
      4. *-commutativeN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\ell, \ell\right), \left({t}^{3} \cdot \color{blue}{{k}^{2}}\right)\right) \]
      5. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\ell, \ell\right), \mathsf{*.f64}\left(\left({t}^{3}\right), \color{blue}{\left({k}^{2}\right)}\right)\right) \]
      6. cube-multN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\ell, \ell\right), \mathsf{*.f64}\left(\left(t \cdot \left(t \cdot t\right)\right), \left({\color{blue}{k}}^{2}\right)\right)\right) \]
      7. unpow2N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\ell, \ell\right), \mathsf{*.f64}\left(\left(t \cdot {t}^{2}\right), \left({k}^{2}\right)\right)\right) \]
      8. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\ell, \ell\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(t, \left({t}^{2}\right)\right), \left({\color{blue}{k}}^{2}\right)\right)\right) \]
      9. unpow2N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\ell, \ell\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(t, \left(t \cdot t\right)\right), \left({k}^{2}\right)\right)\right) \]
      10. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\ell, \ell\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(t, \mathsf{*.f64}\left(t, t\right)\right), \left({k}^{2}\right)\right)\right) \]
      11. unpow2N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\ell, \ell\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(t, \mathsf{*.f64}\left(t, t\right)\right), \left(k \cdot \color{blue}{k}\right)\right)\right) \]
      12. *-lowering-*.f6448.4%

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\ell, \ell\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(t, \mathsf{*.f64}\left(t, t\right)\right), \mathsf{*.f64}\left(k, \color{blue}{k}\right)\right)\right) \]
    5. Simplified48.4%

      \[\leadsto \color{blue}{\frac{\ell \cdot \ell}{\left(t \cdot \left(t \cdot t\right)\right) \cdot \left(k \cdot k\right)}} \]
    6. Step-by-step derivation
      1. associate-*l*N/A

        \[\leadsto \frac{\ell \cdot \ell}{t \cdot \color{blue}{\left(\left(t \cdot t\right) \cdot \left(k \cdot k\right)\right)}} \]
      2. times-fracN/A

        \[\leadsto \frac{\ell}{t} \cdot \color{blue}{\frac{\ell}{\left(t \cdot t\right) \cdot \left(k \cdot k\right)}} \]
      3. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\left(\frac{\ell}{t}\right), \color{blue}{\left(\frac{\ell}{\left(t \cdot t\right) \cdot \left(k \cdot k\right)}\right)}\right) \]
      4. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(\ell, t\right), \left(\frac{\color{blue}{\ell}}{\left(t \cdot t\right) \cdot \left(k \cdot k\right)}\right)\right) \]
      5. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(\ell, t\right), \mathsf{/.f64}\left(\ell, \color{blue}{\left(\left(t \cdot t\right) \cdot \left(k \cdot k\right)\right)}\right)\right) \]
      6. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(\ell, t\right), \mathsf{/.f64}\left(\ell, \mathsf{*.f64}\left(\left(t \cdot t\right), \color{blue}{\left(k \cdot k\right)}\right)\right)\right) \]
      7. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(\ell, t\right), \mathsf{/.f64}\left(\ell, \mathsf{*.f64}\left(\mathsf{*.f64}\left(t, t\right), \left(\color{blue}{k} \cdot k\right)\right)\right)\right) \]
      8. *-lowering-*.f6459.1%

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(\ell, t\right), \mathsf{/.f64}\left(\ell, \mathsf{*.f64}\left(\mathsf{*.f64}\left(t, t\right), \mathsf{*.f64}\left(k, \color{blue}{k}\right)\right)\right)\right) \]
    7. Applied egg-rr59.1%

      \[\leadsto \color{blue}{\frac{\ell}{t} \cdot \frac{\ell}{\left(t \cdot t\right) \cdot \left(k \cdot k\right)}} \]
    8. Step-by-step derivation
      1. associate-*r/N/A

        \[\leadsto \frac{\frac{\ell}{t} \cdot \ell}{\color{blue}{\left(t \cdot t\right) \cdot \left(k \cdot k\right)}} \]
      2. unswap-sqrN/A

        \[\leadsto \frac{\frac{\ell}{t} \cdot \ell}{\left(t \cdot k\right) \cdot \color{blue}{\left(t \cdot k\right)}} \]
      3. times-fracN/A

        \[\leadsto \frac{\frac{\ell}{t}}{t \cdot k} \cdot \color{blue}{\frac{\ell}{t \cdot k}} \]
      4. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\left(\frac{\frac{\ell}{t}}{t \cdot k}\right), \color{blue}{\left(\frac{\ell}{t \cdot k}\right)}\right) \]
      5. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(\left(\frac{\ell}{t}\right), \left(t \cdot k\right)\right), \left(\frac{\color{blue}{\ell}}{t \cdot k}\right)\right) \]
      6. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(\ell, t\right), \left(t \cdot k\right)\right), \left(\frac{\ell}{t \cdot k}\right)\right) \]
      7. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(\ell, t\right), \mathsf{*.f64}\left(t, k\right)\right), \left(\frac{\ell}{t \cdot k}\right)\right) \]
      8. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(\ell, t\right), \mathsf{*.f64}\left(t, k\right)\right), \mathsf{/.f64}\left(\ell, \color{blue}{\left(t \cdot k\right)}\right)\right) \]
      9. *-lowering-*.f6476.2%

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(\ell, t\right), \mathsf{*.f64}\left(t, k\right)\right), \mathsf{/.f64}\left(\ell, \mathsf{*.f64}\left(t, \color{blue}{k}\right)\right)\right) \]
    9. Applied egg-rr76.2%

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

    if 0.0012999999999999999 < k

    1. Initial program 49.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. Add Preprocessing
    3. Step-by-step derivation
      1. associate-*l*N/A

        \[\leadsto \mathsf{/.f64}\left(2, \left(\left(\frac{{t}^{3}}{\ell \cdot \ell} \cdot \sin k\right) \cdot \color{blue}{\left(\tan k \cdot \left(\left(1 + {\left(\frac{k}{t}\right)}^{2}\right) + 1\right)\right)}\right)\right) \]
      2. *-commutativeN/A

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

        \[\leadsto \mathsf{/.f64}\left(2, \left(\left(\left(\frac{{t}^{3}}{\ell \cdot \ell} \cdot \sin k\right) \cdot \left(\left(1 + {\left(\frac{k}{t}\right)}^{2}\right) + 1\right)\right) \cdot \color{blue}{\tan k}\right)\right) \]
      4. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(2, \mathsf{*.f64}\left(\left(\left(\frac{{t}^{3}}{\ell \cdot \ell} \cdot \sin k\right) \cdot \left(\left(1 + {\left(\frac{k}{t}\right)}^{2}\right) + 1\right)\right), \color{blue}{\tan k}\right)\right) \]
    4. Applied egg-rr56.9%

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

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

        \[\leadsto \mathsf{/.f64}\left(2, \mathsf{*.f64}\left(\left({k}^{2} \cdot \frac{t \cdot \sin k}{{\ell}^{2}}\right), \mathsf{tan.f64}\left(\color{blue}{k}\right)\right)\right) \]
      2. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\left({k}^{2}\right), \left(\frac{t \cdot \sin k}{{\ell}^{2}}\right)\right), \mathsf{tan.f64}\left(\color{blue}{k}\right)\right)\right) \]
      3. unpow2N/A

        \[\leadsto \mathsf{/.f64}\left(2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\left(k \cdot k\right), \left(\frac{t \cdot \sin k}{{\ell}^{2}}\right)\right), \mathsf{tan.f64}\left(k\right)\right)\right) \]
      4. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(k, k\right), \left(\frac{t \cdot \sin k}{{\ell}^{2}}\right)\right), \mathsf{tan.f64}\left(k\right)\right)\right) \]
      5. /-lowering-/.f64N/A

        \[\leadsto \mathsf{/.f64}\left(2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(k, k\right), \mathsf{/.f64}\left(\left(t \cdot \sin k\right), \left({\ell}^{2}\right)\right)\right), \mathsf{tan.f64}\left(k\right)\right)\right) \]
      6. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(k, k\right), \mathsf{/.f64}\left(\mathsf{*.f64}\left(t, \sin k\right), \left({\ell}^{2}\right)\right)\right), \mathsf{tan.f64}\left(k\right)\right)\right) \]
      7. sin-lowering-sin.f64N/A

        \[\leadsto \mathsf{/.f64}\left(2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(k, k\right), \mathsf{/.f64}\left(\mathsf{*.f64}\left(t, \mathsf{sin.f64}\left(k\right)\right), \left({\ell}^{2}\right)\right)\right), \mathsf{tan.f64}\left(k\right)\right)\right) \]
      8. unpow2N/A

        \[\leadsto \mathsf{/.f64}\left(2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(k, k\right), \mathsf{/.f64}\left(\mathsf{*.f64}\left(t, \mathsf{sin.f64}\left(k\right)\right), \left(\ell \cdot \ell\right)\right)\right), \mathsf{tan.f64}\left(k\right)\right)\right) \]
      9. *-lowering-*.f6469.8%

        \[\leadsto \mathsf{/.f64}\left(2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(k, k\right), \mathsf{/.f64}\left(\mathsf{*.f64}\left(t, \mathsf{sin.f64}\left(k\right)\right), \mathsf{*.f64}\left(\ell, \ell\right)\right)\right), \mathsf{tan.f64}\left(k\right)\right)\right) \]
    7. Simplified69.8%

      \[\leadsto \frac{2}{\color{blue}{\left(\left(k \cdot k\right) \cdot \frac{t \cdot \sin k}{\ell \cdot \ell}\right)} \cdot \tan k} \]
    8. Step-by-step derivation
      1. associate-*l*N/A

        \[\leadsto \mathsf{/.f64}\left(2, \left(\left(k \cdot k\right) \cdot \color{blue}{\left(\frac{t \cdot \sin k}{\ell \cdot \ell} \cdot \tan k\right)}\right)\right) \]
      2. associate-*l*N/A

        \[\leadsto \mathsf{/.f64}\left(2, \left(k \cdot \color{blue}{\left(k \cdot \left(\frac{t \cdot \sin k}{\ell \cdot \ell} \cdot \tan k\right)\right)}\right)\right) \]
      3. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(2, \mathsf{*.f64}\left(k, \color{blue}{\left(k \cdot \left(\frac{t \cdot \sin k}{\ell \cdot \ell} \cdot \tan k\right)\right)}\right)\right) \]
      4. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(2, \mathsf{*.f64}\left(k, \mathsf{*.f64}\left(k, \color{blue}{\left(\frac{t \cdot \sin k}{\ell \cdot \ell} \cdot \tan k\right)}\right)\right)\right) \]
      5. associate-*l/N/A

        \[\leadsto \mathsf{/.f64}\left(2, \mathsf{*.f64}\left(k, \mathsf{*.f64}\left(k, \left(\frac{\left(t \cdot \sin k\right) \cdot \tan k}{\color{blue}{\ell \cdot \ell}}\right)\right)\right)\right) \]
      6. /-lowering-/.f64N/A

        \[\leadsto \mathsf{/.f64}\left(2, \mathsf{*.f64}\left(k, \mathsf{*.f64}\left(k, \mathsf{/.f64}\left(\left(\left(t \cdot \sin k\right) \cdot \tan k\right), \color{blue}{\left(\ell \cdot \ell\right)}\right)\right)\right)\right) \]
      7. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(2, \mathsf{*.f64}\left(k, \mathsf{*.f64}\left(k, \mathsf{/.f64}\left(\mathsf{*.f64}\left(\left(t \cdot \sin k\right), \tan k\right), \left(\color{blue}{\ell} \cdot \ell\right)\right)\right)\right)\right) \]
      8. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(2, \mathsf{*.f64}\left(k, \mathsf{*.f64}\left(k, \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(t, \sin k\right), \tan k\right), \left(\ell \cdot \ell\right)\right)\right)\right)\right) \]
      9. sin-lowering-sin.f64N/A

        \[\leadsto \mathsf{/.f64}\left(2, \mathsf{*.f64}\left(k, \mathsf{*.f64}\left(k, \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(t, \mathsf{sin.f64}\left(k\right)\right), \tan k\right), \left(\ell \cdot \ell\right)\right)\right)\right)\right) \]
      10. tan-lowering-tan.f64N/A

        \[\leadsto \mathsf{/.f64}\left(2, \mathsf{*.f64}\left(k, \mathsf{*.f64}\left(k, \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(t, \mathsf{sin.f64}\left(k\right)\right), \mathsf{tan.f64}\left(k\right)\right), \left(\ell \cdot \ell\right)\right)\right)\right)\right) \]
      11. *-lowering-*.f6473.1%

        \[\leadsto \mathsf{/.f64}\left(2, \mathsf{*.f64}\left(k, \mathsf{*.f64}\left(k, \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(t, \mathsf{sin.f64}\left(k\right)\right), \mathsf{tan.f64}\left(k\right)\right), \mathsf{*.f64}\left(\ell, \color{blue}{\ell}\right)\right)\right)\right)\right) \]
    9. Applied egg-rr73.1%

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

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

Alternative 7: 80.6% accurate, 1.9× speedup?

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

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

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


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

    1. Initial program 50.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. associate-*l*N/A

        \[\leadsto \mathsf{/.f64}\left(2, \left(\left(\frac{{t}^{3}}{\ell \cdot \ell} \cdot \sin k\right) \cdot \color{blue}{\left(\tan k \cdot \left(\left(1 + {\left(\frac{k}{t}\right)}^{2}\right) + 1\right)\right)}\right)\right) \]
      2. *-commutativeN/A

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

        \[\leadsto \mathsf{/.f64}\left(2, \left(\left(\left(\frac{{t}^{3}}{\ell \cdot \ell} \cdot \sin k\right) \cdot \left(\left(1 + {\left(\frac{k}{t}\right)}^{2}\right) + 1\right)\right) \cdot \color{blue}{\tan k}\right)\right) \]
      4. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(2, \mathsf{*.f64}\left(\left(\left(\frac{{t}^{3}}{\ell \cdot \ell} \cdot \sin k\right) \cdot \left(\left(1 + {\left(\frac{k}{t}\right)}^{2}\right) + 1\right)\right), \color{blue}{\tan k}\right)\right) \]
    4. Applied egg-rr59.4%

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

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

        \[\leadsto \mathsf{/.f64}\left(2, \mathsf{*.f64}\left(\left({k}^{2} \cdot \frac{t \cdot \sin k}{{\ell}^{2}}\right), \mathsf{tan.f64}\left(\color{blue}{k}\right)\right)\right) \]
      2. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\left({k}^{2}\right), \left(\frac{t \cdot \sin k}{{\ell}^{2}}\right)\right), \mathsf{tan.f64}\left(\color{blue}{k}\right)\right)\right) \]
      3. unpow2N/A

        \[\leadsto \mathsf{/.f64}\left(2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\left(k \cdot k\right), \left(\frac{t \cdot \sin k}{{\ell}^{2}}\right)\right), \mathsf{tan.f64}\left(k\right)\right)\right) \]
      4. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(k, k\right), \left(\frac{t \cdot \sin k}{{\ell}^{2}}\right)\right), \mathsf{tan.f64}\left(k\right)\right)\right) \]
      5. /-lowering-/.f64N/A

        \[\leadsto \mathsf{/.f64}\left(2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(k, k\right), \mathsf{/.f64}\left(\left(t \cdot \sin k\right), \left({\ell}^{2}\right)\right)\right), \mathsf{tan.f64}\left(k\right)\right)\right) \]
      6. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(k, k\right), \mathsf{/.f64}\left(\mathsf{*.f64}\left(t, \sin k\right), \left({\ell}^{2}\right)\right)\right), \mathsf{tan.f64}\left(k\right)\right)\right) \]
      7. sin-lowering-sin.f64N/A

        \[\leadsto \mathsf{/.f64}\left(2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(k, k\right), \mathsf{/.f64}\left(\mathsf{*.f64}\left(t, \mathsf{sin.f64}\left(k\right)\right), \left({\ell}^{2}\right)\right)\right), \mathsf{tan.f64}\left(k\right)\right)\right) \]
      8. unpow2N/A

        \[\leadsto \mathsf{/.f64}\left(2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(k, k\right), \mathsf{/.f64}\left(\mathsf{*.f64}\left(t, \mathsf{sin.f64}\left(k\right)\right), \left(\ell \cdot \ell\right)\right)\right), \mathsf{tan.f64}\left(k\right)\right)\right) \]
      9. *-lowering-*.f6464.0%

        \[\leadsto \mathsf{/.f64}\left(2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(k, k\right), \mathsf{/.f64}\left(\mathsf{*.f64}\left(t, \mathsf{sin.f64}\left(k\right)\right), \mathsf{*.f64}\left(\ell, \ell\right)\right)\right), \mathsf{tan.f64}\left(k\right)\right)\right) \]
    7. Simplified64.0%

      \[\leadsto \frac{2}{\color{blue}{\left(\left(k \cdot k\right) \cdot \frac{t \cdot \sin k}{\ell \cdot \ell}\right)} \cdot \tan k} \]
    8. Step-by-step derivation
      1. *-commutativeN/A

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

        \[\leadsto \frac{2}{\tan k \cdot \frac{\left(k \cdot k\right) \cdot \left(t \cdot \sin k\right)}{\color{blue}{\ell \cdot \ell}}} \]
      3. *-commutativeN/A

        \[\leadsto \frac{2}{\tan k \cdot \frac{\left(k \cdot k\right) \cdot \left(\sin k \cdot t\right)}{\ell \cdot \ell}} \]
      4. associate-*r*N/A

        \[\leadsto \frac{2}{\tan k \cdot \frac{\left(\left(k \cdot k\right) \cdot \sin k\right) \cdot t}{\color{blue}{\ell} \cdot \ell}} \]
      5. associate-*l/N/A

        \[\leadsto \frac{2}{\tan k \cdot \left(\frac{\left(k \cdot k\right) \cdot \sin k}{\ell \cdot \ell} \cdot \color{blue}{t}\right)} \]
      6. frac-timesN/A

        \[\leadsto \frac{2}{\tan k \cdot \left(\left(\frac{k \cdot k}{\ell} \cdot \frac{\sin k}{\ell}\right) \cdot t\right)} \]
      7. associate-/r*N/A

        \[\leadsto \frac{\frac{2}{\tan k}}{\color{blue}{\left(\frac{k \cdot k}{\ell} \cdot \frac{\sin k}{\ell}\right) \cdot t}} \]
      8. /-lowering-/.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\left(\frac{2}{\tan k}\right), \color{blue}{\left(\left(\frac{k \cdot k}{\ell} \cdot \frac{\sin k}{\ell}\right) \cdot t\right)}\right) \]
      9. /-lowering-/.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(2, \tan k\right), \left(\color{blue}{\left(\frac{k \cdot k}{\ell} \cdot \frac{\sin k}{\ell}\right)} \cdot t\right)\right) \]
      10. tan-lowering-tan.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(2, \mathsf{tan.f64}\left(k\right)\right), \left(\left(\frac{k \cdot k}{\ell} \cdot \color{blue}{\frac{\sin k}{\ell}}\right) \cdot t\right)\right) \]
      11. frac-timesN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(2, \mathsf{tan.f64}\left(k\right)\right), \left(\frac{\left(k \cdot k\right) \cdot \sin k}{\ell \cdot \ell} \cdot t\right)\right) \]
      12. associate-*l/N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(2, \mathsf{tan.f64}\left(k\right)\right), \left(\frac{\left(\left(k \cdot k\right) \cdot \sin k\right) \cdot t}{\color{blue}{\ell \cdot \ell}}\right)\right) \]
      13. associate-*r*N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(2, \mathsf{tan.f64}\left(k\right)\right), \left(\frac{\left(k \cdot k\right) \cdot \left(\sin k \cdot t\right)}{\color{blue}{\ell} \cdot \ell}\right)\right) \]
      14. *-commutativeN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(2, \mathsf{tan.f64}\left(k\right)\right), \left(\frac{\left(k \cdot k\right) \cdot \left(t \cdot \sin k\right)}{\ell \cdot \ell}\right)\right) \]
    9. Applied egg-rr63.9%

      \[\leadsto \color{blue}{\frac{\frac{2}{\tan k}}{\frac{k \cdot k}{\frac{\ell \cdot \ell}{t \cdot \sin k}}}} \]
    10. Step-by-step derivation
      1. clear-numN/A

        \[\leadsto \frac{1}{\color{blue}{\frac{\frac{k \cdot k}{\frac{\ell \cdot \ell}{t \cdot \sin k}}}{\frac{2}{\tan k}}}} \]
      2. associate-/r/N/A

        \[\leadsto \frac{1}{\frac{k \cdot k}{\frac{\ell \cdot \ell}{t \cdot \sin k}}} \cdot \color{blue}{\frac{2}{\tan k}} \]
      3. clear-numN/A

        \[\leadsto \frac{\frac{\ell \cdot \ell}{t \cdot \sin k}}{k \cdot k} \cdot \frac{\color{blue}{2}}{\tan k} \]
      4. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\left(\frac{\frac{\ell \cdot \ell}{t \cdot \sin k}}{k \cdot k}\right), \color{blue}{\left(\frac{2}{\tan k}\right)}\right) \]
      5. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(\left(\frac{\ell \cdot \ell}{t \cdot \sin k}\right), \left(k \cdot k\right)\right), \left(\frac{\color{blue}{2}}{\tan k}\right)\right) \]
      6. times-fracN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(\left(\frac{\ell}{t} \cdot \frac{\ell}{\sin k}\right), \left(k \cdot k\right)\right), \left(\frac{2}{\tan k}\right)\right) \]
      7. clear-numN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(\left(\frac{1}{\frac{t}{\ell}} \cdot \frac{\ell}{\sin k}\right), \left(k \cdot k\right)\right), \left(\frac{2}{\tan k}\right)\right) \]
      8. associate-*l/N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(\left(\frac{1 \cdot \frac{\ell}{\sin k}}{\frac{t}{\ell}}\right), \left(k \cdot k\right)\right), \left(\frac{2}{\tan k}\right)\right) \]
      9. clear-numN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(\left(\frac{1 \cdot \frac{1}{\frac{\sin k}{\ell}}}{\frac{t}{\ell}}\right), \left(k \cdot k\right)\right), \left(\frac{2}{\tan k}\right)\right) \]
      10. div-invN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(\left(\frac{\frac{1}{\frac{\sin k}{\ell}}}{\frac{t}{\ell}}\right), \left(k \cdot k\right)\right), \left(\frac{2}{\tan k}\right)\right) \]
      11. clear-numN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(\left(\frac{\frac{\ell}{\sin k}}{\frac{t}{\ell}}\right), \left(k \cdot k\right)\right), \left(\frac{2}{\tan k}\right)\right) \]
      12. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(\left(\frac{\ell}{\sin k}\right), \left(\frac{t}{\ell}\right)\right), \left(k \cdot k\right)\right), \left(\frac{2}{\tan k}\right)\right) \]
      13. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(\ell, \sin k\right), \left(\frac{t}{\ell}\right)\right), \left(k \cdot k\right)\right), \left(\frac{2}{\tan k}\right)\right) \]
      14. sin-lowering-sin.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(\ell, \mathsf{sin.f64}\left(k\right)\right), \left(\frac{t}{\ell}\right)\right), \left(k \cdot k\right)\right), \left(\frac{2}{\tan k}\right)\right) \]
      15. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(\ell, \mathsf{sin.f64}\left(k\right)\right), \mathsf{/.f64}\left(t, \ell\right)\right), \left(k \cdot k\right)\right), \left(\frac{2}{\tan k}\right)\right) \]
      16. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(\ell, \mathsf{sin.f64}\left(k\right)\right), \mathsf{/.f64}\left(t, \ell\right)\right), \mathsf{*.f64}\left(k, k\right)\right), \left(\frac{2}{\tan k}\right)\right) \]
      17. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(\ell, \mathsf{sin.f64}\left(k\right)\right), \mathsf{/.f64}\left(t, \ell\right)\right), \mathsf{*.f64}\left(k, k\right)\right), \mathsf{/.f64}\left(2, \color{blue}{\tan k}\right)\right) \]
      18. tan-lowering-tan.f6470.1%

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(\ell, \mathsf{sin.f64}\left(k\right)\right), \mathsf{/.f64}\left(t, \ell\right)\right), \mathsf{*.f64}\left(k, k\right)\right), \mathsf{/.f64}\left(2, \mathsf{tan.f64}\left(k\right)\right)\right) \]
    11. Applied egg-rr70.1%

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

    if 1.25000000000000001e40 < 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. Add Preprocessing
    3. Taylor expanded in k around 0

      \[\leadsto \color{blue}{\frac{{\ell}^{2}}{{k}^{2} \cdot {t}^{3}}} \]
    4. Step-by-step derivation
      1. /-lowering-/.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\left({\ell}^{2}\right), \color{blue}{\left({k}^{2} \cdot {t}^{3}\right)}\right) \]
      2. unpow2N/A

        \[\leadsto \mathsf{/.f64}\left(\left(\ell \cdot \ell\right), \left(\color{blue}{{k}^{2}} \cdot {t}^{3}\right)\right) \]
      3. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\ell, \ell\right), \left(\color{blue}{{k}^{2}} \cdot {t}^{3}\right)\right) \]
      4. *-commutativeN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\ell, \ell\right), \left({t}^{3} \cdot \color{blue}{{k}^{2}}\right)\right) \]
      5. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\ell, \ell\right), \mathsf{*.f64}\left(\left({t}^{3}\right), \color{blue}{\left({k}^{2}\right)}\right)\right) \]
      6. cube-multN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\ell, \ell\right), \mathsf{*.f64}\left(\left(t \cdot \left(t \cdot t\right)\right), \left({\color{blue}{k}}^{2}\right)\right)\right) \]
      7. unpow2N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\ell, \ell\right), \mathsf{*.f64}\left(\left(t \cdot {t}^{2}\right), \left({k}^{2}\right)\right)\right) \]
      8. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\ell, \ell\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(t, \left({t}^{2}\right)\right), \left({\color{blue}{k}}^{2}\right)\right)\right) \]
      9. unpow2N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\ell, \ell\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(t, \left(t \cdot t\right)\right), \left({k}^{2}\right)\right)\right) \]
      10. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\ell, \ell\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(t, \mathsf{*.f64}\left(t, t\right)\right), \left({k}^{2}\right)\right)\right) \]
      11. unpow2N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\ell, \ell\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(t, \mathsf{*.f64}\left(t, t\right)\right), \left(k \cdot \color{blue}{k}\right)\right)\right) \]
      12. *-lowering-*.f6457.2%

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\ell, \ell\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(t, \mathsf{*.f64}\left(t, t\right)\right), \mathsf{*.f64}\left(k, \color{blue}{k}\right)\right)\right) \]
    5. Simplified57.2%

      \[\leadsto \color{blue}{\frac{\ell \cdot \ell}{\left(t \cdot \left(t \cdot t\right)\right) \cdot \left(k \cdot k\right)}} \]
    6. Step-by-step derivation
      1. associate-*l*N/A

        \[\leadsto \frac{\ell \cdot \ell}{t \cdot \color{blue}{\left(\left(t \cdot t\right) \cdot \left(k \cdot k\right)\right)}} \]
      2. times-fracN/A

        \[\leadsto \frac{\ell}{t} \cdot \color{blue}{\frac{\ell}{\left(t \cdot t\right) \cdot \left(k \cdot k\right)}} \]
      3. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\left(\frac{\ell}{t}\right), \color{blue}{\left(\frac{\ell}{\left(t \cdot t\right) \cdot \left(k \cdot k\right)}\right)}\right) \]
      4. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(\ell, t\right), \left(\frac{\color{blue}{\ell}}{\left(t \cdot t\right) \cdot \left(k \cdot k\right)}\right)\right) \]
      5. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(\ell, t\right), \mathsf{/.f64}\left(\ell, \color{blue}{\left(\left(t \cdot t\right) \cdot \left(k \cdot k\right)\right)}\right)\right) \]
      6. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(\ell, t\right), \mathsf{/.f64}\left(\ell, \mathsf{*.f64}\left(\left(t \cdot t\right), \color{blue}{\left(k \cdot k\right)}\right)\right)\right) \]
      7. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(\ell, t\right), \mathsf{/.f64}\left(\ell, \mathsf{*.f64}\left(\mathsf{*.f64}\left(t, t\right), \left(\color{blue}{k} \cdot k\right)\right)\right)\right) \]
      8. *-lowering-*.f6470.9%

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(\ell, t\right), \mathsf{/.f64}\left(\ell, \mathsf{*.f64}\left(\mathsf{*.f64}\left(t, t\right), \mathsf{*.f64}\left(k, \color{blue}{k}\right)\right)\right)\right) \]
    7. Applied egg-rr70.9%

      \[\leadsto \color{blue}{\frac{\ell}{t} \cdot \frac{\ell}{\left(t \cdot t\right) \cdot \left(k \cdot k\right)}} \]
    8. Step-by-step derivation
      1. associate-*r/N/A

        \[\leadsto \frac{\frac{\ell}{t} \cdot \ell}{\color{blue}{\left(t \cdot t\right) \cdot \left(k \cdot k\right)}} \]
      2. unswap-sqrN/A

        \[\leadsto \frac{\frac{\ell}{t} \cdot \ell}{\left(t \cdot k\right) \cdot \color{blue}{\left(t \cdot k\right)}} \]
      3. times-fracN/A

        \[\leadsto \frac{\frac{\ell}{t}}{t \cdot k} \cdot \color{blue}{\frac{\ell}{t \cdot k}} \]
      4. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\left(\frac{\frac{\ell}{t}}{t \cdot k}\right), \color{blue}{\left(\frac{\ell}{t \cdot k}\right)}\right) \]
      5. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(\left(\frac{\ell}{t}\right), \left(t \cdot k\right)\right), \left(\frac{\color{blue}{\ell}}{t \cdot k}\right)\right) \]
      6. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(\ell, t\right), \left(t \cdot k\right)\right), \left(\frac{\ell}{t \cdot k}\right)\right) \]
      7. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(\ell, t\right), \mathsf{*.f64}\left(t, k\right)\right), \left(\frac{\ell}{t \cdot k}\right)\right) \]
      8. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(\ell, t\right), \mathsf{*.f64}\left(t, k\right)\right), \mathsf{/.f64}\left(\ell, \color{blue}{\left(t \cdot k\right)}\right)\right) \]
      9. *-lowering-*.f6489.3%

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(\ell, t\right), \mathsf{*.f64}\left(t, k\right)\right), \mathsf{/.f64}\left(\ell, \mathsf{*.f64}\left(t, \color{blue}{k}\right)\right)\right) \]
    9. Applied egg-rr89.3%

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

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

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

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

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


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

    1. Initial program 53.8%

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

      \[\leadsto \color{blue}{\frac{{\ell}^{2}}{{k}^{2} \cdot {t}^{3}}} \]
    4. Step-by-step derivation
      1. /-lowering-/.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\left({\ell}^{2}\right), \color{blue}{\left({k}^{2} \cdot {t}^{3}\right)}\right) \]
      2. unpow2N/A

        \[\leadsto \mathsf{/.f64}\left(\left(\ell \cdot \ell\right), \left(\color{blue}{{k}^{2}} \cdot {t}^{3}\right)\right) \]
      3. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\ell, \ell\right), \left(\color{blue}{{k}^{2}} \cdot {t}^{3}\right)\right) \]
      4. *-commutativeN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\ell, \ell\right), \left({t}^{3} \cdot \color{blue}{{k}^{2}}\right)\right) \]
      5. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\ell, \ell\right), \mathsf{*.f64}\left(\left({t}^{3}\right), \color{blue}{\left({k}^{2}\right)}\right)\right) \]
      6. cube-multN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\ell, \ell\right), \mathsf{*.f64}\left(\left(t \cdot \left(t \cdot t\right)\right), \left({\color{blue}{k}}^{2}\right)\right)\right) \]
      7. unpow2N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\ell, \ell\right), \mathsf{*.f64}\left(\left(t \cdot {t}^{2}\right), \left({k}^{2}\right)\right)\right) \]
      8. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\ell, \ell\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(t, \left({t}^{2}\right)\right), \left({\color{blue}{k}}^{2}\right)\right)\right) \]
      9. unpow2N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\ell, \ell\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(t, \left(t \cdot t\right)\right), \left({k}^{2}\right)\right)\right) \]
      10. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\ell, \ell\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(t, \mathsf{*.f64}\left(t, t\right)\right), \left({k}^{2}\right)\right)\right) \]
      11. unpow2N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\ell, \ell\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(t, \mathsf{*.f64}\left(t, t\right)\right), \left(k \cdot \color{blue}{k}\right)\right)\right) \]
      12. *-lowering-*.f6447.5%

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\ell, \ell\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(t, \mathsf{*.f64}\left(t, t\right)\right), \mathsf{*.f64}\left(k, \color{blue}{k}\right)\right)\right) \]
    5. Simplified47.5%

      \[\leadsto \color{blue}{\frac{\ell \cdot \ell}{\left(t \cdot \left(t \cdot t\right)\right) \cdot \left(k \cdot k\right)}} \]
    6. Step-by-step derivation
      1. associate-*l*N/A

        \[\leadsto \frac{\ell \cdot \ell}{t \cdot \color{blue}{\left(\left(t \cdot t\right) \cdot \left(k \cdot k\right)\right)}} \]
      2. times-fracN/A

        \[\leadsto \frac{\ell}{t} \cdot \color{blue}{\frac{\ell}{\left(t \cdot t\right) \cdot \left(k \cdot k\right)}} \]
      3. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\left(\frac{\ell}{t}\right), \color{blue}{\left(\frac{\ell}{\left(t \cdot t\right) \cdot \left(k \cdot k\right)}\right)}\right) \]
      4. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(\ell, t\right), \left(\frac{\color{blue}{\ell}}{\left(t \cdot t\right) \cdot \left(k \cdot k\right)}\right)\right) \]
      5. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(\ell, t\right), \mathsf{/.f64}\left(\ell, \color{blue}{\left(\left(t \cdot t\right) \cdot \left(k \cdot k\right)\right)}\right)\right) \]
      6. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(\ell, t\right), \mathsf{/.f64}\left(\ell, \mathsf{*.f64}\left(\left(t \cdot t\right), \color{blue}{\left(k \cdot k\right)}\right)\right)\right) \]
      7. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(\ell, t\right), \mathsf{/.f64}\left(\ell, \mathsf{*.f64}\left(\mathsf{*.f64}\left(t, t\right), \left(\color{blue}{k} \cdot k\right)\right)\right)\right) \]
      8. *-lowering-*.f6458.5%

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(\ell, t\right), \mathsf{/.f64}\left(\ell, \mathsf{*.f64}\left(\mathsf{*.f64}\left(t, t\right), \mathsf{*.f64}\left(k, \color{blue}{k}\right)\right)\right)\right) \]
    7. Applied egg-rr58.5%

      \[\leadsto \color{blue}{\frac{\ell}{t} \cdot \frac{\ell}{\left(t \cdot t\right) \cdot \left(k \cdot k\right)}} \]
    8. Step-by-step derivation
      1. associate-*r/N/A

        \[\leadsto \frac{\frac{\ell}{t} \cdot \ell}{\color{blue}{\left(t \cdot t\right) \cdot \left(k \cdot k\right)}} \]
      2. unswap-sqrN/A

        \[\leadsto \frac{\frac{\ell}{t} \cdot \ell}{\left(t \cdot k\right) \cdot \color{blue}{\left(t \cdot k\right)}} \]
      3. times-fracN/A

        \[\leadsto \frac{\frac{\ell}{t}}{t \cdot k} \cdot \color{blue}{\frac{\ell}{t \cdot k}} \]
      4. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\left(\frac{\frac{\ell}{t}}{t \cdot k}\right), \color{blue}{\left(\frac{\ell}{t \cdot k}\right)}\right) \]
      5. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(\left(\frac{\ell}{t}\right), \left(t \cdot k\right)\right), \left(\frac{\color{blue}{\ell}}{t \cdot k}\right)\right) \]
      6. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(\ell, t\right), \left(t \cdot k\right)\right), \left(\frac{\ell}{t \cdot k}\right)\right) \]
      7. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(\ell, t\right), \mathsf{*.f64}\left(t, k\right)\right), \left(\frac{\ell}{t \cdot k}\right)\right) \]
      8. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(\ell, t\right), \mathsf{*.f64}\left(t, k\right)\right), \mathsf{/.f64}\left(\ell, \color{blue}{\left(t \cdot k\right)}\right)\right) \]
      9. *-lowering-*.f6476.0%

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(\ell, t\right), \mathsf{*.f64}\left(t, k\right)\right), \mathsf{/.f64}\left(\ell, \mathsf{*.f64}\left(t, \color{blue}{k}\right)\right)\right) \]
    9. Applied egg-rr76.0%

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

    if 4.50000000000000025e-43 < k

    1. Initial program 50.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. Add Preprocessing
    3. Step-by-step derivation
      1. associate-*l*N/A

        \[\leadsto \mathsf{/.f64}\left(2, \left(\left(\frac{{t}^{3}}{\ell \cdot \ell} \cdot \sin k\right) \cdot \color{blue}{\left(\tan k \cdot \left(\left(1 + {\left(\frac{k}{t}\right)}^{2}\right) + 1\right)\right)}\right)\right) \]
      2. *-commutativeN/A

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

        \[\leadsto \mathsf{/.f64}\left(2, \left(\left(\left(\frac{{t}^{3}}{\ell \cdot \ell} \cdot \sin k\right) \cdot \left(\left(1 + {\left(\frac{k}{t}\right)}^{2}\right) + 1\right)\right) \cdot \color{blue}{\tan k}\right)\right) \]
      4. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(2, \mathsf{*.f64}\left(\left(\left(\frac{{t}^{3}}{\ell \cdot \ell} \cdot \sin k\right) \cdot \left(\left(1 + {\left(\frac{k}{t}\right)}^{2}\right) + 1\right)\right), \color{blue}{\tan k}\right)\right) \]
    4. Applied egg-rr57.1%

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

      \[\leadsto \mathsf{/.f64}\left(2, \color{blue}{\left({k}^{2} \cdot \left(2 \cdot \frac{{t}^{3}}{{\ell}^{2}} + \frac{{k}^{2} \cdot \left({t}^{3} \cdot \left(\frac{1}{3} + \frac{1}{{t}^{2}}\right)\right)}{{\ell}^{2}}\right)\right)}\right) \]
    6. Simplified44.6%

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

      \[\leadsto \mathsf{/.f64}\left(2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(k, k\right), \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(2, \ell\right), \mathsf{/.f64}\left(\mathsf{*.f64}\left(t, \mathsf{*.f64}\left(t, t\right)\right), \ell\right)\right), \color{blue}{\left(\frac{{k}^{2} \cdot t}{{\ell}^{2}}\right)}\right)\right)\right) \]
    8. Step-by-step derivation
      1. /-lowering-/.f64N/A

        \[\leadsto \mathsf{/.f64}\left(2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(k, k\right), \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(2, \ell\right), \mathsf{/.f64}\left(\mathsf{*.f64}\left(t, \mathsf{*.f64}\left(t, t\right)\right), \ell\right)\right), \mathsf{/.f64}\left(\left({k}^{2} \cdot t\right), \color{blue}{\left({\ell}^{2}\right)}\right)\right)\right)\right) \]
      2. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(k, k\right), \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(2, \ell\right), \mathsf{/.f64}\left(\mathsf{*.f64}\left(t, \mathsf{*.f64}\left(t, t\right)\right), \ell\right)\right), \mathsf{/.f64}\left(\mathsf{*.f64}\left(\left({k}^{2}\right), t\right), \left({\color{blue}{\ell}}^{2}\right)\right)\right)\right)\right) \]
      3. unpow2N/A

        \[\leadsto \mathsf{/.f64}\left(2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(k, k\right), \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(2, \ell\right), \mathsf{/.f64}\left(\mathsf{*.f64}\left(t, \mathsf{*.f64}\left(t, t\right)\right), \ell\right)\right), \mathsf{/.f64}\left(\mathsf{*.f64}\left(\left(k \cdot k\right), t\right), \left({\ell}^{2}\right)\right)\right)\right)\right) \]
      4. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(k, k\right), \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(2, \ell\right), \mathsf{/.f64}\left(\mathsf{*.f64}\left(t, \mathsf{*.f64}\left(t, t\right)\right), \ell\right)\right), \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(k, k\right), t\right), \left({\ell}^{2}\right)\right)\right)\right)\right) \]
      5. unpow2N/A

        \[\leadsto \mathsf{/.f64}\left(2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(k, k\right), \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(2, \ell\right), \mathsf{/.f64}\left(\mathsf{*.f64}\left(t, \mathsf{*.f64}\left(t, t\right)\right), \ell\right)\right), \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(k, k\right), t\right), \left(\ell \cdot \color{blue}{\ell}\right)\right)\right)\right)\right) \]
      6. *-lowering-*.f6459.8%

        \[\leadsto \mathsf{/.f64}\left(2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(k, k\right), \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(2, \ell\right), \mathsf{/.f64}\left(\mathsf{*.f64}\left(t, \mathsf{*.f64}\left(t, t\right)\right), \ell\right)\right), \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(k, k\right), t\right), \mathsf{*.f64}\left(\ell, \color{blue}{\ell}\right)\right)\right)\right)\right) \]
    9. Simplified59.8%

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

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

Alternative 9: 71.2% accurate, 21.0× speedup?

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

\\
t\_s \cdot \begin{array}{l}
\mathbf{if}\;k \leq 1.1 \cdot 10^{+19}:\\
\;\;\;\;\frac{\frac{\ell}{t\_m}}{t\_m \cdot k} \cdot \frac{\ell}{t\_m \cdot k}\\

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


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

    1. Initial program 54.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. Taylor expanded in k around 0

      \[\leadsto \color{blue}{\frac{{\ell}^{2}}{{k}^{2} \cdot {t}^{3}}} \]
    4. Step-by-step derivation
      1. /-lowering-/.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\left({\ell}^{2}\right), \color{blue}{\left({k}^{2} \cdot {t}^{3}\right)}\right) \]
      2. unpow2N/A

        \[\leadsto \mathsf{/.f64}\left(\left(\ell \cdot \ell\right), \left(\color{blue}{{k}^{2}} \cdot {t}^{3}\right)\right) \]
      3. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\ell, \ell\right), \left(\color{blue}{{k}^{2}} \cdot {t}^{3}\right)\right) \]
      4. *-commutativeN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\ell, \ell\right), \left({t}^{3} \cdot \color{blue}{{k}^{2}}\right)\right) \]
      5. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\ell, \ell\right), \mathsf{*.f64}\left(\left({t}^{3}\right), \color{blue}{\left({k}^{2}\right)}\right)\right) \]
      6. cube-multN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\ell, \ell\right), \mathsf{*.f64}\left(\left(t \cdot \left(t \cdot t\right)\right), \left({\color{blue}{k}}^{2}\right)\right)\right) \]
      7. unpow2N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\ell, \ell\right), \mathsf{*.f64}\left(\left(t \cdot {t}^{2}\right), \left({k}^{2}\right)\right)\right) \]
      8. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\ell, \ell\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(t, \left({t}^{2}\right)\right), \left({\color{blue}{k}}^{2}\right)\right)\right) \]
      9. unpow2N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\ell, \ell\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(t, \left(t \cdot t\right)\right), \left({k}^{2}\right)\right)\right) \]
      10. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\ell, \ell\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(t, \mathsf{*.f64}\left(t, t\right)\right), \left({k}^{2}\right)\right)\right) \]
      11. unpow2N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\ell, \ell\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(t, \mathsf{*.f64}\left(t, t\right)\right), \left(k \cdot \color{blue}{k}\right)\right)\right) \]
      12. *-lowering-*.f6448.2%

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\ell, \ell\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(t, \mathsf{*.f64}\left(t, t\right)\right), \mathsf{*.f64}\left(k, \color{blue}{k}\right)\right)\right) \]
    5. Simplified48.2%

      \[\leadsto \color{blue}{\frac{\ell \cdot \ell}{\left(t \cdot \left(t \cdot t\right)\right) \cdot \left(k \cdot k\right)}} \]
    6. Step-by-step derivation
      1. associate-*l*N/A

        \[\leadsto \frac{\ell \cdot \ell}{t \cdot \color{blue}{\left(\left(t \cdot t\right) \cdot \left(k \cdot k\right)\right)}} \]
      2. times-fracN/A

        \[\leadsto \frac{\ell}{t} \cdot \color{blue}{\frac{\ell}{\left(t \cdot t\right) \cdot \left(k \cdot k\right)}} \]
      3. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\left(\frac{\ell}{t}\right), \color{blue}{\left(\frac{\ell}{\left(t \cdot t\right) \cdot \left(k \cdot k\right)}\right)}\right) \]
      4. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(\ell, t\right), \left(\frac{\color{blue}{\ell}}{\left(t \cdot t\right) \cdot \left(k \cdot k\right)}\right)\right) \]
      5. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(\ell, t\right), \mathsf{/.f64}\left(\ell, \color{blue}{\left(\left(t \cdot t\right) \cdot \left(k \cdot k\right)\right)}\right)\right) \]
      6. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(\ell, t\right), \mathsf{/.f64}\left(\ell, \mathsf{*.f64}\left(\left(t \cdot t\right), \color{blue}{\left(k \cdot k\right)}\right)\right)\right) \]
      7. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(\ell, t\right), \mathsf{/.f64}\left(\ell, \mathsf{*.f64}\left(\mathsf{*.f64}\left(t, t\right), \left(\color{blue}{k} \cdot k\right)\right)\right)\right) \]
      8. *-lowering-*.f6458.8%

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(\ell, t\right), \mathsf{/.f64}\left(\ell, \mathsf{*.f64}\left(\mathsf{*.f64}\left(t, t\right), \mathsf{*.f64}\left(k, \color{blue}{k}\right)\right)\right)\right) \]
    7. Applied egg-rr58.8%

      \[\leadsto \color{blue}{\frac{\ell}{t} \cdot \frac{\ell}{\left(t \cdot t\right) \cdot \left(k \cdot k\right)}} \]
    8. Step-by-step derivation
      1. associate-*r/N/A

        \[\leadsto \frac{\frac{\ell}{t} \cdot \ell}{\color{blue}{\left(t \cdot t\right) \cdot \left(k \cdot k\right)}} \]
      2. unswap-sqrN/A

        \[\leadsto \frac{\frac{\ell}{t} \cdot \ell}{\left(t \cdot k\right) \cdot \color{blue}{\left(t \cdot k\right)}} \]
      3. times-fracN/A

        \[\leadsto \frac{\frac{\ell}{t}}{t \cdot k} \cdot \color{blue}{\frac{\ell}{t \cdot k}} \]
      4. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\left(\frac{\frac{\ell}{t}}{t \cdot k}\right), \color{blue}{\left(\frac{\ell}{t \cdot k}\right)}\right) \]
      5. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(\left(\frac{\ell}{t}\right), \left(t \cdot k\right)\right), \left(\frac{\color{blue}{\ell}}{t \cdot k}\right)\right) \]
      6. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(\ell, t\right), \left(t \cdot k\right)\right), \left(\frac{\ell}{t \cdot k}\right)\right) \]
      7. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(\ell, t\right), \mathsf{*.f64}\left(t, k\right)\right), \left(\frac{\ell}{t \cdot k}\right)\right) \]
      8. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(\ell, t\right), \mathsf{*.f64}\left(t, k\right)\right), \mathsf{/.f64}\left(\ell, \color{blue}{\left(t \cdot k\right)}\right)\right) \]
      9. *-lowering-*.f6475.7%

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(\ell, t\right), \mathsf{*.f64}\left(t, k\right)\right), \mathsf{/.f64}\left(\ell, \mathsf{*.f64}\left(t, \color{blue}{k}\right)\right)\right) \]
    9. Applied egg-rr75.7%

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

    if 1.1e19 < k

    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. Add Preprocessing
    3. Step-by-step derivation
      1. associate-*l*N/A

        \[\leadsto \mathsf{/.f64}\left(2, \left(\left(\frac{{t}^{3}}{\ell \cdot \ell} \cdot \sin k\right) \cdot \color{blue}{\left(\tan k \cdot \left(\left(1 + {\left(\frac{k}{t}\right)}^{2}\right) + 1\right)\right)}\right)\right) \]
      2. *-commutativeN/A

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

        \[\leadsto \mathsf{/.f64}\left(2, \left(\left(\left(\frac{{t}^{3}}{\ell \cdot \ell} \cdot \sin k\right) \cdot \left(\left(1 + {\left(\frac{k}{t}\right)}^{2}\right) + 1\right)\right) \cdot \color{blue}{\tan k}\right)\right) \]
      4. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(2, \mathsf{*.f64}\left(\left(\left(\frac{{t}^{3}}{\ell \cdot \ell} \cdot \sin k\right) \cdot \left(\left(1 + {\left(\frac{k}{t}\right)}^{2}\right) + 1\right)\right), \color{blue}{\tan k}\right)\right) \]
    4. Applied egg-rr56.3%

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

      \[\leadsto \mathsf{/.f64}\left(2, \color{blue}{\left({k}^{2} \cdot \left(2 \cdot \frac{{t}^{3}}{{\ell}^{2}} + \frac{{k}^{2} \cdot \left({t}^{3} \cdot \left(\frac{1}{3} + \frac{1}{{t}^{2}}\right)\right)}{{\ell}^{2}}\right)\right)}\right) \]
    6. Simplified44.1%

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

      \[\leadsto \mathsf{/.f64}\left(2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(k, k\right), \color{blue}{\left(\frac{{k}^{2} \cdot t}{{\ell}^{2}}\right)}\right)\right) \]
    8. Step-by-step derivation
      1. /-lowering-/.f64N/A

        \[\leadsto \mathsf{/.f64}\left(2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(k, k\right), \mathsf{/.f64}\left(\left({k}^{2} \cdot t\right), \color{blue}{\left({\ell}^{2}\right)}\right)\right)\right) \]
      2. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(k, k\right), \mathsf{/.f64}\left(\mathsf{*.f64}\left(\left({k}^{2}\right), t\right), \left({\color{blue}{\ell}}^{2}\right)\right)\right)\right) \]
      3. unpow2N/A

        \[\leadsto \mathsf{/.f64}\left(2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(k, k\right), \mathsf{/.f64}\left(\mathsf{*.f64}\left(\left(k \cdot k\right), t\right), \left({\ell}^{2}\right)\right)\right)\right) \]
      4. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(k, k\right), \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(k, k\right), t\right), \left({\ell}^{2}\right)\right)\right)\right) \]
      5. unpow2N/A

        \[\leadsto \mathsf{/.f64}\left(2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(k, k\right), \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(k, k\right), t\right), \left(\ell \cdot \color{blue}{\ell}\right)\right)\right)\right) \]
      6. *-lowering-*.f6457.8%

        \[\leadsto \mathsf{/.f64}\left(2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(k, k\right), \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(k, k\right), t\right), \mathsf{*.f64}\left(\ell, \color{blue}{\ell}\right)\right)\right)\right) \]
    9. Simplified57.8%

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

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

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

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


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

    1. Initial program 53.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. Taylor expanded in k around 0

      \[\leadsto \color{blue}{\frac{{\ell}^{2}}{{k}^{2} \cdot {t}^{3}}} \]
    4. Step-by-step derivation
      1. /-lowering-/.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\left({\ell}^{2}\right), \color{blue}{\left({k}^{2} \cdot {t}^{3}\right)}\right) \]
      2. unpow2N/A

        \[\leadsto \mathsf{/.f64}\left(\left(\ell \cdot \ell\right), \left(\color{blue}{{k}^{2}} \cdot {t}^{3}\right)\right) \]
      3. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\ell, \ell\right), \left(\color{blue}{{k}^{2}} \cdot {t}^{3}\right)\right) \]
      4. *-commutativeN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\ell, \ell\right), \left({t}^{3} \cdot \color{blue}{{k}^{2}}\right)\right) \]
      5. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\ell, \ell\right), \mathsf{*.f64}\left(\left({t}^{3}\right), \color{blue}{\left({k}^{2}\right)}\right)\right) \]
      6. cube-multN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\ell, \ell\right), \mathsf{*.f64}\left(\left(t \cdot \left(t \cdot t\right)\right), \left({\color{blue}{k}}^{2}\right)\right)\right) \]
      7. unpow2N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\ell, \ell\right), \mathsf{*.f64}\left(\left(t \cdot {t}^{2}\right), \left({k}^{2}\right)\right)\right) \]
      8. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\ell, \ell\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(t, \left({t}^{2}\right)\right), \left({\color{blue}{k}}^{2}\right)\right)\right) \]
      9. unpow2N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\ell, \ell\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(t, \left(t \cdot t\right)\right), \left({k}^{2}\right)\right)\right) \]
      10. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\ell, \ell\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(t, \mathsf{*.f64}\left(t, t\right)\right), \left({k}^{2}\right)\right)\right) \]
      11. unpow2N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\ell, \ell\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(t, \mathsf{*.f64}\left(t, t\right)\right), \left(k \cdot \color{blue}{k}\right)\right)\right) \]
      12. *-lowering-*.f6445.6%

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\ell, \ell\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(t, \mathsf{*.f64}\left(t, t\right)\right), \mathsf{*.f64}\left(k, \color{blue}{k}\right)\right)\right) \]
    5. Simplified45.6%

      \[\leadsto \color{blue}{\frac{\ell \cdot \ell}{\left(t \cdot \left(t \cdot t\right)\right) \cdot \left(k \cdot k\right)}} \]
    6. Step-by-step derivation
      1. associate-*l*N/A

        \[\leadsto \frac{\ell \cdot \ell}{t \cdot \color{blue}{\left(\left(t \cdot t\right) \cdot \left(k \cdot k\right)\right)}} \]
      2. times-fracN/A

        \[\leadsto \frac{\ell}{t} \cdot \color{blue}{\frac{\ell}{\left(t \cdot t\right) \cdot \left(k \cdot k\right)}} \]
      3. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\left(\frac{\ell}{t}\right), \color{blue}{\left(\frac{\ell}{\left(t \cdot t\right) \cdot \left(k \cdot k\right)}\right)}\right) \]
      4. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(\ell, t\right), \left(\frac{\color{blue}{\ell}}{\left(t \cdot t\right) \cdot \left(k \cdot k\right)}\right)\right) \]
      5. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(\ell, t\right), \mathsf{/.f64}\left(\ell, \color{blue}{\left(\left(t \cdot t\right) \cdot \left(k \cdot k\right)\right)}\right)\right) \]
      6. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(\ell, t\right), \mathsf{/.f64}\left(\ell, \mathsf{*.f64}\left(\left(t \cdot t\right), \color{blue}{\left(k \cdot k\right)}\right)\right)\right) \]
      7. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(\ell, t\right), \mathsf{/.f64}\left(\ell, \mathsf{*.f64}\left(\mathsf{*.f64}\left(t, t\right), \left(\color{blue}{k} \cdot k\right)\right)\right)\right) \]
      8. *-lowering-*.f6457.3%

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(\ell, t\right), \mathsf{/.f64}\left(\ell, \mathsf{*.f64}\left(\mathsf{*.f64}\left(t, t\right), \mathsf{*.f64}\left(k, \color{blue}{k}\right)\right)\right)\right) \]
    7. Applied egg-rr57.3%

      \[\leadsto \color{blue}{\frac{\ell}{t} \cdot \frac{\ell}{\left(t \cdot t\right) \cdot \left(k \cdot k\right)}} \]
    8. Step-by-step derivation
      1. associate-*r/N/A

        \[\leadsto \frac{\frac{\ell}{t} \cdot \ell}{\color{blue}{\left(t \cdot t\right) \cdot \left(k \cdot k\right)}} \]
      2. unswap-sqrN/A

        \[\leadsto \frac{\frac{\ell}{t} \cdot \ell}{\left(t \cdot k\right) \cdot \color{blue}{\left(t \cdot k\right)}} \]
      3. times-fracN/A

        \[\leadsto \frac{\frac{\ell}{t}}{t \cdot k} \cdot \color{blue}{\frac{\ell}{t \cdot k}} \]
      4. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\left(\frac{\frac{\ell}{t}}{t \cdot k}\right), \color{blue}{\left(\frac{\ell}{t \cdot k}\right)}\right) \]
      5. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(\left(\frac{\ell}{t}\right), \left(t \cdot k\right)\right), \left(\frac{\color{blue}{\ell}}{t \cdot k}\right)\right) \]
      6. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(\ell, t\right), \left(t \cdot k\right)\right), \left(\frac{\ell}{t \cdot k}\right)\right) \]
      7. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(\ell, t\right), \mathsf{*.f64}\left(t, k\right)\right), \left(\frac{\ell}{t \cdot k}\right)\right) \]
      8. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(\ell, t\right), \mathsf{*.f64}\left(t, k\right)\right), \mathsf{/.f64}\left(\ell, \color{blue}{\left(t \cdot k\right)}\right)\right) \]
      9. *-lowering-*.f6475.5%

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(\ell, t\right), \mathsf{*.f64}\left(t, k\right)\right), \mathsf{/.f64}\left(\ell, \mathsf{*.f64}\left(t, \color{blue}{k}\right)\right)\right) \]
    9. Applied egg-rr75.5%

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

    if 4.9999999999999995e-97 < k

    1. Initial program 51.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. Taylor expanded in k around 0

      \[\leadsto \color{blue}{\frac{{\ell}^{2}}{{k}^{2} \cdot {t}^{3}}} \]
    4. Step-by-step derivation
      1. /-lowering-/.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\left({\ell}^{2}\right), \color{blue}{\left({k}^{2} \cdot {t}^{3}\right)}\right) \]
      2. unpow2N/A

        \[\leadsto \mathsf{/.f64}\left(\left(\ell \cdot \ell\right), \left(\color{blue}{{k}^{2}} \cdot {t}^{3}\right)\right) \]
      3. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\ell, \ell\right), \left(\color{blue}{{k}^{2}} \cdot {t}^{3}\right)\right) \]
      4. *-commutativeN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\ell, \ell\right), \left({t}^{3} \cdot \color{blue}{{k}^{2}}\right)\right) \]
      5. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\ell, \ell\right), \mathsf{*.f64}\left(\left({t}^{3}\right), \color{blue}{\left({k}^{2}\right)}\right)\right) \]
      6. cube-multN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\ell, \ell\right), \mathsf{*.f64}\left(\left(t \cdot \left(t \cdot t\right)\right), \left({\color{blue}{k}}^{2}\right)\right)\right) \]
      7. unpow2N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\ell, \ell\right), \mathsf{*.f64}\left(\left(t \cdot {t}^{2}\right), \left({k}^{2}\right)\right)\right) \]
      8. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\ell, \ell\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(t, \left({t}^{2}\right)\right), \left({\color{blue}{k}}^{2}\right)\right)\right) \]
      9. unpow2N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\ell, \ell\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(t, \left(t \cdot t\right)\right), \left({k}^{2}\right)\right)\right) \]
      10. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\ell, \ell\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(t, \mathsf{*.f64}\left(t, t\right)\right), \left({k}^{2}\right)\right)\right) \]
      11. unpow2N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\ell, \ell\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(t, \mathsf{*.f64}\left(t, t\right)\right), \left(k \cdot \color{blue}{k}\right)\right)\right) \]
      12. *-lowering-*.f6452.3%

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\ell, \ell\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(t, \mathsf{*.f64}\left(t, t\right)\right), \mathsf{*.f64}\left(k, \color{blue}{k}\right)\right)\right) \]
    5. Simplified52.3%

      \[\leadsto \color{blue}{\frac{\ell \cdot \ell}{\left(t \cdot \left(t \cdot t\right)\right) \cdot \left(k \cdot k\right)}} \]
    6. Step-by-step derivation
      1. associate-*l*N/A

        \[\leadsto \frac{\ell \cdot \ell}{t \cdot \color{blue}{\left(\left(t \cdot t\right) \cdot \left(k \cdot k\right)\right)}} \]
      2. times-fracN/A

        \[\leadsto \frac{\ell}{t} \cdot \color{blue}{\frac{\ell}{\left(t \cdot t\right) \cdot \left(k \cdot k\right)}} \]
      3. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\left(\frac{\ell}{t}\right), \color{blue}{\left(\frac{\ell}{\left(t \cdot t\right) \cdot \left(k \cdot k\right)}\right)}\right) \]
      4. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(\ell, t\right), \left(\frac{\color{blue}{\ell}}{\left(t \cdot t\right) \cdot \left(k \cdot k\right)}\right)\right) \]
      5. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(\ell, t\right), \mathsf{/.f64}\left(\ell, \color{blue}{\left(\left(t \cdot t\right) \cdot \left(k \cdot k\right)\right)}\right)\right) \]
      6. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(\ell, t\right), \mathsf{/.f64}\left(\ell, \mathsf{*.f64}\left(\left(t \cdot t\right), \color{blue}{\left(k \cdot k\right)}\right)\right)\right) \]
      7. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(\ell, t\right), \mathsf{/.f64}\left(\ell, \mathsf{*.f64}\left(\mathsf{*.f64}\left(t, t\right), \left(\color{blue}{k} \cdot k\right)\right)\right)\right) \]
      8. *-lowering-*.f6459.1%

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(\ell, t\right), \mathsf{/.f64}\left(\ell, \mathsf{*.f64}\left(\mathsf{*.f64}\left(t, t\right), \mathsf{*.f64}\left(k, \color{blue}{k}\right)\right)\right)\right) \]
    7. Applied egg-rr59.1%

      \[\leadsto \color{blue}{\frac{\ell}{t} \cdot \frac{\ell}{\left(t \cdot t\right) \cdot \left(k \cdot k\right)}} \]
    8. Step-by-step derivation
      1. *-commutativeN/A

        \[\leadsto \frac{\ell}{\left(t \cdot t\right) \cdot \left(k \cdot k\right)} \cdot \color{blue}{\frac{\ell}{t}} \]
      2. clear-numN/A

        \[\leadsto \frac{\ell}{\left(t \cdot t\right) \cdot \left(k \cdot k\right)} \cdot \frac{1}{\color{blue}{\frac{t}{\ell}}} \]
      3. un-div-invN/A

        \[\leadsto \frac{\frac{\ell}{\left(t \cdot t\right) \cdot \left(k \cdot k\right)}}{\color{blue}{\frac{t}{\ell}}} \]
      4. /-lowering-/.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\left(\frac{\ell}{\left(t \cdot t\right) \cdot \left(k \cdot k\right)}\right), \color{blue}{\left(\frac{t}{\ell}\right)}\right) \]
      5. associate-*l*N/A

        \[\leadsto \mathsf{/.f64}\left(\left(\frac{\ell}{t \cdot \left(t \cdot \left(k \cdot k\right)\right)}\right), \left(\frac{t}{\ell}\right)\right) \]
      6. associate-/r*N/A

        \[\leadsto \mathsf{/.f64}\left(\left(\frac{\frac{\ell}{t}}{t \cdot \left(k \cdot k\right)}\right), \left(\frac{\color{blue}{t}}{\ell}\right)\right) \]
      7. *-commutativeN/A

        \[\leadsto \mathsf{/.f64}\left(\left(\frac{\frac{\ell}{t}}{\left(k \cdot k\right) \cdot t}\right), \left(\frac{t}{\ell}\right)\right) \]
      8. /-lowering-/.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\left(\frac{\ell}{t}\right), \left(\left(k \cdot k\right) \cdot t\right)\right), \left(\frac{\color{blue}{t}}{\ell}\right)\right) \]
      9. /-lowering-/.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(\ell, t\right), \left(\left(k \cdot k\right) \cdot t\right)\right), \left(\frac{t}{\ell}\right)\right) \]
      10. *-commutativeN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(\ell, t\right), \left(t \cdot \left(k \cdot k\right)\right)\right), \left(\frac{t}{\ell}\right)\right) \]
      11. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(\ell, t\right), \mathsf{*.f64}\left(t, \left(k \cdot k\right)\right)\right), \left(\frac{t}{\ell}\right)\right) \]
      12. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(\ell, t\right), \mathsf{*.f64}\left(t, \mathsf{*.f64}\left(k, k\right)\right)\right), \left(\frac{t}{\ell}\right)\right) \]
      13. /-lowering-/.f6462.9%

        \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(\ell, t\right), \mathsf{*.f64}\left(t, \mathsf{*.f64}\left(k, k\right)\right)\right), \mathsf{/.f64}\left(t, \color{blue}{\ell}\right)\right) \]
    9. Applied egg-rr62.9%

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

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

\\
t\_s \cdot \begin{array}{l}
\mathbf{if}\;k \leq 1.42 \cdot 10^{+20}:\\
\;\;\;\;\frac{\frac{\ell}{t\_m}}{t\_m \cdot k} \cdot \frac{\ell}{t\_m \cdot k}\\

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


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

    1. Initial program 54.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. Taylor expanded in k around 0

      \[\leadsto \color{blue}{\frac{{\ell}^{2}}{{k}^{2} \cdot {t}^{3}}} \]
    4. Step-by-step derivation
      1. /-lowering-/.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\left({\ell}^{2}\right), \color{blue}{\left({k}^{2} \cdot {t}^{3}\right)}\right) \]
      2. unpow2N/A

        \[\leadsto \mathsf{/.f64}\left(\left(\ell \cdot \ell\right), \left(\color{blue}{{k}^{2}} \cdot {t}^{3}\right)\right) \]
      3. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\ell, \ell\right), \left(\color{blue}{{k}^{2}} \cdot {t}^{3}\right)\right) \]
      4. *-commutativeN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\ell, \ell\right), \left({t}^{3} \cdot \color{blue}{{k}^{2}}\right)\right) \]
      5. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\ell, \ell\right), \mathsf{*.f64}\left(\left({t}^{3}\right), \color{blue}{\left({k}^{2}\right)}\right)\right) \]
      6. cube-multN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\ell, \ell\right), \mathsf{*.f64}\left(\left(t \cdot \left(t \cdot t\right)\right), \left({\color{blue}{k}}^{2}\right)\right)\right) \]
      7. unpow2N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\ell, \ell\right), \mathsf{*.f64}\left(\left(t \cdot {t}^{2}\right), \left({k}^{2}\right)\right)\right) \]
      8. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\ell, \ell\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(t, \left({t}^{2}\right)\right), \left({\color{blue}{k}}^{2}\right)\right)\right) \]
      9. unpow2N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\ell, \ell\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(t, \left(t \cdot t\right)\right), \left({k}^{2}\right)\right)\right) \]
      10. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\ell, \ell\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(t, \mathsf{*.f64}\left(t, t\right)\right), \left({k}^{2}\right)\right)\right) \]
      11. unpow2N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\ell, \ell\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(t, \mathsf{*.f64}\left(t, t\right)\right), \left(k \cdot \color{blue}{k}\right)\right)\right) \]
      12. *-lowering-*.f6448.2%

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\ell, \ell\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(t, \mathsf{*.f64}\left(t, t\right)\right), \mathsf{*.f64}\left(k, \color{blue}{k}\right)\right)\right) \]
    5. Simplified48.2%

      \[\leadsto \color{blue}{\frac{\ell \cdot \ell}{\left(t \cdot \left(t \cdot t\right)\right) \cdot \left(k \cdot k\right)}} \]
    6. Step-by-step derivation
      1. associate-*l*N/A

        \[\leadsto \frac{\ell \cdot \ell}{t \cdot \color{blue}{\left(\left(t \cdot t\right) \cdot \left(k \cdot k\right)\right)}} \]
      2. times-fracN/A

        \[\leadsto \frac{\ell}{t} \cdot \color{blue}{\frac{\ell}{\left(t \cdot t\right) \cdot \left(k \cdot k\right)}} \]
      3. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\left(\frac{\ell}{t}\right), \color{blue}{\left(\frac{\ell}{\left(t \cdot t\right) \cdot \left(k \cdot k\right)}\right)}\right) \]
      4. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(\ell, t\right), \left(\frac{\color{blue}{\ell}}{\left(t \cdot t\right) \cdot \left(k \cdot k\right)}\right)\right) \]
      5. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(\ell, t\right), \mathsf{/.f64}\left(\ell, \color{blue}{\left(\left(t \cdot t\right) \cdot \left(k \cdot k\right)\right)}\right)\right) \]
      6. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(\ell, t\right), \mathsf{/.f64}\left(\ell, \mathsf{*.f64}\left(\left(t \cdot t\right), \color{blue}{\left(k \cdot k\right)}\right)\right)\right) \]
      7. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(\ell, t\right), \mathsf{/.f64}\left(\ell, \mathsf{*.f64}\left(\mathsf{*.f64}\left(t, t\right), \left(\color{blue}{k} \cdot k\right)\right)\right)\right) \]
      8. *-lowering-*.f6458.8%

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(\ell, t\right), \mathsf{/.f64}\left(\ell, \mathsf{*.f64}\left(\mathsf{*.f64}\left(t, t\right), \mathsf{*.f64}\left(k, \color{blue}{k}\right)\right)\right)\right) \]
    7. Applied egg-rr58.8%

      \[\leadsto \color{blue}{\frac{\ell}{t} \cdot \frac{\ell}{\left(t \cdot t\right) \cdot \left(k \cdot k\right)}} \]
    8. Step-by-step derivation
      1. associate-*r/N/A

        \[\leadsto \frac{\frac{\ell}{t} \cdot \ell}{\color{blue}{\left(t \cdot t\right) \cdot \left(k \cdot k\right)}} \]
      2. unswap-sqrN/A

        \[\leadsto \frac{\frac{\ell}{t} \cdot \ell}{\left(t \cdot k\right) \cdot \color{blue}{\left(t \cdot k\right)}} \]
      3. times-fracN/A

        \[\leadsto \frac{\frac{\ell}{t}}{t \cdot k} \cdot \color{blue}{\frac{\ell}{t \cdot k}} \]
      4. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\left(\frac{\frac{\ell}{t}}{t \cdot k}\right), \color{blue}{\left(\frac{\ell}{t \cdot k}\right)}\right) \]
      5. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(\left(\frac{\ell}{t}\right), \left(t \cdot k\right)\right), \left(\frac{\color{blue}{\ell}}{t \cdot k}\right)\right) \]
      6. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(\ell, t\right), \left(t \cdot k\right)\right), \left(\frac{\ell}{t \cdot k}\right)\right) \]
      7. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(\ell, t\right), \mathsf{*.f64}\left(t, k\right)\right), \left(\frac{\ell}{t \cdot k}\right)\right) \]
      8. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(\ell, t\right), \mathsf{*.f64}\left(t, k\right)\right), \mathsf{/.f64}\left(\ell, \color{blue}{\left(t \cdot k\right)}\right)\right) \]
      9. *-lowering-*.f6475.7%

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(\ell, t\right), \mathsf{*.f64}\left(t, k\right)\right), \mathsf{/.f64}\left(\ell, \mathsf{*.f64}\left(t, \color{blue}{k}\right)\right)\right) \]
    9. Applied egg-rr75.7%

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

    if 1.42e20 < k

    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. Add Preprocessing
    3. Taylor expanded in k around 0

      \[\leadsto \color{blue}{\frac{{\ell}^{2}}{{k}^{2} \cdot {t}^{3}}} \]
    4. Step-by-step derivation
      1. /-lowering-/.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\left({\ell}^{2}\right), \color{blue}{\left({k}^{2} \cdot {t}^{3}\right)}\right) \]
      2. unpow2N/A

        \[\leadsto \mathsf{/.f64}\left(\left(\ell \cdot \ell\right), \left(\color{blue}{{k}^{2}} \cdot {t}^{3}\right)\right) \]
      3. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\ell, \ell\right), \left(\color{blue}{{k}^{2}} \cdot {t}^{3}\right)\right) \]
      4. *-commutativeN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\ell, \ell\right), \left({t}^{3} \cdot \color{blue}{{k}^{2}}\right)\right) \]
      5. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\ell, \ell\right), \mathsf{*.f64}\left(\left({t}^{3}\right), \color{blue}{\left({k}^{2}\right)}\right)\right) \]
      6. cube-multN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\ell, \ell\right), \mathsf{*.f64}\left(\left(t \cdot \left(t \cdot t\right)\right), \left({\color{blue}{k}}^{2}\right)\right)\right) \]
      7. unpow2N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\ell, \ell\right), \mathsf{*.f64}\left(\left(t \cdot {t}^{2}\right), \left({k}^{2}\right)\right)\right) \]
      8. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\ell, \ell\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(t, \left({t}^{2}\right)\right), \left({\color{blue}{k}}^{2}\right)\right)\right) \]
      9. unpow2N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\ell, \ell\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(t, \left(t \cdot t\right)\right), \left({k}^{2}\right)\right)\right) \]
      10. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\ell, \ell\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(t, \mathsf{*.f64}\left(t, t\right)\right), \left({k}^{2}\right)\right)\right) \]
      11. unpow2N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\ell, \ell\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(t, \mathsf{*.f64}\left(t, t\right)\right), \left(k \cdot \color{blue}{k}\right)\right)\right) \]
      12. *-lowering-*.f6447.2%

        \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\ell, \ell\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(t, \mathsf{*.f64}\left(t, t\right)\right), \mathsf{*.f64}\left(k, \color{blue}{k}\right)\right)\right) \]
    5. Simplified47.2%

      \[\leadsto \color{blue}{\frac{\ell \cdot \ell}{\left(t \cdot \left(t \cdot t\right)\right) \cdot \left(k \cdot k\right)}} \]
    6. Step-by-step derivation
      1. associate-*l*N/A

        \[\leadsto \frac{\ell \cdot \ell}{t \cdot \color{blue}{\left(\left(t \cdot t\right) \cdot \left(k \cdot k\right)\right)}} \]
      2. times-fracN/A

        \[\leadsto \frac{\ell}{t} \cdot \color{blue}{\frac{\ell}{\left(t \cdot t\right) \cdot \left(k \cdot k\right)}} \]
      3. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\left(\frac{\ell}{t}\right), \color{blue}{\left(\frac{\ell}{\left(t \cdot t\right) \cdot \left(k \cdot k\right)}\right)}\right) \]
      4. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(\ell, t\right), \left(\frac{\color{blue}{\ell}}{\left(t \cdot t\right) \cdot \left(k \cdot k\right)}\right)\right) \]
      5. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(\ell, t\right), \mathsf{/.f64}\left(\ell, \color{blue}{\left(\left(t \cdot t\right) \cdot \left(k \cdot k\right)\right)}\right)\right) \]
      6. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(\ell, t\right), \mathsf{/.f64}\left(\ell, \mathsf{*.f64}\left(\left(t \cdot t\right), \color{blue}{\left(k \cdot k\right)}\right)\right)\right) \]
      7. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(\ell, t\right), \mathsf{/.f64}\left(\ell, \mathsf{*.f64}\left(\mathsf{*.f64}\left(t, t\right), \left(\color{blue}{k} \cdot k\right)\right)\right)\right) \]
      8. *-lowering-*.f6455.6%

        \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(\ell, t\right), \mathsf{/.f64}\left(\ell, \mathsf{*.f64}\left(\mathsf{*.f64}\left(t, t\right), \mathsf{*.f64}\left(k, \color{blue}{k}\right)\right)\right)\right) \]
    7. Applied egg-rr55.6%

      \[\leadsto \color{blue}{\frac{\ell}{t} \cdot \frac{\ell}{\left(t \cdot t\right) \cdot \left(k \cdot k\right)}} \]
    8. Step-by-step derivation
      1. associate-*l/N/A

        \[\leadsto \frac{\ell \cdot \frac{\ell}{\left(t \cdot t\right) \cdot \left(k \cdot k\right)}}{\color{blue}{t}} \]
      2. /-lowering-/.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\left(\ell \cdot \frac{\ell}{\left(t \cdot t\right) \cdot \left(k \cdot k\right)}\right), \color{blue}{t}\right) \]
      3. associate-*r/N/A

        \[\leadsto \mathsf{/.f64}\left(\left(\frac{\ell \cdot \ell}{\left(t \cdot t\right) \cdot \left(k \cdot k\right)}\right), t\right) \]
      4. /-lowering-/.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\left(\ell \cdot \ell\right), \left(\left(t \cdot t\right) \cdot \left(k \cdot k\right)\right)\right), t\right) \]
      5. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\ell, \ell\right), \left(\left(t \cdot t\right) \cdot \left(k \cdot k\right)\right)\right), t\right) \]
      6. associate-*l*N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\ell, \ell\right), \left(t \cdot \left(t \cdot \left(k \cdot k\right)\right)\right)\right), t\right) \]
      7. *-commutativeN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\ell, \ell\right), \left(t \cdot \left(\left(k \cdot k\right) \cdot t\right)\right)\right), t\right) \]
      8. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\ell, \ell\right), \mathsf{*.f64}\left(t, \left(\left(k \cdot k\right) \cdot t\right)\right)\right), t\right) \]
      9. *-commutativeN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\ell, \ell\right), \mathsf{*.f64}\left(t, \left(t \cdot \left(k \cdot k\right)\right)\right)\right), t\right) \]
      10. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\ell, \ell\right), \mathsf{*.f64}\left(t, \mathsf{*.f64}\left(t, \left(k \cdot k\right)\right)\right)\right), t\right) \]
      11. *-lowering-*.f6457.7%

        \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\ell, \ell\right), \mathsf{*.f64}\left(t, \mathsf{*.f64}\left(t, \mathsf{*.f64}\left(k, k\right)\right)\right)\right), t\right) \]
    9. Applied egg-rr57.7%

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

Alternative 12: 69.8% accurate, 32.4× speedup?

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

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

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

    \[\leadsto \color{blue}{\frac{{\ell}^{2}}{{k}^{2} \cdot {t}^{3}}} \]
  4. Step-by-step derivation
    1. /-lowering-/.f64N/A

      \[\leadsto \mathsf{/.f64}\left(\left({\ell}^{2}\right), \color{blue}{\left({k}^{2} \cdot {t}^{3}\right)}\right) \]
    2. unpow2N/A

      \[\leadsto \mathsf{/.f64}\left(\left(\ell \cdot \ell\right), \left(\color{blue}{{k}^{2}} \cdot {t}^{3}\right)\right) \]
    3. *-lowering-*.f64N/A

      \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\ell, \ell\right), \left(\color{blue}{{k}^{2}} \cdot {t}^{3}\right)\right) \]
    4. *-commutativeN/A

      \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\ell, \ell\right), \left({t}^{3} \cdot \color{blue}{{k}^{2}}\right)\right) \]
    5. *-lowering-*.f64N/A

      \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\ell, \ell\right), \mathsf{*.f64}\left(\left({t}^{3}\right), \color{blue}{\left({k}^{2}\right)}\right)\right) \]
    6. cube-multN/A

      \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\ell, \ell\right), \mathsf{*.f64}\left(\left(t \cdot \left(t \cdot t\right)\right), \left({\color{blue}{k}}^{2}\right)\right)\right) \]
    7. unpow2N/A

      \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\ell, \ell\right), \mathsf{*.f64}\left(\left(t \cdot {t}^{2}\right), \left({k}^{2}\right)\right)\right) \]
    8. *-lowering-*.f64N/A

      \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\ell, \ell\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(t, \left({t}^{2}\right)\right), \left({\color{blue}{k}}^{2}\right)\right)\right) \]
    9. unpow2N/A

      \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\ell, \ell\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(t, \left(t \cdot t\right)\right), \left({k}^{2}\right)\right)\right) \]
    10. *-lowering-*.f64N/A

      \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\ell, \ell\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(t, \mathsf{*.f64}\left(t, t\right)\right), \left({k}^{2}\right)\right)\right) \]
    11. unpow2N/A

      \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\ell, \ell\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(t, \mathsf{*.f64}\left(t, t\right)\right), \left(k \cdot \color{blue}{k}\right)\right)\right) \]
    12. *-lowering-*.f6447.9%

      \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\ell, \ell\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(t, \mathsf{*.f64}\left(t, t\right)\right), \mathsf{*.f64}\left(k, \color{blue}{k}\right)\right)\right) \]
  5. Simplified47.9%

    \[\leadsto \color{blue}{\frac{\ell \cdot \ell}{\left(t \cdot \left(t \cdot t\right)\right) \cdot \left(k \cdot k\right)}} \]
  6. Step-by-step derivation
    1. associate-*l*N/A

      \[\leadsto \frac{\ell \cdot \ell}{t \cdot \color{blue}{\left(\left(t \cdot t\right) \cdot \left(k \cdot k\right)\right)}} \]
    2. times-fracN/A

      \[\leadsto \frac{\ell}{t} \cdot \color{blue}{\frac{\ell}{\left(t \cdot t\right) \cdot \left(k \cdot k\right)}} \]
    3. *-lowering-*.f64N/A

      \[\leadsto \mathsf{*.f64}\left(\left(\frac{\ell}{t}\right), \color{blue}{\left(\frac{\ell}{\left(t \cdot t\right) \cdot \left(k \cdot k\right)}\right)}\right) \]
    4. /-lowering-/.f64N/A

      \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(\ell, t\right), \left(\frac{\color{blue}{\ell}}{\left(t \cdot t\right) \cdot \left(k \cdot k\right)}\right)\right) \]
    5. /-lowering-/.f64N/A

      \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(\ell, t\right), \mathsf{/.f64}\left(\ell, \color{blue}{\left(\left(t \cdot t\right) \cdot \left(k \cdot k\right)\right)}\right)\right) \]
    6. *-lowering-*.f64N/A

      \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(\ell, t\right), \mathsf{/.f64}\left(\ell, \mathsf{*.f64}\left(\left(t \cdot t\right), \color{blue}{\left(k \cdot k\right)}\right)\right)\right) \]
    7. *-lowering-*.f64N/A

      \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(\ell, t\right), \mathsf{/.f64}\left(\ell, \mathsf{*.f64}\left(\mathsf{*.f64}\left(t, t\right), \left(\color{blue}{k} \cdot k\right)\right)\right)\right) \]
    8. *-lowering-*.f6457.9%

      \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(\ell, t\right), \mathsf{/.f64}\left(\ell, \mathsf{*.f64}\left(\mathsf{*.f64}\left(t, t\right), \mathsf{*.f64}\left(k, \color{blue}{k}\right)\right)\right)\right) \]
  7. Applied egg-rr57.9%

    \[\leadsto \color{blue}{\frac{\ell}{t} \cdot \frac{\ell}{\left(t \cdot t\right) \cdot \left(k \cdot k\right)}} \]
  8. Step-by-step derivation
    1. associate-*r/N/A

      \[\leadsto \frac{\frac{\ell}{t} \cdot \ell}{\color{blue}{\left(t \cdot t\right) \cdot \left(k \cdot k\right)}} \]
    2. unswap-sqrN/A

      \[\leadsto \frac{\frac{\ell}{t} \cdot \ell}{\left(t \cdot k\right) \cdot \color{blue}{\left(t \cdot k\right)}} \]
    3. times-fracN/A

      \[\leadsto \frac{\frac{\ell}{t}}{t \cdot k} \cdot \color{blue}{\frac{\ell}{t \cdot k}} \]
    4. *-lowering-*.f64N/A

      \[\leadsto \mathsf{*.f64}\left(\left(\frac{\frac{\ell}{t}}{t \cdot k}\right), \color{blue}{\left(\frac{\ell}{t \cdot k}\right)}\right) \]
    5. /-lowering-/.f64N/A

      \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(\left(\frac{\ell}{t}\right), \left(t \cdot k\right)\right), \left(\frac{\color{blue}{\ell}}{t \cdot k}\right)\right) \]
    6. /-lowering-/.f64N/A

      \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(\ell, t\right), \left(t \cdot k\right)\right), \left(\frac{\ell}{t \cdot k}\right)\right) \]
    7. *-lowering-*.f64N/A

      \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(\ell, t\right), \mathsf{*.f64}\left(t, k\right)\right), \left(\frac{\ell}{t \cdot k}\right)\right) \]
    8. /-lowering-/.f64N/A

      \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(\ell, t\right), \mathsf{*.f64}\left(t, k\right)\right), \mathsf{/.f64}\left(\ell, \color{blue}{\left(t \cdot k\right)}\right)\right) \]
    9. *-lowering-*.f6469.0%

      \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(\ell, t\right), \mathsf{*.f64}\left(t, k\right)\right), \mathsf{/.f64}\left(\ell, \mathsf{*.f64}\left(t, \color{blue}{k}\right)\right)\right) \]
  9. Applied egg-rr69.0%

    \[\leadsto \color{blue}{\frac{\frac{\ell}{t}}{t \cdot k} \cdot \frac{\ell}{t \cdot k}} \]
  10. Add Preprocessing

Alternative 13: 67.2% accurate, 32.4× speedup?

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

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

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

    \[\leadsto \color{blue}{\frac{{\ell}^{2}}{{k}^{2} \cdot {t}^{3}}} \]
  4. Step-by-step derivation
    1. /-lowering-/.f64N/A

      \[\leadsto \mathsf{/.f64}\left(\left({\ell}^{2}\right), \color{blue}{\left({k}^{2} \cdot {t}^{3}\right)}\right) \]
    2. unpow2N/A

      \[\leadsto \mathsf{/.f64}\left(\left(\ell \cdot \ell\right), \left(\color{blue}{{k}^{2}} \cdot {t}^{3}\right)\right) \]
    3. *-lowering-*.f64N/A

      \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\ell, \ell\right), \left(\color{blue}{{k}^{2}} \cdot {t}^{3}\right)\right) \]
    4. *-commutativeN/A

      \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\ell, \ell\right), \left({t}^{3} \cdot \color{blue}{{k}^{2}}\right)\right) \]
    5. *-lowering-*.f64N/A

      \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\ell, \ell\right), \mathsf{*.f64}\left(\left({t}^{3}\right), \color{blue}{\left({k}^{2}\right)}\right)\right) \]
    6. cube-multN/A

      \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\ell, \ell\right), \mathsf{*.f64}\left(\left(t \cdot \left(t \cdot t\right)\right), \left({\color{blue}{k}}^{2}\right)\right)\right) \]
    7. unpow2N/A

      \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\ell, \ell\right), \mathsf{*.f64}\left(\left(t \cdot {t}^{2}\right), \left({k}^{2}\right)\right)\right) \]
    8. *-lowering-*.f64N/A

      \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\ell, \ell\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(t, \left({t}^{2}\right)\right), \left({\color{blue}{k}}^{2}\right)\right)\right) \]
    9. unpow2N/A

      \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\ell, \ell\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(t, \left(t \cdot t\right)\right), \left({k}^{2}\right)\right)\right) \]
    10. *-lowering-*.f64N/A

      \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\ell, \ell\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(t, \mathsf{*.f64}\left(t, t\right)\right), \left({k}^{2}\right)\right)\right) \]
    11. unpow2N/A

      \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\ell, \ell\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(t, \mathsf{*.f64}\left(t, t\right)\right), \left(k \cdot \color{blue}{k}\right)\right)\right) \]
    12. *-lowering-*.f6447.9%

      \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\ell, \ell\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(t, \mathsf{*.f64}\left(t, t\right)\right), \mathsf{*.f64}\left(k, \color{blue}{k}\right)\right)\right) \]
  5. Simplified47.9%

    \[\leadsto \color{blue}{\frac{\ell \cdot \ell}{\left(t \cdot \left(t \cdot t\right)\right) \cdot \left(k \cdot k\right)}} \]
  6. Step-by-step derivation
    1. associate-*l*N/A

      \[\leadsto \frac{\ell \cdot \ell}{t \cdot \color{blue}{\left(\left(t \cdot t\right) \cdot \left(k \cdot k\right)\right)}} \]
    2. times-fracN/A

      \[\leadsto \frac{\ell}{t} \cdot \color{blue}{\frac{\ell}{\left(t \cdot t\right) \cdot \left(k \cdot k\right)}} \]
    3. *-lowering-*.f64N/A

      \[\leadsto \mathsf{*.f64}\left(\left(\frac{\ell}{t}\right), \color{blue}{\left(\frac{\ell}{\left(t \cdot t\right) \cdot \left(k \cdot k\right)}\right)}\right) \]
    4. /-lowering-/.f64N/A

      \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(\ell, t\right), \left(\frac{\color{blue}{\ell}}{\left(t \cdot t\right) \cdot \left(k \cdot k\right)}\right)\right) \]
    5. /-lowering-/.f64N/A

      \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(\ell, t\right), \mathsf{/.f64}\left(\ell, \color{blue}{\left(\left(t \cdot t\right) \cdot \left(k \cdot k\right)\right)}\right)\right) \]
    6. *-lowering-*.f64N/A

      \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(\ell, t\right), \mathsf{/.f64}\left(\ell, \mathsf{*.f64}\left(\left(t \cdot t\right), \color{blue}{\left(k \cdot k\right)}\right)\right)\right) \]
    7. *-lowering-*.f64N/A

      \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(\ell, t\right), \mathsf{/.f64}\left(\ell, \mathsf{*.f64}\left(\mathsf{*.f64}\left(t, t\right), \left(\color{blue}{k} \cdot k\right)\right)\right)\right) \]
    8. *-lowering-*.f6457.9%

      \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(\ell, t\right), \mathsf{/.f64}\left(\ell, \mathsf{*.f64}\left(\mathsf{*.f64}\left(t, t\right), \mathsf{*.f64}\left(k, \color{blue}{k}\right)\right)\right)\right) \]
  7. Applied egg-rr57.9%

    \[\leadsto \color{blue}{\frac{\ell}{t} \cdot \frac{\ell}{\left(t \cdot t\right) \cdot \left(k \cdot k\right)}} \]
  8. Step-by-step derivation
    1. associate-*r*N/A

      \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(\ell, t\right), \left(\frac{\ell}{\left(\left(t \cdot t\right) \cdot k\right) \cdot \color{blue}{k}}\right)\right) \]
    2. associate-/r*N/A

      \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(\ell, t\right), \left(\frac{\frac{\ell}{\left(t \cdot t\right) \cdot k}}{\color{blue}{k}}\right)\right) \]
    3. /-lowering-/.f64N/A

      \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(\ell, t\right), \mathsf{/.f64}\left(\left(\frac{\ell}{\left(t \cdot t\right) \cdot k}\right), \color{blue}{k}\right)\right) \]
    4. /-lowering-/.f64N/A

      \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(\ell, t\right), \mathsf{/.f64}\left(\mathsf{/.f64}\left(\ell, \left(\left(t \cdot t\right) \cdot k\right)\right), k\right)\right) \]
    5. associate-*l*N/A

      \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(\ell, t\right), \mathsf{/.f64}\left(\mathsf{/.f64}\left(\ell, \left(t \cdot \left(t \cdot k\right)\right)\right), k\right)\right) \]
    6. *-lowering-*.f64N/A

      \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(\ell, t\right), \mathsf{/.f64}\left(\mathsf{/.f64}\left(\ell, \mathsf{*.f64}\left(t, \left(t \cdot k\right)\right)\right), k\right)\right) \]
    7. *-lowering-*.f6466.3%

      \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(\ell, t\right), \mathsf{/.f64}\left(\mathsf{/.f64}\left(\ell, \mathsf{*.f64}\left(t, \mathsf{*.f64}\left(t, k\right)\right)\right), k\right)\right) \]
  9. Applied egg-rr66.3%

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

Alternative 14: 67.0% accurate, 32.4× speedup?

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

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

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

    \[\leadsto \color{blue}{\frac{{\ell}^{2}}{{k}^{2} \cdot {t}^{3}}} \]
  4. Step-by-step derivation
    1. /-lowering-/.f64N/A

      \[\leadsto \mathsf{/.f64}\left(\left({\ell}^{2}\right), \color{blue}{\left({k}^{2} \cdot {t}^{3}\right)}\right) \]
    2. unpow2N/A

      \[\leadsto \mathsf{/.f64}\left(\left(\ell \cdot \ell\right), \left(\color{blue}{{k}^{2}} \cdot {t}^{3}\right)\right) \]
    3. *-lowering-*.f64N/A

      \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\ell, \ell\right), \left(\color{blue}{{k}^{2}} \cdot {t}^{3}\right)\right) \]
    4. *-commutativeN/A

      \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\ell, \ell\right), \left({t}^{3} \cdot \color{blue}{{k}^{2}}\right)\right) \]
    5. *-lowering-*.f64N/A

      \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\ell, \ell\right), \mathsf{*.f64}\left(\left({t}^{3}\right), \color{blue}{\left({k}^{2}\right)}\right)\right) \]
    6. cube-multN/A

      \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\ell, \ell\right), \mathsf{*.f64}\left(\left(t \cdot \left(t \cdot t\right)\right), \left({\color{blue}{k}}^{2}\right)\right)\right) \]
    7. unpow2N/A

      \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\ell, \ell\right), \mathsf{*.f64}\left(\left(t \cdot {t}^{2}\right), \left({k}^{2}\right)\right)\right) \]
    8. *-lowering-*.f64N/A

      \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\ell, \ell\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(t, \left({t}^{2}\right)\right), \left({\color{blue}{k}}^{2}\right)\right)\right) \]
    9. unpow2N/A

      \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\ell, \ell\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(t, \left(t \cdot t\right)\right), \left({k}^{2}\right)\right)\right) \]
    10. *-lowering-*.f64N/A

      \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\ell, \ell\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(t, \mathsf{*.f64}\left(t, t\right)\right), \left({k}^{2}\right)\right)\right) \]
    11. unpow2N/A

      \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\ell, \ell\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(t, \mathsf{*.f64}\left(t, t\right)\right), \left(k \cdot \color{blue}{k}\right)\right)\right) \]
    12. *-lowering-*.f6447.9%

      \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(\ell, \ell\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(t, \mathsf{*.f64}\left(t, t\right)\right), \mathsf{*.f64}\left(k, \color{blue}{k}\right)\right)\right) \]
  5. Simplified47.9%

    \[\leadsto \color{blue}{\frac{\ell \cdot \ell}{\left(t \cdot \left(t \cdot t\right)\right) \cdot \left(k \cdot k\right)}} \]
  6. Step-by-step derivation
    1. associate-*l*N/A

      \[\leadsto \frac{\ell \cdot \ell}{t \cdot \color{blue}{\left(\left(t \cdot t\right) \cdot \left(k \cdot k\right)\right)}} \]
    2. times-fracN/A

      \[\leadsto \frac{\ell}{t} \cdot \color{blue}{\frac{\ell}{\left(t \cdot t\right) \cdot \left(k \cdot k\right)}} \]
    3. *-lowering-*.f64N/A

      \[\leadsto \mathsf{*.f64}\left(\left(\frac{\ell}{t}\right), \color{blue}{\left(\frac{\ell}{\left(t \cdot t\right) \cdot \left(k \cdot k\right)}\right)}\right) \]
    4. /-lowering-/.f64N/A

      \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(\ell, t\right), \left(\frac{\color{blue}{\ell}}{\left(t \cdot t\right) \cdot \left(k \cdot k\right)}\right)\right) \]
    5. /-lowering-/.f64N/A

      \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(\ell, t\right), \mathsf{/.f64}\left(\ell, \color{blue}{\left(\left(t \cdot t\right) \cdot \left(k \cdot k\right)\right)}\right)\right) \]
    6. *-lowering-*.f64N/A

      \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(\ell, t\right), \mathsf{/.f64}\left(\ell, \mathsf{*.f64}\left(\left(t \cdot t\right), \color{blue}{\left(k \cdot k\right)}\right)\right)\right) \]
    7. *-lowering-*.f64N/A

      \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(\ell, t\right), \mathsf{/.f64}\left(\ell, \mathsf{*.f64}\left(\mathsf{*.f64}\left(t, t\right), \left(\color{blue}{k} \cdot k\right)\right)\right)\right) \]
    8. *-lowering-*.f6457.9%

      \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(\ell, t\right), \mathsf{/.f64}\left(\ell, \mathsf{*.f64}\left(\mathsf{*.f64}\left(t, t\right), \mathsf{*.f64}\left(k, \color{blue}{k}\right)\right)\right)\right) \]
  7. Applied egg-rr57.9%

    \[\leadsto \color{blue}{\frac{\ell}{t} \cdot \frac{\ell}{\left(t \cdot t\right) \cdot \left(k \cdot k\right)}} \]
  8. Step-by-step derivation
    1. unswap-sqrN/A

      \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(\ell, t\right), \mathsf{/.f64}\left(\ell, \left(\left(t \cdot k\right) \cdot \color{blue}{\left(t \cdot k\right)}\right)\right)\right) \]
    2. *-lowering-*.f64N/A

      \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(\ell, t\right), \mathsf{/.f64}\left(\ell, \mathsf{*.f64}\left(\left(t \cdot k\right), \color{blue}{\left(t \cdot k\right)}\right)\right)\right) \]
    3. *-lowering-*.f64N/A

      \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(\ell, t\right), \mathsf{/.f64}\left(\ell, \mathsf{*.f64}\left(\mathsf{*.f64}\left(t, k\right), \left(\color{blue}{t} \cdot k\right)\right)\right)\right) \]
    4. *-lowering-*.f6464.7%

      \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(\ell, t\right), \mathsf{/.f64}\left(\ell, \mathsf{*.f64}\left(\mathsf{*.f64}\left(t, k\right), \mathsf{*.f64}\left(t, \color{blue}{k}\right)\right)\right)\right) \]
  9. Applied egg-rr64.7%

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

Reproduce

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