Toniolo and Linder, Equation (10+)

Percentage Accurate: 54.1% → 86.6%
Time: 17.3s
Alternatives: 16
Speedup: 12.5×

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 16 alternatives:

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

Initial Program: 54.1% 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: 86.6% accurate, 1.3× speedup?

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

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

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


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

    1. Initial program 41.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. lift-/.f64N/A

        \[\leadsto \color{blue}{\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. lift-*.f64N/A

        \[\leadsto \frac{2}{\color{blue}{\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)}} \]
      3. lift-*.f64N/A

        \[\leadsto \frac{2}{\color{blue}{\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)} \]
      4. associate-*l*N/A

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

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

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

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

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

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

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

        \[\leadsto \frac{\color{blue}{\left(2 \cdot {\ell}^{2}\right) \cdot \cos k}}{{k}^{2} \cdot \left(t \cdot {\sin k}^{2}\right)} \]
      4. lower-*.f64N/A

        \[\leadsto \frac{\color{blue}{\left(2 \cdot {\ell}^{2}\right) \cdot \cos k}}{{k}^{2} \cdot \left(t \cdot {\sin k}^{2}\right)} \]
      5. lower-*.f64N/A

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

        \[\leadsto \frac{\left(2 \cdot \color{blue}{\left(\ell \cdot \ell\right)}\right) \cdot \cos k}{{k}^{2} \cdot \left(t \cdot {\sin k}^{2}\right)} \]
      7. lower-*.f64N/A

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

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

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

        \[\leadsto \frac{\left(2 \cdot \left(\ell \cdot \ell\right)\right) \cdot \cos k}{\color{blue}{k \cdot \left(k \cdot \left(t \cdot {\sin k}^{2}\right)\right)}} \]
      11. lower-*.f64N/A

        \[\leadsto \frac{\left(2 \cdot \left(\ell \cdot \ell\right)\right) \cdot \cos k}{\color{blue}{k \cdot \left(k \cdot \left(t \cdot {\sin k}^{2}\right)\right)}} \]
      12. lower-*.f64N/A

        \[\leadsto \frac{\left(2 \cdot \left(\ell \cdot \ell\right)\right) \cdot \cos k}{k \cdot \color{blue}{\left(k \cdot \left(t \cdot {\sin k}^{2}\right)\right)}} \]
      13. lower-*.f64N/A

        \[\leadsto \frac{\left(2 \cdot \left(\ell \cdot \ell\right)\right) \cdot \cos k}{k \cdot \left(k \cdot \color{blue}{\left(t \cdot {\sin k}^{2}\right)}\right)} \]
      14. lower-pow.f64N/A

        \[\leadsto \frac{\left(2 \cdot \left(\ell \cdot \ell\right)\right) \cdot \cos k}{k \cdot \left(k \cdot \left(t \cdot \color{blue}{{\sin k}^{2}}\right)\right)} \]
      15. lower-sin.f6464.9

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

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

    if 4.6999999999999998e-160 < t

    1. Initial program 60.5%

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

        \[\leadsto \frac{2}{\left(\color{blue}{\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. lift-/.f64N/A

        \[\leadsto \frac{2}{\left(\left(\color{blue}{\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)} \]
      3. associate-*l/N/A

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

        \[\leadsto \frac{2}{\left(\color{blue}{\left(\left({t}^{3} \cdot \sin k\right) \cdot \frac{1}{\ell \cdot \ell}\right)} \cdot \tan k\right) \cdot \left(\left(1 + {\left(\frac{k}{t}\right)}^{2}\right) + 1\right)} \]
      5. lift-pow.f64N/A

        \[\leadsto \frac{2}{\left(\left(\left(\color{blue}{{t}^{3}} \cdot \sin k\right) \cdot \frac{1}{\ell \cdot \ell}\right) \cdot \tan k\right) \cdot \left(\left(1 + {\left(\frac{k}{t}\right)}^{2}\right) + 1\right)} \]
      6. cube-multN/A

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

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

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

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

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

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

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

        \[\leadsto \frac{2}{\left(\left(t \cdot \left(\left(t \cdot \color{blue}{\left(t \cdot \sin k\right)}\right) \cdot \frac{1}{\ell \cdot \ell}\right)\right) \cdot \tan k\right) \cdot \left(\left(1 + {\left(\frac{k}{t}\right)}^{2}\right) + 1\right)} \]
      14. lower-/.f6471.4

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \frac{2}{\left(\left(t \cdot \left(\color{blue}{\frac{t \cdot \sin k}{\ell}} \cdot \frac{t}{\ell}\right)\right) \cdot \tan k\right) \cdot \left(\left(1 + {\left(\frac{k}{t}\right)}^{2}\right) + 1\right)} \]
      10. lower-/.f6483.2

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

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

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

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

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

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

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

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

        \[\leadsto \frac{2}{\left(\left(t \cdot \left(\frac{t \cdot \sin k}{\ell} \cdot \frac{t}{\ell}\right)\right) \cdot \tan k\right) \cdot \left(\frac{k}{t} \cdot \frac{k}{t} + \color{blue}{2}\right)} \]
      8. lower-fma.f6483.2

        \[\leadsto \frac{2}{\left(\left(t \cdot \left(\frac{t \cdot \sin k}{\ell} \cdot \frac{t}{\ell}\right)\right) \cdot \tan k\right) \cdot \color{blue}{\mathsf{fma}\left(\frac{k}{t}, \frac{k}{t}, 2\right)}} \]
    8. Applied rewrites83.2%

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

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

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

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if (/.f64 #s(literal 2 binary64) (*.f64 (*.f64 (*.f64 (/.f64 (pow.f64 t #s(literal 3 binary64)) (*.f64 l l)) (sin.f64 k)) (tan.f64 k)) (+.f64 (+.f64 #s(literal 1 binary64) (pow.f64 (/.f64 k t) #s(literal 2 binary64))) #s(literal 1 binary64)))) < 9.9999999999999992e227

    1. Initial program 81.5%

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

        \[\leadsto \frac{2}{\color{blue}{\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. lift-*.f64N/A

        \[\leadsto \frac{2}{\color{blue}{\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)} \]
      3. associate-*l*N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \frac{2}{\left(\left(t \cdot \sin k\right) \cdot \frac{t}{\ell \cdot \ell}\right) \cdot \left(k \cdot \left(\color{blue}{\left({k}^{2} \cdot \left(\frac{2}{3} + \frac{1}{{t}^{2}}\right)\right) \cdot t} + 2 \cdot t\right)\right)} \]
      5. distribute-rgt-outN/A

        \[\leadsto \frac{2}{\left(\left(t \cdot \sin k\right) \cdot \frac{t}{\ell \cdot \ell}\right) \cdot \left(k \cdot \color{blue}{\left(t \cdot \left({k}^{2} \cdot \left(\frac{2}{3} + \frac{1}{{t}^{2}}\right) + 2\right)\right)}\right)} \]
      6. lower-*.f64N/A

        \[\leadsto \frac{2}{\left(\left(t \cdot \sin k\right) \cdot \frac{t}{\ell \cdot \ell}\right) \cdot \left(k \cdot \color{blue}{\left(t \cdot \left({k}^{2} \cdot \left(\frac{2}{3} + \frac{1}{{t}^{2}}\right) + 2\right)\right)}\right)} \]
      7. lower-fma.f64N/A

        \[\leadsto \frac{2}{\left(\left(t \cdot \sin k\right) \cdot \frac{t}{\ell \cdot \ell}\right) \cdot \left(k \cdot \left(t \cdot \color{blue}{\mathsf{fma}\left({k}^{2}, \frac{2}{3} + \frac{1}{{t}^{2}}, 2\right)}\right)\right)} \]
      8. unpow2N/A

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

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

        \[\leadsto \frac{2}{\left(\left(t \cdot \sin k\right) \cdot \frac{t}{\ell \cdot \ell}\right) \cdot \left(k \cdot \left(t \cdot \mathsf{fma}\left(k \cdot k, \color{blue}{\frac{1}{{t}^{2}} + \frac{2}{3}}, 2\right)\right)\right)} \]
      11. lower-+.f64N/A

        \[\leadsto \frac{2}{\left(\left(t \cdot \sin k\right) \cdot \frac{t}{\ell \cdot \ell}\right) \cdot \left(k \cdot \left(t \cdot \mathsf{fma}\left(k \cdot k, \color{blue}{\frac{1}{{t}^{2}} + \frac{2}{3}}, 2\right)\right)\right)} \]
      12. lower-/.f64N/A

        \[\leadsto \frac{2}{\left(\left(t \cdot \sin k\right) \cdot \frac{t}{\ell \cdot \ell}\right) \cdot \left(k \cdot \left(t \cdot \mathsf{fma}\left(k \cdot k, \color{blue}{\frac{1}{{t}^{2}}} + \frac{2}{3}, 2\right)\right)\right)} \]
      13. unpow2N/A

        \[\leadsto \frac{2}{\left(\left(t \cdot \sin k\right) \cdot \frac{t}{\ell \cdot \ell}\right) \cdot \left(k \cdot \left(t \cdot \mathsf{fma}\left(k \cdot k, \frac{1}{\color{blue}{t \cdot t}} + \frac{2}{3}, 2\right)\right)\right)} \]
      14. lower-*.f6484.4

        \[\leadsto \frac{2}{\left(\left(t \cdot \sin k\right) \cdot \frac{t}{\ell \cdot \ell}\right) \cdot \left(k \cdot \left(t \cdot \mathsf{fma}\left(k \cdot k, \frac{1}{\color{blue}{t \cdot t}} + 0.6666666666666666, 2\right)\right)\right)} \]
    8. Applied rewrites84.4%

      \[\leadsto \frac{2}{\left(\left(t \cdot \sin k\right) \cdot \frac{t}{\ell \cdot \ell}\right) \cdot \color{blue}{\left(k \cdot \left(t \cdot \mathsf{fma}\left(k \cdot k, \frac{1}{t \cdot t} + 0.6666666666666666, 2\right)\right)\right)}} \]

    if 9.9999999999999992e227 < (/.f64 #s(literal 2 binary64) (*.f64 (*.f64 (*.f64 (/.f64 (pow.f64 t #s(literal 3 binary64)) (*.f64 l l)) (sin.f64 k)) (tan.f64 k)) (+.f64 (+.f64 #s(literal 1 binary64) (pow.f64 (/.f64 k t) #s(literal 2 binary64))) #s(literal 1 binary64))))

    1. Initial program 17.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. lower-/.f64N/A

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

        \[\leadsto \frac{\color{blue}{\ell \cdot \ell}}{{k}^{2} \cdot {t}^{3}} \]
      3. lower-*.f64N/A

        \[\leadsto \frac{\color{blue}{\ell \cdot \ell}}{{k}^{2} \cdot {t}^{3}} \]
      4. *-commutativeN/A

        \[\leadsto \frac{\ell \cdot \ell}{\color{blue}{{t}^{3} \cdot {k}^{2}}} \]
      5. lower-*.f64N/A

        \[\leadsto \frac{\ell \cdot \ell}{\color{blue}{{t}^{3} \cdot {k}^{2}}} \]
      6. cube-multN/A

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

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

        \[\leadsto \frac{\ell \cdot \ell}{\color{blue}{\left(t \cdot {t}^{2}\right)} \cdot {k}^{2}} \]
      9. unpow2N/A

        \[\leadsto \frac{\ell \cdot \ell}{\left(t \cdot \color{blue}{\left(t \cdot t\right)}\right) \cdot {k}^{2}} \]
      10. lower-*.f64N/A

        \[\leadsto \frac{\ell \cdot \ell}{\left(t \cdot \color{blue}{\left(t \cdot t\right)}\right) \cdot {k}^{2}} \]
      11. unpow2N/A

        \[\leadsto \frac{\ell \cdot \ell}{\left(t \cdot \left(t \cdot t\right)\right) \cdot \color{blue}{\left(k \cdot k\right)}} \]
      12. lower-*.f6429.0

        \[\leadsto \frac{\ell \cdot \ell}{\left(t \cdot \left(t \cdot t\right)\right) \cdot \color{blue}{\left(k \cdot k\right)}} \]
    5. Applied rewrites29.0%

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

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

      \[\leadsto \begin{array}{l} \mathbf{if}\;\frac{2}{\left(\tan k \cdot \left(\sin k \cdot \frac{{t}^{3}}{\ell \cdot \ell}\right)\right) \cdot \left(1 + \left(1 + {\left(\frac{k}{t}\right)}^{2}\right)\right)} \leq 10^{+228}:\\ \;\;\;\;\frac{2}{\left(\left(t \cdot \sin k\right) \cdot \frac{t}{\ell \cdot \ell}\right) \cdot \left(k \cdot \left(t \cdot \mathsf{fma}\left(k \cdot k, \frac{1}{t \cdot t} + 0.6666666666666666, 2\right)\right)\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{\ell}{t} \cdot \frac{\ell}{t \cdot \left(t \cdot \left(k \cdot k\right)\right)}\\ \end{array} \]
    9. Add Preprocessing

    Alternative 3: 84.5% accurate, 1.3× speedup?

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

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

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

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

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

          \[\leadsto \frac{\color{blue}{\left(2 \cdot {\ell}^{2}\right) \cdot \cos k}}{{k}^{2} \cdot \left(t \cdot {\sin k}^{2}\right)} \]
        4. lower-*.f64N/A

          \[\leadsto \frac{\color{blue}{\left(2 \cdot {\ell}^{2}\right) \cdot \cos k}}{{k}^{2} \cdot \left(t \cdot {\sin k}^{2}\right)} \]
        5. lower-*.f64N/A

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

          \[\leadsto \frac{\left(2 \cdot \color{blue}{\left(\ell \cdot \ell\right)}\right) \cdot \cos k}{{k}^{2} \cdot \left(t \cdot {\sin k}^{2}\right)} \]
        7. lower-*.f64N/A

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

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

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

          \[\leadsto \frac{\left(2 \cdot \left(\ell \cdot \ell\right)\right) \cdot \cos k}{\color{blue}{{\sin k}^{2} \cdot \left({k}^{2} \cdot t\right)}} \]
        11. lower-*.f64N/A

          \[\leadsto \frac{\left(2 \cdot \left(\ell \cdot \ell\right)\right) \cdot \cos k}{\color{blue}{{\sin k}^{2} \cdot \left({k}^{2} \cdot t\right)}} \]
        12. lower-pow.f64N/A

          \[\leadsto \frac{\left(2 \cdot \left(\ell \cdot \ell\right)\right) \cdot \cos k}{\color{blue}{{\sin k}^{2}} \cdot \left({k}^{2} \cdot t\right)} \]
        13. lower-sin.f64N/A

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

          \[\leadsto \frac{\left(2 \cdot \left(\ell \cdot \ell\right)\right) \cdot \cos k}{{\sin k}^{2} \cdot \color{blue}{\left(t \cdot {k}^{2}\right)}} \]
        15. lower-*.f64N/A

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

          \[\leadsto \frac{\left(2 \cdot \left(\ell \cdot \ell\right)\right) \cdot \cos k}{{\sin k}^{2} \cdot \left(t \cdot \color{blue}{\left(k \cdot k\right)}\right)} \]
        17. lower-*.f6462.2

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

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

      if 4.30000000000000014e-160 < t

      1. Initial program 60.5%

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

          \[\leadsto \frac{2}{\left(\color{blue}{\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. lift-/.f64N/A

          \[\leadsto \frac{2}{\left(\left(\color{blue}{\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)} \]
        3. associate-*l/N/A

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

          \[\leadsto \frac{2}{\left(\color{blue}{\left(\left({t}^{3} \cdot \sin k\right) \cdot \frac{1}{\ell \cdot \ell}\right)} \cdot \tan k\right) \cdot \left(\left(1 + {\left(\frac{k}{t}\right)}^{2}\right) + 1\right)} \]
        5. lift-pow.f64N/A

          \[\leadsto \frac{2}{\left(\left(\left(\color{blue}{{t}^{3}} \cdot \sin k\right) \cdot \frac{1}{\ell \cdot \ell}\right) \cdot \tan k\right) \cdot \left(\left(1 + {\left(\frac{k}{t}\right)}^{2}\right) + 1\right)} \]
        6. cube-multN/A

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

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

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

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

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

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

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

          \[\leadsto \frac{2}{\left(\left(t \cdot \left(\left(t \cdot \color{blue}{\left(t \cdot \sin k\right)}\right) \cdot \frac{1}{\ell \cdot \ell}\right)\right) \cdot \tan k\right) \cdot \left(\left(1 + {\left(\frac{k}{t}\right)}^{2}\right) + 1\right)} \]
        14. lower-/.f6471.4

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

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

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

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

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

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

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

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

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

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

          \[\leadsto \frac{2}{\left(\left(t \cdot \left(\color{blue}{\frac{t \cdot \sin k}{\ell}} \cdot \frac{t}{\ell}\right)\right) \cdot \tan k\right) \cdot \left(\left(1 + {\left(\frac{k}{t}\right)}^{2}\right) + 1\right)} \]
        10. lower-/.f6483.2

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

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

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

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

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

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

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

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

          \[\leadsto \frac{2}{\left(\left(t \cdot \left(\frac{t \cdot \sin k}{\ell} \cdot \frac{t}{\ell}\right)\right) \cdot \tan k\right) \cdot \left(\frac{k}{t} \cdot \frac{k}{t} + \color{blue}{2}\right)} \]
        8. lower-fma.f6483.2

          \[\leadsto \frac{2}{\left(\left(t \cdot \left(\frac{t \cdot \sin k}{\ell} \cdot \frac{t}{\ell}\right)\right) \cdot \tan k\right) \cdot \color{blue}{\mathsf{fma}\left(\frac{k}{t}, \frac{k}{t}, 2\right)}} \]
      8. Applied rewrites83.2%

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

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

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

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

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

    Alternative 4: 72.4% accurate, 1.6× speedup?

    \[\begin{array}{l} t\_m = \left|t\right| \\ t\_s = \mathsf{copysign}\left(1, t\right) \\ \begin{array}{l} t_2 := t\_m \cdot \sin k\\ t\_s \cdot \begin{array}{l} \mathbf{if}\;\ell \leq 2.6 \cdot 10^{-118}:\\ \;\;\;\;\frac{2}{\left(\tan k \cdot \left(t\_m \cdot \left(\frac{t\_m}{\ell} \cdot \left(k \cdot \frac{t\_m}{\ell}\right)\right)\right)\right) \cdot \mathsf{fma}\left(\frac{k}{t\_m}, \frac{k}{t\_m}, 2\right)}\\ \mathbf{elif}\;\ell \leq 2.3 \cdot 10^{+108}:\\ \;\;\;\;\frac{2}{t\_m \cdot \left(\left(\tan k \cdot \mathsf{fma}\left(k, \frac{k}{t\_m \cdot t\_m}, 2\right)\right) \cdot \left(t\_2 \cdot \frac{t\_m}{\ell \cdot \ell}\right)\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{2}{\left(\tan k \cdot \left(t\_m \cdot \left(\frac{t\_2}{\ell} \cdot \frac{t\_m}{\ell}\right)\right)\right) \cdot 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 (* t_m (sin k))))
       (*
        t_s
        (if (<= l 2.6e-118)
          (/
           2.0
           (*
            (* (tan k) (* t_m (* (/ t_m l) (* k (/ t_m l)))))
            (fma (/ k t_m) (/ k t_m) 2.0)))
          (if (<= l 2.3e+108)
            (/
             2.0
             (*
              t_m
              (*
               (* (tan k) (fma k (/ k (* t_m t_m)) 2.0))
               (* t_2 (/ t_m (* l l))))))
            (/ 2.0 (* (* (tan k) (* t_m (* (/ t_2 l) (/ t_m l)))) 2.0)))))))
    t\_m = fabs(t);
    t\_s = copysign(1.0, t);
    double code(double t_s, double t_m, double l, double k) {
    	double t_2 = t_m * sin(k);
    	double tmp;
    	if (l <= 2.6e-118) {
    		tmp = 2.0 / ((tan(k) * (t_m * ((t_m / l) * (k * (t_m / l))))) * fma((k / t_m), (k / t_m), 2.0));
    	} else if (l <= 2.3e+108) {
    		tmp = 2.0 / (t_m * ((tan(k) * fma(k, (k / (t_m * t_m)), 2.0)) * (t_2 * (t_m / (l * l)))));
    	} else {
    		tmp = 2.0 / ((tan(k) * (t_m * ((t_2 / l) * (t_m / l)))) * 2.0);
    	}
    	return t_s * tmp;
    }
    
    t\_m = abs(t)
    t\_s = copysign(1.0, t)
    function code(t_s, t_m, l, k)
    	t_2 = Float64(t_m * sin(k))
    	tmp = 0.0
    	if (l <= 2.6e-118)
    		tmp = Float64(2.0 / Float64(Float64(tan(k) * Float64(t_m * Float64(Float64(t_m / l) * Float64(k * Float64(t_m / l))))) * fma(Float64(k / t_m), Float64(k / t_m), 2.0)));
    	elseif (l <= 2.3e+108)
    		tmp = Float64(2.0 / Float64(t_m * Float64(Float64(tan(k) * fma(k, Float64(k / Float64(t_m * t_m)), 2.0)) * Float64(t_2 * Float64(t_m / Float64(l * l))))));
    	else
    		tmp = Float64(2.0 / Float64(Float64(tan(k) * Float64(t_m * Float64(Float64(t_2 / l) * Float64(t_m / l)))) * 2.0));
    	end
    	return Float64(t_s * tmp)
    end
    
    t\_m = N[Abs[t], $MachinePrecision]
    t\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[t]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
    code[t$95$s_, t$95$m_, l_, k_] := Block[{t$95$2 = N[(t$95$m * N[Sin[k], $MachinePrecision]), $MachinePrecision]}, N[(t$95$s * If[LessEqual[l, 2.6e-118], N[(2.0 / N[(N[(N[Tan[k], $MachinePrecision] * N[(t$95$m * N[(N[(t$95$m / l), $MachinePrecision] * N[(k * N[(t$95$m / l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(N[(k / t$95$m), $MachinePrecision] * N[(k / t$95$m), $MachinePrecision] + 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[l, 2.3e+108], N[(2.0 / N[(t$95$m * N[(N[(N[Tan[k], $MachinePrecision] * N[(k * N[(k / N[(t$95$m * t$95$m), $MachinePrecision]), $MachinePrecision] + 2.0), $MachinePrecision]), $MachinePrecision] * N[(t$95$2 * N[(t$95$m / N[(l * l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(2.0 / N[(N[(N[Tan[k], $MachinePrecision] * N[(t$95$m * N[(N[(t$95$2 / l), $MachinePrecision] * N[(t$95$m / l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * 2.0), $MachinePrecision]), $MachinePrecision]]]), $MachinePrecision]]
    
    \begin{array}{l}
    t\_m = \left|t\right|
    \\
    t\_s = \mathsf{copysign}\left(1, t\right)
    
    \\
    \begin{array}{l}
    t_2 := t\_m \cdot \sin k\\
    t\_s \cdot \begin{array}{l}
    \mathbf{if}\;\ell \leq 2.6 \cdot 10^{-118}:\\
    \;\;\;\;\frac{2}{\left(\tan k \cdot \left(t\_m \cdot \left(\frac{t\_m}{\ell} \cdot \left(k \cdot \frac{t\_m}{\ell}\right)\right)\right)\right) \cdot \mathsf{fma}\left(\frac{k}{t\_m}, \frac{k}{t\_m}, 2\right)}\\
    
    \mathbf{elif}\;\ell \leq 2.3 \cdot 10^{+108}:\\
    \;\;\;\;\frac{2}{t\_m \cdot \left(\left(\tan k \cdot \mathsf{fma}\left(k, \frac{k}{t\_m \cdot t\_m}, 2\right)\right) \cdot \left(t\_2 \cdot \frac{t\_m}{\ell \cdot \ell}\right)\right)}\\
    
    \mathbf{else}:\\
    \;\;\;\;\frac{2}{\left(\tan k \cdot \left(t\_m \cdot \left(\frac{t\_2}{\ell} \cdot \frac{t\_m}{\ell}\right)\right)\right) \cdot 2}\\
    
    
    \end{array}
    \end{array}
    \end{array}
    
    Derivation
    1. Split input into 3 regimes
    2. if l < 2.6e-118

      1. Initial program 51.5%

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

          \[\leadsto \frac{2}{\left(\color{blue}{\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. lift-/.f64N/A

          \[\leadsto \frac{2}{\left(\left(\color{blue}{\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)} \]
        3. associate-*l/N/A

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

          \[\leadsto \frac{2}{\left(\color{blue}{\left(\left({t}^{3} \cdot \sin k\right) \cdot \frac{1}{\ell \cdot \ell}\right)} \cdot \tan k\right) \cdot \left(\left(1 + {\left(\frac{k}{t}\right)}^{2}\right) + 1\right)} \]
        5. lift-pow.f64N/A

          \[\leadsto \frac{2}{\left(\left(\left(\color{blue}{{t}^{3}} \cdot \sin k\right) \cdot \frac{1}{\ell \cdot \ell}\right) \cdot \tan k\right) \cdot \left(\left(1 + {\left(\frac{k}{t}\right)}^{2}\right) + 1\right)} \]
        6. cube-multN/A

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

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

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

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

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

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

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

          \[\leadsto \frac{2}{\left(\left(t \cdot \left(\left(t \cdot \color{blue}{\left(t \cdot \sin k\right)}\right) \cdot \frac{1}{\ell \cdot \ell}\right)\right) \cdot \tan k\right) \cdot \left(\left(1 + {\left(\frac{k}{t}\right)}^{2}\right) + 1\right)} \]
        14. lower-/.f6463.5

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

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

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

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

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

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

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

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

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

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

          \[\leadsto \frac{2}{\left(\left(t \cdot \left(\color{blue}{\frac{t \cdot \sin k}{\ell}} \cdot \frac{t}{\ell}\right)\right) \cdot \tan k\right) \cdot \left(\left(1 + {\left(\frac{k}{t}\right)}^{2}\right) + 1\right)} \]
        10. lower-/.f6478.3

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

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

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

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

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

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

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

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

          \[\leadsto \frac{2}{\left(\left(t \cdot \left(\frac{t \cdot \sin k}{\ell} \cdot \frac{t}{\ell}\right)\right) \cdot \tan k\right) \cdot \left(\frac{k}{t} \cdot \frac{k}{t} + \color{blue}{2}\right)} \]
        8. lower-fma.f6478.3

          \[\leadsto \frac{2}{\left(\left(t \cdot \left(\frac{t \cdot \sin k}{\ell} \cdot \frac{t}{\ell}\right)\right) \cdot \tan k\right) \cdot \color{blue}{\mathsf{fma}\left(\frac{k}{t}, \frac{k}{t}, 2\right)}} \]
      8. Applied rewrites78.3%

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

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

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

          \[\leadsto \frac{2}{\left(\left(t \cdot \left(\color{blue}{\left(k \cdot \frac{t}{\ell}\right)} \cdot \frac{t}{\ell}\right)\right) \cdot \tan k\right) \cdot \mathsf{fma}\left(\frac{k}{t}, \frac{k}{t}, 2\right)} \]
        3. lower-/.f6475.6

          \[\leadsto \frac{2}{\left(\left(t \cdot \left(\left(k \cdot \color{blue}{\frac{t}{\ell}}\right) \cdot \frac{t}{\ell}\right)\right) \cdot \tan k\right) \cdot \mathsf{fma}\left(\frac{k}{t}, \frac{k}{t}, 2\right)} \]
      11. Applied rewrites75.6%

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

      if 2.6e-118 < l < 2.2999999999999999e108

      1. Initial program 70.7%

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

          \[\leadsto \frac{2}{\color{blue}{\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. lift-*.f64N/A

          \[\leadsto \frac{2}{\color{blue}{\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)} \]
        3. associate-*l*N/A

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

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

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

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

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

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

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

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

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

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

      if 2.2999999999999999e108 < l

      1. Initial program 20.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. lift-*.f64N/A

          \[\leadsto \frac{2}{\left(\color{blue}{\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. lift-/.f64N/A

          \[\leadsto \frac{2}{\left(\left(\color{blue}{\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)} \]
        3. associate-*l/N/A

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

          \[\leadsto \frac{2}{\left(\color{blue}{\left(\left({t}^{3} \cdot \sin k\right) \cdot \frac{1}{\ell \cdot \ell}\right)} \cdot \tan k\right) \cdot \left(\left(1 + {\left(\frac{k}{t}\right)}^{2}\right) + 1\right)} \]
        5. lift-pow.f64N/A

          \[\leadsto \frac{2}{\left(\left(\left(\color{blue}{{t}^{3}} \cdot \sin k\right) \cdot \frac{1}{\ell \cdot \ell}\right) \cdot \tan k\right) \cdot \left(\left(1 + {\left(\frac{k}{t}\right)}^{2}\right) + 1\right)} \]
        6. cube-multN/A

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

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

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

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

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

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

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

          \[\leadsto \frac{2}{\left(\left(t \cdot \left(\left(t \cdot \color{blue}{\left(t \cdot \sin k\right)}\right) \cdot \frac{1}{\ell \cdot \ell}\right)\right) \cdot \tan k\right) \cdot \left(\left(1 + {\left(\frac{k}{t}\right)}^{2}\right) + 1\right)} \]
        14. lower-/.f6430.6

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

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

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

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

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

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

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

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

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

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

          \[\leadsto \frac{2}{\left(\left(t \cdot \left(\color{blue}{\frac{t \cdot \sin k}{\ell}} \cdot \frac{t}{\ell}\right)\right) \cdot \tan k\right) \cdot \left(\left(1 + {\left(\frac{k}{t}\right)}^{2}\right) + 1\right)} \]
        10. lower-/.f6448.0

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

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

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

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

        \[\leadsto \begin{array}{l} \mathbf{if}\;\ell \leq 2.6 \cdot 10^{-118}:\\ \;\;\;\;\frac{2}{\left(\tan k \cdot \left(t \cdot \left(\frac{t}{\ell} \cdot \left(k \cdot \frac{t}{\ell}\right)\right)\right)\right) \cdot \mathsf{fma}\left(\frac{k}{t}, \frac{k}{t}, 2\right)}\\ \mathbf{elif}\;\ell \leq 2.3 \cdot 10^{+108}:\\ \;\;\;\;\frac{2}{t \cdot \left(\left(\tan k \cdot \mathsf{fma}\left(k, \frac{k}{t \cdot t}, 2\right)\right) \cdot \left(\left(t \cdot \sin k\right) \cdot \frac{t}{\ell \cdot \ell}\right)\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{2}{\left(\tan k \cdot \left(t \cdot \left(\frac{t \cdot \sin k}{\ell} \cdot \frac{t}{\ell}\right)\right)\right) \cdot 2}\\ \end{array} \]
      11. Add Preprocessing

      Alternative 5: 81.5% accurate, 1.6× speedup?

      \[\begin{array}{l} t\_m = \left|t\right| \\ t\_s = \mathsf{copysign}\left(1, t\right) \\ t\_s \cdot \begin{array}{l} \mathbf{if}\;t\_m \leq 3.2 \cdot 10^{-160}:\\ \;\;\;\;\frac{\ell}{t\_m \cdot \frac{t\_m \cdot \left(t\_m \cdot \left(k \cdot k\right)\right)}{\ell}}\\ \mathbf{else}:\\ \;\;\;\;\frac{2}{\left(t\_m \cdot \frac{t\_m \cdot \sin k}{\ell}\right) \cdot \left(\frac{t\_m}{\ell} \cdot \left(\tan k \cdot \mathsf{fma}\left(k, \frac{k}{t\_m \cdot t\_m}, 2\right)\right)\right)}\\ \end{array} \end{array} \]
      t\_m = (fabs.f64 t)
      t\_s = (copysign.f64 #s(literal 1 binary64) t)
      (FPCore (t_s t_m l k)
       :precision binary64
       (*
        t_s
        (if (<= t_m 3.2e-160)
          (/ l (* t_m (/ (* t_m (* t_m (* k k))) l)))
          (/
           2.0
           (*
            (* t_m (/ (* t_m (sin k)) l))
            (* (/ t_m l) (* (tan k) (fma k (/ k (* t_m t_m)) 2.0))))))))
      t\_m = fabs(t);
      t\_s = copysign(1.0, t);
      double code(double t_s, double t_m, double l, double k) {
      	double tmp;
      	if (t_m <= 3.2e-160) {
      		tmp = l / (t_m * ((t_m * (t_m * (k * k))) / l));
      	} else {
      		tmp = 2.0 / ((t_m * ((t_m * sin(k)) / l)) * ((t_m / l) * (tan(k) * fma(k, (k / (t_m * t_m)), 2.0))));
      	}
      	return t_s * tmp;
      }
      
      t\_m = abs(t)
      t\_s = copysign(1.0, t)
      function code(t_s, t_m, l, k)
      	tmp = 0.0
      	if (t_m <= 3.2e-160)
      		tmp = Float64(l / Float64(t_m * Float64(Float64(t_m * Float64(t_m * Float64(k * k))) / l)));
      	else
      		tmp = Float64(2.0 / Float64(Float64(t_m * Float64(Float64(t_m * sin(k)) / l)) * Float64(Float64(t_m / l) * Float64(tan(k) * fma(k, Float64(k / Float64(t_m * t_m)), 2.0)))));
      	end
      	return Float64(t_s * tmp)
      end
      
      t\_m = N[Abs[t], $MachinePrecision]
      t\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[t]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
      code[t$95$s_, t$95$m_, l_, k_] := N[(t$95$s * If[LessEqual[t$95$m, 3.2e-160], N[(l / N[(t$95$m * N[(N[(t$95$m * N[(t$95$m * N[(k * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(2.0 / N[(N[(t$95$m * N[(N[(t$95$m * N[Sin[k], $MachinePrecision]), $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision] * N[(N[(t$95$m / l), $MachinePrecision] * N[(N[Tan[k], $MachinePrecision] * N[(k * N[(k / N[(t$95$m * t$95$m), $MachinePrecision]), $MachinePrecision] + 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]), $MachinePrecision]
      
      \begin{array}{l}
      t\_m = \left|t\right|
      \\
      t\_s = \mathsf{copysign}\left(1, t\right)
      
      \\
      t\_s \cdot \begin{array}{l}
      \mathbf{if}\;t\_m \leq 3.2 \cdot 10^{-160}:\\
      \;\;\;\;\frac{\ell}{t\_m \cdot \frac{t\_m \cdot \left(t\_m \cdot \left(k \cdot k\right)\right)}{\ell}}\\
      
      \mathbf{else}:\\
      \;\;\;\;\frac{2}{\left(t\_m \cdot \frac{t\_m \cdot \sin k}{\ell}\right) \cdot \left(\frac{t\_m}{\ell} \cdot \left(\tan k \cdot \mathsf{fma}\left(k, \frac{k}{t\_m \cdot t\_m}, 2\right)\right)\right)}\\
      
      
      \end{array}
      \end{array}
      
      Derivation
      1. Split input into 2 regimes
      2. if t < 3.20000000000000009e-160

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

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

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

            \[\leadsto \frac{\color{blue}{\ell \cdot \ell}}{{k}^{2} \cdot {t}^{3}} \]
          3. lower-*.f64N/A

            \[\leadsto \frac{\color{blue}{\ell \cdot \ell}}{{k}^{2} \cdot {t}^{3}} \]
          4. *-commutativeN/A

            \[\leadsto \frac{\ell \cdot \ell}{\color{blue}{{t}^{3} \cdot {k}^{2}}} \]
          5. lower-*.f64N/A

            \[\leadsto \frac{\ell \cdot \ell}{\color{blue}{{t}^{3} \cdot {k}^{2}}} \]
          6. cube-multN/A

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

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

            \[\leadsto \frac{\ell \cdot \ell}{\color{blue}{\left(t \cdot {t}^{2}\right)} \cdot {k}^{2}} \]
          9. unpow2N/A

            \[\leadsto \frac{\ell \cdot \ell}{\left(t \cdot \color{blue}{\left(t \cdot t\right)}\right) \cdot {k}^{2}} \]
          10. lower-*.f64N/A

            \[\leadsto \frac{\ell \cdot \ell}{\left(t \cdot \color{blue}{\left(t \cdot t\right)}\right) \cdot {k}^{2}} \]
          11. unpow2N/A

            \[\leadsto \frac{\ell \cdot \ell}{\left(t \cdot \left(t \cdot t\right)\right) \cdot \color{blue}{\left(k \cdot k\right)}} \]
          12. lower-*.f6444.3

            \[\leadsto \frac{\ell \cdot \ell}{\left(t \cdot \left(t \cdot t\right)\right) \cdot \color{blue}{\left(k \cdot k\right)}} \]
        5. Applied rewrites44.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. Applied rewrites60.2%

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

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

            if 3.20000000000000009e-160 < t

            1. Initial program 60.5%

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

                \[\leadsto \frac{2}{\left(\color{blue}{\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. lift-/.f64N/A

                \[\leadsto \frac{2}{\left(\left(\color{blue}{\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)} \]
              3. associate-*l/N/A

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

                \[\leadsto \frac{2}{\left(\color{blue}{\left(\left({t}^{3} \cdot \sin k\right) \cdot \frac{1}{\ell \cdot \ell}\right)} \cdot \tan k\right) \cdot \left(\left(1 + {\left(\frac{k}{t}\right)}^{2}\right) + 1\right)} \]
              5. lift-pow.f64N/A

                \[\leadsto \frac{2}{\left(\left(\left(\color{blue}{{t}^{3}} \cdot \sin k\right) \cdot \frac{1}{\ell \cdot \ell}\right) \cdot \tan k\right) \cdot \left(\left(1 + {\left(\frac{k}{t}\right)}^{2}\right) + 1\right)} \]
              6. cube-multN/A

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

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

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

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

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

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

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

                \[\leadsto \frac{2}{\left(\left(t \cdot \left(\left(t \cdot \color{blue}{\left(t \cdot \sin k\right)}\right) \cdot \frac{1}{\ell \cdot \ell}\right)\right) \cdot \tan k\right) \cdot \left(\left(1 + {\left(\frac{k}{t}\right)}^{2}\right) + 1\right)} \]
              14. lower-/.f6471.4

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

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

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

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

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

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

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

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

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

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

                \[\leadsto \frac{2}{\left(\left(t \cdot \left(\color{blue}{\frac{t \cdot \sin k}{\ell}} \cdot \frac{t}{\ell}\right)\right) \cdot \tan k\right) \cdot \left(\left(1 + {\left(\frac{k}{t}\right)}^{2}\right) + 1\right)} \]
              10. lower-/.f6483.2

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

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

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

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

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

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

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

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

                \[\leadsto \frac{2}{\left(\left(t \cdot \left(\frac{t \cdot \sin k}{\ell} \cdot \frac{t}{\ell}\right)\right) \cdot \tan k\right) \cdot \left(\frac{k}{t} \cdot \frac{k}{t} + \color{blue}{2}\right)} \]
              8. lower-fma.f6483.2

                \[\leadsto \frac{2}{\left(\left(t \cdot \left(\frac{t \cdot \sin k}{\ell} \cdot \frac{t}{\ell}\right)\right) \cdot \tan k\right) \cdot \color{blue}{\mathsf{fma}\left(\frac{k}{t}, \frac{k}{t}, 2\right)}} \]
            8. Applied rewrites83.2%

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

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

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

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

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

          Alternative 6: 73.1% accurate, 1.7× 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}\;\ell \leq 2.9 \cdot 10^{-22}:\\ \;\;\;\;\frac{2}{\left(\tan k \cdot \left(t\_m \cdot \left(\frac{t\_m}{\ell} \cdot \left(k \cdot \frac{t\_m}{\ell}\right)\right)\right)\right) \cdot \mathsf{fma}\left(\frac{k}{t\_m}, \frac{k}{t\_m}, 2\right)}\\ \mathbf{elif}\;\ell \leq 4.8 \cdot 10^{+106}:\\ \;\;\;\;\frac{\frac{\ell \cdot \ell}{k \cdot \left(t\_m \cdot \left(t\_m \cdot k\right)\right)}}{t\_m}\\ \mathbf{else}:\\ \;\;\;\;\frac{2}{\left(\tan k \cdot \left(t\_m \cdot \left(\frac{t\_m \cdot \sin k}{\ell} \cdot \frac{t\_m}{\ell}\right)\right)\right) \cdot 2}\\ \end{array} \end{array} \]
          t\_m = (fabs.f64 t)
          t\_s = (copysign.f64 #s(literal 1 binary64) t)
          (FPCore (t_s t_m l k)
           :precision binary64
           (*
            t_s
            (if (<= l 2.9e-22)
              (/
               2.0
               (*
                (* (tan k) (* t_m (* (/ t_m l) (* k (/ t_m l)))))
                (fma (/ k t_m) (/ k t_m) 2.0)))
              (if (<= l 4.8e+106)
                (/ (/ (* l l) (* k (* t_m (* t_m k)))) t_m)
                (/
                 2.0
                 (* (* (tan k) (* t_m (* (/ (* t_m (sin k)) l) (/ t_m l)))) 2.0))))))
          t\_m = fabs(t);
          t\_s = copysign(1.0, t);
          double code(double t_s, double t_m, double l, double k) {
          	double tmp;
          	if (l <= 2.9e-22) {
          		tmp = 2.0 / ((tan(k) * (t_m * ((t_m / l) * (k * (t_m / l))))) * fma((k / t_m), (k / t_m), 2.0));
          	} else if (l <= 4.8e+106) {
          		tmp = ((l * l) / (k * (t_m * (t_m * k)))) / t_m;
          	} else {
          		tmp = 2.0 / ((tan(k) * (t_m * (((t_m * sin(k)) / l) * (t_m / l)))) * 2.0);
          	}
          	return t_s * tmp;
          }
          
          t\_m = abs(t)
          t\_s = copysign(1.0, t)
          function code(t_s, t_m, l, k)
          	tmp = 0.0
          	if (l <= 2.9e-22)
          		tmp = Float64(2.0 / Float64(Float64(tan(k) * Float64(t_m * Float64(Float64(t_m / l) * Float64(k * Float64(t_m / l))))) * fma(Float64(k / t_m), Float64(k / t_m), 2.0)));
          	elseif (l <= 4.8e+106)
          		tmp = Float64(Float64(Float64(l * l) / Float64(k * Float64(t_m * Float64(t_m * k)))) / t_m);
          	else
          		tmp = Float64(2.0 / Float64(Float64(tan(k) * Float64(t_m * Float64(Float64(Float64(t_m * sin(k)) / l) * Float64(t_m / l)))) * 2.0));
          	end
          	return Float64(t_s * tmp)
          end
          
          t\_m = N[Abs[t], $MachinePrecision]
          t\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[t]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
          code[t$95$s_, t$95$m_, l_, k_] := N[(t$95$s * If[LessEqual[l, 2.9e-22], N[(2.0 / N[(N[(N[Tan[k], $MachinePrecision] * N[(t$95$m * N[(N[(t$95$m / l), $MachinePrecision] * N[(k * N[(t$95$m / l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(N[(k / t$95$m), $MachinePrecision] * N[(k / t$95$m), $MachinePrecision] + 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[l, 4.8e+106], N[(N[(N[(l * l), $MachinePrecision] / N[(k * N[(t$95$m * N[(t$95$m * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / t$95$m), $MachinePrecision], N[(2.0 / N[(N[(N[Tan[k], $MachinePrecision] * N[(t$95$m * N[(N[(N[(t$95$m * N[Sin[k], $MachinePrecision]), $MachinePrecision] / l), $MachinePrecision] * N[(t$95$m / l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * 2.0), $MachinePrecision]), $MachinePrecision]]]), $MachinePrecision]
          
          \begin{array}{l}
          t\_m = \left|t\right|
          \\
          t\_s = \mathsf{copysign}\left(1, t\right)
          
          \\
          t\_s \cdot \begin{array}{l}
          \mathbf{if}\;\ell \leq 2.9 \cdot 10^{-22}:\\
          \;\;\;\;\frac{2}{\left(\tan k \cdot \left(t\_m \cdot \left(\frac{t\_m}{\ell} \cdot \left(k \cdot \frac{t\_m}{\ell}\right)\right)\right)\right) \cdot \mathsf{fma}\left(\frac{k}{t\_m}, \frac{k}{t\_m}, 2\right)}\\
          
          \mathbf{elif}\;\ell \leq 4.8 \cdot 10^{+106}:\\
          \;\;\;\;\frac{\frac{\ell \cdot \ell}{k \cdot \left(t\_m \cdot \left(t\_m \cdot k\right)\right)}}{t\_m}\\
          
          \mathbf{else}:\\
          \;\;\;\;\frac{2}{\left(\tan k \cdot \left(t\_m \cdot \left(\frac{t\_m \cdot \sin k}{\ell} \cdot \frac{t\_m}{\ell}\right)\right)\right) \cdot 2}\\
          
          
          \end{array}
          \end{array}
          
          Derivation
          1. Split input into 3 regimes
          2. if l < 2.9000000000000002e-22

            1. Initial program 52.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. lift-*.f64N/A

                \[\leadsto \frac{2}{\left(\color{blue}{\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. lift-/.f64N/A

                \[\leadsto \frac{2}{\left(\left(\color{blue}{\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)} \]
              3. associate-*l/N/A

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

                \[\leadsto \frac{2}{\left(\color{blue}{\left(\left({t}^{3} \cdot \sin k\right) \cdot \frac{1}{\ell \cdot \ell}\right)} \cdot \tan k\right) \cdot \left(\left(1 + {\left(\frac{k}{t}\right)}^{2}\right) + 1\right)} \]
              5. lift-pow.f64N/A

                \[\leadsto \frac{2}{\left(\left(\left(\color{blue}{{t}^{3}} \cdot \sin k\right) \cdot \frac{1}{\ell \cdot \ell}\right) \cdot \tan k\right) \cdot \left(\left(1 + {\left(\frac{k}{t}\right)}^{2}\right) + 1\right)} \]
              6. cube-multN/A

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

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

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

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

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

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

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

                \[\leadsto \frac{2}{\left(\left(t \cdot \left(\left(t \cdot \color{blue}{\left(t \cdot \sin k\right)}\right) \cdot \frac{1}{\ell \cdot \ell}\right)\right) \cdot \tan k\right) \cdot \left(\left(1 + {\left(\frac{k}{t}\right)}^{2}\right) + 1\right)} \]
              14. lower-/.f6464.6

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

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

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

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

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

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

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

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

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

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

                \[\leadsto \frac{2}{\left(\left(t \cdot \left(\color{blue}{\frac{t \cdot \sin k}{\ell}} \cdot \frac{t}{\ell}\right)\right) \cdot \tan k\right) \cdot \left(\left(1 + {\left(\frac{k}{t}\right)}^{2}\right) + 1\right)} \]
              10. lower-/.f6478.5

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

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

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

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

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

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

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

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

                \[\leadsto \frac{2}{\left(\left(t \cdot \left(\frac{t \cdot \sin k}{\ell} \cdot \frac{t}{\ell}\right)\right) \cdot \tan k\right) \cdot \left(\frac{k}{t} \cdot \frac{k}{t} + \color{blue}{2}\right)} \]
              8. lower-fma.f6478.5

                \[\leadsto \frac{2}{\left(\left(t \cdot \left(\frac{t \cdot \sin k}{\ell} \cdot \frac{t}{\ell}\right)\right) \cdot \tan k\right) \cdot \color{blue}{\mathsf{fma}\left(\frac{k}{t}, \frac{k}{t}, 2\right)}} \]
            8. Applied rewrites78.5%

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

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

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

                \[\leadsto \frac{2}{\left(\left(t \cdot \left(\color{blue}{\left(k \cdot \frac{t}{\ell}\right)} \cdot \frac{t}{\ell}\right)\right) \cdot \tan k\right) \cdot \mathsf{fma}\left(\frac{k}{t}, \frac{k}{t}, 2\right)} \]
              3. lower-/.f6475.5

                \[\leadsto \frac{2}{\left(\left(t \cdot \left(\left(k \cdot \color{blue}{\frac{t}{\ell}}\right) \cdot \frac{t}{\ell}\right)\right) \cdot \tan k\right) \cdot \mathsf{fma}\left(\frac{k}{t}, \frac{k}{t}, 2\right)} \]
            11. Applied rewrites75.5%

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

            if 2.9000000000000002e-22 < l < 4.8000000000000001e106

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

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

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

                \[\leadsto \frac{\color{blue}{\ell \cdot \ell}}{{k}^{2} \cdot {t}^{3}} \]
              3. lower-*.f64N/A

                \[\leadsto \frac{\color{blue}{\ell \cdot \ell}}{{k}^{2} \cdot {t}^{3}} \]
              4. *-commutativeN/A

                \[\leadsto \frac{\ell \cdot \ell}{\color{blue}{{t}^{3} \cdot {k}^{2}}} \]
              5. lower-*.f64N/A

                \[\leadsto \frac{\ell \cdot \ell}{\color{blue}{{t}^{3} \cdot {k}^{2}}} \]
              6. cube-multN/A

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

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

                \[\leadsto \frac{\ell \cdot \ell}{\color{blue}{\left(t \cdot {t}^{2}\right)} \cdot {k}^{2}} \]
              9. unpow2N/A

                \[\leadsto \frac{\ell \cdot \ell}{\left(t \cdot \color{blue}{\left(t \cdot t\right)}\right) \cdot {k}^{2}} \]
              10. lower-*.f64N/A

                \[\leadsto \frac{\ell \cdot \ell}{\left(t \cdot \color{blue}{\left(t \cdot t\right)}\right) \cdot {k}^{2}} \]
              11. unpow2N/A

                \[\leadsto \frac{\ell \cdot \ell}{\left(t \cdot \left(t \cdot t\right)\right) \cdot \color{blue}{\left(k \cdot k\right)}} \]
              12. lower-*.f6460.5

                \[\leadsto \frac{\ell \cdot \ell}{\left(t \cdot \left(t \cdot t\right)\right) \cdot \color{blue}{\left(k \cdot k\right)}} \]
            5. Applied rewrites60.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. Applied rewrites66.7%

                \[\leadsto \frac{\ell}{t \cdot \left(t \cdot \left(t \cdot \left(k \cdot k\right)\right)\right)} \cdot \color{blue}{\ell} \]
              2. Step-by-step derivation
                1. Applied rewrites74.7%

                  \[\leadsto \frac{\ell}{t \cdot \left(t \cdot \left(\left(k \cdot t\right) \cdot k\right)\right)} \cdot \ell \]
                2. Step-by-step derivation
                  1. Applied rewrites76.7%

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

                  if 4.8000000000000001e106 < l

                  1. Initial program 20.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. lift-*.f64N/A

                      \[\leadsto \frac{2}{\left(\color{blue}{\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. lift-/.f64N/A

                      \[\leadsto \frac{2}{\left(\left(\color{blue}{\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)} \]
                    3. associate-*l/N/A

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

                      \[\leadsto \frac{2}{\left(\color{blue}{\left(\left({t}^{3} \cdot \sin k\right) \cdot \frac{1}{\ell \cdot \ell}\right)} \cdot \tan k\right) \cdot \left(\left(1 + {\left(\frac{k}{t}\right)}^{2}\right) + 1\right)} \]
                    5. lift-pow.f64N/A

                      \[\leadsto \frac{2}{\left(\left(\left(\color{blue}{{t}^{3}} \cdot \sin k\right) \cdot \frac{1}{\ell \cdot \ell}\right) \cdot \tan k\right) \cdot \left(\left(1 + {\left(\frac{k}{t}\right)}^{2}\right) + 1\right)} \]
                    6. cube-multN/A

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

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

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

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

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

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

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

                      \[\leadsto \frac{2}{\left(\left(t \cdot \left(\left(t \cdot \color{blue}{\left(t \cdot \sin k\right)}\right) \cdot \frac{1}{\ell \cdot \ell}\right)\right) \cdot \tan k\right) \cdot \left(\left(1 + {\left(\frac{k}{t}\right)}^{2}\right) + 1\right)} \]
                    14. lower-/.f6430.0

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

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

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

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

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

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

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

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

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

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

                      \[\leadsto \frac{2}{\left(\left(t \cdot \left(\color{blue}{\frac{t \cdot \sin k}{\ell}} \cdot \frac{t}{\ell}\right)\right) \cdot \tan k\right) \cdot \left(\left(1 + {\left(\frac{k}{t}\right)}^{2}\right) + 1\right)} \]
                    10. lower-/.f6446.9

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

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

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

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

                    \[\leadsto \begin{array}{l} \mathbf{if}\;\ell \leq 2.9 \cdot 10^{-22}:\\ \;\;\;\;\frac{2}{\left(\tan k \cdot \left(t \cdot \left(\frac{t}{\ell} \cdot \left(k \cdot \frac{t}{\ell}\right)\right)\right)\right) \cdot \mathsf{fma}\left(\frac{k}{t}, \frac{k}{t}, 2\right)}\\ \mathbf{elif}\;\ell \leq 4.8 \cdot 10^{+106}:\\ \;\;\;\;\frac{\frac{\ell \cdot \ell}{k \cdot \left(t \cdot \left(t \cdot k\right)\right)}}{t}\\ \mathbf{else}:\\ \;\;\;\;\frac{2}{\left(\tan k \cdot \left(t \cdot \left(\frac{t \cdot \sin k}{\ell} \cdot \frac{t}{\ell}\right)\right)\right) \cdot 2}\\ \end{array} \]
                  11. Add Preprocessing

                  Alternative 7: 72.2% accurate, 2.3× speedup?

                  \[\begin{array}{l} t\_m = \left|t\right| \\ t\_s = \mathsf{copysign}\left(1, t\right) \\ t\_s \cdot \begin{array}{l} \mathbf{if}\;\ell \cdot \ell \leq 500000:\\ \;\;\;\;\frac{2}{\left(\tan k \cdot \left(t\_m \cdot \left(\frac{t\_m}{\ell} \cdot \left(k \cdot \frac{t\_m}{\ell}\right)\right)\right)\right) \cdot \mathsf{fma}\left(\frac{k}{t\_m}, \frac{k}{t\_m}, 2\right)}\\ \mathbf{else}:\\ \;\;\;\;\ell \cdot \frac{\frac{\ell}{k \cdot \left(t\_m \cdot \left(t\_m \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 (<= (* l l) 500000.0)
                      (/
                       2.0
                       (*
                        (* (tan k) (* t_m (* (/ t_m l) (* k (/ t_m l)))))
                        (fma (/ k t_m) (/ k t_m) 2.0)))
                      (* l (/ (/ l (* k (* t_m (* t_m 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 ((l * l) <= 500000.0) {
                  		tmp = 2.0 / ((tan(k) * (t_m * ((t_m / l) * (k * (t_m / l))))) * fma((k / t_m), (k / t_m), 2.0));
                  	} else {
                  		tmp = l * ((l / (k * (t_m * (t_m * 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 (Float64(l * l) <= 500000.0)
                  		tmp = Float64(2.0 / Float64(Float64(tan(k) * Float64(t_m * Float64(Float64(t_m / l) * Float64(k * Float64(t_m / l))))) * fma(Float64(k / t_m), Float64(k / t_m), 2.0)));
                  	else
                  		tmp = Float64(l * Float64(Float64(l / Float64(k * Float64(t_m * Float64(t_m * k)))) / t_m));
                  	end
                  	return Float64(t_s * tmp)
                  end
                  
                  t\_m = N[Abs[t], $MachinePrecision]
                  t\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[t]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
                  code[t$95$s_, t$95$m_, l_, k_] := N[(t$95$s * If[LessEqual[N[(l * l), $MachinePrecision], 500000.0], N[(2.0 / N[(N[(N[Tan[k], $MachinePrecision] * N[(t$95$m * N[(N[(t$95$m / l), $MachinePrecision] * N[(k * N[(t$95$m / l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(N[(k / t$95$m), $MachinePrecision] * N[(k / t$95$m), $MachinePrecision] + 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(l * N[(N[(l / N[(k * N[(t$95$m * N[(t$95$m * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / t$95$m), $MachinePrecision]), $MachinePrecision]]), $MachinePrecision]
                  
                  \begin{array}{l}
                  t\_m = \left|t\right|
                  \\
                  t\_s = \mathsf{copysign}\left(1, t\right)
                  
                  \\
                  t\_s \cdot \begin{array}{l}
                  \mathbf{if}\;\ell \cdot \ell \leq 500000:\\
                  \;\;\;\;\frac{2}{\left(\tan k \cdot \left(t\_m \cdot \left(\frac{t\_m}{\ell} \cdot \left(k \cdot \frac{t\_m}{\ell}\right)\right)\right)\right) \cdot \mathsf{fma}\left(\frac{k}{t\_m}, \frac{k}{t\_m}, 2\right)}\\
                  
                  \mathbf{else}:\\
                  \;\;\;\;\ell \cdot \frac{\frac{\ell}{k \cdot \left(t\_m \cdot \left(t\_m \cdot k\right)\right)}}{t\_m}\\
                  
                  
                  \end{array}
                  \end{array}
                  
                  Derivation
                  1. Split input into 2 regimes
                  2. if (*.f64 l l) < 5e5

                    1. Initial program 63.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. Step-by-step derivation
                      1. lift-*.f64N/A

                        \[\leadsto \frac{2}{\left(\color{blue}{\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. lift-/.f64N/A

                        \[\leadsto \frac{2}{\left(\left(\color{blue}{\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)} \]
                      3. associate-*l/N/A

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

                        \[\leadsto \frac{2}{\left(\color{blue}{\left(\left({t}^{3} \cdot \sin k\right) \cdot \frac{1}{\ell \cdot \ell}\right)} \cdot \tan k\right) \cdot \left(\left(1 + {\left(\frac{k}{t}\right)}^{2}\right) + 1\right)} \]
                      5. lift-pow.f64N/A

                        \[\leadsto \frac{2}{\left(\left(\left(\color{blue}{{t}^{3}} \cdot \sin k\right) \cdot \frac{1}{\ell \cdot \ell}\right) \cdot \tan k\right) \cdot \left(\left(1 + {\left(\frac{k}{t}\right)}^{2}\right) + 1\right)} \]
                      6. cube-multN/A

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

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

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

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

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

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

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

                        \[\leadsto \frac{2}{\left(\left(t \cdot \left(\left(t \cdot \color{blue}{\left(t \cdot \sin k\right)}\right) \cdot \frac{1}{\ell \cdot \ell}\right)\right) \cdot \tan k\right) \cdot \left(\left(1 + {\left(\frac{k}{t}\right)}^{2}\right) + 1\right)} \]
                      14. lower-/.f6474.1

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

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

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

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

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

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

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

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

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

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

                        \[\leadsto \frac{2}{\left(\left(t \cdot \left(\color{blue}{\frac{t \cdot \sin k}{\ell}} \cdot \frac{t}{\ell}\right)\right) \cdot \tan k\right) \cdot \left(\left(1 + {\left(\frac{k}{t}\right)}^{2}\right) + 1\right)} \]
                      10. lower-/.f6487.7

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

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

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

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

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

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

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

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

                        \[\leadsto \frac{2}{\left(\left(t \cdot \left(\frac{t \cdot \sin k}{\ell} \cdot \frac{t}{\ell}\right)\right) \cdot \tan k\right) \cdot \left(\frac{k}{t} \cdot \frac{k}{t} + \color{blue}{2}\right)} \]
                      8. lower-fma.f6487.7

                        \[\leadsto \frac{2}{\left(\left(t \cdot \left(\frac{t \cdot \sin k}{\ell} \cdot \frac{t}{\ell}\right)\right) \cdot \tan k\right) \cdot \color{blue}{\mathsf{fma}\left(\frac{k}{t}, \frac{k}{t}, 2\right)}} \]
                    8. Applied rewrites87.7%

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

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

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

                        \[\leadsto \frac{2}{\left(\left(t \cdot \left(\color{blue}{\left(k \cdot \frac{t}{\ell}\right)} \cdot \frac{t}{\ell}\right)\right) \cdot \tan k\right) \cdot \mathsf{fma}\left(\frac{k}{t}, \frac{k}{t}, 2\right)} \]
                      3. lower-/.f6487.8

                        \[\leadsto \frac{2}{\left(\left(t \cdot \left(\left(k \cdot \color{blue}{\frac{t}{\ell}}\right) \cdot \frac{t}{\ell}\right)\right) \cdot \tan k\right) \cdot \mathsf{fma}\left(\frac{k}{t}, \frac{k}{t}, 2\right)} \]
                    11. Applied rewrites87.8%

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

                    if 5e5 < (*.f64 l l)

                    1. Initial program 36.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. lower-/.f64N/A

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

                        \[\leadsto \frac{\color{blue}{\ell \cdot \ell}}{{k}^{2} \cdot {t}^{3}} \]
                      3. lower-*.f64N/A

                        \[\leadsto \frac{\color{blue}{\ell \cdot \ell}}{{k}^{2} \cdot {t}^{3}} \]
                      4. *-commutativeN/A

                        \[\leadsto \frac{\ell \cdot \ell}{\color{blue}{{t}^{3} \cdot {k}^{2}}} \]
                      5. lower-*.f64N/A

                        \[\leadsto \frac{\ell \cdot \ell}{\color{blue}{{t}^{3} \cdot {k}^{2}}} \]
                      6. cube-multN/A

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

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

                        \[\leadsto \frac{\ell \cdot \ell}{\color{blue}{\left(t \cdot {t}^{2}\right)} \cdot {k}^{2}} \]
                      9. unpow2N/A

                        \[\leadsto \frac{\ell \cdot \ell}{\left(t \cdot \color{blue}{\left(t \cdot t\right)}\right) \cdot {k}^{2}} \]
                      10. lower-*.f64N/A

                        \[\leadsto \frac{\ell \cdot \ell}{\left(t \cdot \color{blue}{\left(t \cdot t\right)}\right) \cdot {k}^{2}} \]
                      11. unpow2N/A

                        \[\leadsto \frac{\ell \cdot \ell}{\left(t \cdot \left(t \cdot t\right)\right) \cdot \color{blue}{\left(k \cdot k\right)}} \]
                      12. lower-*.f6442.8

                        \[\leadsto \frac{\ell \cdot \ell}{\left(t \cdot \left(t \cdot t\right)\right) \cdot \color{blue}{\left(k \cdot k\right)}} \]
                    5. Applied rewrites42.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. Applied rewrites54.6%

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

                          \[\leadsto \frac{\ell}{t \cdot \left(t \cdot \left(\left(k \cdot t\right) \cdot k\right)\right)} \cdot \ell \]
                        2. Step-by-step derivation
                          1. Applied rewrites62.8%

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

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

                        Alternative 8: 71.5% accurate, 2.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}\;t\_m \leq 1.5 \cdot 10^{-135}:\\ \;\;\;\;\frac{\ell}{t\_m \cdot \frac{t\_m \cdot \left(t\_m \cdot \left(k \cdot k\right)\right)}{\ell}}\\ \mathbf{elif}\;t\_m \leq 6 \cdot 10^{+108}:\\ \;\;\;\;\frac{2}{\frac{t\_m \cdot \left(k \cdot \left(t\_m \cdot t\_m\right)\right)}{\ell} \cdot \frac{\tan k \cdot \left(2 + \frac{k \cdot k}{t\_m \cdot t\_m}\right)}{\ell}}\\ \mathbf{else}:\\ \;\;\;\;\frac{\ell}{\frac{t\_m}{\ell} \cdot \left(k \cdot \left(t\_m \cdot \left(t\_m \cdot k\right)\right)\right)}\\ \end{array} \end{array} \]
                        t\_m = (fabs.f64 t)
                        t\_s = (copysign.f64 #s(literal 1 binary64) t)
                        (FPCore (t_s t_m l k)
                         :precision binary64
                         (*
                          t_s
                          (if (<= t_m 1.5e-135)
                            (/ l (* t_m (/ (* t_m (* t_m (* k k))) l)))
                            (if (<= t_m 6e+108)
                              (/
                               2.0
                               (*
                                (/ (* t_m (* k (* t_m t_m))) l)
                                (/ (* (tan k) (+ 2.0 (/ (* k k) (* t_m t_m)))) l)))
                              (/ l (* (/ t_m l) (* k (* t_m (* 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.5e-135) {
                        		tmp = l / (t_m * ((t_m * (t_m * (k * k))) / l));
                        	} else if (t_m <= 6e+108) {
                        		tmp = 2.0 / (((t_m * (k * (t_m * t_m))) / l) * ((tan(k) * (2.0 + ((k * k) / (t_m * t_m)))) / l));
                        	} else {
                        		tmp = l / ((t_m / l) * (k * (t_m * (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.5d-135) then
                                tmp = l / (t_m * ((t_m * (t_m * (k * k))) / l))
                            else if (t_m <= 6d+108) then
                                tmp = 2.0d0 / (((t_m * (k * (t_m * t_m))) / l) * ((tan(k) * (2.0d0 + ((k * k) / (t_m * t_m)))) / l))
                            else
                                tmp = l / ((t_m / l) * (k * (t_m * (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.5e-135) {
                        		tmp = l / (t_m * ((t_m * (t_m * (k * k))) / l));
                        	} else if (t_m <= 6e+108) {
                        		tmp = 2.0 / (((t_m * (k * (t_m * t_m))) / l) * ((Math.tan(k) * (2.0 + ((k * k) / (t_m * t_m)))) / l));
                        	} else {
                        		tmp = l / ((t_m / l) * (k * (t_m * (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.5e-135:
                        		tmp = l / (t_m * ((t_m * (t_m * (k * k))) / l))
                        	elif t_m <= 6e+108:
                        		tmp = 2.0 / (((t_m * (k * (t_m * t_m))) / l) * ((math.tan(k) * (2.0 + ((k * k) / (t_m * t_m)))) / l))
                        	else:
                        		tmp = l / ((t_m / l) * (k * (t_m * (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.5e-135)
                        		tmp = Float64(l / Float64(t_m * Float64(Float64(t_m * Float64(t_m * Float64(k * k))) / l)));
                        	elseif (t_m <= 6e+108)
                        		tmp = Float64(2.0 / Float64(Float64(Float64(t_m * Float64(k * Float64(t_m * t_m))) / l) * Float64(Float64(tan(k) * Float64(2.0 + Float64(Float64(k * k) / Float64(t_m * t_m)))) / l)));
                        	else
                        		tmp = Float64(l / Float64(Float64(t_m / l) * Float64(k * Float64(t_m * 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.5e-135)
                        		tmp = l / (t_m * ((t_m * (t_m * (k * k))) / l));
                        	elseif (t_m <= 6e+108)
                        		tmp = 2.0 / (((t_m * (k * (t_m * t_m))) / l) * ((tan(k) * (2.0 + ((k * k) / (t_m * t_m)))) / l));
                        	else
                        		tmp = l / ((t_m / l) * (k * (t_m * (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.5e-135], N[(l / N[(t$95$m * N[(N[(t$95$m * N[(t$95$m * N[(k * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$m, 6e+108], N[(2.0 / N[(N[(N[(t$95$m * N[(k * N[(t$95$m * t$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / l), $MachinePrecision] * N[(N[(N[Tan[k], $MachinePrecision] * N[(2.0 + N[(N[(k * k), $MachinePrecision] / N[(t$95$m * t$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(l / N[(N[(t$95$m / l), $MachinePrecision] * N[(k * N[(t$95$m * N[(t$95$m * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]), $MachinePrecision]
                        
                        \begin{array}{l}
                        t\_m = \left|t\right|
                        \\
                        t\_s = \mathsf{copysign}\left(1, t\right)
                        
                        \\
                        t\_s \cdot \begin{array}{l}
                        \mathbf{if}\;t\_m \leq 1.5 \cdot 10^{-135}:\\
                        \;\;\;\;\frac{\ell}{t\_m \cdot \frac{t\_m \cdot \left(t\_m \cdot \left(k \cdot k\right)\right)}{\ell}}\\
                        
                        \mathbf{elif}\;t\_m \leq 6 \cdot 10^{+108}:\\
                        \;\;\;\;\frac{2}{\frac{t\_m \cdot \left(k \cdot \left(t\_m \cdot t\_m\right)\right)}{\ell} \cdot \frac{\tan k \cdot \left(2 + \frac{k \cdot k}{t\_m \cdot t\_m}\right)}{\ell}}\\
                        
                        \mathbf{else}:\\
                        \;\;\;\;\frac{\ell}{\frac{t\_m}{\ell} \cdot \left(k \cdot \left(t\_m \cdot \left(t\_m \cdot k\right)\right)\right)}\\
                        
                        
                        \end{array}
                        \end{array}
                        
                        Derivation
                        1. Split input into 3 regimes
                        2. if t < 1.50000000000000006e-135

                          1. Initial program 41.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. lower-/.f64N/A

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

                              \[\leadsto \frac{\color{blue}{\ell \cdot \ell}}{{k}^{2} \cdot {t}^{3}} \]
                            3. lower-*.f64N/A

                              \[\leadsto \frac{\color{blue}{\ell \cdot \ell}}{{k}^{2} \cdot {t}^{3}} \]
                            4. *-commutativeN/A

                              \[\leadsto \frac{\ell \cdot \ell}{\color{blue}{{t}^{3} \cdot {k}^{2}}} \]
                            5. lower-*.f64N/A

                              \[\leadsto \frac{\ell \cdot \ell}{\color{blue}{{t}^{3} \cdot {k}^{2}}} \]
                            6. cube-multN/A

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

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

                              \[\leadsto \frac{\ell \cdot \ell}{\color{blue}{\left(t \cdot {t}^{2}\right)} \cdot {k}^{2}} \]
                            9. unpow2N/A

                              \[\leadsto \frac{\ell \cdot \ell}{\left(t \cdot \color{blue}{\left(t \cdot t\right)}\right) \cdot {k}^{2}} \]
                            10. lower-*.f64N/A

                              \[\leadsto \frac{\ell \cdot \ell}{\left(t \cdot \color{blue}{\left(t \cdot t\right)}\right) \cdot {k}^{2}} \]
                            11. unpow2N/A

                              \[\leadsto \frac{\ell \cdot \ell}{\left(t \cdot \left(t \cdot t\right)\right) \cdot \color{blue}{\left(k \cdot k\right)}} \]
                            12. lower-*.f6443.7

                              \[\leadsto \frac{\ell \cdot \ell}{\left(t \cdot \left(t \cdot t\right)\right) \cdot \color{blue}{\left(k \cdot k\right)}} \]
                          5. Applied rewrites43.7%

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

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

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

                              if 1.50000000000000006e-135 < t < 5.99999999999999968e108

                              1. Initial program 68.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. lift-*.f64N/A

                                  \[\leadsto \frac{2}{\color{blue}{\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. lift-*.f64N/A

                                  \[\leadsto \frac{2}{\color{blue}{\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)} \]
                                3. associate-*l*N/A

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

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

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

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

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

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

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

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

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

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

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

                                  \[\leadsto \frac{2}{\frac{\color{blue}{{t}^{3} \cdot k}}{\ell} \cdot \frac{\tan k \cdot \left(2 + \frac{k \cdot k}{t \cdot t}\right)}{\ell}} \]
                                3. cube-multN/A

                                  \[\leadsto \frac{2}{\frac{\color{blue}{\left(t \cdot \left(t \cdot t\right)\right)} \cdot k}{\ell} \cdot \frac{\tan k \cdot \left(2 + \frac{k \cdot k}{t \cdot t}\right)}{\ell}} \]
                                4. unpow2N/A

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

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

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

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

                                  \[\leadsto \frac{2}{\frac{t \cdot \color{blue}{\left(k \cdot {t}^{2}\right)}}{\ell} \cdot \frac{\tan k \cdot \left(2 + \frac{k \cdot k}{t \cdot t}\right)}{\ell}} \]
                                9. unpow2N/A

                                  \[\leadsto \frac{2}{\frac{t \cdot \left(k \cdot \color{blue}{\left(t \cdot t\right)}\right)}{\ell} \cdot \frac{\tan k \cdot \left(2 + \frac{k \cdot k}{t \cdot t}\right)}{\ell}} \]
                                10. lower-*.f6465.9

                                  \[\leadsto \frac{2}{\frac{t \cdot \left(k \cdot \color{blue}{\left(t \cdot t\right)}\right)}{\ell} \cdot \frac{\tan k \cdot \left(2 + \frac{k \cdot k}{t \cdot t}\right)}{\ell}} \]
                              7. Applied rewrites65.9%

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

                              if 5.99999999999999968e108 < t

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

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

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

                                  \[\leadsto \frac{\color{blue}{\ell \cdot \ell}}{{k}^{2} \cdot {t}^{3}} \]
                                3. lower-*.f64N/A

                                  \[\leadsto \frac{\color{blue}{\ell \cdot \ell}}{{k}^{2} \cdot {t}^{3}} \]
                                4. *-commutativeN/A

                                  \[\leadsto \frac{\ell \cdot \ell}{\color{blue}{{t}^{3} \cdot {k}^{2}}} \]
                                5. lower-*.f64N/A

                                  \[\leadsto \frac{\ell \cdot \ell}{\color{blue}{{t}^{3} \cdot {k}^{2}}} \]
                                6. cube-multN/A

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

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

                                  \[\leadsto \frac{\ell \cdot \ell}{\color{blue}{\left(t \cdot {t}^{2}\right)} \cdot {k}^{2}} \]
                                9. unpow2N/A

                                  \[\leadsto \frac{\ell \cdot \ell}{\left(t \cdot \color{blue}{\left(t \cdot t\right)}\right) \cdot {k}^{2}} \]
                                10. lower-*.f64N/A

                                  \[\leadsto \frac{\ell \cdot \ell}{\left(t \cdot \color{blue}{\left(t \cdot t\right)}\right) \cdot {k}^{2}} \]
                                11. unpow2N/A

                                  \[\leadsto \frac{\ell \cdot \ell}{\left(t \cdot \left(t \cdot t\right)\right) \cdot \color{blue}{\left(k \cdot k\right)}} \]
                                12. lower-*.f6449.3

                                  \[\leadsto \frac{\ell \cdot \ell}{\left(t \cdot \left(t \cdot t\right)\right) \cdot \color{blue}{\left(k \cdot k\right)}} \]
                              5. Applied rewrites49.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. Applied rewrites68.2%

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

                                    \[\leadsto \frac{\ell}{t \cdot \left(t \cdot \left(\left(k \cdot t\right) \cdot k\right)\right)} \cdot \ell \]
                                  2. Step-by-step derivation
                                    1. Applied rewrites88.8%

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

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

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

                                    1. Initial program 53.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. lower-/.f64N/A

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

                                        \[\leadsto \frac{\color{blue}{\ell \cdot \ell}}{{k}^{2} \cdot {t}^{3}} \]
                                      3. lower-*.f64N/A

                                        \[\leadsto \frac{\color{blue}{\ell \cdot \ell}}{{k}^{2} \cdot {t}^{3}} \]
                                      4. *-commutativeN/A

                                        \[\leadsto \frac{\ell \cdot \ell}{\color{blue}{{t}^{3} \cdot {k}^{2}}} \]
                                      5. lower-*.f64N/A

                                        \[\leadsto \frac{\ell \cdot \ell}{\color{blue}{{t}^{3} \cdot {k}^{2}}} \]
                                      6. cube-multN/A

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

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

                                        \[\leadsto \frac{\ell \cdot \ell}{\color{blue}{\left(t \cdot {t}^{2}\right)} \cdot {k}^{2}} \]
                                      9. unpow2N/A

                                        \[\leadsto \frac{\ell \cdot \ell}{\left(t \cdot \color{blue}{\left(t \cdot t\right)}\right) \cdot {k}^{2}} \]
                                      10. lower-*.f64N/A

                                        \[\leadsto \frac{\ell \cdot \ell}{\left(t \cdot \color{blue}{\left(t \cdot t\right)}\right) \cdot {k}^{2}} \]
                                      11. unpow2N/A

                                        \[\leadsto \frac{\ell \cdot \ell}{\left(t \cdot \left(t \cdot t\right)\right) \cdot \color{blue}{\left(k \cdot k\right)}} \]
                                      12. lower-*.f6447.5

                                        \[\leadsto \frac{\ell \cdot \ell}{\left(t \cdot \left(t \cdot t\right)\right) \cdot \color{blue}{\left(k \cdot k\right)}} \]
                                    5. Applied rewrites47.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. Applied rewrites60.0%

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

                                          \[\leadsto \frac{\ell}{t \cdot \left(t \cdot \left(\left(k \cdot t\right) \cdot k\right)\right)} \cdot \ell \]
                                        2. Step-by-step derivation
                                          1. Applied rewrites71.9%

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

                                          if 3.9999999999999999e-154 < k

                                          1. Initial program 44.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. lower-/.f64N/A

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

                                              \[\leadsto \frac{\color{blue}{\ell \cdot \ell}}{{k}^{2} \cdot {t}^{3}} \]
                                            3. lower-*.f64N/A

                                              \[\leadsto \frac{\color{blue}{\ell \cdot \ell}}{{k}^{2} \cdot {t}^{3}} \]
                                            4. *-commutativeN/A

                                              \[\leadsto \frac{\ell \cdot \ell}{\color{blue}{{t}^{3} \cdot {k}^{2}}} \]
                                            5. lower-*.f64N/A

                                              \[\leadsto \frac{\ell \cdot \ell}{\color{blue}{{t}^{3} \cdot {k}^{2}}} \]
                                            6. cube-multN/A

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

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

                                              \[\leadsto \frac{\ell \cdot \ell}{\color{blue}{\left(t \cdot {t}^{2}\right)} \cdot {k}^{2}} \]
                                            9. unpow2N/A

                                              \[\leadsto \frac{\ell \cdot \ell}{\left(t \cdot \color{blue}{\left(t \cdot t\right)}\right) \cdot {k}^{2}} \]
                                            10. lower-*.f64N/A

                                              \[\leadsto \frac{\ell \cdot \ell}{\left(t \cdot \color{blue}{\left(t \cdot t\right)}\right) \cdot {k}^{2}} \]
                                            11. unpow2N/A

                                              \[\leadsto \frac{\ell \cdot \ell}{\left(t \cdot \left(t \cdot t\right)\right) \cdot \color{blue}{\left(k \cdot k\right)}} \]
                                            12. lower-*.f6447.4

                                              \[\leadsto \frac{\ell \cdot \ell}{\left(t \cdot \left(t \cdot t\right)\right) \cdot \color{blue}{\left(k \cdot k\right)}} \]
                                          5. Applied rewrites47.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. Applied rewrites65.5%

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

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

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

                                            1. Initial program 53.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. lower-/.f64N/A

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

                                                \[\leadsto \frac{\color{blue}{\ell \cdot \ell}}{{k}^{2} \cdot {t}^{3}} \]
                                              3. lower-*.f64N/A

                                                \[\leadsto \frac{\color{blue}{\ell \cdot \ell}}{{k}^{2} \cdot {t}^{3}} \]
                                              4. *-commutativeN/A

                                                \[\leadsto \frac{\ell \cdot \ell}{\color{blue}{{t}^{3} \cdot {k}^{2}}} \]
                                              5. lower-*.f64N/A

                                                \[\leadsto \frac{\ell \cdot \ell}{\color{blue}{{t}^{3} \cdot {k}^{2}}} \]
                                              6. cube-multN/A

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

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

                                                \[\leadsto \frac{\ell \cdot \ell}{\color{blue}{\left(t \cdot {t}^{2}\right)} \cdot {k}^{2}} \]
                                              9. unpow2N/A

                                                \[\leadsto \frac{\ell \cdot \ell}{\left(t \cdot \color{blue}{\left(t \cdot t\right)}\right) \cdot {k}^{2}} \]
                                              10. lower-*.f64N/A

                                                \[\leadsto \frac{\ell \cdot \ell}{\left(t \cdot \color{blue}{\left(t \cdot t\right)}\right) \cdot {k}^{2}} \]
                                              11. unpow2N/A

                                                \[\leadsto \frac{\ell \cdot \ell}{\left(t \cdot \left(t \cdot t\right)\right) \cdot \color{blue}{\left(k \cdot k\right)}} \]
                                              12. lower-*.f6447.5

                                                \[\leadsto \frac{\ell \cdot \ell}{\left(t \cdot \left(t \cdot t\right)\right) \cdot \color{blue}{\left(k \cdot k\right)}} \]
                                            5. Applied rewrites47.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. Applied rewrites60.0%

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

                                                  \[\leadsto \frac{\ell}{t \cdot \left(t \cdot \left(\left(k \cdot t\right) \cdot k\right)\right)} \cdot \ell \]
                                                2. Step-by-step derivation
                                                  1. Applied rewrites71.9%

                                                    \[\leadsto \frac{\frac{\ell}{k \cdot \left(t \cdot \left(t \cdot k\right)\right)}}{t} \cdot \ell \]

                                                  if 3.9999999999999999e-154 < k

                                                  1. Initial program 44.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. lower-/.f64N/A

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

                                                      \[\leadsto \frac{\color{blue}{\ell \cdot \ell}}{{k}^{2} \cdot {t}^{3}} \]
                                                    3. lower-*.f64N/A

                                                      \[\leadsto \frac{\color{blue}{\ell \cdot \ell}}{{k}^{2} \cdot {t}^{3}} \]
                                                    4. *-commutativeN/A

                                                      \[\leadsto \frac{\ell \cdot \ell}{\color{blue}{{t}^{3} \cdot {k}^{2}}} \]
                                                    5. lower-*.f64N/A

                                                      \[\leadsto \frac{\ell \cdot \ell}{\color{blue}{{t}^{3} \cdot {k}^{2}}} \]
                                                    6. cube-multN/A

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

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

                                                      \[\leadsto \frac{\ell \cdot \ell}{\color{blue}{\left(t \cdot {t}^{2}\right)} \cdot {k}^{2}} \]
                                                    9. unpow2N/A

                                                      \[\leadsto \frac{\ell \cdot \ell}{\left(t \cdot \color{blue}{\left(t \cdot t\right)}\right) \cdot {k}^{2}} \]
                                                    10. lower-*.f64N/A

                                                      \[\leadsto \frac{\ell \cdot \ell}{\left(t \cdot \color{blue}{\left(t \cdot t\right)}\right) \cdot {k}^{2}} \]
                                                    11. unpow2N/A

                                                      \[\leadsto \frac{\ell \cdot \ell}{\left(t \cdot \left(t \cdot t\right)\right) \cdot \color{blue}{\left(k \cdot k\right)}} \]
                                                    12. lower-*.f6447.4

                                                      \[\leadsto \frac{\ell \cdot \ell}{\left(t \cdot \left(t \cdot t\right)\right) \cdot \color{blue}{\left(k \cdot k\right)}} \]
                                                  5. Applied rewrites47.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. Applied rewrites65.5%

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

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

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

                                                    1. Initial program 53.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. lower-/.f64N/A

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

                                                        \[\leadsto \frac{\color{blue}{\ell \cdot \ell}}{{k}^{2} \cdot {t}^{3}} \]
                                                      3. lower-*.f64N/A

                                                        \[\leadsto \frac{\color{blue}{\ell \cdot \ell}}{{k}^{2} \cdot {t}^{3}} \]
                                                      4. *-commutativeN/A

                                                        \[\leadsto \frac{\ell \cdot \ell}{\color{blue}{{t}^{3} \cdot {k}^{2}}} \]
                                                      5. lower-*.f64N/A

                                                        \[\leadsto \frac{\ell \cdot \ell}{\color{blue}{{t}^{3} \cdot {k}^{2}}} \]
                                                      6. cube-multN/A

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

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

                                                        \[\leadsto \frac{\ell \cdot \ell}{\color{blue}{\left(t \cdot {t}^{2}\right)} \cdot {k}^{2}} \]
                                                      9. unpow2N/A

                                                        \[\leadsto \frac{\ell \cdot \ell}{\left(t \cdot \color{blue}{\left(t \cdot t\right)}\right) \cdot {k}^{2}} \]
                                                      10. lower-*.f64N/A

                                                        \[\leadsto \frac{\ell \cdot \ell}{\left(t \cdot \color{blue}{\left(t \cdot t\right)}\right) \cdot {k}^{2}} \]
                                                      11. unpow2N/A

                                                        \[\leadsto \frac{\ell \cdot \ell}{\left(t \cdot \left(t \cdot t\right)\right) \cdot \color{blue}{\left(k \cdot k\right)}} \]
                                                      12. lower-*.f6447.5

                                                        \[\leadsto \frac{\ell \cdot \ell}{\left(t \cdot \left(t \cdot t\right)\right) \cdot \color{blue}{\left(k \cdot k\right)}} \]
                                                    5. Applied rewrites47.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. Applied rewrites60.0%

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

                                                          \[\leadsto \frac{\ell}{t \cdot \left(t \cdot \left(\left(k \cdot t\right) \cdot k\right)\right)} \cdot \ell \]
                                                        2. Step-by-step derivation
                                                          1. Applied rewrites70.2%

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

                                                          if 1.8999999999999999e-155 < k

                                                          1. Initial program 44.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. lower-/.f64N/A

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

                                                              \[\leadsto \frac{\color{blue}{\ell \cdot \ell}}{{k}^{2} \cdot {t}^{3}} \]
                                                            3. lower-*.f64N/A

                                                              \[\leadsto \frac{\color{blue}{\ell \cdot \ell}}{{k}^{2} \cdot {t}^{3}} \]
                                                            4. *-commutativeN/A

                                                              \[\leadsto \frac{\ell \cdot \ell}{\color{blue}{{t}^{3} \cdot {k}^{2}}} \]
                                                            5. lower-*.f64N/A

                                                              \[\leadsto \frac{\ell \cdot \ell}{\color{blue}{{t}^{3} \cdot {k}^{2}}} \]
                                                            6. cube-multN/A

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

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

                                                              \[\leadsto \frac{\ell \cdot \ell}{\color{blue}{\left(t \cdot {t}^{2}\right)} \cdot {k}^{2}} \]
                                                            9. unpow2N/A

                                                              \[\leadsto \frac{\ell \cdot \ell}{\left(t \cdot \color{blue}{\left(t \cdot t\right)}\right) \cdot {k}^{2}} \]
                                                            10. lower-*.f64N/A

                                                              \[\leadsto \frac{\ell \cdot \ell}{\left(t \cdot \color{blue}{\left(t \cdot t\right)}\right) \cdot {k}^{2}} \]
                                                            11. unpow2N/A

                                                              \[\leadsto \frac{\ell \cdot \ell}{\left(t \cdot \left(t \cdot t\right)\right) \cdot \color{blue}{\left(k \cdot k\right)}} \]
                                                            12. lower-*.f6447.4

                                                              \[\leadsto \frac{\ell \cdot \ell}{\left(t \cdot \left(t \cdot t\right)\right) \cdot \color{blue}{\left(k \cdot k\right)}} \]
                                                          5. Applied rewrites47.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. Applied rewrites65.5%

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

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

                                                          Alternative 12: 68.6% accurate, 9.6× speedup?

                                                          \[\begin{array}{l} t\_m = \left|t\right| \\ t\_s = \mathsf{copysign}\left(1, t\right) \\ t\_s \cdot \begin{array}{l} \mathbf{if}\;t\_m \leq 1.1 \cdot 10^{-45}:\\ \;\;\;\;\ell \cdot \frac{\ell}{t\_m \cdot \left(t\_m \cdot \left(t\_m \cdot \left(k \cdot k\right)\right)\right)}\\ \mathbf{else}:\\ \;\;\;\;\ell \cdot \left(\ell \cdot \frac{1}{\left(t\_m \cdot \left(t\_m \cdot k\right)\right) \cdot \left(t\_m \cdot k\right)}\right)\\ \end{array} \end{array} \]
                                                          t\_m = (fabs.f64 t)
                                                          t\_s = (copysign.f64 #s(literal 1 binary64) t)
                                                          (FPCore (t_s t_m l k)
                                                           :precision binary64
                                                           (*
                                                            t_s
                                                            (if (<= t_m 1.1e-45)
                                                              (* l (/ l (* t_m (* t_m (* t_m (* k k))))))
                                                              (* l (* l (/ 1.0 (* (* t_m (* 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) {
                                                          	double tmp;
                                                          	if (t_m <= 1.1e-45) {
                                                          		tmp = l * (l / (t_m * (t_m * (t_m * (k * k)))));
                                                          	} else {
                                                          		tmp = l * (l * (1.0 / ((t_m * (t_m * k)) * (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.1d-45) then
                                                                  tmp = l * (l / (t_m * (t_m * (t_m * (k * k)))))
                                                              else
                                                                  tmp = l * (l * (1.0d0 / ((t_m * (t_m * k)) * (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.1e-45) {
                                                          		tmp = l * (l / (t_m * (t_m * (t_m * (k * k)))));
                                                          	} else {
                                                          		tmp = l * (l * (1.0 / ((t_m * (t_m * k)) * (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.1e-45:
                                                          		tmp = l * (l / (t_m * (t_m * (t_m * (k * k)))))
                                                          	else:
                                                          		tmp = l * (l * (1.0 / ((t_m * (t_m * k)) * (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.1e-45)
                                                          		tmp = Float64(l * Float64(l / Float64(t_m * Float64(t_m * Float64(t_m * Float64(k * k))))));
                                                          	else
                                                          		tmp = Float64(l * Float64(l * Float64(1.0 / Float64(Float64(t_m * Float64(t_m * k)) * 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.1e-45)
                                                          		tmp = l * (l / (t_m * (t_m * (t_m * (k * k)))));
                                                          	else
                                                          		tmp = l * (l * (1.0 / ((t_m * (t_m * k)) * (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.1e-45], N[(l * N[(l / N[(t$95$m * N[(t$95$m * N[(t$95$m * N[(k * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(l * N[(l * N[(1.0 / N[(N[(t$95$m * N[(t$95$m * k), $MachinePrecision]), $MachinePrecision] * N[(t$95$m * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]), $MachinePrecision]
                                                          
                                                          \begin{array}{l}
                                                          t\_m = \left|t\right|
                                                          \\
                                                          t\_s = \mathsf{copysign}\left(1, t\right)
                                                          
                                                          \\
                                                          t\_s \cdot \begin{array}{l}
                                                          \mathbf{if}\;t\_m \leq 1.1 \cdot 10^{-45}:\\
                                                          \;\;\;\;\ell \cdot \frac{\ell}{t\_m \cdot \left(t\_m \cdot \left(t\_m \cdot \left(k \cdot k\right)\right)\right)}\\
                                                          
                                                          \mathbf{else}:\\
                                                          \;\;\;\;\ell \cdot \left(\ell \cdot \frac{1}{\left(t\_m \cdot \left(t\_m \cdot k\right)\right) \cdot \left(t\_m \cdot k\right)}\right)\\
                                                          
                                                          
                                                          \end{array}
                                                          \end{array}
                                                          
                                                          Derivation
                                                          1. Split input into 2 regimes
                                                          2. if t < 1.09999999999999997e-45

                                                            1. Initial program 43.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. lower-/.f64N/A

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

                                                                \[\leadsto \frac{\color{blue}{\ell \cdot \ell}}{{k}^{2} \cdot {t}^{3}} \]
                                                              3. lower-*.f64N/A

                                                                \[\leadsto \frac{\color{blue}{\ell \cdot \ell}}{{k}^{2} \cdot {t}^{3}} \]
                                                              4. *-commutativeN/A

                                                                \[\leadsto \frac{\ell \cdot \ell}{\color{blue}{{t}^{3} \cdot {k}^{2}}} \]
                                                              5. lower-*.f64N/A

                                                                \[\leadsto \frac{\ell \cdot \ell}{\color{blue}{{t}^{3} \cdot {k}^{2}}} \]
                                                              6. cube-multN/A

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

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

                                                                \[\leadsto \frac{\ell \cdot \ell}{\color{blue}{\left(t \cdot {t}^{2}\right)} \cdot {k}^{2}} \]
                                                              9. unpow2N/A

                                                                \[\leadsto \frac{\ell \cdot \ell}{\left(t \cdot \color{blue}{\left(t \cdot t\right)}\right) \cdot {k}^{2}} \]
                                                              10. lower-*.f64N/A

                                                                \[\leadsto \frac{\ell \cdot \ell}{\left(t \cdot \color{blue}{\left(t \cdot t\right)}\right) \cdot {k}^{2}} \]
                                                              11. unpow2N/A

                                                                \[\leadsto \frac{\ell \cdot \ell}{\left(t \cdot \left(t \cdot t\right)\right) \cdot \color{blue}{\left(k \cdot k\right)}} \]
                                                              12. lower-*.f6444.9

                                                                \[\leadsto \frac{\ell \cdot \ell}{\left(t \cdot \left(t \cdot t\right)\right) \cdot \color{blue}{\left(k \cdot k\right)}} \]
                                                            5. Applied rewrites44.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. Applied rewrites58.5%

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

                                                              if 1.09999999999999997e-45 < t

                                                              1. Initial program 64.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. lower-/.f64N/A

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

                                                                  \[\leadsto \frac{\color{blue}{\ell \cdot \ell}}{{k}^{2} \cdot {t}^{3}} \]
                                                                3. lower-*.f64N/A

                                                                  \[\leadsto \frac{\color{blue}{\ell \cdot \ell}}{{k}^{2} \cdot {t}^{3}} \]
                                                                4. *-commutativeN/A

                                                                  \[\leadsto \frac{\ell \cdot \ell}{\color{blue}{{t}^{3} \cdot {k}^{2}}} \]
                                                                5. lower-*.f64N/A

                                                                  \[\leadsto \frac{\ell \cdot \ell}{\color{blue}{{t}^{3} \cdot {k}^{2}}} \]
                                                                6. cube-multN/A

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

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

                                                                  \[\leadsto \frac{\ell \cdot \ell}{\color{blue}{\left(t \cdot {t}^{2}\right)} \cdot {k}^{2}} \]
                                                                9. unpow2N/A

                                                                  \[\leadsto \frac{\ell \cdot \ell}{\left(t \cdot \color{blue}{\left(t \cdot t\right)}\right) \cdot {k}^{2}} \]
                                                                10. lower-*.f64N/A

                                                                  \[\leadsto \frac{\ell \cdot \ell}{\left(t \cdot \color{blue}{\left(t \cdot t\right)}\right) \cdot {k}^{2}} \]
                                                                11. unpow2N/A

                                                                  \[\leadsto \frac{\ell \cdot \ell}{\left(t \cdot \left(t \cdot t\right)\right) \cdot \color{blue}{\left(k \cdot k\right)}} \]
                                                                12. lower-*.f6454.6

                                                                  \[\leadsto \frac{\ell \cdot \ell}{\left(t \cdot \left(t \cdot t\right)\right) \cdot \color{blue}{\left(k \cdot k\right)}} \]
                                                              5. Applied rewrites54.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. Applied rewrites66.5%

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

                                                                    \[\leadsto \frac{\ell}{t \cdot \left(t \cdot \left(\left(k \cdot t\right) \cdot k\right)\right)} \cdot \ell \]
                                                                  2. Step-by-step derivation
                                                                    1. Applied rewrites76.7%

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

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

                                                                  Alternative 13: 68.7% accurate, 10.7× 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.1 \cdot 10^{-45}:\\ \;\;\;\;\ell \cdot \frac{\ell}{t\_m \cdot \left(t\_m \cdot \left(t\_m \cdot \left(k \cdot k\right)\right)\right)}\\ \mathbf{else}:\\ \;\;\;\;\ell \cdot \frac{\ell}{\left(t\_m \cdot \left(t\_m \cdot k\right)\right) \cdot \left(t\_m \cdot k\right)}\\ \end{array} \end{array} \]
                                                                  t\_m = (fabs.f64 t)
                                                                  t\_s = (copysign.f64 #s(literal 1 binary64) t)
                                                                  (FPCore (t_s t_m l k)
                                                                   :precision binary64
                                                                   (*
                                                                    t_s
                                                                    (if (<= t_m 1.1e-45)
                                                                      (* l (/ l (* t_m (* t_m (* t_m (* k k))))))
                                                                      (* l (/ l (* (* t_m (* 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) {
                                                                  	double tmp;
                                                                  	if (t_m <= 1.1e-45) {
                                                                  		tmp = l * (l / (t_m * (t_m * (t_m * (k * k)))));
                                                                  	} else {
                                                                  		tmp = l * (l / ((t_m * (t_m * k)) * (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.1d-45) then
                                                                          tmp = l * (l / (t_m * (t_m * (t_m * (k * k)))))
                                                                      else
                                                                          tmp = l * (l / ((t_m * (t_m * k)) * (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.1e-45) {
                                                                  		tmp = l * (l / (t_m * (t_m * (t_m * (k * k)))));
                                                                  	} else {
                                                                  		tmp = l * (l / ((t_m * (t_m * k)) * (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.1e-45:
                                                                  		tmp = l * (l / (t_m * (t_m * (t_m * (k * k)))))
                                                                  	else:
                                                                  		tmp = l * (l / ((t_m * (t_m * k)) * (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.1e-45)
                                                                  		tmp = Float64(l * Float64(l / Float64(t_m * Float64(t_m * Float64(t_m * Float64(k * k))))));
                                                                  	else
                                                                  		tmp = Float64(l * Float64(l / Float64(Float64(t_m * Float64(t_m * k)) * 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.1e-45)
                                                                  		tmp = l * (l / (t_m * (t_m * (t_m * (k * k)))));
                                                                  	else
                                                                  		tmp = l * (l / ((t_m * (t_m * k)) * (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.1e-45], N[(l * N[(l / N[(t$95$m * N[(t$95$m * N[(t$95$m * N[(k * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(l * N[(l / N[(N[(t$95$m * N[(t$95$m * k), $MachinePrecision]), $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 \begin{array}{l}
                                                                  \mathbf{if}\;t\_m \leq 1.1 \cdot 10^{-45}:\\
                                                                  \;\;\;\;\ell \cdot \frac{\ell}{t\_m \cdot \left(t\_m \cdot \left(t\_m \cdot \left(k \cdot k\right)\right)\right)}\\
                                                                  
                                                                  \mathbf{else}:\\
                                                                  \;\;\;\;\ell \cdot \frac{\ell}{\left(t\_m \cdot \left(t\_m \cdot k\right)\right) \cdot \left(t\_m \cdot k\right)}\\
                                                                  
                                                                  
                                                                  \end{array}
                                                                  \end{array}
                                                                  
                                                                  Derivation
                                                                  1. Split input into 2 regimes
                                                                  2. if t < 1.09999999999999997e-45

                                                                    1. Initial program 43.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. lower-/.f64N/A

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

                                                                        \[\leadsto \frac{\color{blue}{\ell \cdot \ell}}{{k}^{2} \cdot {t}^{3}} \]
                                                                      3. lower-*.f64N/A

                                                                        \[\leadsto \frac{\color{blue}{\ell \cdot \ell}}{{k}^{2} \cdot {t}^{3}} \]
                                                                      4. *-commutativeN/A

                                                                        \[\leadsto \frac{\ell \cdot \ell}{\color{blue}{{t}^{3} \cdot {k}^{2}}} \]
                                                                      5. lower-*.f64N/A

                                                                        \[\leadsto \frac{\ell \cdot \ell}{\color{blue}{{t}^{3} \cdot {k}^{2}}} \]
                                                                      6. cube-multN/A

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

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

                                                                        \[\leadsto \frac{\ell \cdot \ell}{\color{blue}{\left(t \cdot {t}^{2}\right)} \cdot {k}^{2}} \]
                                                                      9. unpow2N/A

                                                                        \[\leadsto \frac{\ell \cdot \ell}{\left(t \cdot \color{blue}{\left(t \cdot t\right)}\right) \cdot {k}^{2}} \]
                                                                      10. lower-*.f64N/A

                                                                        \[\leadsto \frac{\ell \cdot \ell}{\left(t \cdot \color{blue}{\left(t \cdot t\right)}\right) \cdot {k}^{2}} \]
                                                                      11. unpow2N/A

                                                                        \[\leadsto \frac{\ell \cdot \ell}{\left(t \cdot \left(t \cdot t\right)\right) \cdot \color{blue}{\left(k \cdot k\right)}} \]
                                                                      12. lower-*.f6444.9

                                                                        \[\leadsto \frac{\ell \cdot \ell}{\left(t \cdot \left(t \cdot t\right)\right) \cdot \color{blue}{\left(k \cdot k\right)}} \]
                                                                    5. Applied rewrites44.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. Applied rewrites58.5%

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

                                                                      if 1.09999999999999997e-45 < t

                                                                      1. Initial program 64.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. lower-/.f64N/A

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

                                                                          \[\leadsto \frac{\color{blue}{\ell \cdot \ell}}{{k}^{2} \cdot {t}^{3}} \]
                                                                        3. lower-*.f64N/A

                                                                          \[\leadsto \frac{\color{blue}{\ell \cdot \ell}}{{k}^{2} \cdot {t}^{3}} \]
                                                                        4. *-commutativeN/A

                                                                          \[\leadsto \frac{\ell \cdot \ell}{\color{blue}{{t}^{3} \cdot {k}^{2}}} \]
                                                                        5. lower-*.f64N/A

                                                                          \[\leadsto \frac{\ell \cdot \ell}{\color{blue}{{t}^{3} \cdot {k}^{2}}} \]
                                                                        6. cube-multN/A

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

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

                                                                          \[\leadsto \frac{\ell \cdot \ell}{\color{blue}{\left(t \cdot {t}^{2}\right)} \cdot {k}^{2}} \]
                                                                        9. unpow2N/A

                                                                          \[\leadsto \frac{\ell \cdot \ell}{\left(t \cdot \color{blue}{\left(t \cdot t\right)}\right) \cdot {k}^{2}} \]
                                                                        10. lower-*.f64N/A

                                                                          \[\leadsto \frac{\ell \cdot \ell}{\left(t \cdot \color{blue}{\left(t \cdot t\right)}\right) \cdot {k}^{2}} \]
                                                                        11. unpow2N/A

                                                                          \[\leadsto \frac{\ell \cdot \ell}{\left(t \cdot \left(t \cdot t\right)\right) \cdot \color{blue}{\left(k \cdot k\right)}} \]
                                                                        12. lower-*.f6454.6

                                                                          \[\leadsto \frac{\ell \cdot \ell}{\left(t \cdot \left(t \cdot t\right)\right) \cdot \color{blue}{\left(k \cdot k\right)}} \]
                                                                      5. Applied rewrites54.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. Applied rewrites66.5%

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

                                                                            \[\leadsto \frac{\ell}{t \cdot \left(t \cdot \left(\left(k \cdot t\right) \cdot k\right)\right)} \cdot \ell \]
                                                                          2. Step-by-step derivation
                                                                            1. Applied rewrites76.7%

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

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

                                                                          Alternative 14: 68.3% accurate, 10.7× speedup?

                                                                          \[\begin{array}{l} t\_m = \left|t\right| \\ t\_s = \mathsf{copysign}\left(1, t\right) \\ t\_s \cdot \begin{array}{l} \mathbf{if}\;t\_m \leq 2 \cdot 10^{-22}:\\ \;\;\;\;\ell \cdot \frac{\ell}{t\_m \cdot \left(t\_m \cdot \left(t\_m \cdot \left(k \cdot k\right)\right)\right)}\\ \mathbf{else}:\\ \;\;\;\;\ell \cdot \frac{\ell}{t\_m \cdot \left(k \cdot \left(t\_m \cdot \left(t\_m \cdot k\right)\right)\right)}\\ \end{array} \end{array} \]
                                                                          t\_m = (fabs.f64 t)
                                                                          t\_s = (copysign.f64 #s(literal 1 binary64) t)
                                                                          (FPCore (t_s t_m l k)
                                                                           :precision binary64
                                                                           (*
                                                                            t_s
                                                                            (if (<= t_m 2e-22)
                                                                              (* l (/ l (* t_m (* t_m (* t_m (* k k))))))
                                                                              (* l (/ l (* t_m (* k (* t_m (* 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 <= 2e-22) {
                                                                          		tmp = l * (l / (t_m * (t_m * (t_m * (k * k)))));
                                                                          	} else {
                                                                          		tmp = l * (l / (t_m * (k * (t_m * (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 <= 2d-22) then
                                                                                  tmp = l * (l / (t_m * (t_m * (t_m * (k * k)))))
                                                                              else
                                                                                  tmp = l * (l / (t_m * (k * (t_m * (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 <= 2e-22) {
                                                                          		tmp = l * (l / (t_m * (t_m * (t_m * (k * k)))));
                                                                          	} else {
                                                                          		tmp = l * (l / (t_m * (k * (t_m * (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 <= 2e-22:
                                                                          		tmp = l * (l / (t_m * (t_m * (t_m * (k * k)))))
                                                                          	else:
                                                                          		tmp = l * (l / (t_m * (k * (t_m * (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 <= 2e-22)
                                                                          		tmp = Float64(l * Float64(l / Float64(t_m * Float64(t_m * Float64(t_m * Float64(k * k))))));
                                                                          	else
                                                                          		tmp = Float64(l * Float64(l / Float64(t_m * Float64(k * Float64(t_m * 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 <= 2e-22)
                                                                          		tmp = l * (l / (t_m * (t_m * (t_m * (k * k)))));
                                                                          	else
                                                                          		tmp = l * (l / (t_m * (k * (t_m * (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, 2e-22], N[(l * N[(l / N[(t$95$m * N[(t$95$m * N[(t$95$m * N[(k * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(l * N[(l / N[(t$95$m * N[(k * N[(t$95$m * N[(t$95$m * 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}\;t\_m \leq 2 \cdot 10^{-22}:\\
                                                                          \;\;\;\;\ell \cdot \frac{\ell}{t\_m \cdot \left(t\_m \cdot \left(t\_m \cdot \left(k \cdot k\right)\right)\right)}\\
                                                                          
                                                                          \mathbf{else}:\\
                                                                          \;\;\;\;\ell \cdot \frac{\ell}{t\_m \cdot \left(k \cdot \left(t\_m \cdot \left(t\_m \cdot k\right)\right)\right)}\\
                                                                          
                                                                          
                                                                          \end{array}
                                                                          \end{array}
                                                                          
                                                                          Derivation
                                                                          1. Split input into 2 regimes
                                                                          2. if t < 2.0000000000000001e-22

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

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

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

                                                                                \[\leadsto \frac{\color{blue}{\ell \cdot \ell}}{{k}^{2} \cdot {t}^{3}} \]
                                                                              3. lower-*.f64N/A

                                                                                \[\leadsto \frac{\color{blue}{\ell \cdot \ell}}{{k}^{2} \cdot {t}^{3}} \]
                                                                              4. *-commutativeN/A

                                                                                \[\leadsto \frac{\ell \cdot \ell}{\color{blue}{{t}^{3} \cdot {k}^{2}}} \]
                                                                              5. lower-*.f64N/A

                                                                                \[\leadsto \frac{\ell \cdot \ell}{\color{blue}{{t}^{3} \cdot {k}^{2}}} \]
                                                                              6. cube-multN/A

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

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

                                                                                \[\leadsto \frac{\ell \cdot \ell}{\color{blue}{\left(t \cdot {t}^{2}\right)} \cdot {k}^{2}} \]
                                                                              9. unpow2N/A

                                                                                \[\leadsto \frac{\ell \cdot \ell}{\left(t \cdot \color{blue}{\left(t \cdot t\right)}\right) \cdot {k}^{2}} \]
                                                                              10. lower-*.f64N/A

                                                                                \[\leadsto \frac{\ell \cdot \ell}{\left(t \cdot \color{blue}{\left(t \cdot t\right)}\right) \cdot {k}^{2}} \]
                                                                              11. unpow2N/A

                                                                                \[\leadsto \frac{\ell \cdot \ell}{\left(t \cdot \left(t \cdot t\right)\right) \cdot \color{blue}{\left(k \cdot k\right)}} \]
                                                                              12. lower-*.f6446.0

                                                                                \[\leadsto \frac{\ell \cdot \ell}{\left(t \cdot \left(t \cdot t\right)\right) \cdot \color{blue}{\left(k \cdot k\right)}} \]
                                                                            5. Applied rewrites46.0%

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

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

                                                                              if 2.0000000000000001e-22 < 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. lower-/.f64N/A

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

                                                                                  \[\leadsto \frac{\color{blue}{\ell \cdot \ell}}{{k}^{2} \cdot {t}^{3}} \]
                                                                                3. lower-*.f64N/A

                                                                                  \[\leadsto \frac{\color{blue}{\ell \cdot \ell}}{{k}^{2} \cdot {t}^{3}} \]
                                                                                4. *-commutativeN/A

                                                                                  \[\leadsto \frac{\ell \cdot \ell}{\color{blue}{{t}^{3} \cdot {k}^{2}}} \]
                                                                                5. lower-*.f64N/A

                                                                                  \[\leadsto \frac{\ell \cdot \ell}{\color{blue}{{t}^{3} \cdot {k}^{2}}} \]
                                                                                6. cube-multN/A

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

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

                                                                                  \[\leadsto \frac{\ell \cdot \ell}{\color{blue}{\left(t \cdot {t}^{2}\right)} \cdot {k}^{2}} \]
                                                                                9. unpow2N/A

                                                                                  \[\leadsto \frac{\ell \cdot \ell}{\left(t \cdot \color{blue}{\left(t \cdot t\right)}\right) \cdot {k}^{2}} \]
                                                                                10. lower-*.f64N/A

                                                                                  \[\leadsto \frac{\ell \cdot \ell}{\left(t \cdot \color{blue}{\left(t \cdot t\right)}\right) \cdot {k}^{2}} \]
                                                                                11. unpow2N/A

                                                                                  \[\leadsto \frac{\ell \cdot \ell}{\left(t \cdot \left(t \cdot t\right)\right) \cdot \color{blue}{\left(k \cdot k\right)}} \]
                                                                                12. lower-*.f6451.8

                                                                                  \[\leadsto \frac{\ell \cdot \ell}{\left(t \cdot \left(t \cdot t\right)\right) \cdot \color{blue}{\left(k \cdot k\right)}} \]
                                                                              5. Applied rewrites51.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. Applied rewrites64.5%

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

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

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

                                                                                Alternative 15: 66.1% accurate, 10.7× speedup?

                                                                                \[\begin{array}{l} t\_m = \left|t\right| \\ t\_s = \mathsf{copysign}\left(1, t\right) \\ t\_s \cdot \begin{array}{l} \mathbf{if}\;t\_m \leq 5 \cdot 10^{-107}:\\ \;\;\;\;\ell \cdot \frac{\ell}{t\_m \cdot \left(t\_m \cdot \left(t\_m \cdot \left(k \cdot k\right)\right)\right)}\\ \mathbf{else}:\\ \;\;\;\;\ell \cdot \frac{\ell}{t\_m \cdot \left(t\_m \cdot \left(k \cdot \left(t\_m \cdot k\right)\right)\right)}\\ \end{array} \end{array} \]
                                                                                t\_m = (fabs.f64 t)
                                                                                t\_s = (copysign.f64 #s(literal 1 binary64) t)
                                                                                (FPCore (t_s t_m l k)
                                                                                 :precision binary64
                                                                                 (*
                                                                                  t_s
                                                                                  (if (<= t_m 5e-107)
                                                                                    (* l (/ l (* t_m (* t_m (* t_m (* k k))))))
                                                                                    (* l (/ l (* t_m (* 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) {
                                                                                	double tmp;
                                                                                	if (t_m <= 5e-107) {
                                                                                		tmp = l * (l / (t_m * (t_m * (t_m * (k * k)))));
                                                                                	} else {
                                                                                		tmp = l * (l / (t_m * (t_m * (k * (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 <= 5d-107) then
                                                                                        tmp = l * (l / (t_m * (t_m * (t_m * (k * k)))))
                                                                                    else
                                                                                        tmp = l * (l / (t_m * (t_m * (k * (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 <= 5e-107) {
                                                                                		tmp = l * (l / (t_m * (t_m * (t_m * (k * k)))));
                                                                                	} else {
                                                                                		tmp = l * (l / (t_m * (t_m * (k * (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 <= 5e-107:
                                                                                		tmp = l * (l / (t_m * (t_m * (t_m * (k * k)))))
                                                                                	else:
                                                                                		tmp = l * (l / (t_m * (t_m * (k * (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 <= 5e-107)
                                                                                		tmp = Float64(l * Float64(l / Float64(t_m * Float64(t_m * Float64(t_m * Float64(k * k))))));
                                                                                	else
                                                                                		tmp = Float64(l * Float64(l / Float64(t_m * Float64(t_m * Float64(k * 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 <= 5e-107)
                                                                                		tmp = l * (l / (t_m * (t_m * (t_m * (k * k)))));
                                                                                	else
                                                                                		tmp = l * (l / (t_m * (t_m * (k * (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, 5e-107], N[(l * N[(l / N[(t$95$m * N[(t$95$m * N[(t$95$m * N[(k * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(l * N[(l / N[(t$95$m * N[(t$95$m * N[(k * N[(t$95$m * 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}\;t\_m \leq 5 \cdot 10^{-107}:\\
                                                                                \;\;\;\;\ell \cdot \frac{\ell}{t\_m \cdot \left(t\_m \cdot \left(t\_m \cdot \left(k \cdot k\right)\right)\right)}\\
                                                                                
                                                                                \mathbf{else}:\\
                                                                                \;\;\;\;\ell \cdot \frac{\ell}{t\_m \cdot \left(t\_m \cdot \left(k \cdot \left(t\_m \cdot k\right)\right)\right)}\\
                                                                                
                                                                                
                                                                                \end{array}
                                                                                \end{array}
                                                                                
                                                                                Derivation
                                                                                1. Split input into 2 regimes
                                                                                2. if t < 4.99999999999999971e-107

                                                                                  1. Initial program 40.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. lower-/.f64N/A

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

                                                                                      \[\leadsto \frac{\color{blue}{\ell \cdot \ell}}{{k}^{2} \cdot {t}^{3}} \]
                                                                                    3. lower-*.f64N/A

                                                                                      \[\leadsto \frac{\color{blue}{\ell \cdot \ell}}{{k}^{2} \cdot {t}^{3}} \]
                                                                                    4. *-commutativeN/A

                                                                                      \[\leadsto \frac{\ell \cdot \ell}{\color{blue}{{t}^{3} \cdot {k}^{2}}} \]
                                                                                    5. lower-*.f64N/A

                                                                                      \[\leadsto \frac{\ell \cdot \ell}{\color{blue}{{t}^{3} \cdot {k}^{2}}} \]
                                                                                    6. cube-multN/A

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

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

                                                                                      \[\leadsto \frac{\ell \cdot \ell}{\color{blue}{\left(t \cdot {t}^{2}\right)} \cdot {k}^{2}} \]
                                                                                    9. unpow2N/A

                                                                                      \[\leadsto \frac{\ell \cdot \ell}{\left(t \cdot \color{blue}{\left(t \cdot t\right)}\right) \cdot {k}^{2}} \]
                                                                                    10. lower-*.f64N/A

                                                                                      \[\leadsto \frac{\ell \cdot \ell}{\left(t \cdot \color{blue}{\left(t \cdot t\right)}\right) \cdot {k}^{2}} \]
                                                                                    11. unpow2N/A

                                                                                      \[\leadsto \frac{\ell \cdot \ell}{\left(t \cdot \left(t \cdot t\right)\right) \cdot \color{blue}{\left(k \cdot k\right)}} \]
                                                                                    12. lower-*.f6443.4

                                                                                      \[\leadsto \frac{\ell \cdot \ell}{\left(t \cdot \left(t \cdot t\right)\right) \cdot \color{blue}{\left(k \cdot k\right)}} \]
                                                                                  5. Applied rewrites43.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. Applied rewrites59.7%

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

                                                                                    if 4.99999999999999971e-107 < t

                                                                                    1. Initial program 65.0%

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

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

                                                                                        \[\leadsto \frac{\color{blue}{\ell \cdot \ell}}{{k}^{2} \cdot {t}^{3}} \]
                                                                                      3. lower-*.f64N/A

                                                                                        \[\leadsto \frac{\color{blue}{\ell \cdot \ell}}{{k}^{2} \cdot {t}^{3}} \]
                                                                                      4. *-commutativeN/A

                                                                                        \[\leadsto \frac{\ell \cdot \ell}{\color{blue}{{t}^{3} \cdot {k}^{2}}} \]
                                                                                      5. lower-*.f64N/A

                                                                                        \[\leadsto \frac{\ell \cdot \ell}{\color{blue}{{t}^{3} \cdot {k}^{2}}} \]
                                                                                      6. cube-multN/A

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

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

                                                                                        \[\leadsto \frac{\ell \cdot \ell}{\color{blue}{\left(t \cdot {t}^{2}\right)} \cdot {k}^{2}} \]
                                                                                      9. unpow2N/A

                                                                                        \[\leadsto \frac{\ell \cdot \ell}{\left(t \cdot \color{blue}{\left(t \cdot t\right)}\right) \cdot {k}^{2}} \]
                                                                                      10. lower-*.f64N/A

                                                                                        \[\leadsto \frac{\ell \cdot \ell}{\left(t \cdot \color{blue}{\left(t \cdot t\right)}\right) \cdot {k}^{2}} \]
                                                                                      11. unpow2N/A

                                                                                        \[\leadsto \frac{\ell \cdot \ell}{\left(t \cdot \left(t \cdot t\right)\right) \cdot \color{blue}{\left(k \cdot k\right)}} \]
                                                                                      12. lower-*.f6455.0

                                                                                        \[\leadsto \frac{\ell \cdot \ell}{\left(t \cdot \left(t \cdot t\right)\right) \cdot \color{blue}{\left(k \cdot k\right)}} \]
                                                                                    5. Applied rewrites55.0%

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

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

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

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

                                                                                      Alternative 16: 61.8% accurate, 12.5× speedup?

                                                                                      \[\begin{array}{l} t\_m = \left|t\right| \\ t\_s = \mathsf{copysign}\left(1, t\right) \\ t\_s \cdot \left(\ell \cdot \frac{\ell}{t\_m \cdot \left(t\_m \cdot \left(t\_m \cdot \left(k \cdot k\right)\right)\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 (/ l (* t_m (* 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 * (l / (t_m * (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 * (l / (t_m * (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 * (l / (t_m * (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 * (l / (t_m * (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(l * Float64(l / Float64(t_m * Float64(t_m * Float64(t_m * Float64(k * k)))))))
                                                                                      end
                                                                                      
                                                                                      t\_m = abs(t);
                                                                                      t\_s = sign(t) * abs(1.0);
                                                                                      function tmp = code(t_s, t_m, l, k)
                                                                                      	tmp = t_s * (l * (l / (t_m * (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[(l * N[(l / N[(t$95$m * N[(t$95$m * N[(t$95$m * N[(k * 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 \left(\ell \cdot \frac{\ell}{t\_m \cdot \left(t\_m \cdot \left(t\_m \cdot \left(k \cdot k\right)\right)\right)}\right)
                                                                                      \end{array}
                                                                                      
                                                                                      Derivation
                                                                                      1. Initial program 49.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. lower-/.f64N/A

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

                                                                                          \[\leadsto \frac{\color{blue}{\ell \cdot \ell}}{{k}^{2} \cdot {t}^{3}} \]
                                                                                        3. lower-*.f64N/A

                                                                                          \[\leadsto \frac{\color{blue}{\ell \cdot \ell}}{{k}^{2} \cdot {t}^{3}} \]
                                                                                        4. *-commutativeN/A

                                                                                          \[\leadsto \frac{\ell \cdot \ell}{\color{blue}{{t}^{3} \cdot {k}^{2}}} \]
                                                                                        5. lower-*.f64N/A

                                                                                          \[\leadsto \frac{\ell \cdot \ell}{\color{blue}{{t}^{3} \cdot {k}^{2}}} \]
                                                                                        6. cube-multN/A

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

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

                                                                                          \[\leadsto \frac{\ell \cdot \ell}{\color{blue}{\left(t \cdot {t}^{2}\right)} \cdot {k}^{2}} \]
                                                                                        9. unpow2N/A

                                                                                          \[\leadsto \frac{\ell \cdot \ell}{\left(t \cdot \color{blue}{\left(t \cdot t\right)}\right) \cdot {k}^{2}} \]
                                                                                        10. lower-*.f64N/A

                                                                                          \[\leadsto \frac{\ell \cdot \ell}{\left(t \cdot \color{blue}{\left(t \cdot t\right)}\right) \cdot {k}^{2}} \]
                                                                                        11. unpow2N/A

                                                                                          \[\leadsto \frac{\ell \cdot \ell}{\left(t \cdot \left(t \cdot t\right)\right) \cdot \color{blue}{\left(k \cdot k\right)}} \]
                                                                                        12. lower-*.f6447.5

                                                                                          \[\leadsto \frac{\ell \cdot \ell}{\left(t \cdot \left(t \cdot t\right)\right) \cdot \color{blue}{\left(k \cdot k\right)}} \]
                                                                                      5. Applied rewrites47.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. Applied rewrites60.7%

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

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

                                                                                        Reproduce

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