Toniolo and Linder, Equation (10+)

Percentage Accurate: 54.7% → 92.4%
Time: 7.4s
Alternatives: 22
Speedup: 6.8×

Specification

?
\[\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)} \]
(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));
}
module fmin_fmax_functions
    implicit none
    private
    public fmax
    public fmin

    interface fmax
        module procedure fmax88
        module procedure fmax44
        module procedure fmax84
        module procedure fmax48
    end interface
    interface fmin
        module procedure fmin88
        module procedure fmin44
        module procedure fmin84
        module procedure fmin48
    end interface
contains
    real(8) function fmax88(x, y) result (res)
        real(8), intent (in) :: x
        real(8), intent (in) :: y
        res = merge(y, merge(x, max(x, y), y /= y), x /= x)
    end function
    real(4) function fmax44(x, y) result (res)
        real(4), intent (in) :: x
        real(4), intent (in) :: y
        res = merge(y, merge(x, max(x, y), y /= y), x /= x)
    end function
    real(8) function fmax84(x, y) result(res)
        real(8), intent (in) :: x
        real(4), intent (in) :: y
        res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
    end function
    real(8) function fmax48(x, y) result(res)
        real(4), intent (in) :: x
        real(8), intent (in) :: y
        res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
    end function
    real(8) function fmin88(x, y) result (res)
        real(8), intent (in) :: x
        real(8), intent (in) :: y
        res = merge(y, merge(x, min(x, y), y /= y), x /= x)
    end function
    real(4) function fmin44(x, y) result (res)
        real(4), intent (in) :: x
        real(4), intent (in) :: y
        res = merge(y, merge(x, min(x, y), y /= y), x /= x)
    end function
    real(8) function fmin84(x, y) result(res)
        real(8), intent (in) :: x
        real(4), intent (in) :: y
        res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
    end function
    real(8) function fmin48(x, y) result(res)
        real(4), intent (in) :: x
        real(8), intent (in) :: y
        res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
    end function
end module

real(8) function code(t, l, k)
use fmin_fmax_functions
    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]
\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)}

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 22 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.7% accurate, 1.0× speedup?

\[\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)} \]
(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));
}
module fmin_fmax_functions
    implicit none
    private
    public fmax
    public fmin

    interface fmax
        module procedure fmax88
        module procedure fmax44
        module procedure fmax84
        module procedure fmax48
    end interface
    interface fmin
        module procedure fmin88
        module procedure fmin44
        module procedure fmin84
        module procedure fmin48
    end interface
contains
    real(8) function fmax88(x, y) result (res)
        real(8), intent (in) :: x
        real(8), intent (in) :: y
        res = merge(y, merge(x, max(x, y), y /= y), x /= x)
    end function
    real(4) function fmax44(x, y) result (res)
        real(4), intent (in) :: x
        real(4), intent (in) :: y
        res = merge(y, merge(x, max(x, y), y /= y), x /= x)
    end function
    real(8) function fmax84(x, y) result(res)
        real(8), intent (in) :: x
        real(4), intent (in) :: y
        res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
    end function
    real(8) function fmax48(x, y) result(res)
        real(4), intent (in) :: x
        real(8), intent (in) :: y
        res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
    end function
    real(8) function fmin88(x, y) result (res)
        real(8), intent (in) :: x
        real(8), intent (in) :: y
        res = merge(y, merge(x, min(x, y), y /= y), x /= x)
    end function
    real(4) function fmin44(x, y) result (res)
        real(4), intent (in) :: x
        real(4), intent (in) :: y
        res = merge(y, merge(x, min(x, y), y /= y), x /= x)
    end function
    real(8) function fmin84(x, y) result(res)
        real(8), intent (in) :: x
        real(4), intent (in) :: y
        res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
    end function
    real(8) function fmin48(x, y) result(res)
        real(4), intent (in) :: x
        real(8), intent (in) :: y
        res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
    end function
end module

real(8) function code(t, l, k)
use fmin_fmax_functions
    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]
\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)}

Alternative 1: 92.4% accurate, 1.0× speedup?

\[\begin{array}{l} t_1 := \left|t\right| \cdot \left|t\right|\\ t_2 := \frac{\ell}{\sin k \cdot \left|t\right|}\\ \mathsf{copysign}\left(1, t\right) \cdot \begin{array}{l} \mathbf{if}\;\left|t\right| \leq 4.8 \cdot 10^{-39}:\\ \;\;\;\;\frac{2}{\left(\left(\mathsf{fma}\left(-0.5, \cos \left(k + k\right), 0.5\right) \cdot \left|t\right|\right) \cdot \frac{k}{\cos k \cdot \ell}\right) \cdot \frac{k}{\ell}}\\ \mathbf{elif}\;\left|t\right| \leq 1.35 \cdot 10^{+155}:\\ \;\;\;\;\left(\frac{2}{\mathsf{fma}\left(\frac{k}{t\_1}, k, 2\right) \cdot \tan k} \cdot \frac{\ell}{t\_1}\right) \cdot t\_2\\ \mathbf{else}:\\ \;\;\;\;\frac{\frac{\ell}{\left|t\right|} \cdot 2}{\left|t\right| \cdot \left(2 \cdot \tan k\right)} \cdot t\_2\\ \end{array} \end{array} \]
(FPCore (t l k)
  :precision binary64
  (let* ((t_1 (* (fabs t) (fabs t))) (t_2 (/ l (* (sin k) (fabs t)))))
  (*
   (copysign 1.0 t)
   (if (<= (fabs t) 4.8e-39)
     (/
      2.0
      (*
       (*
        (* (fma -0.5 (cos (+ k k)) 0.5) (fabs t))
        (/ k (* (cos k) l)))
       (/ k l)))
     (if (<= (fabs t) 1.35e+155)
       (* (* (/ 2.0 (* (fma (/ k t_1) k 2.0) (tan k))) (/ l t_1)) t_2)
       (*
        (/ (* (/ l (fabs t)) 2.0) (* (fabs t) (* 2.0 (tan k))))
        t_2))))))
double code(double t, double l, double k) {
	double t_1 = fabs(t) * fabs(t);
	double t_2 = l / (sin(k) * fabs(t));
	double tmp;
	if (fabs(t) <= 4.8e-39) {
		tmp = 2.0 / (((fma(-0.5, cos((k + k)), 0.5) * fabs(t)) * (k / (cos(k) * l))) * (k / l));
	} else if (fabs(t) <= 1.35e+155) {
		tmp = ((2.0 / (fma((k / t_1), k, 2.0) * tan(k))) * (l / t_1)) * t_2;
	} else {
		tmp = (((l / fabs(t)) * 2.0) / (fabs(t) * (2.0 * tan(k)))) * t_2;
	}
	return copysign(1.0, t) * tmp;
}
function code(t, l, k)
	t_1 = Float64(abs(t) * abs(t))
	t_2 = Float64(l / Float64(sin(k) * abs(t)))
	tmp = 0.0
	if (abs(t) <= 4.8e-39)
		tmp = Float64(2.0 / Float64(Float64(Float64(fma(-0.5, cos(Float64(k + k)), 0.5) * abs(t)) * Float64(k / Float64(cos(k) * l))) * Float64(k / l)));
	elseif (abs(t) <= 1.35e+155)
		tmp = Float64(Float64(Float64(2.0 / Float64(fma(Float64(k / t_1), k, 2.0) * tan(k))) * Float64(l / t_1)) * t_2);
	else
		tmp = Float64(Float64(Float64(Float64(l / abs(t)) * 2.0) / Float64(abs(t) * Float64(2.0 * tan(k)))) * t_2);
	end
	return Float64(copysign(1.0, t) * tmp)
end
code[t_, l_, k_] := Block[{t$95$1 = N[(N[Abs[t], $MachinePrecision] * N[Abs[t], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(l / N[(N[Sin[k], $MachinePrecision] * N[Abs[t], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, N[(N[With[{TMP1 = Abs[1.0], TMP2 = Sign[t]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision] * If[LessEqual[N[Abs[t], $MachinePrecision], 4.8e-39], N[(2.0 / N[(N[(N[(N[(-0.5 * N[Cos[N[(k + k), $MachinePrecision]], $MachinePrecision] + 0.5), $MachinePrecision] * N[Abs[t], $MachinePrecision]), $MachinePrecision] * N[(k / N[(N[Cos[k], $MachinePrecision] * l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(k / l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[Abs[t], $MachinePrecision], 1.35e+155], N[(N[(N[(2.0 / N[(N[(N[(k / t$95$1), $MachinePrecision] * k + 2.0), $MachinePrecision] * N[Tan[k], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(l / t$95$1), $MachinePrecision]), $MachinePrecision] * t$95$2), $MachinePrecision], N[(N[(N[(N[(l / N[Abs[t], $MachinePrecision]), $MachinePrecision] * 2.0), $MachinePrecision] / N[(N[Abs[t], $MachinePrecision] * N[(2.0 * N[Tan[k], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * t$95$2), $MachinePrecision]]]), $MachinePrecision]]]
\begin{array}{l}
t_1 := \left|t\right| \cdot \left|t\right|\\
t_2 := \frac{\ell}{\sin k \cdot \left|t\right|}\\
\mathsf{copysign}\left(1, t\right) \cdot \begin{array}{l}
\mathbf{if}\;\left|t\right| \leq 4.8 \cdot 10^{-39}:\\
\;\;\;\;\frac{2}{\left(\left(\mathsf{fma}\left(-0.5, \cos \left(k + k\right), 0.5\right) \cdot \left|t\right|\right) \cdot \frac{k}{\cos k \cdot \ell}\right) \cdot \frac{k}{\ell}}\\

\mathbf{elif}\;\left|t\right| \leq 1.35 \cdot 10^{+155}:\\
\;\;\;\;\left(\frac{2}{\mathsf{fma}\left(\frac{k}{t\_1}, k, 2\right) \cdot \tan k} \cdot \frac{\ell}{t\_1}\right) \cdot t\_2\\

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


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

    1. Initial program 54.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \frac{2}{\left(\left(\left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(k + k\right)\right) \cdot t\right) \cdot \frac{k}{\cos k \cdot \ell}\right) \cdot \color{blue}{\frac{k}{\ell}}} \]
    8. Applied rewrites68.5%

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

    if 4.8000000000000003e-39 < t < 1.35e155

    1. Initial program 54.7%

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

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

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

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

        \[\leadsto \frac{2}{\left(\frac{\color{blue}{{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)} \]
      7. cube-multN/A

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

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

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

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

        \[\leadsto \frac{2}{\left(\left(\frac{t}{\ell} \cdot \frac{\color{blue}{\left(t \cdot t\right) \cdot \sin k}}{\ell}\right) \cdot \tan k\right) \cdot \left(\left(1 + {\left(\frac{k}{t}\right)}^{2}\right) + 1\right)} \]
      15. lower-*.f6466.5%

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

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

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

    if 1.35e155 < t

    1. Initial program 54.7%

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

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

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

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

        \[\leadsto \frac{2}{\left(\frac{\color{blue}{{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)} \]
      7. cube-multN/A

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

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

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

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

        \[\leadsto \frac{2}{\left(\left(\frac{t}{\ell} \cdot \frac{\color{blue}{\left(t \cdot t\right) \cdot \sin k}}{\ell}\right) \cdot \tan k\right) \cdot \left(\left(1 + {\left(\frac{k}{t}\right)}^{2}\right) + 1\right)} \]
      15. lower-*.f6466.5%

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \frac{\color{blue}{\frac{\ell}{t}} \cdot 2}{t \cdot \left(\mathsf{fma}\left(\frac{k}{t \cdot t}, k, 2\right) \cdot \tan k\right)} \cdot \frac{\ell}{\sin k \cdot t} \]
      11. lower-*.f6473.0%

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

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

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

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

    Alternative 2: 92.2% accurate, 1.0× speedup?

    \[\begin{array}{l} t_1 := \left|t\right| \cdot \left|t\right|\\ \mathsf{copysign}\left(1, t\right) \cdot \begin{array}{l} \mathbf{if}\;\left|t\right| \leq 2.25 \cdot 10^{-80}:\\ \;\;\;\;\frac{2}{\left(\left(\mathsf{fma}\left(-0.5, \cos \left(k + k\right), 0.5\right) \cdot \left|t\right|\right) \cdot \frac{k}{\cos k \cdot \ell}\right) \cdot \frac{k}{\ell}}\\ \mathbf{elif}\;\left|t\right| \leq 1.35 \cdot 10^{+155}:\\ \;\;\;\;\frac{2}{\left(\frac{\sin k}{\ell} \cdot t\_1\right) \cdot \left(\frac{\left|t\right|}{\ell} \cdot \left(\mathsf{fma}\left(\frac{k}{t\_1}, k, 2\right) \cdot \tan k\right)\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{\frac{\ell}{\left|t\right|} \cdot 2}{\left|t\right| \cdot \left(2 \cdot \tan k\right)} \cdot \frac{\ell}{\sin k \cdot \left|t\right|}\\ \end{array} \end{array} \]
    (FPCore (t l k)
      :precision binary64
      (let* ((t_1 (* (fabs t) (fabs t))))
      (*
       (copysign 1.0 t)
       (if (<= (fabs t) 2.25e-80)
         (/
          2.0
          (*
           (*
            (* (fma -0.5 (cos (+ k k)) 0.5) (fabs t))
            (/ k (* (cos k) l)))
           (/ k l)))
         (if (<= (fabs t) 1.35e+155)
           (/
            2.0
            (*
             (* (/ (sin k) l) t_1)
             (* (/ (fabs t) l) (* (fma (/ k t_1) k 2.0) (tan k)))))
           (*
            (/ (* (/ l (fabs t)) 2.0) (* (fabs t) (* 2.0 (tan k))))
            (/ l (* (sin k) (fabs t)))))))))
    double code(double t, double l, double k) {
    	double t_1 = fabs(t) * fabs(t);
    	double tmp;
    	if (fabs(t) <= 2.25e-80) {
    		tmp = 2.0 / (((fma(-0.5, cos((k + k)), 0.5) * fabs(t)) * (k / (cos(k) * l))) * (k / l));
    	} else if (fabs(t) <= 1.35e+155) {
    		tmp = 2.0 / (((sin(k) / l) * t_1) * ((fabs(t) / l) * (fma((k / t_1), k, 2.0) * tan(k))));
    	} else {
    		tmp = (((l / fabs(t)) * 2.0) / (fabs(t) * (2.0 * tan(k)))) * (l / (sin(k) * fabs(t)));
    	}
    	return copysign(1.0, t) * tmp;
    }
    
    function code(t, l, k)
    	t_1 = Float64(abs(t) * abs(t))
    	tmp = 0.0
    	if (abs(t) <= 2.25e-80)
    		tmp = Float64(2.0 / Float64(Float64(Float64(fma(-0.5, cos(Float64(k + k)), 0.5) * abs(t)) * Float64(k / Float64(cos(k) * l))) * Float64(k / l)));
    	elseif (abs(t) <= 1.35e+155)
    		tmp = Float64(2.0 / Float64(Float64(Float64(sin(k) / l) * t_1) * Float64(Float64(abs(t) / l) * Float64(fma(Float64(k / t_1), k, 2.0) * tan(k)))));
    	else
    		tmp = Float64(Float64(Float64(Float64(l / abs(t)) * 2.0) / Float64(abs(t) * Float64(2.0 * tan(k)))) * Float64(l / Float64(sin(k) * abs(t))));
    	end
    	return Float64(copysign(1.0, t) * tmp)
    end
    
    code[t_, l_, k_] := Block[{t$95$1 = N[(N[Abs[t], $MachinePrecision] * N[Abs[t], $MachinePrecision]), $MachinePrecision]}, N[(N[With[{TMP1 = Abs[1.0], TMP2 = Sign[t]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision] * If[LessEqual[N[Abs[t], $MachinePrecision], 2.25e-80], N[(2.0 / N[(N[(N[(N[(-0.5 * N[Cos[N[(k + k), $MachinePrecision]], $MachinePrecision] + 0.5), $MachinePrecision] * N[Abs[t], $MachinePrecision]), $MachinePrecision] * N[(k / N[(N[Cos[k], $MachinePrecision] * l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(k / l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[Abs[t], $MachinePrecision], 1.35e+155], N[(2.0 / N[(N[(N[(N[Sin[k], $MachinePrecision] / l), $MachinePrecision] * t$95$1), $MachinePrecision] * N[(N[(N[Abs[t], $MachinePrecision] / l), $MachinePrecision] * N[(N[(N[(k / t$95$1), $MachinePrecision] * k + 2.0), $MachinePrecision] * N[Tan[k], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(N[(l / N[Abs[t], $MachinePrecision]), $MachinePrecision] * 2.0), $MachinePrecision] / N[(N[Abs[t], $MachinePrecision] * N[(2.0 * N[Tan[k], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(l / N[(N[Sin[k], $MachinePrecision] * N[Abs[t], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]), $MachinePrecision]]
    
    \begin{array}{l}
    t_1 := \left|t\right| \cdot \left|t\right|\\
    \mathsf{copysign}\left(1, t\right) \cdot \begin{array}{l}
    \mathbf{if}\;\left|t\right| \leq 2.25 \cdot 10^{-80}:\\
    \;\;\;\;\frac{2}{\left(\left(\mathsf{fma}\left(-0.5, \cos \left(k + k\right), 0.5\right) \cdot \left|t\right|\right) \cdot \frac{k}{\cos k \cdot \ell}\right) \cdot \frac{k}{\ell}}\\
    
    \mathbf{elif}\;\left|t\right| \leq 1.35 \cdot 10^{+155}:\\
    \;\;\;\;\frac{2}{\left(\frac{\sin k}{\ell} \cdot t\_1\right) \cdot \left(\frac{\left|t\right|}{\ell} \cdot \left(\mathsf{fma}\left(\frac{k}{t\_1}, k, 2\right) \cdot \tan k\right)\right)}\\
    
    \mathbf{else}:\\
    \;\;\;\;\frac{\frac{\ell}{\left|t\right|} \cdot 2}{\left|t\right| \cdot \left(2 \cdot \tan k\right)} \cdot \frac{\ell}{\sin k \cdot \left|t\right|}\\
    
    
    \end{array}
    \end{array}
    
    Derivation
    1. Split input into 3 regimes
    2. if t < 2.2500000000000001e-80

      1. Initial program 54.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

          \[\leadsto \frac{2}{\left(\left(\left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(k + k\right)\right) \cdot t\right) \cdot \frac{k}{\cos k \cdot \ell}\right) \cdot \color{blue}{\frac{k}{\ell}}} \]
      8. Applied rewrites68.5%

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

      if 2.2500000000000001e-80 < t < 1.35e155

      1. Initial program 54.7%

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

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

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

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

          \[\leadsto \frac{2}{\left(\frac{\color{blue}{{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)} \]
        7. cube-multN/A

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

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

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

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

          \[\leadsto \frac{2}{\left(\left(\frac{t}{\ell} \cdot \frac{\color{blue}{\left(t \cdot t\right) \cdot \sin k}}{\ell}\right) \cdot \tan k\right) \cdot \left(\left(1 + {\left(\frac{k}{t}\right)}^{2}\right) + 1\right)} \]
        15. lower-*.f6466.5%

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

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

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

      if 1.35e155 < t

      1. Initial program 54.7%

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

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

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

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

          \[\leadsto \frac{2}{\left(\frac{\color{blue}{{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)} \]
        7. cube-multN/A

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

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

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

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

          \[\leadsto \frac{2}{\left(\left(\frac{t}{\ell} \cdot \frac{\color{blue}{\left(t \cdot t\right) \cdot \sin k}}{\ell}\right) \cdot \tan k\right) \cdot \left(\left(1 + {\left(\frac{k}{t}\right)}^{2}\right) + 1\right)} \]
        15. lower-*.f6466.5%

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

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

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

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

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

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

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

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

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

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

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

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

          \[\leadsto \frac{\color{blue}{\frac{\ell}{t}} \cdot 2}{t \cdot \left(\mathsf{fma}\left(\frac{k}{t \cdot t}, k, 2\right) \cdot \tan k\right)} \cdot \frac{\ell}{\sin k \cdot t} \]
        11. lower-*.f6473.0%

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

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

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

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

      Alternative 3: 91.8% accurate, 1.0× speedup?

      \[\begin{array}{l} t_1 := \left|t\right| \cdot \left|t\right|\\ t_2 := \frac{\ell}{\sin k \cdot \left|t\right|}\\ \mathsf{copysign}\left(1, t\right) \cdot \begin{array}{l} \mathbf{if}\;\left|t\right| \leq 4.8 \cdot 10^{-39}:\\ \;\;\;\;\frac{2}{\left(\left(\mathsf{fma}\left(-0.5, \cos \left(k + k\right), 0.5\right) \cdot \left|t\right|\right) \cdot \frac{k}{\cos k \cdot \ell}\right) \cdot \frac{k}{\ell}}\\ \mathbf{elif}\;\left|t\right| \leq 1.35 \cdot 10^{+155}:\\ \;\;\;\;\frac{\ell + \ell}{\left(\mathsf{fma}\left(\frac{k}{t\_1}, k, 2\right) \cdot \tan k\right) \cdot t\_1} \cdot t\_2\\ \mathbf{else}:\\ \;\;\;\;\frac{\frac{\ell}{\left|t\right|} \cdot 2}{\left|t\right| \cdot \left(2 \cdot \tan k\right)} \cdot t\_2\\ \end{array} \end{array} \]
      (FPCore (t l k)
        :precision binary64
        (let* ((t_1 (* (fabs t) (fabs t))) (t_2 (/ l (* (sin k) (fabs t)))))
        (*
         (copysign 1.0 t)
         (if (<= (fabs t) 4.8e-39)
           (/
            2.0
            (*
             (*
              (* (fma -0.5 (cos (+ k k)) 0.5) (fabs t))
              (/ k (* (cos k) l)))
             (/ k l)))
           (if (<= (fabs t) 1.35e+155)
             (* (/ (+ l l) (* (* (fma (/ k t_1) k 2.0) (tan k)) t_1)) t_2)
             (*
              (/ (* (/ l (fabs t)) 2.0) (* (fabs t) (* 2.0 (tan k))))
              t_2))))))
      double code(double t, double l, double k) {
      	double t_1 = fabs(t) * fabs(t);
      	double t_2 = l / (sin(k) * fabs(t));
      	double tmp;
      	if (fabs(t) <= 4.8e-39) {
      		tmp = 2.0 / (((fma(-0.5, cos((k + k)), 0.5) * fabs(t)) * (k / (cos(k) * l))) * (k / l));
      	} else if (fabs(t) <= 1.35e+155) {
      		tmp = ((l + l) / ((fma((k / t_1), k, 2.0) * tan(k)) * t_1)) * t_2;
      	} else {
      		tmp = (((l / fabs(t)) * 2.0) / (fabs(t) * (2.0 * tan(k)))) * t_2;
      	}
      	return copysign(1.0, t) * tmp;
      }
      
      function code(t, l, k)
      	t_1 = Float64(abs(t) * abs(t))
      	t_2 = Float64(l / Float64(sin(k) * abs(t)))
      	tmp = 0.0
      	if (abs(t) <= 4.8e-39)
      		tmp = Float64(2.0 / Float64(Float64(Float64(fma(-0.5, cos(Float64(k + k)), 0.5) * abs(t)) * Float64(k / Float64(cos(k) * l))) * Float64(k / l)));
      	elseif (abs(t) <= 1.35e+155)
      		tmp = Float64(Float64(Float64(l + l) / Float64(Float64(fma(Float64(k / t_1), k, 2.0) * tan(k)) * t_1)) * t_2);
      	else
      		tmp = Float64(Float64(Float64(Float64(l / abs(t)) * 2.0) / Float64(abs(t) * Float64(2.0 * tan(k)))) * t_2);
      	end
      	return Float64(copysign(1.0, t) * tmp)
      end
      
      code[t_, l_, k_] := Block[{t$95$1 = N[(N[Abs[t], $MachinePrecision] * N[Abs[t], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(l / N[(N[Sin[k], $MachinePrecision] * N[Abs[t], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, N[(N[With[{TMP1 = Abs[1.0], TMP2 = Sign[t]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision] * If[LessEqual[N[Abs[t], $MachinePrecision], 4.8e-39], N[(2.0 / N[(N[(N[(N[(-0.5 * N[Cos[N[(k + k), $MachinePrecision]], $MachinePrecision] + 0.5), $MachinePrecision] * N[Abs[t], $MachinePrecision]), $MachinePrecision] * N[(k / N[(N[Cos[k], $MachinePrecision] * l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(k / l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[Abs[t], $MachinePrecision], 1.35e+155], N[(N[(N[(l + l), $MachinePrecision] / N[(N[(N[(N[(k / t$95$1), $MachinePrecision] * k + 2.0), $MachinePrecision] * N[Tan[k], $MachinePrecision]), $MachinePrecision] * t$95$1), $MachinePrecision]), $MachinePrecision] * t$95$2), $MachinePrecision], N[(N[(N[(N[(l / N[Abs[t], $MachinePrecision]), $MachinePrecision] * 2.0), $MachinePrecision] / N[(N[Abs[t], $MachinePrecision] * N[(2.0 * N[Tan[k], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * t$95$2), $MachinePrecision]]]), $MachinePrecision]]]
      
      \begin{array}{l}
      t_1 := \left|t\right| \cdot \left|t\right|\\
      t_2 := \frac{\ell}{\sin k \cdot \left|t\right|}\\
      \mathsf{copysign}\left(1, t\right) \cdot \begin{array}{l}
      \mathbf{if}\;\left|t\right| \leq 4.8 \cdot 10^{-39}:\\
      \;\;\;\;\frac{2}{\left(\left(\mathsf{fma}\left(-0.5, \cos \left(k + k\right), 0.5\right) \cdot \left|t\right|\right) \cdot \frac{k}{\cos k \cdot \ell}\right) \cdot \frac{k}{\ell}}\\
      
      \mathbf{elif}\;\left|t\right| \leq 1.35 \cdot 10^{+155}:\\
      \;\;\;\;\frac{\ell + \ell}{\left(\mathsf{fma}\left(\frac{k}{t\_1}, k, 2\right) \cdot \tan k\right) \cdot t\_1} \cdot t\_2\\
      
      \mathbf{else}:\\
      \;\;\;\;\frac{\frac{\ell}{\left|t\right|} \cdot 2}{\left|t\right| \cdot \left(2 \cdot \tan k\right)} \cdot t\_2\\
      
      
      \end{array}
      \end{array}
      
      Derivation
      1. Split input into 3 regimes
      2. if t < 4.8000000000000003e-39

        1. Initial program 54.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

            \[\leadsto \frac{2}{\left(\left(\left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(k + k\right)\right) \cdot t\right) \cdot \frac{k}{\cos k \cdot \ell}\right) \cdot \color{blue}{\frac{k}{\ell}}} \]
        8. Applied rewrites68.5%

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

        if 4.8000000000000003e-39 < t < 1.35e155

        1. Initial program 54.7%

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

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

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

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

            \[\leadsto \frac{2}{\left(\frac{\color{blue}{{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)} \]
          7. cube-multN/A

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

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

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

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

            \[\leadsto \frac{2}{\left(\left(\frac{t}{\ell} \cdot \frac{\color{blue}{\left(t \cdot t\right) \cdot \sin k}}{\ell}\right) \cdot \tan k\right) \cdot \left(\left(1 + {\left(\frac{k}{t}\right)}^{2}\right) + 1\right)} \]
          15. lower-*.f6466.5%

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

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

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

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

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

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

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

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

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

            \[\leadsto \frac{\color{blue}{\ell + \ell}}{\left(\mathsf{fma}\left(\frac{k}{t \cdot t}, k, 2\right) \cdot \tan k\right) \cdot \left(t \cdot t\right)} \cdot \frac{\ell}{\sin k \cdot t} \]
          8. lower-*.f6461.4%

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

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

        if 1.35e155 < t

        1. Initial program 54.7%

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

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

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

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

            \[\leadsto \frac{2}{\left(\frac{\color{blue}{{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)} \]
          7. cube-multN/A

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

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

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

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

            \[\leadsto \frac{2}{\left(\left(\frac{t}{\ell} \cdot \frac{\color{blue}{\left(t \cdot t\right) \cdot \sin k}}{\ell}\right) \cdot \tan k\right) \cdot \left(\left(1 + {\left(\frac{k}{t}\right)}^{2}\right) + 1\right)} \]
          15. lower-*.f6466.5%

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

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

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

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

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

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

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

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

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

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

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

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

            \[\leadsto \frac{\color{blue}{\frac{\ell}{t}} \cdot 2}{t \cdot \left(\mathsf{fma}\left(\frac{k}{t \cdot t}, k, 2\right) \cdot \tan k\right)} \cdot \frac{\ell}{\sin k \cdot t} \]
          11. lower-*.f6473.0%

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

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

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

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

        Alternative 4: 91.8% accurate, 1.1× speedup?

        \[\mathsf{copysign}\left(1, t\right) \cdot \begin{array}{l} \mathbf{if}\;\left|t\right| \leq 4.8 \cdot 10^{-39}:\\ \;\;\;\;\frac{2}{\left(\left(\mathsf{fma}\left(-0.5, \cos \left(k + k\right), 0.5\right) \cdot \left|t\right|\right) \cdot \frac{k}{\cos k \cdot \ell}\right) \cdot \frac{k}{\ell}}\\ \mathbf{else}:\\ \;\;\;\;\frac{\frac{\ell}{\left|t\right|} \cdot 2}{\left|t\right| \cdot \left(\mathsf{fma}\left(\frac{k}{\left|t\right| \cdot \left|t\right|}, k, 2\right) \cdot \tan k\right)} \cdot \frac{\ell}{\sin k \cdot \left|t\right|}\\ \end{array} \]
        (FPCore (t l k)
          :precision binary64
          (*
         (copysign 1.0 t)
         (if (<= (fabs t) 4.8e-39)
           (/
            2.0
            (*
             (* (* (fma -0.5 (cos (+ k k)) 0.5) (fabs t)) (/ k (* (cos k) l)))
             (/ k l)))
           (*
            (/
             (* (/ l (fabs t)) 2.0)
             (* (fabs t) (* (fma (/ k (* (fabs t) (fabs t))) k 2.0) (tan k))))
            (/ l (* (sin k) (fabs t)))))))
        double code(double t, double l, double k) {
        	double tmp;
        	if (fabs(t) <= 4.8e-39) {
        		tmp = 2.0 / (((fma(-0.5, cos((k + k)), 0.5) * fabs(t)) * (k / (cos(k) * l))) * (k / l));
        	} else {
        		tmp = (((l / fabs(t)) * 2.0) / (fabs(t) * (fma((k / (fabs(t) * fabs(t))), k, 2.0) * tan(k)))) * (l / (sin(k) * fabs(t)));
        	}
        	return copysign(1.0, t) * tmp;
        }
        
        function code(t, l, k)
        	tmp = 0.0
        	if (abs(t) <= 4.8e-39)
        		tmp = Float64(2.0 / Float64(Float64(Float64(fma(-0.5, cos(Float64(k + k)), 0.5) * abs(t)) * Float64(k / Float64(cos(k) * l))) * Float64(k / l)));
        	else
        		tmp = Float64(Float64(Float64(Float64(l / abs(t)) * 2.0) / Float64(abs(t) * Float64(fma(Float64(k / Float64(abs(t) * abs(t))), k, 2.0) * tan(k)))) * Float64(l / Float64(sin(k) * abs(t))));
        	end
        	return Float64(copysign(1.0, t) * tmp)
        end
        
        code[t_, l_, k_] := N[(N[With[{TMP1 = Abs[1.0], TMP2 = Sign[t]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision] * If[LessEqual[N[Abs[t], $MachinePrecision], 4.8e-39], N[(2.0 / N[(N[(N[(N[(-0.5 * N[Cos[N[(k + k), $MachinePrecision]], $MachinePrecision] + 0.5), $MachinePrecision] * N[Abs[t], $MachinePrecision]), $MachinePrecision] * N[(k / N[(N[Cos[k], $MachinePrecision] * l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(k / l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(N[(l / N[Abs[t], $MachinePrecision]), $MachinePrecision] * 2.0), $MachinePrecision] / N[(N[Abs[t], $MachinePrecision] * N[(N[(N[(k / N[(N[Abs[t], $MachinePrecision] * N[Abs[t], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * k + 2.0), $MachinePrecision] * N[Tan[k], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(l / N[(N[Sin[k], $MachinePrecision] * N[Abs[t], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]), $MachinePrecision]
        
        \mathsf{copysign}\left(1, t\right) \cdot \begin{array}{l}
        \mathbf{if}\;\left|t\right| \leq 4.8 \cdot 10^{-39}:\\
        \;\;\;\;\frac{2}{\left(\left(\mathsf{fma}\left(-0.5, \cos \left(k + k\right), 0.5\right) \cdot \left|t\right|\right) \cdot \frac{k}{\cos k \cdot \ell}\right) \cdot \frac{k}{\ell}}\\
        
        \mathbf{else}:\\
        \;\;\;\;\frac{\frac{\ell}{\left|t\right|} \cdot 2}{\left|t\right| \cdot \left(\mathsf{fma}\left(\frac{k}{\left|t\right| \cdot \left|t\right|}, k, 2\right) \cdot \tan k\right)} \cdot \frac{\ell}{\sin k \cdot \left|t\right|}\\
        
        
        \end{array}
        
        Derivation
        1. Split input into 2 regimes
        2. if t < 4.8000000000000003e-39

          1. Initial program 54.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

              \[\leadsto \frac{2}{\left(\left(\left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(k + k\right)\right) \cdot t\right) \cdot \frac{k}{\cos k \cdot \ell}\right) \cdot \color{blue}{\frac{k}{\ell}}} \]
          8. Applied rewrites68.5%

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

          if 4.8000000000000003e-39 < t

          1. Initial program 54.7%

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

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

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

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

              \[\leadsto \frac{2}{\left(\frac{\color{blue}{{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)} \]
            7. cube-multN/A

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

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

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

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

              \[\leadsto \frac{2}{\left(\left(\frac{t}{\ell} \cdot \frac{\color{blue}{\left(t \cdot t\right) \cdot \sin k}}{\ell}\right) \cdot \tan k\right) \cdot \left(\left(1 + {\left(\frac{k}{t}\right)}^{2}\right) + 1\right)} \]
            15. lower-*.f6466.5%

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

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

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

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

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

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

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

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

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

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

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

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

              \[\leadsto \frac{\color{blue}{\frac{\ell}{t}} \cdot 2}{t \cdot \left(\mathsf{fma}\left(\frac{k}{t \cdot t}, k, 2\right) \cdot \tan k\right)} \cdot \frac{\ell}{\sin k \cdot t} \]
            11. lower-*.f6473.0%

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

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

        Alternative 5: 90.4% accurate, 1.2× speedup?

        \[\begin{array}{l} \mathbf{if}\;\left|k\right| \leq 6 \cdot 10^{+35}:\\ \;\;\;\;\frac{\frac{\ell}{t} \cdot 2}{t \cdot \left(2 \cdot \tan \left(\left|k\right|\right)\right)} \cdot \frac{\ell}{\sin \left(\left|k\right|\right) \cdot t}\\ \mathbf{else}:\\ \;\;\;\;\frac{2}{\left(\left(\mathsf{fma}\left(-0.5, \cos \left(\left|k\right| + \left|k\right|\right), 0.5\right) \cdot t\right) \cdot \frac{\left|k\right|}{\cos \left(\left|k\right|\right) \cdot \ell}\right) \cdot \frac{\left|k\right|}{\ell}}\\ \end{array} \]
        (FPCore (t l k)
          :precision binary64
          (if (<= (fabs k) 6e+35)
          (*
           (/ (* (/ l t) 2.0) (* t (* 2.0 (tan (fabs k)))))
           (/ l (* (sin (fabs k)) t)))
          (/
           2.0
           (*
            (*
             (* (fma -0.5 (cos (+ (fabs k) (fabs k))) 0.5) t)
             (/ (fabs k) (* (cos (fabs k)) l)))
            (/ (fabs k) l)))))
        double code(double t, double l, double k) {
        	double tmp;
        	if (fabs(k) <= 6e+35) {
        		tmp = (((l / t) * 2.0) / (t * (2.0 * tan(fabs(k))))) * (l / (sin(fabs(k)) * t));
        	} else {
        		tmp = 2.0 / (((fma(-0.5, cos((fabs(k) + fabs(k))), 0.5) * t) * (fabs(k) / (cos(fabs(k)) * l))) * (fabs(k) / l));
        	}
        	return tmp;
        }
        
        function code(t, l, k)
        	tmp = 0.0
        	if (abs(k) <= 6e+35)
        		tmp = Float64(Float64(Float64(Float64(l / t) * 2.0) / Float64(t * Float64(2.0 * tan(abs(k))))) * Float64(l / Float64(sin(abs(k)) * t)));
        	else
        		tmp = Float64(2.0 / Float64(Float64(Float64(fma(-0.5, cos(Float64(abs(k) + abs(k))), 0.5) * t) * Float64(abs(k) / Float64(cos(abs(k)) * l))) * Float64(abs(k) / l)));
        	end
        	return tmp
        end
        
        code[t_, l_, k_] := If[LessEqual[N[Abs[k], $MachinePrecision], 6e+35], N[(N[(N[(N[(l / t), $MachinePrecision] * 2.0), $MachinePrecision] / N[(t * N[(2.0 * N[Tan[N[Abs[k], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(l / N[(N[Sin[N[Abs[k], $MachinePrecision]], $MachinePrecision] * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(2.0 / N[(N[(N[(N[(-0.5 * N[Cos[N[(N[Abs[k], $MachinePrecision] + N[Abs[k], $MachinePrecision]), $MachinePrecision]], $MachinePrecision] + 0.5), $MachinePrecision] * t), $MachinePrecision] * N[(N[Abs[k], $MachinePrecision] / N[(N[Cos[N[Abs[k], $MachinePrecision]], $MachinePrecision] * l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(N[Abs[k], $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
        
        \begin{array}{l}
        \mathbf{if}\;\left|k\right| \leq 6 \cdot 10^{+35}:\\
        \;\;\;\;\frac{\frac{\ell}{t} \cdot 2}{t \cdot \left(2 \cdot \tan \left(\left|k\right|\right)\right)} \cdot \frac{\ell}{\sin \left(\left|k\right|\right) \cdot t}\\
        
        \mathbf{else}:\\
        \;\;\;\;\frac{2}{\left(\left(\mathsf{fma}\left(-0.5, \cos \left(\left|k\right| + \left|k\right|\right), 0.5\right) \cdot t\right) \cdot \frac{\left|k\right|}{\cos \left(\left|k\right|\right) \cdot \ell}\right) \cdot \frac{\left|k\right|}{\ell}}\\
        
        
        \end{array}
        
        Derivation
        1. Split input into 2 regimes
        2. if k < 5.9999999999999998e35

          1. Initial program 54.7%

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

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

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

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

              \[\leadsto \frac{2}{\left(\frac{\color{blue}{{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)} \]
            7. cube-multN/A

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

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

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

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

              \[\leadsto \frac{2}{\left(\left(\frac{t}{\ell} \cdot \frac{\color{blue}{\left(t \cdot t\right) \cdot \sin k}}{\ell}\right) \cdot \tan k\right) \cdot \left(\left(1 + {\left(\frac{k}{t}\right)}^{2}\right) + 1\right)} \]
            15. lower-*.f6466.5%

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

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

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

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

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

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

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

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

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

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

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

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

              \[\leadsto \frac{\color{blue}{\frac{\ell}{t}} \cdot 2}{t \cdot \left(\mathsf{fma}\left(\frac{k}{t \cdot t}, k, 2\right) \cdot \tan k\right)} \cdot \frac{\ell}{\sin k \cdot t} \]
            11. lower-*.f6473.0%

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

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

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

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

            if 5.9999999999999998e35 < k

            1. Initial program 54.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                \[\leadsto \frac{2}{\left(\left(\left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(k + k\right)\right) \cdot t\right) \cdot \frac{k}{\cos k \cdot \ell}\right) \cdot \color{blue}{\frac{k}{\ell}}} \]
            8. Applied rewrites68.5%

              \[\leadsto \frac{2}{\left(\left(\mathsf{fma}\left(-0.5, \cos \left(k + k\right), 0.5\right) \cdot t\right) \cdot \frac{k}{\cos k \cdot \ell}\right) \cdot \color{blue}{\frac{k}{\ell}}} \]
          9. Recombined 2 regimes into one program.
          10. Add Preprocessing

          Alternative 6: 84.3% accurate, 1.2× speedup?

          \[\begin{array}{l} \mathbf{if}\;\left|k\right| \leq 5.8 \cdot 10^{+35}:\\ \;\;\;\;\frac{\frac{\ell}{t} \cdot 2}{t \cdot \left(2 \cdot \tan \left(\left|k\right|\right)\right)} \cdot \frac{\ell}{\sin \left(\left|k\right|\right) \cdot t}\\ \mathbf{else}:\\ \;\;\;\;\frac{2}{\mathsf{fma}\left(-0.5, \cos \left(\left|k\right| + \left|k\right|\right), 0.5\right) \cdot \left(\left(\left|k\right| \cdot t\right) \cdot \frac{\left|k\right|}{\left(\cos \left(\left|k\right|\right) \cdot \ell\right) \cdot \ell}\right)}\\ \end{array} \]
          (FPCore (t l k)
            :precision binary64
            (if (<= (fabs k) 5.8e+35)
            (*
             (/ (* (/ l t) 2.0) (* t (* 2.0 (tan (fabs k)))))
             (/ l (* (sin (fabs k)) t)))
            (/
             2.0
             (*
              (fma -0.5 (cos (+ (fabs k) (fabs k))) 0.5)
              (* (* (fabs k) t) (/ (fabs k) (* (* (cos (fabs k)) l) l)))))))
          double code(double t, double l, double k) {
          	double tmp;
          	if (fabs(k) <= 5.8e+35) {
          		tmp = (((l / t) * 2.0) / (t * (2.0 * tan(fabs(k))))) * (l / (sin(fabs(k)) * t));
          	} else {
          		tmp = 2.0 / (fma(-0.5, cos((fabs(k) + fabs(k))), 0.5) * ((fabs(k) * t) * (fabs(k) / ((cos(fabs(k)) * l) * l))));
          	}
          	return tmp;
          }
          
          function code(t, l, k)
          	tmp = 0.0
          	if (abs(k) <= 5.8e+35)
          		tmp = Float64(Float64(Float64(Float64(l / t) * 2.0) / Float64(t * Float64(2.0 * tan(abs(k))))) * Float64(l / Float64(sin(abs(k)) * t)));
          	else
          		tmp = Float64(2.0 / Float64(fma(-0.5, cos(Float64(abs(k) + abs(k))), 0.5) * Float64(Float64(abs(k) * t) * Float64(abs(k) / Float64(Float64(cos(abs(k)) * l) * l)))));
          	end
          	return tmp
          end
          
          code[t_, l_, k_] := If[LessEqual[N[Abs[k], $MachinePrecision], 5.8e+35], N[(N[(N[(N[(l / t), $MachinePrecision] * 2.0), $MachinePrecision] / N[(t * N[(2.0 * N[Tan[N[Abs[k], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(l / N[(N[Sin[N[Abs[k], $MachinePrecision]], $MachinePrecision] * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(2.0 / N[(N[(-0.5 * N[Cos[N[(N[Abs[k], $MachinePrecision] + N[Abs[k], $MachinePrecision]), $MachinePrecision]], $MachinePrecision] + 0.5), $MachinePrecision] * N[(N[(N[Abs[k], $MachinePrecision] * t), $MachinePrecision] * N[(N[Abs[k], $MachinePrecision] / N[(N[(N[Cos[N[Abs[k], $MachinePrecision]], $MachinePrecision] * l), $MachinePrecision] * l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
          
          \begin{array}{l}
          \mathbf{if}\;\left|k\right| \leq 5.8 \cdot 10^{+35}:\\
          \;\;\;\;\frac{\frac{\ell}{t} \cdot 2}{t \cdot \left(2 \cdot \tan \left(\left|k\right|\right)\right)} \cdot \frac{\ell}{\sin \left(\left|k\right|\right) \cdot t}\\
          
          \mathbf{else}:\\
          \;\;\;\;\frac{2}{\mathsf{fma}\left(-0.5, \cos \left(\left|k\right| + \left|k\right|\right), 0.5\right) \cdot \left(\left(\left|k\right| \cdot t\right) \cdot \frac{\left|k\right|}{\left(\cos \left(\left|k\right|\right) \cdot \ell\right) \cdot \ell}\right)}\\
          
          
          \end{array}
          
          Derivation
          1. Split input into 2 regimes
          2. if k < 5.7999999999999999e35

            1. Initial program 54.7%

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

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

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

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

                \[\leadsto \frac{2}{\left(\frac{\color{blue}{{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)} \]
              7. cube-multN/A

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

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

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

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

                \[\leadsto \frac{2}{\left(\left(\frac{t}{\ell} \cdot \frac{\color{blue}{\left(t \cdot t\right) \cdot \sin k}}{\ell}\right) \cdot \tan k\right) \cdot \left(\left(1 + {\left(\frac{k}{t}\right)}^{2}\right) + 1\right)} \]
              15. lower-*.f6466.5%

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

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

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

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

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

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

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

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

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

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

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

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

                \[\leadsto \frac{\color{blue}{\frac{\ell}{t}} \cdot 2}{t \cdot \left(\mathsf{fma}\left(\frac{k}{t \cdot t}, k, 2\right) \cdot \tan k\right)} \cdot \frac{\ell}{\sin k \cdot t} \]
              11. lower-*.f6473.0%

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

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

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

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

              if 5.7999999999999999e35 < k

              1. Initial program 54.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                  \[\leadsto \frac{2}{\left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(k + k\right)\right) \cdot \left(t \cdot \frac{k \cdot k}{\left(\cos k \cdot \ell\right) \cdot \ell}\right)} \]
                7. fp-cancel-sub-sign-invN/A

                  \[\leadsto \frac{2}{\left(\frac{1}{2} + \left(\mathsf{neg}\left(\frac{1}{2}\right)\right) \cdot \cos \left(k + k\right)\right) \cdot \left(\color{blue}{t} \cdot \frac{k \cdot k}{\left(\cos k \cdot \ell\right) \cdot \ell}\right)} \]
                8. +-commutativeN/A

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

                  \[\leadsto \frac{2}{\mathsf{fma}\left(\mathsf{neg}\left(\frac{1}{2}\right), \cos \left(k + k\right), \frac{1}{2}\right) \cdot \left(\color{blue}{t} \cdot \frac{k \cdot k}{\left(\cos k \cdot \ell\right) \cdot \ell}\right)} \]
                10. metadata-evalN/A

                  \[\leadsto \frac{2}{\mathsf{fma}\left(\frac{-1}{2}, \cos \left(k + k\right), \frac{1}{2}\right) \cdot \left(t \cdot \frac{k \cdot k}{\left(\cos k \cdot \ell\right) \cdot \ell}\right)} \]
                11. lift-/.f64N/A

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

                  \[\leadsto \frac{2}{\mathsf{fma}\left(\frac{-1}{2}, \cos \left(k + k\right), \frac{1}{2}\right) \cdot \left(t \cdot \frac{k \cdot k}{\color{blue}{\left(\cos k \cdot \ell\right)} \cdot \ell}\right)} \]
                13. associate-/l*N/A

                  \[\leadsto \frac{2}{\mathsf{fma}\left(\frac{-1}{2}, \cos \left(k + k\right), \frac{1}{2}\right) \cdot \left(t \cdot \left(k \cdot \color{blue}{\frac{k}{\left(\cos k \cdot \ell\right) \cdot \ell}}\right)\right)} \]
                14. associate-*r*N/A

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

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

                  \[\leadsto \frac{2}{\mathsf{fma}\left(\frac{-1}{2}, \cos \left(k + k\right), \frac{1}{2}\right) \cdot \left(\left(k \cdot t\right) \cdot \frac{\color{blue}{k}}{\left(\cos k \cdot \ell\right) \cdot \ell}\right)} \]
                17. lift-*.f64N/A

                  \[\leadsto \frac{2}{\mathsf{fma}\left(\frac{-1}{2}, \cos \left(k + k\right), \frac{1}{2}\right) \cdot \left(\left(k \cdot t\right) \cdot \frac{\color{blue}{k}}{\left(\cos k \cdot \ell\right) \cdot \ell}\right)} \]
                18. lower-/.f6460.2%

                  \[\leadsto \frac{2}{\mathsf{fma}\left(-0.5, \cos \left(k + k\right), 0.5\right) \cdot \left(\left(k \cdot t\right) \cdot \frac{k}{\color{blue}{\left(\cos k \cdot \ell\right) \cdot \ell}}\right)} \]
              8. Applied rewrites60.2%

                \[\leadsto \frac{2}{\mathsf{fma}\left(-0.5, \cos \left(k + k\right), 0.5\right) \cdot \color{blue}{\left(\left(k \cdot t\right) \cdot \frac{k}{\left(\cos k \cdot \ell\right) \cdot \ell}\right)}} \]
            9. Recombined 2 regimes into one program.
            10. Add Preprocessing

            Alternative 7: 83.6% accurate, 1.3× speedup?

            \[\begin{array}{l} t_1 := \tan \left(\left|k\right|\right)\\ t_2 := \sin \left(\left|k\right|\right)\\ \mathbf{if}\;\left|k\right| \leq 6 \cdot 10^{+35}:\\ \;\;\;\;\frac{\frac{\ell}{t} \cdot 2}{t \cdot \left(2 \cdot t\_1\right)} \cdot \frac{\ell}{t\_2 \cdot t}\\ \mathbf{else}:\\ \;\;\;\;\frac{2}{\frac{\left(\left|k\right| \cdot t\right) \cdot \left|k\right|}{\ell \cdot \ell} \cdot \left(t\_2 \cdot t\_1\right)}\\ \end{array} \]
            (FPCore (t l k)
              :precision binary64
              (let* ((t_1 (tan (fabs k))) (t_2 (sin (fabs k))))
              (if (<= (fabs k) 6e+35)
                (* (/ (* (/ l t) 2.0) (* t (* 2.0 t_1))) (/ l (* t_2 t)))
                (/ 2.0 (* (/ (* (* (fabs k) t) (fabs k)) (* l l)) (* t_2 t_1))))))
            double code(double t, double l, double k) {
            	double t_1 = tan(fabs(k));
            	double t_2 = sin(fabs(k));
            	double tmp;
            	if (fabs(k) <= 6e+35) {
            		tmp = (((l / t) * 2.0) / (t * (2.0 * t_1))) * (l / (t_2 * t));
            	} else {
            		tmp = 2.0 / ((((fabs(k) * t) * fabs(k)) / (l * l)) * (t_2 * t_1));
            	}
            	return tmp;
            }
            
            module fmin_fmax_functions
                implicit none
                private
                public fmax
                public fmin
            
                interface fmax
                    module procedure fmax88
                    module procedure fmax44
                    module procedure fmax84
                    module procedure fmax48
                end interface
                interface fmin
                    module procedure fmin88
                    module procedure fmin44
                    module procedure fmin84
                    module procedure fmin48
                end interface
            contains
                real(8) function fmax88(x, y) result (res)
                    real(8), intent (in) :: x
                    real(8), intent (in) :: y
                    res = merge(y, merge(x, max(x, y), y /= y), x /= x)
                end function
                real(4) function fmax44(x, y) result (res)
                    real(4), intent (in) :: x
                    real(4), intent (in) :: y
                    res = merge(y, merge(x, max(x, y), y /= y), x /= x)
                end function
                real(8) function fmax84(x, y) result(res)
                    real(8), intent (in) :: x
                    real(4), intent (in) :: y
                    res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
                end function
                real(8) function fmax48(x, y) result(res)
                    real(4), intent (in) :: x
                    real(8), intent (in) :: y
                    res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
                end function
                real(8) function fmin88(x, y) result (res)
                    real(8), intent (in) :: x
                    real(8), intent (in) :: y
                    res = merge(y, merge(x, min(x, y), y /= y), x /= x)
                end function
                real(4) function fmin44(x, y) result (res)
                    real(4), intent (in) :: x
                    real(4), intent (in) :: y
                    res = merge(y, merge(x, min(x, y), y /= y), x /= x)
                end function
                real(8) function fmin84(x, y) result(res)
                    real(8), intent (in) :: x
                    real(4), intent (in) :: y
                    res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
                end function
                real(8) function fmin48(x, y) result(res)
                    real(4), intent (in) :: x
                    real(8), intent (in) :: y
                    res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
                end function
            end module
            
            real(8) function code(t, l, k)
            use fmin_fmax_functions
                real(8), intent (in) :: t
                real(8), intent (in) :: l
                real(8), intent (in) :: k
                real(8) :: t_1
                real(8) :: t_2
                real(8) :: tmp
                t_1 = tan(abs(k))
                t_2 = sin(abs(k))
                if (abs(k) <= 6d+35) then
                    tmp = (((l / t) * 2.0d0) / (t * (2.0d0 * t_1))) * (l / (t_2 * t))
                else
                    tmp = 2.0d0 / ((((abs(k) * t) * abs(k)) / (l * l)) * (t_2 * t_1))
                end if
                code = tmp
            end function
            
            public static double code(double t, double l, double k) {
            	double t_1 = Math.tan(Math.abs(k));
            	double t_2 = Math.sin(Math.abs(k));
            	double tmp;
            	if (Math.abs(k) <= 6e+35) {
            		tmp = (((l / t) * 2.0) / (t * (2.0 * t_1))) * (l / (t_2 * t));
            	} else {
            		tmp = 2.0 / ((((Math.abs(k) * t) * Math.abs(k)) / (l * l)) * (t_2 * t_1));
            	}
            	return tmp;
            }
            
            def code(t, l, k):
            	t_1 = math.tan(math.fabs(k))
            	t_2 = math.sin(math.fabs(k))
            	tmp = 0
            	if math.fabs(k) <= 6e+35:
            		tmp = (((l / t) * 2.0) / (t * (2.0 * t_1))) * (l / (t_2 * t))
            	else:
            		tmp = 2.0 / ((((math.fabs(k) * t) * math.fabs(k)) / (l * l)) * (t_2 * t_1))
            	return tmp
            
            function code(t, l, k)
            	t_1 = tan(abs(k))
            	t_2 = sin(abs(k))
            	tmp = 0.0
            	if (abs(k) <= 6e+35)
            		tmp = Float64(Float64(Float64(Float64(l / t) * 2.0) / Float64(t * Float64(2.0 * t_1))) * Float64(l / Float64(t_2 * t)));
            	else
            		tmp = Float64(2.0 / Float64(Float64(Float64(Float64(abs(k) * t) * abs(k)) / Float64(l * l)) * Float64(t_2 * t_1)));
            	end
            	return tmp
            end
            
            function tmp_2 = code(t, l, k)
            	t_1 = tan(abs(k));
            	t_2 = sin(abs(k));
            	tmp = 0.0;
            	if (abs(k) <= 6e+35)
            		tmp = (((l / t) * 2.0) / (t * (2.0 * t_1))) * (l / (t_2 * t));
            	else
            		tmp = 2.0 / ((((abs(k) * t) * abs(k)) / (l * l)) * (t_2 * t_1));
            	end
            	tmp_2 = tmp;
            end
            
            code[t_, l_, k_] := Block[{t$95$1 = N[Tan[N[Abs[k], $MachinePrecision]], $MachinePrecision]}, Block[{t$95$2 = N[Sin[N[Abs[k], $MachinePrecision]], $MachinePrecision]}, If[LessEqual[N[Abs[k], $MachinePrecision], 6e+35], N[(N[(N[(N[(l / t), $MachinePrecision] * 2.0), $MachinePrecision] / N[(t * N[(2.0 * t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(l / N[(t$95$2 * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(2.0 / N[(N[(N[(N[(N[Abs[k], $MachinePrecision] * t), $MachinePrecision] * N[Abs[k], $MachinePrecision]), $MachinePrecision] / N[(l * l), $MachinePrecision]), $MachinePrecision] * N[(t$95$2 * t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
            
            \begin{array}{l}
            t_1 := \tan \left(\left|k\right|\right)\\
            t_2 := \sin \left(\left|k\right|\right)\\
            \mathbf{if}\;\left|k\right| \leq 6 \cdot 10^{+35}:\\
            \;\;\;\;\frac{\frac{\ell}{t} \cdot 2}{t \cdot \left(2 \cdot t\_1\right)} \cdot \frac{\ell}{t\_2 \cdot t}\\
            
            \mathbf{else}:\\
            \;\;\;\;\frac{2}{\frac{\left(\left|k\right| \cdot t\right) \cdot \left|k\right|}{\ell \cdot \ell} \cdot \left(t\_2 \cdot t\_1\right)}\\
            
            
            \end{array}
            
            Derivation
            1. Split input into 2 regimes
            2. if k < 5.9999999999999998e35

              1. Initial program 54.7%

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

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

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

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

                  \[\leadsto \frac{2}{\left(\frac{\color{blue}{{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)} \]
                7. cube-multN/A

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

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

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

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

                  \[\leadsto \frac{2}{\left(\left(\frac{t}{\ell} \cdot \frac{\color{blue}{\left(t \cdot t\right) \cdot \sin k}}{\ell}\right) \cdot \tan k\right) \cdot \left(\left(1 + {\left(\frac{k}{t}\right)}^{2}\right) + 1\right)} \]
                15. lower-*.f6466.5%

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

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

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

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

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

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

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

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

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

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

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

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

                  \[\leadsto \frac{\color{blue}{\frac{\ell}{t}} \cdot 2}{t \cdot \left(\mathsf{fma}\left(\frac{k}{t \cdot t}, k, 2\right) \cdot \tan k\right)} \cdot \frac{\ell}{\sin k \cdot t} \]
                11. lower-*.f6473.0%

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

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

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

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

                if 5.9999999999999998e35 < k

                1. Initial program 54.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                    \[\leadsto \frac{2}{\frac{\left(k \cdot k\right) \cdot t}{\ell \cdot \ell} \cdot \color{blue}{\frac{\frac{1}{2} - \frac{1}{2} \cdot \cos \left(k + k\right)}{\cos k}}} \]
                8. Applied rewrites64.3%

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

              Alternative 8: 83.4% accurate, 1.3× speedup?

              \[\begin{array}{l} t_1 := \sin \left(\left|k\right|\right)\\ \mathbf{if}\;\left|k\right| \leq 1.02 \cdot 10^{-5}:\\ \;\;\;\;\frac{\frac{\ell}{t} \cdot 2}{t \cdot \left(2 \cdot \left|k\right|\right)} \cdot \frac{\ell}{t\_1 \cdot t}\\ \mathbf{else}:\\ \;\;\;\;\frac{2}{\frac{\left(\left|k\right| \cdot t\right) \cdot \left|k\right|}{\ell \cdot \ell} \cdot \left(t\_1 \cdot \tan \left(\left|k\right|\right)\right)}\\ \end{array} \]
              (FPCore (t l k)
                :precision binary64
                (let* ((t_1 (sin (fabs k))))
                (if (<= (fabs k) 1.02e-5)
                  (* (/ (* (/ l t) 2.0) (* t (* 2.0 (fabs k)))) (/ l (* t_1 t)))
                  (/
                   2.0
                   (*
                    (/ (* (* (fabs k) t) (fabs k)) (* l l))
                    (* t_1 (tan (fabs k))))))))
              double code(double t, double l, double k) {
              	double t_1 = sin(fabs(k));
              	double tmp;
              	if (fabs(k) <= 1.02e-5) {
              		tmp = (((l / t) * 2.0) / (t * (2.0 * fabs(k)))) * (l / (t_1 * t));
              	} else {
              		tmp = 2.0 / ((((fabs(k) * t) * fabs(k)) / (l * l)) * (t_1 * tan(fabs(k))));
              	}
              	return tmp;
              }
              
              module fmin_fmax_functions
                  implicit none
                  private
                  public fmax
                  public fmin
              
                  interface fmax
                      module procedure fmax88
                      module procedure fmax44
                      module procedure fmax84
                      module procedure fmax48
                  end interface
                  interface fmin
                      module procedure fmin88
                      module procedure fmin44
                      module procedure fmin84
                      module procedure fmin48
                  end interface
              contains
                  real(8) function fmax88(x, y) result (res)
                      real(8), intent (in) :: x
                      real(8), intent (in) :: y
                      res = merge(y, merge(x, max(x, y), y /= y), x /= x)
                  end function
                  real(4) function fmax44(x, y) result (res)
                      real(4), intent (in) :: x
                      real(4), intent (in) :: y
                      res = merge(y, merge(x, max(x, y), y /= y), x /= x)
                  end function
                  real(8) function fmax84(x, y) result(res)
                      real(8), intent (in) :: x
                      real(4), intent (in) :: y
                      res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
                  end function
                  real(8) function fmax48(x, y) result(res)
                      real(4), intent (in) :: x
                      real(8), intent (in) :: y
                      res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
                  end function
                  real(8) function fmin88(x, y) result (res)
                      real(8), intent (in) :: x
                      real(8), intent (in) :: y
                      res = merge(y, merge(x, min(x, y), y /= y), x /= x)
                  end function
                  real(4) function fmin44(x, y) result (res)
                      real(4), intent (in) :: x
                      real(4), intent (in) :: y
                      res = merge(y, merge(x, min(x, y), y /= y), x /= x)
                  end function
                  real(8) function fmin84(x, y) result(res)
                      real(8), intent (in) :: x
                      real(4), intent (in) :: y
                      res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
                  end function
                  real(8) function fmin48(x, y) result(res)
                      real(4), intent (in) :: x
                      real(8), intent (in) :: y
                      res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
                  end function
              end module
              
              real(8) function code(t, l, k)
              use fmin_fmax_functions
                  real(8), intent (in) :: t
                  real(8), intent (in) :: l
                  real(8), intent (in) :: k
                  real(8) :: t_1
                  real(8) :: tmp
                  t_1 = sin(abs(k))
                  if (abs(k) <= 1.02d-5) then
                      tmp = (((l / t) * 2.0d0) / (t * (2.0d0 * abs(k)))) * (l / (t_1 * t))
                  else
                      tmp = 2.0d0 / ((((abs(k) * t) * abs(k)) / (l * l)) * (t_1 * tan(abs(k))))
                  end if
                  code = tmp
              end function
              
              public static double code(double t, double l, double k) {
              	double t_1 = Math.sin(Math.abs(k));
              	double tmp;
              	if (Math.abs(k) <= 1.02e-5) {
              		tmp = (((l / t) * 2.0) / (t * (2.0 * Math.abs(k)))) * (l / (t_1 * t));
              	} else {
              		tmp = 2.0 / ((((Math.abs(k) * t) * Math.abs(k)) / (l * l)) * (t_1 * Math.tan(Math.abs(k))));
              	}
              	return tmp;
              }
              
              def code(t, l, k):
              	t_1 = math.sin(math.fabs(k))
              	tmp = 0
              	if math.fabs(k) <= 1.02e-5:
              		tmp = (((l / t) * 2.0) / (t * (2.0 * math.fabs(k)))) * (l / (t_1 * t))
              	else:
              		tmp = 2.0 / ((((math.fabs(k) * t) * math.fabs(k)) / (l * l)) * (t_1 * math.tan(math.fabs(k))))
              	return tmp
              
              function code(t, l, k)
              	t_1 = sin(abs(k))
              	tmp = 0.0
              	if (abs(k) <= 1.02e-5)
              		tmp = Float64(Float64(Float64(Float64(l / t) * 2.0) / Float64(t * Float64(2.0 * abs(k)))) * Float64(l / Float64(t_1 * t)));
              	else
              		tmp = Float64(2.0 / Float64(Float64(Float64(Float64(abs(k) * t) * abs(k)) / Float64(l * l)) * Float64(t_1 * tan(abs(k)))));
              	end
              	return tmp
              end
              
              function tmp_2 = code(t, l, k)
              	t_1 = sin(abs(k));
              	tmp = 0.0;
              	if (abs(k) <= 1.02e-5)
              		tmp = (((l / t) * 2.0) / (t * (2.0 * abs(k)))) * (l / (t_1 * t));
              	else
              		tmp = 2.0 / ((((abs(k) * t) * abs(k)) / (l * l)) * (t_1 * tan(abs(k))));
              	end
              	tmp_2 = tmp;
              end
              
              code[t_, l_, k_] := Block[{t$95$1 = N[Sin[N[Abs[k], $MachinePrecision]], $MachinePrecision]}, If[LessEqual[N[Abs[k], $MachinePrecision], 1.02e-5], N[(N[(N[(N[(l / t), $MachinePrecision] * 2.0), $MachinePrecision] / N[(t * N[(2.0 * N[Abs[k], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(l / N[(t$95$1 * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(2.0 / N[(N[(N[(N[(N[Abs[k], $MachinePrecision] * t), $MachinePrecision] * N[Abs[k], $MachinePrecision]), $MachinePrecision] / N[(l * l), $MachinePrecision]), $MachinePrecision] * N[(t$95$1 * N[Tan[N[Abs[k], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
              
              \begin{array}{l}
              t_1 := \sin \left(\left|k\right|\right)\\
              \mathbf{if}\;\left|k\right| \leq 1.02 \cdot 10^{-5}:\\
              \;\;\;\;\frac{\frac{\ell}{t} \cdot 2}{t \cdot \left(2 \cdot \left|k\right|\right)} \cdot \frac{\ell}{t\_1 \cdot t}\\
              
              \mathbf{else}:\\
              \;\;\;\;\frac{2}{\frac{\left(\left|k\right| \cdot t\right) \cdot \left|k\right|}{\ell \cdot \ell} \cdot \left(t\_1 \cdot \tan \left(\left|k\right|\right)\right)}\\
              
              
              \end{array}
              
              Derivation
              1. Split input into 2 regimes
              2. if k < 1.0200000000000001e-5

                1. Initial program 54.7%

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

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

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

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

                    \[\leadsto \frac{2}{\left(\frac{\color{blue}{{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)} \]
                  7. cube-multN/A

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

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

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

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

                    \[\leadsto \frac{2}{\left(\left(\frac{t}{\ell} \cdot \frac{\color{blue}{\left(t \cdot t\right) \cdot \sin k}}{\ell}\right) \cdot \tan k\right) \cdot \left(\left(1 + {\left(\frac{k}{t}\right)}^{2}\right) + 1\right)} \]
                  15. lower-*.f6466.5%

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

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

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

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

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

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

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

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

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

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

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

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

                    \[\leadsto \frac{\color{blue}{\frac{\ell}{t}} \cdot 2}{t \cdot \left(\mathsf{fma}\left(\frac{k}{t \cdot t}, k, 2\right) \cdot \tan k\right)} \cdot \frac{\ell}{\sin k \cdot t} \]
                  11. lower-*.f6473.0%

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

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

                  \[\leadsto \frac{\frac{\ell}{t} \cdot 2}{t \cdot \color{blue}{\left(2 \cdot k\right)}} \cdot \frac{\ell}{\sin k \cdot t} \]
                8. Step-by-step derivation
                  1. lower-*.f6468.5%

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

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

                if 1.0200000000000001e-5 < k

                1. Initial program 54.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                    \[\leadsto \frac{2}{\frac{\left(k \cdot k\right) \cdot t}{\ell \cdot \ell} \cdot \color{blue}{\frac{\frac{1}{2} - \frac{1}{2} \cdot \cos \left(k + k\right)}{\cos k}}} \]
                8. Applied rewrites64.3%

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

              Alternative 9: 82.5% accurate, 1.3× speedup?

              \[\begin{array}{l} t_1 := \sin \left(\left|k\right|\right)\\ \mathbf{if}\;\left|k\right| \leq 1.02 \cdot 10^{-5}:\\ \;\;\;\;\frac{\frac{\ell}{t} \cdot 2}{t \cdot \left(2 \cdot \left|k\right|\right)} \cdot \frac{\ell}{t\_1 \cdot t}\\ \mathbf{else}:\\ \;\;\;\;\frac{2}{\left|k\right| \cdot \left(\left|k\right| \cdot \left(\left(\tan \left(\left|k\right|\right) \cdot t\_1\right) \cdot \frac{t}{\ell \cdot \ell}\right)\right)}\\ \end{array} \]
              (FPCore (t l k)
                :precision binary64
                (let* ((t_1 (sin (fabs k))))
                (if (<= (fabs k) 1.02e-5)
                  (* (/ (* (/ l t) 2.0) (* t (* 2.0 (fabs k)))) (/ l (* t_1 t)))
                  (/
                   2.0
                   (*
                    (fabs k)
                    (* (fabs k) (* (* (tan (fabs k)) t_1) (/ t (* l l)))))))))
              double code(double t, double l, double k) {
              	double t_1 = sin(fabs(k));
              	double tmp;
              	if (fabs(k) <= 1.02e-5) {
              		tmp = (((l / t) * 2.0) / (t * (2.0 * fabs(k)))) * (l / (t_1 * t));
              	} else {
              		tmp = 2.0 / (fabs(k) * (fabs(k) * ((tan(fabs(k)) * t_1) * (t / (l * l)))));
              	}
              	return tmp;
              }
              
              module fmin_fmax_functions
                  implicit none
                  private
                  public fmax
                  public fmin
              
                  interface fmax
                      module procedure fmax88
                      module procedure fmax44
                      module procedure fmax84
                      module procedure fmax48
                  end interface
                  interface fmin
                      module procedure fmin88
                      module procedure fmin44
                      module procedure fmin84
                      module procedure fmin48
                  end interface
              contains
                  real(8) function fmax88(x, y) result (res)
                      real(8), intent (in) :: x
                      real(8), intent (in) :: y
                      res = merge(y, merge(x, max(x, y), y /= y), x /= x)
                  end function
                  real(4) function fmax44(x, y) result (res)
                      real(4), intent (in) :: x
                      real(4), intent (in) :: y
                      res = merge(y, merge(x, max(x, y), y /= y), x /= x)
                  end function
                  real(8) function fmax84(x, y) result(res)
                      real(8), intent (in) :: x
                      real(4), intent (in) :: y
                      res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
                  end function
                  real(8) function fmax48(x, y) result(res)
                      real(4), intent (in) :: x
                      real(8), intent (in) :: y
                      res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
                  end function
                  real(8) function fmin88(x, y) result (res)
                      real(8), intent (in) :: x
                      real(8), intent (in) :: y
                      res = merge(y, merge(x, min(x, y), y /= y), x /= x)
                  end function
                  real(4) function fmin44(x, y) result (res)
                      real(4), intent (in) :: x
                      real(4), intent (in) :: y
                      res = merge(y, merge(x, min(x, y), y /= y), x /= x)
                  end function
                  real(8) function fmin84(x, y) result(res)
                      real(8), intent (in) :: x
                      real(4), intent (in) :: y
                      res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
                  end function
                  real(8) function fmin48(x, y) result(res)
                      real(4), intent (in) :: x
                      real(8), intent (in) :: y
                      res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
                  end function
              end module
              
              real(8) function code(t, l, k)
              use fmin_fmax_functions
                  real(8), intent (in) :: t
                  real(8), intent (in) :: l
                  real(8), intent (in) :: k
                  real(8) :: t_1
                  real(8) :: tmp
                  t_1 = sin(abs(k))
                  if (abs(k) <= 1.02d-5) then
                      tmp = (((l / t) * 2.0d0) / (t * (2.0d0 * abs(k)))) * (l / (t_1 * t))
                  else
                      tmp = 2.0d0 / (abs(k) * (abs(k) * ((tan(abs(k)) * t_1) * (t / (l * l)))))
                  end if
                  code = tmp
              end function
              
              public static double code(double t, double l, double k) {
              	double t_1 = Math.sin(Math.abs(k));
              	double tmp;
              	if (Math.abs(k) <= 1.02e-5) {
              		tmp = (((l / t) * 2.0) / (t * (2.0 * Math.abs(k)))) * (l / (t_1 * t));
              	} else {
              		tmp = 2.0 / (Math.abs(k) * (Math.abs(k) * ((Math.tan(Math.abs(k)) * t_1) * (t / (l * l)))));
              	}
              	return tmp;
              }
              
              def code(t, l, k):
              	t_1 = math.sin(math.fabs(k))
              	tmp = 0
              	if math.fabs(k) <= 1.02e-5:
              		tmp = (((l / t) * 2.0) / (t * (2.0 * math.fabs(k)))) * (l / (t_1 * t))
              	else:
              		tmp = 2.0 / (math.fabs(k) * (math.fabs(k) * ((math.tan(math.fabs(k)) * t_1) * (t / (l * l)))))
              	return tmp
              
              function code(t, l, k)
              	t_1 = sin(abs(k))
              	tmp = 0.0
              	if (abs(k) <= 1.02e-5)
              		tmp = Float64(Float64(Float64(Float64(l / t) * 2.0) / Float64(t * Float64(2.0 * abs(k)))) * Float64(l / Float64(t_1 * t)));
              	else
              		tmp = Float64(2.0 / Float64(abs(k) * Float64(abs(k) * Float64(Float64(tan(abs(k)) * t_1) * Float64(t / Float64(l * l))))));
              	end
              	return tmp
              end
              
              function tmp_2 = code(t, l, k)
              	t_1 = sin(abs(k));
              	tmp = 0.0;
              	if (abs(k) <= 1.02e-5)
              		tmp = (((l / t) * 2.0) / (t * (2.0 * abs(k)))) * (l / (t_1 * t));
              	else
              		tmp = 2.0 / (abs(k) * (abs(k) * ((tan(abs(k)) * t_1) * (t / (l * l)))));
              	end
              	tmp_2 = tmp;
              end
              
              code[t_, l_, k_] := Block[{t$95$1 = N[Sin[N[Abs[k], $MachinePrecision]], $MachinePrecision]}, If[LessEqual[N[Abs[k], $MachinePrecision], 1.02e-5], N[(N[(N[(N[(l / t), $MachinePrecision] * 2.0), $MachinePrecision] / N[(t * N[(2.0 * N[Abs[k], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(l / N[(t$95$1 * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(2.0 / N[(N[Abs[k], $MachinePrecision] * N[(N[Abs[k], $MachinePrecision] * N[(N[(N[Tan[N[Abs[k], $MachinePrecision]], $MachinePrecision] * t$95$1), $MachinePrecision] * N[(t / N[(l * l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
              
              \begin{array}{l}
              t_1 := \sin \left(\left|k\right|\right)\\
              \mathbf{if}\;\left|k\right| \leq 1.02 \cdot 10^{-5}:\\
              \;\;\;\;\frac{\frac{\ell}{t} \cdot 2}{t \cdot \left(2 \cdot \left|k\right|\right)} \cdot \frac{\ell}{t\_1 \cdot t}\\
              
              \mathbf{else}:\\
              \;\;\;\;\frac{2}{\left|k\right| \cdot \left(\left|k\right| \cdot \left(\left(\tan \left(\left|k\right|\right) \cdot t\_1\right) \cdot \frac{t}{\ell \cdot \ell}\right)\right)}\\
              
              
              \end{array}
              
              Derivation
              1. Split input into 2 regimes
              2. if k < 1.0200000000000001e-5

                1. Initial program 54.7%

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

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

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

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

                    \[\leadsto \frac{2}{\left(\frac{\color{blue}{{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)} \]
                  7. cube-multN/A

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

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

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

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

                    \[\leadsto \frac{2}{\left(\left(\frac{t}{\ell} \cdot \frac{\color{blue}{\left(t \cdot t\right) \cdot \sin k}}{\ell}\right) \cdot \tan k\right) \cdot \left(\left(1 + {\left(\frac{k}{t}\right)}^{2}\right) + 1\right)} \]
                  15. lower-*.f6466.5%

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

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

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

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

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

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

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

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

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

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

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

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

                    \[\leadsto \frac{\color{blue}{\frac{\ell}{t}} \cdot 2}{t \cdot \left(\mathsf{fma}\left(\frac{k}{t \cdot t}, k, 2\right) \cdot \tan k\right)} \cdot \frac{\ell}{\sin k \cdot t} \]
                  11. lower-*.f6473.0%

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

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

                  \[\leadsto \frac{\frac{\ell}{t} \cdot 2}{t \cdot \color{blue}{\left(2 \cdot k\right)}} \cdot \frac{\ell}{\sin k \cdot t} \]
                8. Step-by-step derivation
                  1. lower-*.f6468.5%

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

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

                if 1.0200000000000001e-5 < k

                1. Initial program 54.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                    \[\leadsto \frac{2}{{k}^{2} \cdot \color{blue}{\frac{t \cdot {\sin k}^{2}}{{\ell}^{2} \cdot \cos k}}} \]
                  4. lift-pow.f64N/A

                    \[\leadsto \frac{2}{{k}^{2} \cdot \frac{\color{blue}{t \cdot {\sin k}^{2}}}{{\ell}^{2} \cdot \cos k}} \]
                  5. pow2N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

              Alternative 10: 75.7% accurate, 1.8× speedup?

              \[\mathsf{copysign}\left(1, t\right) \cdot \begin{array}{l} \mathbf{if}\;\left|t\right| \leq 5.8 \cdot 10^{-32}:\\ \;\;\;\;\frac{2}{\frac{{k}^{4}}{\ell} \cdot \frac{\left|t\right|}{\ell}}\\ \mathbf{else}:\\ \;\;\;\;\frac{\frac{\ell}{\left|t\right|} \cdot 2}{\left|t\right| \cdot \left(2 \cdot k\right)} \cdot \frac{\ell}{\sin k \cdot \left|t\right|}\\ \end{array} \]
              (FPCore (t l k)
                :precision binary64
                (*
               (copysign 1.0 t)
               (if (<= (fabs t) 5.8e-32)
                 (/ 2.0 (* (/ (pow k 4.0) l) (/ (fabs t) l)))
                 (*
                  (/ (* (/ l (fabs t)) 2.0) (* (fabs t) (* 2.0 k)))
                  (/ l (* (sin k) (fabs t)))))))
              double code(double t, double l, double k) {
              	double tmp;
              	if (fabs(t) <= 5.8e-32) {
              		tmp = 2.0 / ((pow(k, 4.0) / l) * (fabs(t) / l));
              	} else {
              		tmp = (((l / fabs(t)) * 2.0) / (fabs(t) * (2.0 * k))) * (l / (sin(k) * fabs(t)));
              	}
              	return copysign(1.0, t) * tmp;
              }
              
              public static double code(double t, double l, double k) {
              	double tmp;
              	if (Math.abs(t) <= 5.8e-32) {
              		tmp = 2.0 / ((Math.pow(k, 4.0) / l) * (Math.abs(t) / l));
              	} else {
              		tmp = (((l / Math.abs(t)) * 2.0) / (Math.abs(t) * (2.0 * k))) * (l / (Math.sin(k) * Math.abs(t)));
              	}
              	return Math.copySign(1.0, t) * tmp;
              }
              
              def code(t, l, k):
              	tmp = 0
              	if math.fabs(t) <= 5.8e-32:
              		tmp = 2.0 / ((math.pow(k, 4.0) / l) * (math.fabs(t) / l))
              	else:
              		tmp = (((l / math.fabs(t)) * 2.0) / (math.fabs(t) * (2.0 * k))) * (l / (math.sin(k) * math.fabs(t)))
              	return math.copysign(1.0, t) * tmp
              
              function code(t, l, k)
              	tmp = 0.0
              	if (abs(t) <= 5.8e-32)
              		tmp = Float64(2.0 / Float64(Float64((k ^ 4.0) / l) * Float64(abs(t) / l)));
              	else
              		tmp = Float64(Float64(Float64(Float64(l / abs(t)) * 2.0) / Float64(abs(t) * Float64(2.0 * k))) * Float64(l / Float64(sin(k) * abs(t))));
              	end
              	return Float64(copysign(1.0, t) * tmp)
              end
              
              function tmp_2 = code(t, l, k)
              	tmp = 0.0;
              	if (abs(t) <= 5.8e-32)
              		tmp = 2.0 / (((k ^ 4.0) / l) * (abs(t) / l));
              	else
              		tmp = (((l / abs(t)) * 2.0) / (abs(t) * (2.0 * k))) * (l / (sin(k) * abs(t)));
              	end
              	tmp_2 = (sign(t) * abs(1.0)) * tmp;
              end
              
              code[t_, l_, k_] := N[(N[With[{TMP1 = Abs[1.0], TMP2 = Sign[t]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision] * If[LessEqual[N[Abs[t], $MachinePrecision], 5.8e-32], N[(2.0 / N[(N[(N[Power[k, 4.0], $MachinePrecision] / l), $MachinePrecision] * N[(N[Abs[t], $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(N[(l / N[Abs[t], $MachinePrecision]), $MachinePrecision] * 2.0), $MachinePrecision] / N[(N[Abs[t], $MachinePrecision] * N[(2.0 * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(l / N[(N[Sin[k], $MachinePrecision] * N[Abs[t], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]), $MachinePrecision]
              
              \mathsf{copysign}\left(1, t\right) \cdot \begin{array}{l}
              \mathbf{if}\;\left|t\right| \leq 5.8 \cdot 10^{-32}:\\
              \;\;\;\;\frac{2}{\frac{{k}^{4}}{\ell} \cdot \frac{\left|t\right|}{\ell}}\\
              
              \mathbf{else}:\\
              \;\;\;\;\frac{\frac{\ell}{\left|t\right|} \cdot 2}{\left|t\right| \cdot \left(2 \cdot k\right)} \cdot \frac{\ell}{\sin k \cdot \left|t\right|}\\
              
              
              \end{array}
              
              Derivation
              1. Split input into 2 regimes
              2. if t < 5.7999999999999999e-32

                1. Initial program 54.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                    \[\leadsto \frac{2}{\frac{{k}^{4} \cdot t}{{\ell}^{2}}} \]
                  4. lower-pow.f6451.9%

                    \[\leadsto \frac{2}{\frac{{k}^{4} \cdot t}{{\ell}^{2}}} \]
                7. Applied rewrites51.9%

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

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

                    \[\leadsto \frac{2}{\frac{{k}^{4} \cdot t}{{\ell}^{2}}} \]
                  3. lift-pow.f64N/A

                    \[\leadsto \frac{2}{\frac{{k}^{4} \cdot t}{{\ell}^{2}}} \]
                  4. pow2N/A

                    \[\leadsto \frac{2}{\frac{{k}^{4} \cdot t}{\ell \cdot \ell}} \]
                  5. times-fracN/A

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

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

                    \[\leadsto \frac{2}{\frac{{k}^{4}}{\ell} \cdot \frac{t}{\ell}} \]
                  8. lower-/.f6456.2%

                    \[\leadsto \frac{2}{\frac{{k}^{4}}{\ell} \cdot \frac{t}{\ell}} \]
                9. Applied rewrites56.2%

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

                if 5.7999999999999999e-32 < t

                1. Initial program 54.7%

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

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

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

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

                    \[\leadsto \frac{2}{\left(\frac{\color{blue}{{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)} \]
                  7. cube-multN/A

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

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

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

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

                    \[\leadsto \frac{2}{\left(\left(\frac{t}{\ell} \cdot \frac{\color{blue}{\left(t \cdot t\right) \cdot \sin k}}{\ell}\right) \cdot \tan k\right) \cdot \left(\left(1 + {\left(\frac{k}{t}\right)}^{2}\right) + 1\right)} \]
                  15. lower-*.f6466.5%

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

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

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

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

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

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

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

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

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

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

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

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

                    \[\leadsto \frac{\color{blue}{\frac{\ell}{t}} \cdot 2}{t \cdot \left(\mathsf{fma}\left(\frac{k}{t \cdot t}, k, 2\right) \cdot \tan k\right)} \cdot \frac{\ell}{\sin k \cdot t} \]
                  11. lower-*.f6473.0%

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

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

                  \[\leadsto \frac{\frac{\ell}{t} \cdot 2}{t \cdot \color{blue}{\left(2 \cdot k\right)}} \cdot \frac{\ell}{\sin k \cdot t} \]
                8. Step-by-step derivation
                  1. lower-*.f6468.5%

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

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

              Alternative 11: 74.9% accurate, 3.1× speedup?

              \[\begin{array}{l} t_1 := k \cdot \left|t\right|\\ \mathsf{copysign}\left(1, t\right) \cdot \begin{array}{l} \mathbf{if}\;\left|t\right| \leq 2.1 \cdot 10^{-38}:\\ \;\;\;\;\frac{2}{\frac{{k}^{4}}{\ell} \cdot \frac{\left|t\right|}{\ell}}\\ \mathbf{else}:\\ \;\;\;\;\ell \cdot \frac{\frac{\frac{\ell}{\left|t\right|}}{t\_1}}{t\_1}\\ \end{array} \end{array} \]
              (FPCore (t l k)
                :precision binary64
                (let* ((t_1 (* k (fabs t))))
                (*
                 (copysign 1.0 t)
                 (if (<= (fabs t) 2.1e-38)
                   (/ 2.0 (* (/ (pow k 4.0) l) (/ (fabs t) l)))
                   (* l (/ (/ (/ l (fabs t)) t_1) t_1))))))
              double code(double t, double l, double k) {
              	double t_1 = k * fabs(t);
              	double tmp;
              	if (fabs(t) <= 2.1e-38) {
              		tmp = 2.0 / ((pow(k, 4.0) / l) * (fabs(t) / l));
              	} else {
              		tmp = l * (((l / fabs(t)) / t_1) / t_1);
              	}
              	return copysign(1.0, t) * tmp;
              }
              
              public static double code(double t, double l, double k) {
              	double t_1 = k * Math.abs(t);
              	double tmp;
              	if (Math.abs(t) <= 2.1e-38) {
              		tmp = 2.0 / ((Math.pow(k, 4.0) / l) * (Math.abs(t) / l));
              	} else {
              		tmp = l * (((l / Math.abs(t)) / t_1) / t_1);
              	}
              	return Math.copySign(1.0, t) * tmp;
              }
              
              def code(t, l, k):
              	t_1 = k * math.fabs(t)
              	tmp = 0
              	if math.fabs(t) <= 2.1e-38:
              		tmp = 2.0 / ((math.pow(k, 4.0) / l) * (math.fabs(t) / l))
              	else:
              		tmp = l * (((l / math.fabs(t)) / t_1) / t_1)
              	return math.copysign(1.0, t) * tmp
              
              function code(t, l, k)
              	t_1 = Float64(k * abs(t))
              	tmp = 0.0
              	if (abs(t) <= 2.1e-38)
              		tmp = Float64(2.0 / Float64(Float64((k ^ 4.0) / l) * Float64(abs(t) / l)));
              	else
              		tmp = Float64(l * Float64(Float64(Float64(l / abs(t)) / t_1) / t_1));
              	end
              	return Float64(copysign(1.0, t) * tmp)
              end
              
              function tmp_2 = code(t, l, k)
              	t_1 = k * abs(t);
              	tmp = 0.0;
              	if (abs(t) <= 2.1e-38)
              		tmp = 2.0 / (((k ^ 4.0) / l) * (abs(t) / l));
              	else
              		tmp = l * (((l / abs(t)) / t_1) / t_1);
              	end
              	tmp_2 = (sign(t) * abs(1.0)) * tmp;
              end
              
              code[t_, l_, k_] := Block[{t$95$1 = N[(k * N[Abs[t], $MachinePrecision]), $MachinePrecision]}, N[(N[With[{TMP1 = Abs[1.0], TMP2 = Sign[t]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision] * If[LessEqual[N[Abs[t], $MachinePrecision], 2.1e-38], N[(2.0 / N[(N[(N[Power[k, 4.0], $MachinePrecision] / l), $MachinePrecision] * N[(N[Abs[t], $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(l * N[(N[(N[(l / N[Abs[t], $MachinePrecision]), $MachinePrecision] / t$95$1), $MachinePrecision] / t$95$1), $MachinePrecision]), $MachinePrecision]]), $MachinePrecision]]
              
              \begin{array}{l}
              t_1 := k \cdot \left|t\right|\\
              \mathsf{copysign}\left(1, t\right) \cdot \begin{array}{l}
              \mathbf{if}\;\left|t\right| \leq 2.1 \cdot 10^{-38}:\\
              \;\;\;\;\frac{2}{\frac{{k}^{4}}{\ell} \cdot \frac{\left|t\right|}{\ell}}\\
              
              \mathbf{else}:\\
              \;\;\;\;\ell \cdot \frac{\frac{\frac{\ell}{\left|t\right|}}{t\_1}}{t\_1}\\
              
              
              \end{array}
              \end{array}
              
              Derivation
              1. Split input into 2 regimes
              2. if t < 2.1000000000000001e-38

                1. Initial program 54.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                    \[\leadsto \frac{2}{\frac{{k}^{4} \cdot t}{{\ell}^{2}}} \]
                  4. lower-pow.f6451.9%

                    \[\leadsto \frac{2}{\frac{{k}^{4} \cdot t}{{\ell}^{2}}} \]
                7. Applied rewrites51.9%

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

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

                    \[\leadsto \frac{2}{\frac{{k}^{4} \cdot t}{{\ell}^{2}}} \]
                  3. lift-pow.f64N/A

                    \[\leadsto \frac{2}{\frac{{k}^{4} \cdot t}{{\ell}^{2}}} \]
                  4. pow2N/A

                    \[\leadsto \frac{2}{\frac{{k}^{4} \cdot t}{\ell \cdot \ell}} \]
                  5. times-fracN/A

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

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

                    \[\leadsto \frac{2}{\frac{{k}^{4}}{\ell} \cdot \frac{t}{\ell}} \]
                  8. lower-/.f6456.2%

                    \[\leadsto \frac{2}{\frac{{k}^{4}}{\ell} \cdot \frac{t}{\ell}} \]
                9. Applied rewrites56.2%

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

                if 2.1000000000000001e-38 < t

                1. Initial program 54.7%

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

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

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

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

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

                    \[\leadsto \frac{{\ell}^{2}}{{k}^{2} \cdot {\color{blue}{t}}^{3}} \]
                  5. lower-pow.f6451.2%

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

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

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

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

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

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

                    \[\leadsto \ell \cdot \color{blue}{\frac{\ell}{{k}^{2} \cdot {t}^{3}}} \]
                  6. lower-/.f6455.1%

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

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

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

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

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

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

                    \[\leadsto \ell \cdot \frac{\ell}{\left({t}^{3} \cdot k\right) \cdot \color{blue}{k}} \]
                  13. lower-*.f6459.5%

                    \[\leadsto \ell \cdot \frac{\ell}{\left({t}^{3} \cdot k\right) \cdot k} \]
                  14. lift-pow.f64N/A

                    \[\leadsto \ell \cdot \frac{\ell}{\left({t}^{3} \cdot k\right) \cdot k} \]
                  15. unpow3N/A

                    \[\leadsto \ell \cdot \frac{\ell}{\left(\left(\left(t \cdot t\right) \cdot t\right) \cdot k\right) \cdot k} \]
                  16. lift-*.f64N/A

                    \[\leadsto \ell \cdot \frac{\ell}{\left(\left(\left(t \cdot t\right) \cdot t\right) \cdot k\right) \cdot k} \]
                  17. lower-*.f6459.5%

                    \[\leadsto \ell \cdot \frac{\ell}{\left(\left(\left(t \cdot t\right) \cdot t\right) \cdot k\right) \cdot k} \]
                6. Applied rewrites59.5%

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

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

                    \[\leadsto \ell \cdot \frac{\ell}{\left(\left(\left(t \cdot t\right) \cdot t\right) \cdot k\right) \cdot k} \]
                  3. associate-*l*N/A

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

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

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

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

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

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

                    \[\leadsto \ell \cdot \frac{\ell}{t \cdot \left(\left(t \cdot t\right) \cdot \color{blue}{\left(k \cdot k\right)}\right)} \]
                8. Applied rewrites58.1%

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

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

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

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

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

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

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

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

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

                    \[\leadsto \ell \cdot \frac{\frac{\frac{\ell}{t}}{t \cdot k}}{\color{blue}{t \cdot k}} \]
                  10. lower-/.f64N/A

                    \[\leadsto \ell \cdot \frac{\frac{\frac{\ell}{t}}{t \cdot k}}{\color{blue}{t \cdot k}} \]
                  11. lower-/.f64N/A

                    \[\leadsto \ell \cdot \frac{\frac{\frac{\ell}{t}}{t \cdot k}}{\color{blue}{t} \cdot k} \]
                  12. *-commutativeN/A

                    \[\leadsto \ell \cdot \frac{\frac{\frac{\ell}{t}}{k \cdot t}}{t \cdot k} \]
                  13. lift-*.f64N/A

                    \[\leadsto \ell \cdot \frac{\frac{\frac{\ell}{t}}{k \cdot t}}{t \cdot k} \]
                  14. *-commutativeN/A

                    \[\leadsto \ell \cdot \frac{\frac{\frac{\ell}{t}}{k \cdot t}}{k \cdot \color{blue}{t}} \]
                  15. lift-*.f6469.3%

                    \[\leadsto \ell \cdot \frac{\frac{\frac{\ell}{t}}{k \cdot t}}{k \cdot \color{blue}{t}} \]
                10. Applied rewrites69.3%

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

              Alternative 12: 72.8% accurate, 2.8× speedup?

              \[\begin{array}{l} t_1 := k \cdot \left|t\right|\\ t_2 := -\left|t\right|\\ \mathsf{copysign}\left(1, t\right) \cdot \begin{array}{l} \mathbf{if}\;\left|t\right| \leq 1.75 \cdot 10^{-205}:\\ \;\;\;\;\ell \cdot \frac{\ell}{\left|t\right| \cdot \left(\left(\left(k \cdot k\right) \cdot t\_2\right) \cdot t\_2\right)}\\ \mathbf{elif}\;\left|t\right| \leq 2 \cdot 10^{-38}:\\ \;\;\;\;\frac{2}{{k}^{4} \cdot \frac{\left|t\right|}{\ell \cdot \ell}}\\ \mathbf{else}:\\ \;\;\;\;\ell \cdot \frac{\frac{\frac{\ell}{\left|t\right|}}{t\_1}}{t\_1}\\ \end{array} \end{array} \]
              (FPCore (t l k)
                :precision binary64
                (let* ((t_1 (* k (fabs t))) (t_2 (- (fabs t))))
                (*
                 (copysign 1.0 t)
                 (if (<= (fabs t) 1.75e-205)
                   (* l (/ l (* (fabs t) (* (* (* k k) t_2) t_2))))
                   (if (<= (fabs t) 2e-38)
                     (/ 2.0 (* (pow k 4.0) (/ (fabs t) (* l l))))
                     (* l (/ (/ (/ l (fabs t)) t_1) t_1)))))))
              double code(double t, double l, double k) {
              	double t_1 = k * fabs(t);
              	double t_2 = -fabs(t);
              	double tmp;
              	if (fabs(t) <= 1.75e-205) {
              		tmp = l * (l / (fabs(t) * (((k * k) * t_2) * t_2)));
              	} else if (fabs(t) <= 2e-38) {
              		tmp = 2.0 / (pow(k, 4.0) * (fabs(t) / (l * l)));
              	} else {
              		tmp = l * (((l / fabs(t)) / t_1) / t_1);
              	}
              	return copysign(1.0, t) * tmp;
              }
              
              public static double code(double t, double l, double k) {
              	double t_1 = k * Math.abs(t);
              	double t_2 = -Math.abs(t);
              	double tmp;
              	if (Math.abs(t) <= 1.75e-205) {
              		tmp = l * (l / (Math.abs(t) * (((k * k) * t_2) * t_2)));
              	} else if (Math.abs(t) <= 2e-38) {
              		tmp = 2.0 / (Math.pow(k, 4.0) * (Math.abs(t) / (l * l)));
              	} else {
              		tmp = l * (((l / Math.abs(t)) / t_1) / t_1);
              	}
              	return Math.copySign(1.0, t) * tmp;
              }
              
              def code(t, l, k):
              	t_1 = k * math.fabs(t)
              	t_2 = -math.fabs(t)
              	tmp = 0
              	if math.fabs(t) <= 1.75e-205:
              		tmp = l * (l / (math.fabs(t) * (((k * k) * t_2) * t_2)))
              	elif math.fabs(t) <= 2e-38:
              		tmp = 2.0 / (math.pow(k, 4.0) * (math.fabs(t) / (l * l)))
              	else:
              		tmp = l * (((l / math.fabs(t)) / t_1) / t_1)
              	return math.copysign(1.0, t) * tmp
              
              function code(t, l, k)
              	t_1 = Float64(k * abs(t))
              	t_2 = Float64(-abs(t))
              	tmp = 0.0
              	if (abs(t) <= 1.75e-205)
              		tmp = Float64(l * Float64(l / Float64(abs(t) * Float64(Float64(Float64(k * k) * t_2) * t_2))));
              	elseif (abs(t) <= 2e-38)
              		tmp = Float64(2.0 / Float64((k ^ 4.0) * Float64(abs(t) / Float64(l * l))));
              	else
              		tmp = Float64(l * Float64(Float64(Float64(l / abs(t)) / t_1) / t_1));
              	end
              	return Float64(copysign(1.0, t) * tmp)
              end
              
              function tmp_2 = code(t, l, k)
              	t_1 = k * abs(t);
              	t_2 = -abs(t);
              	tmp = 0.0;
              	if (abs(t) <= 1.75e-205)
              		tmp = l * (l / (abs(t) * (((k * k) * t_2) * t_2)));
              	elseif (abs(t) <= 2e-38)
              		tmp = 2.0 / ((k ^ 4.0) * (abs(t) / (l * l)));
              	else
              		tmp = l * (((l / abs(t)) / t_1) / t_1);
              	end
              	tmp_2 = (sign(t) * abs(1.0)) * tmp;
              end
              
              code[t_, l_, k_] := Block[{t$95$1 = N[(k * N[Abs[t], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = (-N[Abs[t], $MachinePrecision])}, N[(N[With[{TMP1 = Abs[1.0], TMP2 = Sign[t]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision] * If[LessEqual[N[Abs[t], $MachinePrecision], 1.75e-205], N[(l * N[(l / N[(N[Abs[t], $MachinePrecision] * N[(N[(N[(k * k), $MachinePrecision] * t$95$2), $MachinePrecision] * t$95$2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[Abs[t], $MachinePrecision], 2e-38], N[(2.0 / N[(N[Power[k, 4.0], $MachinePrecision] * N[(N[Abs[t], $MachinePrecision] / N[(l * l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(l * N[(N[(N[(l / N[Abs[t], $MachinePrecision]), $MachinePrecision] / t$95$1), $MachinePrecision] / t$95$1), $MachinePrecision]), $MachinePrecision]]]), $MachinePrecision]]]
              
              \begin{array}{l}
              t_1 := k \cdot \left|t\right|\\
              t_2 := -\left|t\right|\\
              \mathsf{copysign}\left(1, t\right) \cdot \begin{array}{l}
              \mathbf{if}\;\left|t\right| \leq 1.75 \cdot 10^{-205}:\\
              \;\;\;\;\ell \cdot \frac{\ell}{\left|t\right| \cdot \left(\left(\left(k \cdot k\right) \cdot t\_2\right) \cdot t\_2\right)}\\
              
              \mathbf{elif}\;\left|t\right| \leq 2 \cdot 10^{-38}:\\
              \;\;\;\;\frac{2}{{k}^{4} \cdot \frac{\left|t\right|}{\ell \cdot \ell}}\\
              
              \mathbf{else}:\\
              \;\;\;\;\ell \cdot \frac{\frac{\frac{\ell}{\left|t\right|}}{t\_1}}{t\_1}\\
              
              
              \end{array}
              \end{array}
              
              Derivation
              1. Split input into 3 regimes
              2. if t < 1.75e-205

                1. Initial program 54.7%

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

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

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

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

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

                    \[\leadsto \frac{{\ell}^{2}}{{k}^{2} \cdot {\color{blue}{t}}^{3}} \]
                  5. lower-pow.f6451.2%

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

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

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

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

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

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

                    \[\leadsto \ell \cdot \color{blue}{\frac{\ell}{{k}^{2} \cdot {t}^{3}}} \]
                  6. lower-/.f6455.1%

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

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

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

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

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

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

                    \[\leadsto \ell \cdot \frac{\ell}{\left({t}^{3} \cdot k\right) \cdot \color{blue}{k}} \]
                  13. lower-*.f6459.5%

                    \[\leadsto \ell \cdot \frac{\ell}{\left({t}^{3} \cdot k\right) \cdot k} \]
                  14. lift-pow.f64N/A

                    \[\leadsto \ell \cdot \frac{\ell}{\left({t}^{3} \cdot k\right) \cdot k} \]
                  15. unpow3N/A

                    \[\leadsto \ell \cdot \frac{\ell}{\left(\left(\left(t \cdot t\right) \cdot t\right) \cdot k\right) \cdot k} \]
                  16. lift-*.f64N/A

                    \[\leadsto \ell \cdot \frac{\ell}{\left(\left(\left(t \cdot t\right) \cdot t\right) \cdot k\right) \cdot k} \]
                  17. lower-*.f6459.5%

                    \[\leadsto \ell \cdot \frac{\ell}{\left(\left(\left(t \cdot t\right) \cdot t\right) \cdot k\right) \cdot k} \]
                6. Applied rewrites59.5%

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

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

                    \[\leadsto \ell \cdot \frac{\ell}{\left(\left(\left(t \cdot t\right) \cdot t\right) \cdot k\right) \cdot k} \]
                  3. associate-*l*N/A

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

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

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

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

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

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

                    \[\leadsto \ell \cdot \frac{\ell}{t \cdot \left(\left(t \cdot t\right) \cdot \color{blue}{\left(k \cdot k\right)}\right)} \]
                8. Applied rewrites58.1%

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

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

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

                    \[\leadsto \ell \cdot \frac{\ell}{t \cdot \left(\left(k \cdot k\right) \cdot \left(t \cdot \color{blue}{t}\right)\right)} \]
                  4. sqr-neg-revN/A

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

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

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

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

                    \[\leadsto \ell \cdot \frac{\ell}{t \cdot \left(\left(\left(k \cdot k\right) \cdot \left(-t\right)\right) \cdot \left(\mathsf{neg}\left(t\right)\right)\right)} \]
                  9. lower-neg.f6461.9%

                    \[\leadsto \ell \cdot \frac{\ell}{t \cdot \left(\left(\left(k \cdot k\right) \cdot \left(-t\right)\right) \cdot \left(-t\right)\right)} \]
                10. Applied rewrites61.9%

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

                if 1.75e-205 < t < 1.9999999999999999e-38

                1. Initial program 54.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                    \[\leadsto \frac{2}{\frac{{k}^{4} \cdot t}{{\ell}^{2}}} \]
                  4. lower-pow.f6451.9%

                    \[\leadsto \frac{2}{\frac{{k}^{4} \cdot t}{{\ell}^{2}}} \]
                7. Applied rewrites51.9%

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

                    \[\leadsto \frac{2}{\frac{{k}^{4} \cdot t}{{\ell}^{\color{blue}{2}}}} \]
                  2. lift-pow.f64N/A

                    \[\leadsto \frac{2}{\frac{{k}^{4} \cdot t}{{\ell}^{2}}} \]
                  3. pow2N/A

                    \[\leadsto \frac{2}{\frac{{k}^{4} \cdot t}{\ell \cdot \ell}} \]
                  4. lift-*.f64N/A

                    \[\leadsto \frac{2}{\frac{{k}^{4} \cdot t}{\ell \cdot \ell}} \]
                  5. lift-*.f64N/A

                    \[\leadsto \frac{2}{\frac{{k}^{4} \cdot t}{\ell \cdot \ell}} \]
                  6. associate-/l*N/A

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

                    \[\leadsto \frac{2}{{k}^{4} \cdot \frac{t}{\color{blue}{\ell \cdot \ell}}} \]
                  8. lower-/.f6452.8%

                    \[\leadsto \frac{2}{{k}^{4} \cdot \frac{t}{\ell \cdot \color{blue}{\ell}}} \]
                9. Applied rewrites52.8%

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

                if 1.9999999999999999e-38 < t

                1. Initial program 54.7%

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

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

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

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

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

                    \[\leadsto \frac{{\ell}^{2}}{{k}^{2} \cdot {\color{blue}{t}}^{3}} \]
                  5. lower-pow.f6451.2%

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

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

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

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

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

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

                    \[\leadsto \ell \cdot \color{blue}{\frac{\ell}{{k}^{2} \cdot {t}^{3}}} \]
                  6. lower-/.f6455.1%

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

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

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

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

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

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

                    \[\leadsto \ell \cdot \frac{\ell}{\left({t}^{3} \cdot k\right) \cdot \color{blue}{k}} \]
                  13. lower-*.f6459.5%

                    \[\leadsto \ell \cdot \frac{\ell}{\left({t}^{3} \cdot k\right) \cdot k} \]
                  14. lift-pow.f64N/A

                    \[\leadsto \ell \cdot \frac{\ell}{\left({t}^{3} \cdot k\right) \cdot k} \]
                  15. unpow3N/A

                    \[\leadsto \ell \cdot \frac{\ell}{\left(\left(\left(t \cdot t\right) \cdot t\right) \cdot k\right) \cdot k} \]
                  16. lift-*.f64N/A

                    \[\leadsto \ell \cdot \frac{\ell}{\left(\left(\left(t \cdot t\right) \cdot t\right) \cdot k\right) \cdot k} \]
                  17. lower-*.f6459.5%

                    \[\leadsto \ell \cdot \frac{\ell}{\left(\left(\left(t \cdot t\right) \cdot t\right) \cdot k\right) \cdot k} \]
                6. Applied rewrites59.5%

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

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

                    \[\leadsto \ell \cdot \frac{\ell}{\left(\left(\left(t \cdot t\right) \cdot t\right) \cdot k\right) \cdot k} \]
                  3. associate-*l*N/A

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

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

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

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

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

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

                    \[\leadsto \ell \cdot \frac{\ell}{t \cdot \left(\left(t \cdot t\right) \cdot \color{blue}{\left(k \cdot k\right)}\right)} \]
                8. Applied rewrites58.1%

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

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

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

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

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

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

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

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

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

                    \[\leadsto \ell \cdot \frac{\frac{\frac{\ell}{t}}{t \cdot k}}{\color{blue}{t \cdot k}} \]
                  10. lower-/.f64N/A

                    \[\leadsto \ell \cdot \frac{\frac{\frac{\ell}{t}}{t \cdot k}}{\color{blue}{t \cdot k}} \]
                  11. lower-/.f64N/A

                    \[\leadsto \ell \cdot \frac{\frac{\frac{\ell}{t}}{t \cdot k}}{\color{blue}{t} \cdot k} \]
                  12. *-commutativeN/A

                    \[\leadsto \ell \cdot \frac{\frac{\frac{\ell}{t}}{k \cdot t}}{t \cdot k} \]
                  13. lift-*.f64N/A

                    \[\leadsto \ell \cdot \frac{\frac{\frac{\ell}{t}}{k \cdot t}}{t \cdot k} \]
                  14. *-commutativeN/A

                    \[\leadsto \ell \cdot \frac{\frac{\frac{\ell}{t}}{k \cdot t}}{k \cdot \color{blue}{t}} \]
                  15. lift-*.f6469.3%

                    \[\leadsto \ell \cdot \frac{\frac{\frac{\ell}{t}}{k \cdot t}}{k \cdot \color{blue}{t}} \]
                10. Applied rewrites69.3%

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

              Alternative 13: 72.3% accurate, 2.8× speedup?

              \[\begin{array}{l} t_1 := k \cdot \left|t\right|\\ t_2 := -\left|t\right|\\ \mathsf{copysign}\left(1, t\right) \cdot \begin{array}{l} \mathbf{if}\;\left|t\right| \leq 2.8 \cdot 10^{-213}:\\ \;\;\;\;\ell \cdot \frac{\ell}{\left|t\right| \cdot \left(\left(\left(k \cdot k\right) \cdot t\_2\right) \cdot t\_2\right)}\\ \mathbf{elif}\;\left|t\right| \leq 2 \cdot 10^{-38}:\\ \;\;\;\;\frac{2}{\left|t\right| \cdot \frac{{k}^{4}}{\ell \cdot \ell}}\\ \mathbf{else}:\\ \;\;\;\;\ell \cdot \frac{\frac{\frac{\ell}{\left|t\right|}}{t\_1}}{t\_1}\\ \end{array} \end{array} \]
              (FPCore (t l k)
                :precision binary64
                (let* ((t_1 (* k (fabs t))) (t_2 (- (fabs t))))
                (*
                 (copysign 1.0 t)
                 (if (<= (fabs t) 2.8e-213)
                   (* l (/ l (* (fabs t) (* (* (* k k) t_2) t_2))))
                   (if (<= (fabs t) 2e-38)
                     (/ 2.0 (* (fabs t) (/ (pow k 4.0) (* l l))))
                     (* l (/ (/ (/ l (fabs t)) t_1) t_1)))))))
              double code(double t, double l, double k) {
              	double t_1 = k * fabs(t);
              	double t_2 = -fabs(t);
              	double tmp;
              	if (fabs(t) <= 2.8e-213) {
              		tmp = l * (l / (fabs(t) * (((k * k) * t_2) * t_2)));
              	} else if (fabs(t) <= 2e-38) {
              		tmp = 2.0 / (fabs(t) * (pow(k, 4.0) / (l * l)));
              	} else {
              		tmp = l * (((l / fabs(t)) / t_1) / t_1);
              	}
              	return copysign(1.0, t) * tmp;
              }
              
              public static double code(double t, double l, double k) {
              	double t_1 = k * Math.abs(t);
              	double t_2 = -Math.abs(t);
              	double tmp;
              	if (Math.abs(t) <= 2.8e-213) {
              		tmp = l * (l / (Math.abs(t) * (((k * k) * t_2) * t_2)));
              	} else if (Math.abs(t) <= 2e-38) {
              		tmp = 2.0 / (Math.abs(t) * (Math.pow(k, 4.0) / (l * l)));
              	} else {
              		tmp = l * (((l / Math.abs(t)) / t_1) / t_1);
              	}
              	return Math.copySign(1.0, t) * tmp;
              }
              
              def code(t, l, k):
              	t_1 = k * math.fabs(t)
              	t_2 = -math.fabs(t)
              	tmp = 0
              	if math.fabs(t) <= 2.8e-213:
              		tmp = l * (l / (math.fabs(t) * (((k * k) * t_2) * t_2)))
              	elif math.fabs(t) <= 2e-38:
              		tmp = 2.0 / (math.fabs(t) * (math.pow(k, 4.0) / (l * l)))
              	else:
              		tmp = l * (((l / math.fabs(t)) / t_1) / t_1)
              	return math.copysign(1.0, t) * tmp
              
              function code(t, l, k)
              	t_1 = Float64(k * abs(t))
              	t_2 = Float64(-abs(t))
              	tmp = 0.0
              	if (abs(t) <= 2.8e-213)
              		tmp = Float64(l * Float64(l / Float64(abs(t) * Float64(Float64(Float64(k * k) * t_2) * t_2))));
              	elseif (abs(t) <= 2e-38)
              		tmp = Float64(2.0 / Float64(abs(t) * Float64((k ^ 4.0) / Float64(l * l))));
              	else
              		tmp = Float64(l * Float64(Float64(Float64(l / abs(t)) / t_1) / t_1));
              	end
              	return Float64(copysign(1.0, t) * tmp)
              end
              
              function tmp_2 = code(t, l, k)
              	t_1 = k * abs(t);
              	t_2 = -abs(t);
              	tmp = 0.0;
              	if (abs(t) <= 2.8e-213)
              		tmp = l * (l / (abs(t) * (((k * k) * t_2) * t_2)));
              	elseif (abs(t) <= 2e-38)
              		tmp = 2.0 / (abs(t) * ((k ^ 4.0) / (l * l)));
              	else
              		tmp = l * (((l / abs(t)) / t_1) / t_1);
              	end
              	tmp_2 = (sign(t) * abs(1.0)) * tmp;
              end
              
              code[t_, l_, k_] := Block[{t$95$1 = N[(k * N[Abs[t], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = (-N[Abs[t], $MachinePrecision])}, N[(N[With[{TMP1 = Abs[1.0], TMP2 = Sign[t]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision] * If[LessEqual[N[Abs[t], $MachinePrecision], 2.8e-213], N[(l * N[(l / N[(N[Abs[t], $MachinePrecision] * N[(N[(N[(k * k), $MachinePrecision] * t$95$2), $MachinePrecision] * t$95$2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[Abs[t], $MachinePrecision], 2e-38], N[(2.0 / N[(N[Abs[t], $MachinePrecision] * N[(N[Power[k, 4.0], $MachinePrecision] / N[(l * l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(l * N[(N[(N[(l / N[Abs[t], $MachinePrecision]), $MachinePrecision] / t$95$1), $MachinePrecision] / t$95$1), $MachinePrecision]), $MachinePrecision]]]), $MachinePrecision]]]
              
              \begin{array}{l}
              t_1 := k \cdot \left|t\right|\\
              t_2 := -\left|t\right|\\
              \mathsf{copysign}\left(1, t\right) \cdot \begin{array}{l}
              \mathbf{if}\;\left|t\right| \leq 2.8 \cdot 10^{-213}:\\
              \;\;\;\;\ell \cdot \frac{\ell}{\left|t\right| \cdot \left(\left(\left(k \cdot k\right) \cdot t\_2\right) \cdot t\_2\right)}\\
              
              \mathbf{elif}\;\left|t\right| \leq 2 \cdot 10^{-38}:\\
              \;\;\;\;\frac{2}{\left|t\right| \cdot \frac{{k}^{4}}{\ell \cdot \ell}}\\
              
              \mathbf{else}:\\
              \;\;\;\;\ell \cdot \frac{\frac{\frac{\ell}{\left|t\right|}}{t\_1}}{t\_1}\\
              
              
              \end{array}
              \end{array}
              
              Derivation
              1. Split input into 3 regimes
              2. if t < 2.8e-213

                1. Initial program 54.7%

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

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

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

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

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

                    \[\leadsto \frac{{\ell}^{2}}{{k}^{2} \cdot {\color{blue}{t}}^{3}} \]
                  5. lower-pow.f6451.2%

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

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

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

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

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

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

                    \[\leadsto \ell \cdot \color{blue}{\frac{\ell}{{k}^{2} \cdot {t}^{3}}} \]
                  6. lower-/.f6455.1%

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

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

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

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

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

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

                    \[\leadsto \ell \cdot \frac{\ell}{\left({t}^{3} \cdot k\right) \cdot \color{blue}{k}} \]
                  13. lower-*.f6459.5%

                    \[\leadsto \ell \cdot \frac{\ell}{\left({t}^{3} \cdot k\right) \cdot k} \]
                  14. lift-pow.f64N/A

                    \[\leadsto \ell \cdot \frac{\ell}{\left({t}^{3} \cdot k\right) \cdot k} \]
                  15. unpow3N/A

                    \[\leadsto \ell \cdot \frac{\ell}{\left(\left(\left(t \cdot t\right) \cdot t\right) \cdot k\right) \cdot k} \]
                  16. lift-*.f64N/A

                    \[\leadsto \ell \cdot \frac{\ell}{\left(\left(\left(t \cdot t\right) \cdot t\right) \cdot k\right) \cdot k} \]
                  17. lower-*.f6459.5%

                    \[\leadsto \ell \cdot \frac{\ell}{\left(\left(\left(t \cdot t\right) \cdot t\right) \cdot k\right) \cdot k} \]
                6. Applied rewrites59.5%

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

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

                    \[\leadsto \ell \cdot \frac{\ell}{\left(\left(\left(t \cdot t\right) \cdot t\right) \cdot k\right) \cdot k} \]
                  3. associate-*l*N/A

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

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

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

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

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

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

                    \[\leadsto \ell \cdot \frac{\ell}{t \cdot \left(\left(t \cdot t\right) \cdot \color{blue}{\left(k \cdot k\right)}\right)} \]
                8. Applied rewrites58.1%

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

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

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

                    \[\leadsto \ell \cdot \frac{\ell}{t \cdot \left(\left(k \cdot k\right) \cdot \left(t \cdot \color{blue}{t}\right)\right)} \]
                  4. sqr-neg-revN/A

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

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

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

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

                    \[\leadsto \ell \cdot \frac{\ell}{t \cdot \left(\left(\left(k \cdot k\right) \cdot \left(-t\right)\right) \cdot \left(\mathsf{neg}\left(t\right)\right)\right)} \]
                  9. lower-neg.f6461.9%

                    \[\leadsto \ell \cdot \frac{\ell}{t \cdot \left(\left(\left(k \cdot k\right) \cdot \left(-t\right)\right) \cdot \left(-t\right)\right)} \]
                10. Applied rewrites61.9%

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

                if 2.8e-213 < t < 1.9999999999999999e-38

                1. Initial program 54.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                    \[\leadsto \frac{2}{\frac{{k}^{4} \cdot t}{{\ell}^{2}}} \]
                  4. lower-pow.f6451.9%

                    \[\leadsto \frac{2}{\frac{{k}^{4} \cdot t}{{\ell}^{2}}} \]
                7. Applied rewrites51.9%

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

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

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

                    \[\leadsto \frac{2}{\frac{t \cdot {k}^{4}}{{\ell}^{2}}} \]
                  4. lift-pow.f64N/A

                    \[\leadsto \frac{2}{\frac{t \cdot {k}^{4}}{{\ell}^{2}}} \]
                  5. pow2N/A

                    \[\leadsto \frac{2}{\frac{t \cdot {k}^{4}}{\ell \cdot \ell}} \]
                  6. lift-*.f64N/A

                    \[\leadsto \frac{2}{\frac{t \cdot {k}^{4}}{\ell \cdot \ell}} \]
                  7. associate-/l*N/A

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

                    \[\leadsto \frac{2}{t \cdot \frac{{k}^{4}}{\color{blue}{\ell \cdot \ell}}} \]
                  9. lower-/.f6452.2%

                    \[\leadsto \frac{2}{t \cdot \frac{{k}^{4}}{\ell \cdot \color{blue}{\ell}}} \]
                9. Applied rewrites52.2%

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

                if 1.9999999999999999e-38 < t

                1. Initial program 54.7%

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

                  \[\leadsto \color{blue}{\frac{{\ell}^{2}}{{k}^{2} \cdot {t}^{3}}} \]
                3. Step-by-step derivation
                  1. lower-/.f64N/A

                    \[\leadsto \frac{{\ell}^{2}}{\color{blue}{{k}^{2} \cdot {t}^{3}}} \]
                  2. lower-pow.f64N/A

                    \[\leadsto \frac{{\ell}^{2}}{\color{blue}{{k}^{2}} \cdot {t}^{3}} \]
                  3. lower-*.f64N/A

                    \[\leadsto \frac{{\ell}^{2}}{{k}^{2} \cdot \color{blue}{{t}^{3}}} \]
                  4. lower-pow.f64N/A

                    \[\leadsto \frac{{\ell}^{2}}{{k}^{2} \cdot {\color{blue}{t}}^{3}} \]
                  5. lower-pow.f6451.2%

                    \[\leadsto \frac{{\ell}^{2}}{{k}^{2} \cdot {t}^{\color{blue}{3}}} \]
                4. Applied rewrites51.2%

                  \[\leadsto \color{blue}{\frac{{\ell}^{2}}{{k}^{2} \cdot {t}^{3}}} \]
                5. Step-by-step derivation
                  1. lift-/.f64N/A

                    \[\leadsto \frac{{\ell}^{2}}{\color{blue}{{k}^{2} \cdot {t}^{3}}} \]
                  2. lift-pow.f64N/A

                    \[\leadsto \frac{{\ell}^{2}}{\color{blue}{{k}^{2}} \cdot {t}^{3}} \]
                  3. pow2N/A

                    \[\leadsto \frac{\ell \cdot \ell}{\color{blue}{{k}^{2}} \cdot {t}^{3}} \]
                  4. associate-/l*N/A

                    \[\leadsto \ell \cdot \color{blue}{\frac{\ell}{{k}^{2} \cdot {t}^{3}}} \]
                  5. lower-*.f64N/A

                    \[\leadsto \ell \cdot \color{blue}{\frac{\ell}{{k}^{2} \cdot {t}^{3}}} \]
                  6. lower-/.f6455.1%

                    \[\leadsto \ell \cdot \frac{\ell}{\color{blue}{{k}^{2} \cdot {t}^{3}}} \]
                  7. lift-*.f64N/A

                    \[\leadsto \ell \cdot \frac{\ell}{{k}^{2} \cdot \color{blue}{{t}^{3}}} \]
                  8. *-commutativeN/A

                    \[\leadsto \ell \cdot \frac{\ell}{{t}^{3} \cdot \color{blue}{{k}^{2}}} \]
                  9. lift-pow.f64N/A

                    \[\leadsto \ell \cdot \frac{\ell}{{t}^{3} \cdot {k}^{\color{blue}{2}}} \]
                  10. pow2N/A

                    \[\leadsto \ell \cdot \frac{\ell}{{t}^{3} \cdot \left(k \cdot \color{blue}{k}\right)} \]
                  11. associate-*r*N/A

                    \[\leadsto \ell \cdot \frac{\ell}{\left({t}^{3} \cdot k\right) \cdot \color{blue}{k}} \]
                  12. lower-*.f64N/A

                    \[\leadsto \ell \cdot \frac{\ell}{\left({t}^{3} \cdot k\right) \cdot \color{blue}{k}} \]
                  13. lower-*.f6459.5%

                    \[\leadsto \ell \cdot \frac{\ell}{\left({t}^{3} \cdot k\right) \cdot k} \]
                  14. lift-pow.f64N/A

                    \[\leadsto \ell \cdot \frac{\ell}{\left({t}^{3} \cdot k\right) \cdot k} \]
                  15. unpow3N/A

                    \[\leadsto \ell \cdot \frac{\ell}{\left(\left(\left(t \cdot t\right) \cdot t\right) \cdot k\right) \cdot k} \]
                  16. lift-*.f64N/A

                    \[\leadsto \ell \cdot \frac{\ell}{\left(\left(\left(t \cdot t\right) \cdot t\right) \cdot k\right) \cdot k} \]
                  17. lower-*.f6459.5%

                    \[\leadsto \ell \cdot \frac{\ell}{\left(\left(\left(t \cdot t\right) \cdot t\right) \cdot k\right) \cdot k} \]
                6. Applied rewrites59.5%

                  \[\leadsto \ell \cdot \color{blue}{\frac{\ell}{\left(\left(\left(t \cdot t\right) \cdot t\right) \cdot k\right) \cdot k}} \]
                7. Step-by-step derivation
                  1. lift-*.f64N/A

                    \[\leadsto \ell \cdot \frac{\ell}{\left(\left(\left(t \cdot t\right) \cdot t\right) \cdot k\right) \cdot \color{blue}{k}} \]
                  2. lift-*.f64N/A

                    \[\leadsto \ell \cdot \frac{\ell}{\left(\left(\left(t \cdot t\right) \cdot t\right) \cdot k\right) \cdot k} \]
                  3. associate-*l*N/A

                    \[\leadsto \ell \cdot \frac{\ell}{\left(\left(t \cdot t\right) \cdot t\right) \cdot \color{blue}{\left(k \cdot k\right)}} \]
                  4. lift-*.f64N/A

                    \[\leadsto \ell \cdot \frac{\ell}{\left(\left(t \cdot t\right) \cdot t\right) \cdot \left(\color{blue}{k} \cdot k\right)} \]
                  5. *-commutativeN/A

                    \[\leadsto \ell \cdot \frac{\ell}{\left(t \cdot \left(t \cdot t\right)\right) \cdot \left(\color{blue}{k} \cdot k\right)} \]
                  6. lift-*.f64N/A

                    \[\leadsto \ell \cdot \frac{\ell}{\left(t \cdot \left(t \cdot t\right)\right) \cdot \left(k \cdot \color{blue}{k}\right)} \]
                  7. associate-*l*N/A

                    \[\leadsto \ell \cdot \frac{\ell}{t \cdot \color{blue}{\left(\left(t \cdot t\right) \cdot \left(k \cdot k\right)\right)}} \]
                  8. lower-*.f64N/A

                    \[\leadsto \ell \cdot \frac{\ell}{t \cdot \color{blue}{\left(\left(t \cdot t\right) \cdot \left(k \cdot k\right)\right)}} \]
                  9. lower-*.f6458.1%

                    \[\leadsto \ell \cdot \frac{\ell}{t \cdot \left(\left(t \cdot t\right) \cdot \color{blue}{\left(k \cdot k\right)}\right)} \]
                8. Applied rewrites58.1%

                  \[\leadsto \ell \cdot \frac{\ell}{t \cdot \color{blue}{\left(\left(t \cdot t\right) \cdot \left(k \cdot k\right)\right)}} \]
                9. Step-by-step derivation
                  1. lift-/.f64N/A

                    \[\leadsto \ell \cdot \frac{\ell}{\color{blue}{t \cdot \left(\left(t \cdot t\right) \cdot \left(k \cdot k\right)\right)}} \]
                  2. lift-*.f64N/A

                    \[\leadsto \ell \cdot \frac{\ell}{t \cdot \color{blue}{\left(\left(t \cdot t\right) \cdot \left(k \cdot k\right)\right)}} \]
                  3. associate-/r*N/A

                    \[\leadsto \ell \cdot \frac{\frac{\ell}{t}}{\color{blue}{\left(t \cdot t\right) \cdot \left(k \cdot k\right)}} \]
                  4. lift-/.f64N/A

                    \[\leadsto \ell \cdot \frac{\frac{\ell}{t}}{\color{blue}{\left(t \cdot t\right)} \cdot \left(k \cdot k\right)} \]
                  5. lift-*.f64N/A

                    \[\leadsto \ell \cdot \frac{\frac{\ell}{t}}{\left(t \cdot t\right) \cdot \color{blue}{\left(k \cdot k\right)}} \]
                  6. lift-*.f64N/A

                    \[\leadsto \ell \cdot \frac{\frac{\ell}{t}}{\left(t \cdot t\right) \cdot \left(\color{blue}{k} \cdot k\right)} \]
                  7. lift-*.f64N/A

                    \[\leadsto \ell \cdot \frac{\frac{\ell}{t}}{\left(t \cdot t\right) \cdot \left(k \cdot \color{blue}{k}\right)} \]
                  8. unswap-sqrN/A

                    \[\leadsto \ell \cdot \frac{\frac{\ell}{t}}{\left(t \cdot k\right) \cdot \color{blue}{\left(t \cdot k\right)}} \]
                  9. associate-/r*N/A

                    \[\leadsto \ell \cdot \frac{\frac{\frac{\ell}{t}}{t \cdot k}}{\color{blue}{t \cdot k}} \]
                  10. lower-/.f64N/A

                    \[\leadsto \ell \cdot \frac{\frac{\frac{\ell}{t}}{t \cdot k}}{\color{blue}{t \cdot k}} \]
                  11. lower-/.f64N/A

                    \[\leadsto \ell \cdot \frac{\frac{\frac{\ell}{t}}{t \cdot k}}{\color{blue}{t} \cdot k} \]
                  12. *-commutativeN/A

                    \[\leadsto \ell \cdot \frac{\frac{\frac{\ell}{t}}{k \cdot t}}{t \cdot k} \]
                  13. lift-*.f64N/A

                    \[\leadsto \ell \cdot \frac{\frac{\frac{\ell}{t}}{k \cdot t}}{t \cdot k} \]
                  14. *-commutativeN/A

                    \[\leadsto \ell \cdot \frac{\frac{\frac{\ell}{t}}{k \cdot t}}{k \cdot \color{blue}{t}} \]
                  15. lift-*.f6469.3%

                    \[\leadsto \ell \cdot \frac{\frac{\frac{\ell}{t}}{k \cdot t}}{k \cdot \color{blue}{t}} \]
                10. Applied rewrites69.3%

                  \[\leadsto \ell \cdot \frac{\frac{\frac{\ell}{t}}{k \cdot t}}{\color{blue}{k \cdot t}} \]
              3. Recombined 3 regimes into one program.
              4. Add Preprocessing

              Alternative 14: 72.3% accurate, 3.6× speedup?

              \[\begin{array}{l} t_1 := \left|k\right| \cdot t\\ \mathbf{if}\;\left|k\right| \leq 2.25 \cdot 10^{-5}:\\ \;\;\;\;\ell \cdot \frac{\frac{\frac{\ell}{t}}{t\_1}}{t\_1}\\ \mathbf{else}:\\ \;\;\;\;\frac{2}{\frac{{\left(\left|k\right|\right)}^{4} \cdot t}{\ell \cdot \ell}}\\ \end{array} \]
              (FPCore (t l k)
                :precision binary64
                (let* ((t_1 (* (fabs k) t)))
                (if (<= (fabs k) 2.25e-5)
                  (* l (/ (/ (/ l t) t_1) t_1))
                  (/ 2.0 (/ (* (pow (fabs k) 4.0) t) (* l l))))))
              double code(double t, double l, double k) {
              	double t_1 = fabs(k) * t;
              	double tmp;
              	if (fabs(k) <= 2.25e-5) {
              		tmp = l * (((l / t) / t_1) / t_1);
              	} else {
              		tmp = 2.0 / ((pow(fabs(k), 4.0) * t) / (l * l));
              	}
              	return tmp;
              }
              
              module fmin_fmax_functions
                  implicit none
                  private
                  public fmax
                  public fmin
              
                  interface fmax
                      module procedure fmax88
                      module procedure fmax44
                      module procedure fmax84
                      module procedure fmax48
                  end interface
                  interface fmin
                      module procedure fmin88
                      module procedure fmin44
                      module procedure fmin84
                      module procedure fmin48
                  end interface
              contains
                  real(8) function fmax88(x, y) result (res)
                      real(8), intent (in) :: x
                      real(8), intent (in) :: y
                      res = merge(y, merge(x, max(x, y), y /= y), x /= x)
                  end function
                  real(4) function fmax44(x, y) result (res)
                      real(4), intent (in) :: x
                      real(4), intent (in) :: y
                      res = merge(y, merge(x, max(x, y), y /= y), x /= x)
                  end function
                  real(8) function fmax84(x, y) result(res)
                      real(8), intent (in) :: x
                      real(4), intent (in) :: y
                      res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
                  end function
                  real(8) function fmax48(x, y) result(res)
                      real(4), intent (in) :: x
                      real(8), intent (in) :: y
                      res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
                  end function
                  real(8) function fmin88(x, y) result (res)
                      real(8), intent (in) :: x
                      real(8), intent (in) :: y
                      res = merge(y, merge(x, min(x, y), y /= y), x /= x)
                  end function
                  real(4) function fmin44(x, y) result (res)
                      real(4), intent (in) :: x
                      real(4), intent (in) :: y
                      res = merge(y, merge(x, min(x, y), y /= y), x /= x)
                  end function
                  real(8) function fmin84(x, y) result(res)
                      real(8), intent (in) :: x
                      real(4), intent (in) :: y
                      res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
                  end function
                  real(8) function fmin48(x, y) result(res)
                      real(4), intent (in) :: x
                      real(8), intent (in) :: y
                      res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
                  end function
              end module
              
              real(8) function code(t, l, k)
              use fmin_fmax_functions
                  real(8), intent (in) :: t
                  real(8), intent (in) :: l
                  real(8), intent (in) :: k
                  real(8) :: t_1
                  real(8) :: tmp
                  t_1 = abs(k) * t
                  if (abs(k) <= 2.25d-5) then
                      tmp = l * (((l / t) / t_1) / t_1)
                  else
                      tmp = 2.0d0 / (((abs(k) ** 4.0d0) * t) / (l * l))
                  end if
                  code = tmp
              end function
              
              public static double code(double t, double l, double k) {
              	double t_1 = Math.abs(k) * t;
              	double tmp;
              	if (Math.abs(k) <= 2.25e-5) {
              		tmp = l * (((l / t) / t_1) / t_1);
              	} else {
              		tmp = 2.0 / ((Math.pow(Math.abs(k), 4.0) * t) / (l * l));
              	}
              	return tmp;
              }
              
              def code(t, l, k):
              	t_1 = math.fabs(k) * t
              	tmp = 0
              	if math.fabs(k) <= 2.25e-5:
              		tmp = l * (((l / t) / t_1) / t_1)
              	else:
              		tmp = 2.0 / ((math.pow(math.fabs(k), 4.0) * t) / (l * l))
              	return tmp
              
              function code(t, l, k)
              	t_1 = Float64(abs(k) * t)
              	tmp = 0.0
              	if (abs(k) <= 2.25e-5)
              		tmp = Float64(l * Float64(Float64(Float64(l / t) / t_1) / t_1));
              	else
              		tmp = Float64(2.0 / Float64(Float64((abs(k) ^ 4.0) * t) / Float64(l * l)));
              	end
              	return tmp
              end
              
              function tmp_2 = code(t, l, k)
              	t_1 = abs(k) * t;
              	tmp = 0.0;
              	if (abs(k) <= 2.25e-5)
              		tmp = l * (((l / t) / t_1) / t_1);
              	else
              		tmp = 2.0 / (((abs(k) ^ 4.0) * t) / (l * l));
              	end
              	tmp_2 = tmp;
              end
              
              code[t_, l_, k_] := Block[{t$95$1 = N[(N[Abs[k], $MachinePrecision] * t), $MachinePrecision]}, If[LessEqual[N[Abs[k], $MachinePrecision], 2.25e-5], N[(l * N[(N[(N[(l / t), $MachinePrecision] / t$95$1), $MachinePrecision] / t$95$1), $MachinePrecision]), $MachinePrecision], N[(2.0 / N[(N[(N[Power[N[Abs[k], $MachinePrecision], 4.0], $MachinePrecision] * t), $MachinePrecision] / N[(l * l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
              
              \begin{array}{l}
              t_1 := \left|k\right| \cdot t\\
              \mathbf{if}\;\left|k\right| \leq 2.25 \cdot 10^{-5}:\\
              \;\;\;\;\ell \cdot \frac{\frac{\frac{\ell}{t}}{t\_1}}{t\_1}\\
              
              \mathbf{else}:\\
              \;\;\;\;\frac{2}{\frac{{\left(\left|k\right|\right)}^{4} \cdot t}{\ell \cdot \ell}}\\
              
              
              \end{array}
              
              Derivation
              1. Split input into 2 regimes
              2. if k < 2.2500000000000001e-5

                1. Initial program 54.7%

                  \[\frac{2}{\left(\left(\frac{{t}^{3}}{\ell \cdot \ell} \cdot \sin k\right) \cdot \tan k\right) \cdot \left(\left(1 + {\left(\frac{k}{t}\right)}^{2}\right) + 1\right)} \]
                2. Taylor expanded in k around 0

                  \[\leadsto \color{blue}{\frac{{\ell}^{2}}{{k}^{2} \cdot {t}^{3}}} \]
                3. Step-by-step derivation
                  1. lower-/.f64N/A

                    \[\leadsto \frac{{\ell}^{2}}{\color{blue}{{k}^{2} \cdot {t}^{3}}} \]
                  2. lower-pow.f64N/A

                    \[\leadsto \frac{{\ell}^{2}}{\color{blue}{{k}^{2}} \cdot {t}^{3}} \]
                  3. lower-*.f64N/A

                    \[\leadsto \frac{{\ell}^{2}}{{k}^{2} \cdot \color{blue}{{t}^{3}}} \]
                  4. lower-pow.f64N/A

                    \[\leadsto \frac{{\ell}^{2}}{{k}^{2} \cdot {\color{blue}{t}}^{3}} \]
                  5. lower-pow.f6451.2%

                    \[\leadsto \frac{{\ell}^{2}}{{k}^{2} \cdot {t}^{\color{blue}{3}}} \]
                4. Applied rewrites51.2%

                  \[\leadsto \color{blue}{\frac{{\ell}^{2}}{{k}^{2} \cdot {t}^{3}}} \]
                5. Step-by-step derivation
                  1. lift-/.f64N/A

                    \[\leadsto \frac{{\ell}^{2}}{\color{blue}{{k}^{2} \cdot {t}^{3}}} \]
                  2. lift-pow.f64N/A

                    \[\leadsto \frac{{\ell}^{2}}{\color{blue}{{k}^{2}} \cdot {t}^{3}} \]
                  3. pow2N/A

                    \[\leadsto \frac{\ell \cdot \ell}{\color{blue}{{k}^{2}} \cdot {t}^{3}} \]
                  4. associate-/l*N/A

                    \[\leadsto \ell \cdot \color{blue}{\frac{\ell}{{k}^{2} \cdot {t}^{3}}} \]
                  5. lower-*.f64N/A

                    \[\leadsto \ell \cdot \color{blue}{\frac{\ell}{{k}^{2} \cdot {t}^{3}}} \]
                  6. lower-/.f6455.1%

                    \[\leadsto \ell \cdot \frac{\ell}{\color{blue}{{k}^{2} \cdot {t}^{3}}} \]
                  7. lift-*.f64N/A

                    \[\leadsto \ell \cdot \frac{\ell}{{k}^{2} \cdot \color{blue}{{t}^{3}}} \]
                  8. *-commutativeN/A

                    \[\leadsto \ell \cdot \frac{\ell}{{t}^{3} \cdot \color{blue}{{k}^{2}}} \]
                  9. lift-pow.f64N/A

                    \[\leadsto \ell \cdot \frac{\ell}{{t}^{3} \cdot {k}^{\color{blue}{2}}} \]
                  10. pow2N/A

                    \[\leadsto \ell \cdot \frac{\ell}{{t}^{3} \cdot \left(k \cdot \color{blue}{k}\right)} \]
                  11. associate-*r*N/A

                    \[\leadsto \ell \cdot \frac{\ell}{\left({t}^{3} \cdot k\right) \cdot \color{blue}{k}} \]
                  12. lower-*.f64N/A

                    \[\leadsto \ell \cdot \frac{\ell}{\left({t}^{3} \cdot k\right) \cdot \color{blue}{k}} \]
                  13. lower-*.f6459.5%

                    \[\leadsto \ell \cdot \frac{\ell}{\left({t}^{3} \cdot k\right) \cdot k} \]
                  14. lift-pow.f64N/A

                    \[\leadsto \ell \cdot \frac{\ell}{\left({t}^{3} \cdot k\right) \cdot k} \]
                  15. unpow3N/A

                    \[\leadsto \ell \cdot \frac{\ell}{\left(\left(\left(t \cdot t\right) \cdot t\right) \cdot k\right) \cdot k} \]
                  16. lift-*.f64N/A

                    \[\leadsto \ell \cdot \frac{\ell}{\left(\left(\left(t \cdot t\right) \cdot t\right) \cdot k\right) \cdot k} \]
                  17. lower-*.f6459.5%

                    \[\leadsto \ell \cdot \frac{\ell}{\left(\left(\left(t \cdot t\right) \cdot t\right) \cdot k\right) \cdot k} \]
                6. Applied rewrites59.5%

                  \[\leadsto \ell \cdot \color{blue}{\frac{\ell}{\left(\left(\left(t \cdot t\right) \cdot t\right) \cdot k\right) \cdot k}} \]
                7. Step-by-step derivation
                  1. lift-*.f64N/A

                    \[\leadsto \ell \cdot \frac{\ell}{\left(\left(\left(t \cdot t\right) \cdot t\right) \cdot k\right) \cdot \color{blue}{k}} \]
                  2. lift-*.f64N/A

                    \[\leadsto \ell \cdot \frac{\ell}{\left(\left(\left(t \cdot t\right) \cdot t\right) \cdot k\right) \cdot k} \]
                  3. associate-*l*N/A

                    \[\leadsto \ell \cdot \frac{\ell}{\left(\left(t \cdot t\right) \cdot t\right) \cdot \color{blue}{\left(k \cdot k\right)}} \]
                  4. lift-*.f64N/A

                    \[\leadsto \ell \cdot \frac{\ell}{\left(\left(t \cdot t\right) \cdot t\right) \cdot \left(\color{blue}{k} \cdot k\right)} \]
                  5. *-commutativeN/A

                    \[\leadsto \ell \cdot \frac{\ell}{\left(t \cdot \left(t \cdot t\right)\right) \cdot \left(\color{blue}{k} \cdot k\right)} \]
                  6. lift-*.f64N/A

                    \[\leadsto \ell \cdot \frac{\ell}{\left(t \cdot \left(t \cdot t\right)\right) \cdot \left(k \cdot \color{blue}{k}\right)} \]
                  7. associate-*l*N/A

                    \[\leadsto \ell \cdot \frac{\ell}{t \cdot \color{blue}{\left(\left(t \cdot t\right) \cdot \left(k \cdot k\right)\right)}} \]
                  8. lower-*.f64N/A

                    \[\leadsto \ell \cdot \frac{\ell}{t \cdot \color{blue}{\left(\left(t \cdot t\right) \cdot \left(k \cdot k\right)\right)}} \]
                  9. lower-*.f6458.1%

                    \[\leadsto \ell \cdot \frac{\ell}{t \cdot \left(\left(t \cdot t\right) \cdot \color{blue}{\left(k \cdot k\right)}\right)} \]
                8. Applied rewrites58.1%

                  \[\leadsto \ell \cdot \frac{\ell}{t \cdot \color{blue}{\left(\left(t \cdot t\right) \cdot \left(k \cdot k\right)\right)}} \]
                9. Step-by-step derivation
                  1. lift-/.f64N/A

                    \[\leadsto \ell \cdot \frac{\ell}{\color{blue}{t \cdot \left(\left(t \cdot t\right) \cdot \left(k \cdot k\right)\right)}} \]
                  2. lift-*.f64N/A

                    \[\leadsto \ell \cdot \frac{\ell}{t \cdot \color{blue}{\left(\left(t \cdot t\right) \cdot \left(k \cdot k\right)\right)}} \]
                  3. associate-/r*N/A

                    \[\leadsto \ell \cdot \frac{\frac{\ell}{t}}{\color{blue}{\left(t \cdot t\right) \cdot \left(k \cdot k\right)}} \]
                  4. lift-/.f64N/A

                    \[\leadsto \ell \cdot \frac{\frac{\ell}{t}}{\color{blue}{\left(t \cdot t\right)} \cdot \left(k \cdot k\right)} \]
                  5. lift-*.f64N/A

                    \[\leadsto \ell \cdot \frac{\frac{\ell}{t}}{\left(t \cdot t\right) \cdot \color{blue}{\left(k \cdot k\right)}} \]
                  6. lift-*.f64N/A

                    \[\leadsto \ell \cdot \frac{\frac{\ell}{t}}{\left(t \cdot t\right) \cdot \left(\color{blue}{k} \cdot k\right)} \]
                  7. lift-*.f64N/A

                    \[\leadsto \ell \cdot \frac{\frac{\ell}{t}}{\left(t \cdot t\right) \cdot \left(k \cdot \color{blue}{k}\right)} \]
                  8. unswap-sqrN/A

                    \[\leadsto \ell \cdot \frac{\frac{\ell}{t}}{\left(t \cdot k\right) \cdot \color{blue}{\left(t \cdot k\right)}} \]
                  9. associate-/r*N/A

                    \[\leadsto \ell \cdot \frac{\frac{\frac{\ell}{t}}{t \cdot k}}{\color{blue}{t \cdot k}} \]
                  10. lower-/.f64N/A

                    \[\leadsto \ell \cdot \frac{\frac{\frac{\ell}{t}}{t \cdot k}}{\color{blue}{t \cdot k}} \]
                  11. lower-/.f64N/A

                    \[\leadsto \ell \cdot \frac{\frac{\frac{\ell}{t}}{t \cdot k}}{\color{blue}{t} \cdot k} \]
                  12. *-commutativeN/A

                    \[\leadsto \ell \cdot \frac{\frac{\frac{\ell}{t}}{k \cdot t}}{t \cdot k} \]
                  13. lift-*.f64N/A

                    \[\leadsto \ell \cdot \frac{\frac{\frac{\ell}{t}}{k \cdot t}}{t \cdot k} \]
                  14. *-commutativeN/A

                    \[\leadsto \ell \cdot \frac{\frac{\frac{\ell}{t}}{k \cdot t}}{k \cdot \color{blue}{t}} \]
                  15. lift-*.f6469.3%

                    \[\leadsto \ell \cdot \frac{\frac{\frac{\ell}{t}}{k \cdot t}}{k \cdot \color{blue}{t}} \]
                10. Applied rewrites69.3%

                  \[\leadsto \ell \cdot \frac{\frac{\frac{\ell}{t}}{k \cdot t}}{\color{blue}{k \cdot t}} \]

                if 2.2500000000000001e-5 < k

                1. Initial program 54.7%

                  \[\frac{2}{\left(\left(\frac{{t}^{3}}{\ell \cdot \ell} \cdot \sin k\right) \cdot \tan k\right) \cdot \left(\left(1 + {\left(\frac{k}{t}\right)}^{2}\right) + 1\right)} \]
                2. Taylor expanded in t around 0

                  \[\leadsto \frac{2}{\color{blue}{\frac{{k}^{2} \cdot \left(t \cdot {\sin k}^{2}\right)}{{\ell}^{2} \cdot \cos k}}} \]
                3. Step-by-step derivation
                  1. lower-/.f64N/A

                    \[\leadsto \frac{2}{\frac{{k}^{2} \cdot \left(t \cdot {\sin k}^{2}\right)}{\color{blue}{{\ell}^{2} \cdot \cos k}}} \]
                  2. lower-*.f64N/A

                    \[\leadsto \frac{2}{\frac{{k}^{2} \cdot \left(t \cdot {\sin k}^{2}\right)}{\color{blue}{{\ell}^{2}} \cdot \cos k}} \]
                  3. lower-pow.f64N/A

                    \[\leadsto \frac{2}{\frac{{k}^{2} \cdot \left(t \cdot {\sin k}^{2}\right)}{{\color{blue}{\ell}}^{2} \cdot \cos k}} \]
                  4. lower-*.f64N/A

                    \[\leadsto \frac{2}{\frac{{k}^{2} \cdot \left(t \cdot {\sin k}^{2}\right)}{{\ell}^{\color{blue}{2}} \cdot \cos k}} \]
                  5. lower-pow.f64N/A

                    \[\leadsto \frac{2}{\frac{{k}^{2} \cdot \left(t \cdot {\sin k}^{2}\right)}{{\ell}^{2} \cdot \cos k}} \]
                  6. lower-sin.f64N/A

                    \[\leadsto \frac{2}{\frac{{k}^{2} \cdot \left(t \cdot {\sin k}^{2}\right)}{{\ell}^{2} \cdot \cos k}} \]
                  7. lower-*.f64N/A

                    \[\leadsto \frac{2}{\frac{{k}^{2} \cdot \left(t \cdot {\sin k}^{2}\right)}{{\ell}^{2} \cdot \color{blue}{\cos k}}} \]
                  8. lower-pow.f64N/A

                    \[\leadsto \frac{2}{\frac{{k}^{2} \cdot \left(t \cdot {\sin k}^{2}\right)}{{\ell}^{2} \cdot \cos \color{blue}{k}}} \]
                  9. lower-cos.f6460.5%

                    \[\leadsto \frac{2}{\frac{{k}^{2} \cdot \left(t \cdot {\sin k}^{2}\right)}{{\ell}^{2} \cdot \cos k}} \]
                4. Applied rewrites60.5%

                  \[\leadsto \frac{2}{\color{blue}{\frac{{k}^{2} \cdot \left(t \cdot {\sin k}^{2}\right)}{{\ell}^{2} \cdot \cos k}}} \]
                5. Taylor expanded in k around 0

                  \[\leadsto \frac{2}{\frac{{k}^{4} \cdot t}{\color{blue}{{\ell}^{2}}}} \]
                6. Step-by-step derivation
                  1. lower-/.f64N/A

                    \[\leadsto \frac{2}{\frac{{k}^{4} \cdot t}{{\ell}^{\color{blue}{2}}}} \]
                  2. lower-*.f64N/A

                    \[\leadsto \frac{2}{\frac{{k}^{4} \cdot t}{{\ell}^{2}}} \]
                  3. lower-pow.f64N/A

                    \[\leadsto \frac{2}{\frac{{k}^{4} \cdot t}{{\ell}^{2}}} \]
                  4. lower-pow.f6451.9%

                    \[\leadsto \frac{2}{\frac{{k}^{4} \cdot t}{{\ell}^{2}}} \]
                7. Applied rewrites51.9%

                  \[\leadsto \frac{2}{\frac{{k}^{4} \cdot t}{\color{blue}{{\ell}^{2}}}} \]
                8. Step-by-step derivation
                  1. lift-pow.f64N/A

                    \[\leadsto \frac{2}{\frac{{k}^{4} \cdot t}{{\ell}^{2}}} \]
                  2. pow2N/A

                    \[\leadsto \frac{2}{\frac{{k}^{4} \cdot t}{\ell \cdot \ell}} \]
                  3. lift-*.f6451.9%

                    \[\leadsto \frac{2}{\frac{{k}^{4} \cdot t}{\ell \cdot \ell}} \]
                9. Applied rewrites51.9%

                  \[\leadsto \frac{2}{\frac{{k}^{4} \cdot t}{\ell \cdot \ell}} \]
              3. Recombined 2 regimes into one program.
              4. Add Preprocessing

              Alternative 15: 71.5% accurate, 3.4× speedup?

              \[\begin{array}{l} t_1 := k \cdot \left|t\right|\\ t_2 := -\left|t\right|\\ \mathsf{copysign}\left(1, t\right) \cdot \begin{array}{l} \mathbf{if}\;\left|t\right| \leq 1.55 \cdot 10^{-162}:\\ \;\;\;\;\ell \cdot \frac{\ell}{\left|t\right| \cdot \left(\left(\left(k \cdot k\right) \cdot t\_2\right) \cdot t\_2\right)}\\ \mathbf{elif}\;\left|t\right| \leq 1.62 \cdot 10^{-38}:\\ \;\;\;\;\frac{\frac{\ell \cdot \frac{\ell}{k \cdot k}}{\left|t\right| \cdot \left|t\right|}}{\left|t\right|}\\ \mathbf{else}:\\ \;\;\;\;\ell \cdot \frac{\frac{\frac{\ell}{\left|t\right|}}{t\_1}}{t\_1}\\ \end{array} \end{array} \]
              (FPCore (t l k)
                :precision binary64
                (let* ((t_1 (* k (fabs t))) (t_2 (- (fabs t))))
                (*
                 (copysign 1.0 t)
                 (if (<= (fabs t) 1.55e-162)
                   (* l (/ l (* (fabs t) (* (* (* k k) t_2) t_2))))
                   (if (<= (fabs t) 1.62e-38)
                     (/ (/ (* l (/ l (* k k))) (* (fabs t) (fabs t))) (fabs t))
                     (* l (/ (/ (/ l (fabs t)) t_1) t_1)))))))
              double code(double t, double l, double k) {
              	double t_1 = k * fabs(t);
              	double t_2 = -fabs(t);
              	double tmp;
              	if (fabs(t) <= 1.55e-162) {
              		tmp = l * (l / (fabs(t) * (((k * k) * t_2) * t_2)));
              	} else if (fabs(t) <= 1.62e-38) {
              		tmp = ((l * (l / (k * k))) / (fabs(t) * fabs(t))) / fabs(t);
              	} else {
              		tmp = l * (((l / fabs(t)) / t_1) / t_1);
              	}
              	return copysign(1.0, t) * tmp;
              }
              
              public static double code(double t, double l, double k) {
              	double t_1 = k * Math.abs(t);
              	double t_2 = -Math.abs(t);
              	double tmp;
              	if (Math.abs(t) <= 1.55e-162) {
              		tmp = l * (l / (Math.abs(t) * (((k * k) * t_2) * t_2)));
              	} else if (Math.abs(t) <= 1.62e-38) {
              		tmp = ((l * (l / (k * k))) / (Math.abs(t) * Math.abs(t))) / Math.abs(t);
              	} else {
              		tmp = l * (((l / Math.abs(t)) / t_1) / t_1);
              	}
              	return Math.copySign(1.0, t) * tmp;
              }
              
              def code(t, l, k):
              	t_1 = k * math.fabs(t)
              	t_2 = -math.fabs(t)
              	tmp = 0
              	if math.fabs(t) <= 1.55e-162:
              		tmp = l * (l / (math.fabs(t) * (((k * k) * t_2) * t_2)))
              	elif math.fabs(t) <= 1.62e-38:
              		tmp = ((l * (l / (k * k))) / (math.fabs(t) * math.fabs(t))) / math.fabs(t)
              	else:
              		tmp = l * (((l / math.fabs(t)) / t_1) / t_1)
              	return math.copysign(1.0, t) * tmp
              
              function code(t, l, k)
              	t_1 = Float64(k * abs(t))
              	t_2 = Float64(-abs(t))
              	tmp = 0.0
              	if (abs(t) <= 1.55e-162)
              		tmp = Float64(l * Float64(l / Float64(abs(t) * Float64(Float64(Float64(k * k) * t_2) * t_2))));
              	elseif (abs(t) <= 1.62e-38)
              		tmp = Float64(Float64(Float64(l * Float64(l / Float64(k * k))) / Float64(abs(t) * abs(t))) / abs(t));
              	else
              		tmp = Float64(l * Float64(Float64(Float64(l / abs(t)) / t_1) / t_1));
              	end
              	return Float64(copysign(1.0, t) * tmp)
              end
              
              function tmp_2 = code(t, l, k)
              	t_1 = k * abs(t);
              	t_2 = -abs(t);
              	tmp = 0.0;
              	if (abs(t) <= 1.55e-162)
              		tmp = l * (l / (abs(t) * (((k * k) * t_2) * t_2)));
              	elseif (abs(t) <= 1.62e-38)
              		tmp = ((l * (l / (k * k))) / (abs(t) * abs(t))) / abs(t);
              	else
              		tmp = l * (((l / abs(t)) / t_1) / t_1);
              	end
              	tmp_2 = (sign(t) * abs(1.0)) * tmp;
              end
              
              code[t_, l_, k_] := Block[{t$95$1 = N[(k * N[Abs[t], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = (-N[Abs[t], $MachinePrecision])}, N[(N[With[{TMP1 = Abs[1.0], TMP2 = Sign[t]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision] * If[LessEqual[N[Abs[t], $MachinePrecision], 1.55e-162], N[(l * N[(l / N[(N[Abs[t], $MachinePrecision] * N[(N[(N[(k * k), $MachinePrecision] * t$95$2), $MachinePrecision] * t$95$2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[Abs[t], $MachinePrecision], 1.62e-38], N[(N[(N[(l * N[(l / N[(k * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(N[Abs[t], $MachinePrecision] * N[Abs[t], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[Abs[t], $MachinePrecision]), $MachinePrecision], N[(l * N[(N[(N[(l / N[Abs[t], $MachinePrecision]), $MachinePrecision] / t$95$1), $MachinePrecision] / t$95$1), $MachinePrecision]), $MachinePrecision]]]), $MachinePrecision]]]
              
              \begin{array}{l}
              t_1 := k \cdot \left|t\right|\\
              t_2 := -\left|t\right|\\
              \mathsf{copysign}\left(1, t\right) \cdot \begin{array}{l}
              \mathbf{if}\;\left|t\right| \leq 1.55 \cdot 10^{-162}:\\
              \;\;\;\;\ell \cdot \frac{\ell}{\left|t\right| \cdot \left(\left(\left(k \cdot k\right) \cdot t\_2\right) \cdot t\_2\right)}\\
              
              \mathbf{elif}\;\left|t\right| \leq 1.62 \cdot 10^{-38}:\\
              \;\;\;\;\frac{\frac{\ell \cdot \frac{\ell}{k \cdot k}}{\left|t\right| \cdot \left|t\right|}}{\left|t\right|}\\
              
              \mathbf{else}:\\
              \;\;\;\;\ell \cdot \frac{\frac{\frac{\ell}{\left|t\right|}}{t\_1}}{t\_1}\\
              
              
              \end{array}
              \end{array}
              
              Derivation
              1. Split input into 3 regimes
              2. if t < 1.5499999999999999e-162

                1. Initial program 54.7%

                  \[\frac{2}{\left(\left(\frac{{t}^{3}}{\ell \cdot \ell} \cdot \sin k\right) \cdot \tan k\right) \cdot \left(\left(1 + {\left(\frac{k}{t}\right)}^{2}\right) + 1\right)} \]
                2. Taylor expanded in k around 0

                  \[\leadsto \color{blue}{\frac{{\ell}^{2}}{{k}^{2} \cdot {t}^{3}}} \]
                3. Step-by-step derivation
                  1. lower-/.f64N/A

                    \[\leadsto \frac{{\ell}^{2}}{\color{blue}{{k}^{2} \cdot {t}^{3}}} \]
                  2. lower-pow.f64N/A

                    \[\leadsto \frac{{\ell}^{2}}{\color{blue}{{k}^{2}} \cdot {t}^{3}} \]
                  3. lower-*.f64N/A

                    \[\leadsto \frac{{\ell}^{2}}{{k}^{2} \cdot \color{blue}{{t}^{3}}} \]
                  4. lower-pow.f64N/A

                    \[\leadsto \frac{{\ell}^{2}}{{k}^{2} \cdot {\color{blue}{t}}^{3}} \]
                  5. lower-pow.f6451.2%

                    \[\leadsto \frac{{\ell}^{2}}{{k}^{2} \cdot {t}^{\color{blue}{3}}} \]
                4. Applied rewrites51.2%

                  \[\leadsto \color{blue}{\frac{{\ell}^{2}}{{k}^{2} \cdot {t}^{3}}} \]
                5. Step-by-step derivation
                  1. lift-/.f64N/A

                    \[\leadsto \frac{{\ell}^{2}}{\color{blue}{{k}^{2} \cdot {t}^{3}}} \]
                  2. lift-pow.f64N/A

                    \[\leadsto \frac{{\ell}^{2}}{\color{blue}{{k}^{2}} \cdot {t}^{3}} \]
                  3. pow2N/A

                    \[\leadsto \frac{\ell \cdot \ell}{\color{blue}{{k}^{2}} \cdot {t}^{3}} \]
                  4. associate-/l*N/A

                    \[\leadsto \ell \cdot \color{blue}{\frac{\ell}{{k}^{2} \cdot {t}^{3}}} \]
                  5. lower-*.f64N/A

                    \[\leadsto \ell \cdot \color{blue}{\frac{\ell}{{k}^{2} \cdot {t}^{3}}} \]
                  6. lower-/.f6455.1%

                    \[\leadsto \ell \cdot \frac{\ell}{\color{blue}{{k}^{2} \cdot {t}^{3}}} \]
                  7. lift-*.f64N/A

                    \[\leadsto \ell \cdot \frac{\ell}{{k}^{2} \cdot \color{blue}{{t}^{3}}} \]
                  8. *-commutativeN/A

                    \[\leadsto \ell \cdot \frac{\ell}{{t}^{3} \cdot \color{blue}{{k}^{2}}} \]
                  9. lift-pow.f64N/A

                    \[\leadsto \ell \cdot \frac{\ell}{{t}^{3} \cdot {k}^{\color{blue}{2}}} \]
                  10. pow2N/A

                    \[\leadsto \ell \cdot \frac{\ell}{{t}^{3} \cdot \left(k \cdot \color{blue}{k}\right)} \]
                  11. associate-*r*N/A

                    \[\leadsto \ell \cdot \frac{\ell}{\left({t}^{3} \cdot k\right) \cdot \color{blue}{k}} \]
                  12. lower-*.f64N/A

                    \[\leadsto \ell \cdot \frac{\ell}{\left({t}^{3} \cdot k\right) \cdot \color{blue}{k}} \]
                  13. lower-*.f6459.5%

                    \[\leadsto \ell \cdot \frac{\ell}{\left({t}^{3} \cdot k\right) \cdot k} \]
                  14. lift-pow.f64N/A

                    \[\leadsto \ell \cdot \frac{\ell}{\left({t}^{3} \cdot k\right) \cdot k} \]
                  15. unpow3N/A

                    \[\leadsto \ell \cdot \frac{\ell}{\left(\left(\left(t \cdot t\right) \cdot t\right) \cdot k\right) \cdot k} \]
                  16. lift-*.f64N/A

                    \[\leadsto \ell \cdot \frac{\ell}{\left(\left(\left(t \cdot t\right) \cdot t\right) \cdot k\right) \cdot k} \]
                  17. lower-*.f6459.5%

                    \[\leadsto \ell \cdot \frac{\ell}{\left(\left(\left(t \cdot t\right) \cdot t\right) \cdot k\right) \cdot k} \]
                6. Applied rewrites59.5%

                  \[\leadsto \ell \cdot \color{blue}{\frac{\ell}{\left(\left(\left(t \cdot t\right) \cdot t\right) \cdot k\right) \cdot k}} \]
                7. Step-by-step derivation
                  1. lift-*.f64N/A

                    \[\leadsto \ell \cdot \frac{\ell}{\left(\left(\left(t \cdot t\right) \cdot t\right) \cdot k\right) \cdot \color{blue}{k}} \]
                  2. lift-*.f64N/A

                    \[\leadsto \ell \cdot \frac{\ell}{\left(\left(\left(t \cdot t\right) \cdot t\right) \cdot k\right) \cdot k} \]
                  3. associate-*l*N/A

                    \[\leadsto \ell \cdot \frac{\ell}{\left(\left(t \cdot t\right) \cdot t\right) \cdot \color{blue}{\left(k \cdot k\right)}} \]
                  4. lift-*.f64N/A

                    \[\leadsto \ell \cdot \frac{\ell}{\left(\left(t \cdot t\right) \cdot t\right) \cdot \left(\color{blue}{k} \cdot k\right)} \]
                  5. *-commutativeN/A

                    \[\leadsto \ell \cdot \frac{\ell}{\left(t \cdot \left(t \cdot t\right)\right) \cdot \left(\color{blue}{k} \cdot k\right)} \]
                  6. lift-*.f64N/A

                    \[\leadsto \ell \cdot \frac{\ell}{\left(t \cdot \left(t \cdot t\right)\right) \cdot \left(k \cdot \color{blue}{k}\right)} \]
                  7. associate-*l*N/A

                    \[\leadsto \ell \cdot \frac{\ell}{t \cdot \color{blue}{\left(\left(t \cdot t\right) \cdot \left(k \cdot k\right)\right)}} \]
                  8. lower-*.f64N/A

                    \[\leadsto \ell \cdot \frac{\ell}{t \cdot \color{blue}{\left(\left(t \cdot t\right) \cdot \left(k \cdot k\right)\right)}} \]
                  9. lower-*.f6458.1%

                    \[\leadsto \ell \cdot \frac{\ell}{t \cdot \left(\left(t \cdot t\right) \cdot \color{blue}{\left(k \cdot k\right)}\right)} \]
                8. Applied rewrites58.1%

                  \[\leadsto \ell \cdot \frac{\ell}{t \cdot \color{blue}{\left(\left(t \cdot t\right) \cdot \left(k \cdot k\right)\right)}} \]
                9. Step-by-step derivation
                  1. lift-*.f64N/A

                    \[\leadsto \ell \cdot \frac{\ell}{t \cdot \left(\left(t \cdot t\right) \cdot \color{blue}{\left(k \cdot k\right)}\right)} \]
                  2. *-commutativeN/A

                    \[\leadsto \ell \cdot \frac{\ell}{t \cdot \left(\left(k \cdot k\right) \cdot \color{blue}{\left(t \cdot t\right)}\right)} \]
                  3. lift-*.f64N/A

                    \[\leadsto \ell \cdot \frac{\ell}{t \cdot \left(\left(k \cdot k\right) \cdot \left(t \cdot \color{blue}{t}\right)\right)} \]
                  4. sqr-neg-revN/A

                    \[\leadsto \ell \cdot \frac{\ell}{t \cdot \left(\left(k \cdot k\right) \cdot \left(\left(\mathsf{neg}\left(t\right)\right) \cdot \color{blue}{\left(\mathsf{neg}\left(t\right)\right)}\right)\right)} \]
                  5. associate-*r*N/A

                    \[\leadsto \ell \cdot \frac{\ell}{t \cdot \left(\left(\left(k \cdot k\right) \cdot \left(\mathsf{neg}\left(t\right)\right)\right) \cdot \color{blue}{\left(\mathsf{neg}\left(t\right)\right)}\right)} \]
                  6. lower-*.f64N/A

                    \[\leadsto \ell \cdot \frac{\ell}{t \cdot \left(\left(\left(k \cdot k\right) \cdot \left(\mathsf{neg}\left(t\right)\right)\right) \cdot \color{blue}{\left(\mathsf{neg}\left(t\right)\right)}\right)} \]
                  7. lower-*.f64N/A

                    \[\leadsto \ell \cdot \frac{\ell}{t \cdot \left(\left(\left(k \cdot k\right) \cdot \left(\mathsf{neg}\left(t\right)\right)\right) \cdot \left(\mathsf{neg}\left(\color{blue}{t}\right)\right)\right)} \]
                  8. lower-neg.f64N/A

                    \[\leadsto \ell \cdot \frac{\ell}{t \cdot \left(\left(\left(k \cdot k\right) \cdot \left(-t\right)\right) \cdot \left(\mathsf{neg}\left(t\right)\right)\right)} \]
                  9. lower-neg.f6461.9%

                    \[\leadsto \ell \cdot \frac{\ell}{t \cdot \left(\left(\left(k \cdot k\right) \cdot \left(-t\right)\right) \cdot \left(-t\right)\right)} \]
                10. Applied rewrites61.9%

                  \[\leadsto \ell \cdot \frac{\ell}{t \cdot \left(\left(\left(k \cdot k\right) \cdot \left(-t\right)\right) \cdot \color{blue}{\left(-t\right)}\right)} \]

                if 1.5499999999999999e-162 < t < 1.62e-38

                1. Initial program 54.7%

                  \[\frac{2}{\left(\left(\frac{{t}^{3}}{\ell \cdot \ell} \cdot \sin k\right) \cdot \tan k\right) \cdot \left(\left(1 + {\left(\frac{k}{t}\right)}^{2}\right) + 1\right)} \]
                2. Taylor expanded in k around 0

                  \[\leadsto \color{blue}{\frac{{\ell}^{2}}{{k}^{2} \cdot {t}^{3}}} \]
                3. Step-by-step derivation
                  1. lower-/.f64N/A

                    \[\leadsto \frac{{\ell}^{2}}{\color{blue}{{k}^{2} \cdot {t}^{3}}} \]
                  2. lower-pow.f64N/A

                    \[\leadsto \frac{{\ell}^{2}}{\color{blue}{{k}^{2}} \cdot {t}^{3}} \]
                  3. lower-*.f64N/A

                    \[\leadsto \frac{{\ell}^{2}}{{k}^{2} \cdot \color{blue}{{t}^{3}}} \]
                  4. lower-pow.f64N/A

                    \[\leadsto \frac{{\ell}^{2}}{{k}^{2} \cdot {\color{blue}{t}}^{3}} \]
                  5. lower-pow.f6451.2%

                    \[\leadsto \frac{{\ell}^{2}}{{k}^{2} \cdot {t}^{\color{blue}{3}}} \]
                4. Applied rewrites51.2%

                  \[\leadsto \color{blue}{\frac{{\ell}^{2}}{{k}^{2} \cdot {t}^{3}}} \]
                5. Step-by-step derivation
                  1. lift-/.f64N/A

                    \[\leadsto \frac{{\ell}^{2}}{\color{blue}{{k}^{2} \cdot {t}^{3}}} \]
                  2. lift-pow.f64N/A

                    \[\leadsto \frac{{\ell}^{2}}{\color{blue}{{k}^{2}} \cdot {t}^{3}} \]
                  3. pow2N/A

                    \[\leadsto \frac{\ell \cdot \ell}{\color{blue}{{k}^{2}} \cdot {t}^{3}} \]
                  4. lift-*.f64N/A

                    \[\leadsto \frac{\ell \cdot \ell}{\color{blue}{{k}^{2}} \cdot {t}^{3}} \]
                  5. lift-*.f64N/A

                    \[\leadsto \frac{\ell \cdot \ell}{{k}^{2} \cdot \color{blue}{{t}^{3}}} \]
                  6. associate-/r*N/A

                    \[\leadsto \frac{\frac{\ell \cdot \ell}{{k}^{2}}}{\color{blue}{{t}^{3}}} \]
                  7. lift-pow.f64N/A

                    \[\leadsto \frac{\frac{\ell \cdot \ell}{{k}^{2}}}{{t}^{\color{blue}{3}}} \]
                  8. unpow3N/A

                    \[\leadsto \frac{\frac{\ell \cdot \ell}{{k}^{2}}}{\left(t \cdot t\right) \cdot \color{blue}{t}} \]
                  9. lift-*.f64N/A

                    \[\leadsto \frac{\frac{\ell \cdot \ell}{{k}^{2}}}{\left(t \cdot t\right) \cdot t} \]
                  10. associate-/r*N/A

                    \[\leadsto \frac{\frac{\frac{\ell \cdot \ell}{{k}^{2}}}{t \cdot t}}{\color{blue}{t}} \]
                  11. lower-/.f64N/A

                    \[\leadsto \frac{\frac{\frac{\ell \cdot \ell}{{k}^{2}}}{t \cdot t}}{\color{blue}{t}} \]
                  12. lower-/.f64N/A

                    \[\leadsto \frac{\frac{\frac{\ell \cdot \ell}{{k}^{2}}}{t \cdot t}}{t} \]
                  13. lift-*.f64N/A

                    \[\leadsto \frac{\frac{\frac{\ell \cdot \ell}{{k}^{2}}}{t \cdot t}}{t} \]
                  14. associate-/l*N/A

                    \[\leadsto \frac{\frac{\ell \cdot \frac{\ell}{{k}^{2}}}{t \cdot t}}{t} \]
                  15. lower-*.f64N/A

                    \[\leadsto \frac{\frac{\ell \cdot \frac{\ell}{{k}^{2}}}{t \cdot t}}{t} \]
                  16. lower-/.f6457.9%

                    \[\leadsto \frac{\frac{\ell \cdot \frac{\ell}{{k}^{2}}}{t \cdot t}}{t} \]
                  17. lift-pow.f64N/A

                    \[\leadsto \frac{\frac{\ell \cdot \frac{\ell}{{k}^{2}}}{t \cdot t}}{t} \]
                  18. pow2N/A

                    \[\leadsto \frac{\frac{\ell \cdot \frac{\ell}{k \cdot k}}{t \cdot t}}{t} \]
                  19. lift-*.f6457.9%

                    \[\leadsto \frac{\frac{\ell \cdot \frac{\ell}{k \cdot k}}{t \cdot t}}{t} \]
                6. Applied rewrites57.9%

                  \[\leadsto \frac{\frac{\ell \cdot \frac{\ell}{k \cdot k}}{t \cdot t}}{\color{blue}{t}} \]

                if 1.62e-38 < t

                1. Initial program 54.7%

                  \[\frac{2}{\left(\left(\frac{{t}^{3}}{\ell \cdot \ell} \cdot \sin k\right) \cdot \tan k\right) \cdot \left(\left(1 + {\left(\frac{k}{t}\right)}^{2}\right) + 1\right)} \]
                2. Taylor expanded in k around 0

                  \[\leadsto \color{blue}{\frac{{\ell}^{2}}{{k}^{2} \cdot {t}^{3}}} \]
                3. Step-by-step derivation
                  1. lower-/.f64N/A

                    \[\leadsto \frac{{\ell}^{2}}{\color{blue}{{k}^{2} \cdot {t}^{3}}} \]
                  2. lower-pow.f64N/A

                    \[\leadsto \frac{{\ell}^{2}}{\color{blue}{{k}^{2}} \cdot {t}^{3}} \]
                  3. lower-*.f64N/A

                    \[\leadsto \frac{{\ell}^{2}}{{k}^{2} \cdot \color{blue}{{t}^{3}}} \]
                  4. lower-pow.f64N/A

                    \[\leadsto \frac{{\ell}^{2}}{{k}^{2} \cdot {\color{blue}{t}}^{3}} \]
                  5. lower-pow.f6451.2%

                    \[\leadsto \frac{{\ell}^{2}}{{k}^{2} \cdot {t}^{\color{blue}{3}}} \]
                4. Applied rewrites51.2%

                  \[\leadsto \color{blue}{\frac{{\ell}^{2}}{{k}^{2} \cdot {t}^{3}}} \]
                5. Step-by-step derivation
                  1. lift-/.f64N/A

                    \[\leadsto \frac{{\ell}^{2}}{\color{blue}{{k}^{2} \cdot {t}^{3}}} \]
                  2. lift-pow.f64N/A

                    \[\leadsto \frac{{\ell}^{2}}{\color{blue}{{k}^{2}} \cdot {t}^{3}} \]
                  3. pow2N/A

                    \[\leadsto \frac{\ell \cdot \ell}{\color{blue}{{k}^{2}} \cdot {t}^{3}} \]
                  4. associate-/l*N/A

                    \[\leadsto \ell \cdot \color{blue}{\frac{\ell}{{k}^{2} \cdot {t}^{3}}} \]
                  5. lower-*.f64N/A

                    \[\leadsto \ell \cdot \color{blue}{\frac{\ell}{{k}^{2} \cdot {t}^{3}}} \]
                  6. lower-/.f6455.1%

                    \[\leadsto \ell \cdot \frac{\ell}{\color{blue}{{k}^{2} \cdot {t}^{3}}} \]
                  7. lift-*.f64N/A

                    \[\leadsto \ell \cdot \frac{\ell}{{k}^{2} \cdot \color{blue}{{t}^{3}}} \]
                  8. *-commutativeN/A

                    \[\leadsto \ell \cdot \frac{\ell}{{t}^{3} \cdot \color{blue}{{k}^{2}}} \]
                  9. lift-pow.f64N/A

                    \[\leadsto \ell \cdot \frac{\ell}{{t}^{3} \cdot {k}^{\color{blue}{2}}} \]
                  10. pow2N/A

                    \[\leadsto \ell \cdot \frac{\ell}{{t}^{3} \cdot \left(k \cdot \color{blue}{k}\right)} \]
                  11. associate-*r*N/A

                    \[\leadsto \ell \cdot \frac{\ell}{\left({t}^{3} \cdot k\right) \cdot \color{blue}{k}} \]
                  12. lower-*.f64N/A

                    \[\leadsto \ell \cdot \frac{\ell}{\left({t}^{3} \cdot k\right) \cdot \color{blue}{k}} \]
                  13. lower-*.f6459.5%

                    \[\leadsto \ell \cdot \frac{\ell}{\left({t}^{3} \cdot k\right) \cdot k} \]
                  14. lift-pow.f64N/A

                    \[\leadsto \ell \cdot \frac{\ell}{\left({t}^{3} \cdot k\right) \cdot k} \]
                  15. unpow3N/A

                    \[\leadsto \ell \cdot \frac{\ell}{\left(\left(\left(t \cdot t\right) \cdot t\right) \cdot k\right) \cdot k} \]
                  16. lift-*.f64N/A

                    \[\leadsto \ell \cdot \frac{\ell}{\left(\left(\left(t \cdot t\right) \cdot t\right) \cdot k\right) \cdot k} \]
                  17. lower-*.f6459.5%

                    \[\leadsto \ell \cdot \frac{\ell}{\left(\left(\left(t \cdot t\right) \cdot t\right) \cdot k\right) \cdot k} \]
                6. Applied rewrites59.5%

                  \[\leadsto \ell \cdot \color{blue}{\frac{\ell}{\left(\left(\left(t \cdot t\right) \cdot t\right) \cdot k\right) \cdot k}} \]
                7. Step-by-step derivation
                  1. lift-*.f64N/A

                    \[\leadsto \ell \cdot \frac{\ell}{\left(\left(\left(t \cdot t\right) \cdot t\right) \cdot k\right) \cdot \color{blue}{k}} \]
                  2. lift-*.f64N/A

                    \[\leadsto \ell \cdot \frac{\ell}{\left(\left(\left(t \cdot t\right) \cdot t\right) \cdot k\right) \cdot k} \]
                  3. associate-*l*N/A

                    \[\leadsto \ell \cdot \frac{\ell}{\left(\left(t \cdot t\right) \cdot t\right) \cdot \color{blue}{\left(k \cdot k\right)}} \]
                  4. lift-*.f64N/A

                    \[\leadsto \ell \cdot \frac{\ell}{\left(\left(t \cdot t\right) \cdot t\right) \cdot \left(\color{blue}{k} \cdot k\right)} \]
                  5. *-commutativeN/A

                    \[\leadsto \ell \cdot \frac{\ell}{\left(t \cdot \left(t \cdot t\right)\right) \cdot \left(\color{blue}{k} \cdot k\right)} \]
                  6. lift-*.f64N/A

                    \[\leadsto \ell \cdot \frac{\ell}{\left(t \cdot \left(t \cdot t\right)\right) \cdot \left(k \cdot \color{blue}{k}\right)} \]
                  7. associate-*l*N/A

                    \[\leadsto \ell \cdot \frac{\ell}{t \cdot \color{blue}{\left(\left(t \cdot t\right) \cdot \left(k \cdot k\right)\right)}} \]
                  8. lower-*.f64N/A

                    \[\leadsto \ell \cdot \frac{\ell}{t \cdot \color{blue}{\left(\left(t \cdot t\right) \cdot \left(k \cdot k\right)\right)}} \]
                  9. lower-*.f6458.1%

                    \[\leadsto \ell \cdot \frac{\ell}{t \cdot \left(\left(t \cdot t\right) \cdot \color{blue}{\left(k \cdot k\right)}\right)} \]
                8. Applied rewrites58.1%

                  \[\leadsto \ell \cdot \frac{\ell}{t \cdot \color{blue}{\left(\left(t \cdot t\right) \cdot \left(k \cdot k\right)\right)}} \]
                9. Step-by-step derivation
                  1. lift-/.f64N/A

                    \[\leadsto \ell \cdot \frac{\ell}{\color{blue}{t \cdot \left(\left(t \cdot t\right) \cdot \left(k \cdot k\right)\right)}} \]
                  2. lift-*.f64N/A

                    \[\leadsto \ell \cdot \frac{\ell}{t \cdot \color{blue}{\left(\left(t \cdot t\right) \cdot \left(k \cdot k\right)\right)}} \]
                  3. associate-/r*N/A

                    \[\leadsto \ell \cdot \frac{\frac{\ell}{t}}{\color{blue}{\left(t \cdot t\right) \cdot \left(k \cdot k\right)}} \]
                  4. lift-/.f64N/A

                    \[\leadsto \ell \cdot \frac{\frac{\ell}{t}}{\color{blue}{\left(t \cdot t\right)} \cdot \left(k \cdot k\right)} \]
                  5. lift-*.f64N/A

                    \[\leadsto \ell \cdot \frac{\frac{\ell}{t}}{\left(t \cdot t\right) \cdot \color{blue}{\left(k \cdot k\right)}} \]
                  6. lift-*.f64N/A

                    \[\leadsto \ell \cdot \frac{\frac{\ell}{t}}{\left(t \cdot t\right) \cdot \left(\color{blue}{k} \cdot k\right)} \]
                  7. lift-*.f64N/A

                    \[\leadsto \ell \cdot \frac{\frac{\ell}{t}}{\left(t \cdot t\right) \cdot \left(k \cdot \color{blue}{k}\right)} \]
                  8. unswap-sqrN/A

                    \[\leadsto \ell \cdot \frac{\frac{\ell}{t}}{\left(t \cdot k\right) \cdot \color{blue}{\left(t \cdot k\right)}} \]
                  9. associate-/r*N/A

                    \[\leadsto \ell \cdot \frac{\frac{\frac{\ell}{t}}{t \cdot k}}{\color{blue}{t \cdot k}} \]
                  10. lower-/.f64N/A

                    \[\leadsto \ell \cdot \frac{\frac{\frac{\ell}{t}}{t \cdot k}}{\color{blue}{t \cdot k}} \]
                  11. lower-/.f64N/A

                    \[\leadsto \ell \cdot \frac{\frac{\frac{\ell}{t}}{t \cdot k}}{\color{blue}{t} \cdot k} \]
                  12. *-commutativeN/A

                    \[\leadsto \ell \cdot \frac{\frac{\frac{\ell}{t}}{k \cdot t}}{t \cdot k} \]
                  13. lift-*.f64N/A

                    \[\leadsto \ell \cdot \frac{\frac{\frac{\ell}{t}}{k \cdot t}}{t \cdot k} \]
                  14. *-commutativeN/A

                    \[\leadsto \ell \cdot \frac{\frac{\frac{\ell}{t}}{k \cdot t}}{k \cdot \color{blue}{t}} \]
                  15. lift-*.f6469.3%

                    \[\leadsto \ell \cdot \frac{\frac{\frac{\ell}{t}}{k \cdot t}}{k \cdot \color{blue}{t}} \]
                10. Applied rewrites69.3%

                  \[\leadsto \ell \cdot \frac{\frac{\frac{\ell}{t}}{k \cdot t}}{\color{blue}{k \cdot t}} \]
              3. Recombined 3 regimes into one program.
              4. Add Preprocessing

              Alternative 16: 69.9% accurate, 3.9× speedup?

              \[\begin{array}{l} t_1 := k \cdot \left|t\right|\\ \mathsf{copysign}\left(1, t\right) \cdot \begin{array}{l} \mathbf{if}\;\left|t\right| \leq 1.55 \cdot 10^{-46}:\\ \;\;\;\;\frac{\frac{\ell \cdot \frac{\ell}{k \cdot k}}{\left|t\right| \cdot \left|t\right|}}{\left|t\right|}\\ \mathbf{else}:\\ \;\;\;\;\ell \cdot \frac{\frac{\frac{\ell}{\left|t\right|}}{t\_1}}{t\_1}\\ \end{array} \end{array} \]
              (FPCore (t l k)
                :precision binary64
                (let* ((t_1 (* k (fabs t))))
                (*
                 (copysign 1.0 t)
                 (if (<= (fabs t) 1.55e-46)
                   (/ (/ (* l (/ l (* k k))) (* (fabs t) (fabs t))) (fabs t))
                   (* l (/ (/ (/ l (fabs t)) t_1) t_1))))))
              double code(double t, double l, double k) {
              	double t_1 = k * fabs(t);
              	double tmp;
              	if (fabs(t) <= 1.55e-46) {
              		tmp = ((l * (l / (k * k))) / (fabs(t) * fabs(t))) / fabs(t);
              	} else {
              		tmp = l * (((l / fabs(t)) / t_1) / t_1);
              	}
              	return copysign(1.0, t) * tmp;
              }
              
              public static double code(double t, double l, double k) {
              	double t_1 = k * Math.abs(t);
              	double tmp;
              	if (Math.abs(t) <= 1.55e-46) {
              		tmp = ((l * (l / (k * k))) / (Math.abs(t) * Math.abs(t))) / Math.abs(t);
              	} else {
              		tmp = l * (((l / Math.abs(t)) / t_1) / t_1);
              	}
              	return Math.copySign(1.0, t) * tmp;
              }
              
              def code(t, l, k):
              	t_1 = k * math.fabs(t)
              	tmp = 0
              	if math.fabs(t) <= 1.55e-46:
              		tmp = ((l * (l / (k * k))) / (math.fabs(t) * math.fabs(t))) / math.fabs(t)
              	else:
              		tmp = l * (((l / math.fabs(t)) / t_1) / t_1)
              	return math.copysign(1.0, t) * tmp
              
              function code(t, l, k)
              	t_1 = Float64(k * abs(t))
              	tmp = 0.0
              	if (abs(t) <= 1.55e-46)
              		tmp = Float64(Float64(Float64(l * Float64(l / Float64(k * k))) / Float64(abs(t) * abs(t))) / abs(t));
              	else
              		tmp = Float64(l * Float64(Float64(Float64(l / abs(t)) / t_1) / t_1));
              	end
              	return Float64(copysign(1.0, t) * tmp)
              end
              
              function tmp_2 = code(t, l, k)
              	t_1 = k * abs(t);
              	tmp = 0.0;
              	if (abs(t) <= 1.55e-46)
              		tmp = ((l * (l / (k * k))) / (abs(t) * abs(t))) / abs(t);
              	else
              		tmp = l * (((l / abs(t)) / t_1) / t_1);
              	end
              	tmp_2 = (sign(t) * abs(1.0)) * tmp;
              end
              
              code[t_, l_, k_] := Block[{t$95$1 = N[(k * N[Abs[t], $MachinePrecision]), $MachinePrecision]}, N[(N[With[{TMP1 = Abs[1.0], TMP2 = Sign[t]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision] * If[LessEqual[N[Abs[t], $MachinePrecision], 1.55e-46], N[(N[(N[(l * N[(l / N[(k * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(N[Abs[t], $MachinePrecision] * N[Abs[t], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[Abs[t], $MachinePrecision]), $MachinePrecision], N[(l * N[(N[(N[(l / N[Abs[t], $MachinePrecision]), $MachinePrecision] / t$95$1), $MachinePrecision] / t$95$1), $MachinePrecision]), $MachinePrecision]]), $MachinePrecision]]
              
              \begin{array}{l}
              t_1 := k \cdot \left|t\right|\\
              \mathsf{copysign}\left(1, t\right) \cdot \begin{array}{l}
              \mathbf{if}\;\left|t\right| \leq 1.55 \cdot 10^{-46}:\\
              \;\;\;\;\frac{\frac{\ell \cdot \frac{\ell}{k \cdot k}}{\left|t\right| \cdot \left|t\right|}}{\left|t\right|}\\
              
              \mathbf{else}:\\
              \;\;\;\;\ell \cdot \frac{\frac{\frac{\ell}{\left|t\right|}}{t\_1}}{t\_1}\\
              
              
              \end{array}
              \end{array}
              
              Derivation
              1. Split input into 2 regimes
              2. if t < 1.55e-46

                1. Initial program 54.7%

                  \[\frac{2}{\left(\left(\frac{{t}^{3}}{\ell \cdot \ell} \cdot \sin k\right) \cdot \tan k\right) \cdot \left(\left(1 + {\left(\frac{k}{t}\right)}^{2}\right) + 1\right)} \]
                2. Taylor expanded in k around 0

                  \[\leadsto \color{blue}{\frac{{\ell}^{2}}{{k}^{2} \cdot {t}^{3}}} \]
                3. Step-by-step derivation
                  1. lower-/.f64N/A

                    \[\leadsto \frac{{\ell}^{2}}{\color{blue}{{k}^{2} \cdot {t}^{3}}} \]
                  2. lower-pow.f64N/A

                    \[\leadsto \frac{{\ell}^{2}}{\color{blue}{{k}^{2}} \cdot {t}^{3}} \]
                  3. lower-*.f64N/A

                    \[\leadsto \frac{{\ell}^{2}}{{k}^{2} \cdot \color{blue}{{t}^{3}}} \]
                  4. lower-pow.f64N/A

                    \[\leadsto \frac{{\ell}^{2}}{{k}^{2} \cdot {\color{blue}{t}}^{3}} \]
                  5. lower-pow.f6451.2%

                    \[\leadsto \frac{{\ell}^{2}}{{k}^{2} \cdot {t}^{\color{blue}{3}}} \]
                4. Applied rewrites51.2%

                  \[\leadsto \color{blue}{\frac{{\ell}^{2}}{{k}^{2} \cdot {t}^{3}}} \]
                5. Step-by-step derivation
                  1. lift-/.f64N/A

                    \[\leadsto \frac{{\ell}^{2}}{\color{blue}{{k}^{2} \cdot {t}^{3}}} \]
                  2. lift-pow.f64N/A

                    \[\leadsto \frac{{\ell}^{2}}{\color{blue}{{k}^{2}} \cdot {t}^{3}} \]
                  3. pow2N/A

                    \[\leadsto \frac{\ell \cdot \ell}{\color{blue}{{k}^{2}} \cdot {t}^{3}} \]
                  4. lift-*.f64N/A

                    \[\leadsto \frac{\ell \cdot \ell}{\color{blue}{{k}^{2}} \cdot {t}^{3}} \]
                  5. lift-*.f64N/A

                    \[\leadsto \frac{\ell \cdot \ell}{{k}^{2} \cdot \color{blue}{{t}^{3}}} \]
                  6. associate-/r*N/A

                    \[\leadsto \frac{\frac{\ell \cdot \ell}{{k}^{2}}}{\color{blue}{{t}^{3}}} \]
                  7. lift-pow.f64N/A

                    \[\leadsto \frac{\frac{\ell \cdot \ell}{{k}^{2}}}{{t}^{\color{blue}{3}}} \]
                  8. unpow3N/A

                    \[\leadsto \frac{\frac{\ell \cdot \ell}{{k}^{2}}}{\left(t \cdot t\right) \cdot \color{blue}{t}} \]
                  9. lift-*.f64N/A

                    \[\leadsto \frac{\frac{\ell \cdot \ell}{{k}^{2}}}{\left(t \cdot t\right) \cdot t} \]
                  10. associate-/r*N/A

                    \[\leadsto \frac{\frac{\frac{\ell \cdot \ell}{{k}^{2}}}{t \cdot t}}{\color{blue}{t}} \]
                  11. lower-/.f64N/A

                    \[\leadsto \frac{\frac{\frac{\ell \cdot \ell}{{k}^{2}}}{t \cdot t}}{\color{blue}{t}} \]
                  12. lower-/.f64N/A

                    \[\leadsto \frac{\frac{\frac{\ell \cdot \ell}{{k}^{2}}}{t \cdot t}}{t} \]
                  13. lift-*.f64N/A

                    \[\leadsto \frac{\frac{\frac{\ell \cdot \ell}{{k}^{2}}}{t \cdot t}}{t} \]
                  14. associate-/l*N/A

                    \[\leadsto \frac{\frac{\ell \cdot \frac{\ell}{{k}^{2}}}{t \cdot t}}{t} \]
                  15. lower-*.f64N/A

                    \[\leadsto \frac{\frac{\ell \cdot \frac{\ell}{{k}^{2}}}{t \cdot t}}{t} \]
                  16. lower-/.f6457.9%

                    \[\leadsto \frac{\frac{\ell \cdot \frac{\ell}{{k}^{2}}}{t \cdot t}}{t} \]
                  17. lift-pow.f64N/A

                    \[\leadsto \frac{\frac{\ell \cdot \frac{\ell}{{k}^{2}}}{t \cdot t}}{t} \]
                  18. pow2N/A

                    \[\leadsto \frac{\frac{\ell \cdot \frac{\ell}{k \cdot k}}{t \cdot t}}{t} \]
                  19. lift-*.f6457.9%

                    \[\leadsto \frac{\frac{\ell \cdot \frac{\ell}{k \cdot k}}{t \cdot t}}{t} \]
                6. Applied rewrites57.9%

                  \[\leadsto \frac{\frac{\ell \cdot \frac{\ell}{k \cdot k}}{t \cdot t}}{\color{blue}{t}} \]

                if 1.55e-46 < t

                1. Initial program 54.7%

                  \[\frac{2}{\left(\left(\frac{{t}^{3}}{\ell \cdot \ell} \cdot \sin k\right) \cdot \tan k\right) \cdot \left(\left(1 + {\left(\frac{k}{t}\right)}^{2}\right) + 1\right)} \]
                2. Taylor expanded in k around 0

                  \[\leadsto \color{blue}{\frac{{\ell}^{2}}{{k}^{2} \cdot {t}^{3}}} \]
                3. Step-by-step derivation
                  1. lower-/.f64N/A

                    \[\leadsto \frac{{\ell}^{2}}{\color{blue}{{k}^{2} \cdot {t}^{3}}} \]
                  2. lower-pow.f64N/A

                    \[\leadsto \frac{{\ell}^{2}}{\color{blue}{{k}^{2}} \cdot {t}^{3}} \]
                  3. lower-*.f64N/A

                    \[\leadsto \frac{{\ell}^{2}}{{k}^{2} \cdot \color{blue}{{t}^{3}}} \]
                  4. lower-pow.f64N/A

                    \[\leadsto \frac{{\ell}^{2}}{{k}^{2} \cdot {\color{blue}{t}}^{3}} \]
                  5. lower-pow.f6451.2%

                    \[\leadsto \frac{{\ell}^{2}}{{k}^{2} \cdot {t}^{\color{blue}{3}}} \]
                4. Applied rewrites51.2%

                  \[\leadsto \color{blue}{\frac{{\ell}^{2}}{{k}^{2} \cdot {t}^{3}}} \]
                5. Step-by-step derivation
                  1. lift-/.f64N/A

                    \[\leadsto \frac{{\ell}^{2}}{\color{blue}{{k}^{2} \cdot {t}^{3}}} \]
                  2. lift-pow.f64N/A

                    \[\leadsto \frac{{\ell}^{2}}{\color{blue}{{k}^{2}} \cdot {t}^{3}} \]
                  3. pow2N/A

                    \[\leadsto \frac{\ell \cdot \ell}{\color{blue}{{k}^{2}} \cdot {t}^{3}} \]
                  4. associate-/l*N/A

                    \[\leadsto \ell \cdot \color{blue}{\frac{\ell}{{k}^{2} \cdot {t}^{3}}} \]
                  5. lower-*.f64N/A

                    \[\leadsto \ell \cdot \color{blue}{\frac{\ell}{{k}^{2} \cdot {t}^{3}}} \]
                  6. lower-/.f6455.1%

                    \[\leadsto \ell \cdot \frac{\ell}{\color{blue}{{k}^{2} \cdot {t}^{3}}} \]
                  7. lift-*.f64N/A

                    \[\leadsto \ell \cdot \frac{\ell}{{k}^{2} \cdot \color{blue}{{t}^{3}}} \]
                  8. *-commutativeN/A

                    \[\leadsto \ell \cdot \frac{\ell}{{t}^{3} \cdot \color{blue}{{k}^{2}}} \]
                  9. lift-pow.f64N/A

                    \[\leadsto \ell \cdot \frac{\ell}{{t}^{3} \cdot {k}^{\color{blue}{2}}} \]
                  10. pow2N/A

                    \[\leadsto \ell \cdot \frac{\ell}{{t}^{3} \cdot \left(k \cdot \color{blue}{k}\right)} \]
                  11. associate-*r*N/A

                    \[\leadsto \ell \cdot \frac{\ell}{\left({t}^{3} \cdot k\right) \cdot \color{blue}{k}} \]
                  12. lower-*.f64N/A

                    \[\leadsto \ell \cdot \frac{\ell}{\left({t}^{3} \cdot k\right) \cdot \color{blue}{k}} \]
                  13. lower-*.f6459.5%

                    \[\leadsto \ell \cdot \frac{\ell}{\left({t}^{3} \cdot k\right) \cdot k} \]
                  14. lift-pow.f64N/A

                    \[\leadsto \ell \cdot \frac{\ell}{\left({t}^{3} \cdot k\right) \cdot k} \]
                  15. unpow3N/A

                    \[\leadsto \ell \cdot \frac{\ell}{\left(\left(\left(t \cdot t\right) \cdot t\right) \cdot k\right) \cdot k} \]
                  16. lift-*.f64N/A

                    \[\leadsto \ell \cdot \frac{\ell}{\left(\left(\left(t \cdot t\right) \cdot t\right) \cdot k\right) \cdot k} \]
                  17. lower-*.f6459.5%

                    \[\leadsto \ell \cdot \frac{\ell}{\left(\left(\left(t \cdot t\right) \cdot t\right) \cdot k\right) \cdot k} \]
                6. Applied rewrites59.5%

                  \[\leadsto \ell \cdot \color{blue}{\frac{\ell}{\left(\left(\left(t \cdot t\right) \cdot t\right) \cdot k\right) \cdot k}} \]
                7. Step-by-step derivation
                  1. lift-*.f64N/A

                    \[\leadsto \ell \cdot \frac{\ell}{\left(\left(\left(t \cdot t\right) \cdot t\right) \cdot k\right) \cdot \color{blue}{k}} \]
                  2. lift-*.f64N/A

                    \[\leadsto \ell \cdot \frac{\ell}{\left(\left(\left(t \cdot t\right) \cdot t\right) \cdot k\right) \cdot k} \]
                  3. associate-*l*N/A

                    \[\leadsto \ell \cdot \frac{\ell}{\left(\left(t \cdot t\right) \cdot t\right) \cdot \color{blue}{\left(k \cdot k\right)}} \]
                  4. lift-*.f64N/A

                    \[\leadsto \ell \cdot \frac{\ell}{\left(\left(t \cdot t\right) \cdot t\right) \cdot \left(\color{blue}{k} \cdot k\right)} \]
                  5. *-commutativeN/A

                    \[\leadsto \ell \cdot \frac{\ell}{\left(t \cdot \left(t \cdot t\right)\right) \cdot \left(\color{blue}{k} \cdot k\right)} \]
                  6. lift-*.f64N/A

                    \[\leadsto \ell \cdot \frac{\ell}{\left(t \cdot \left(t \cdot t\right)\right) \cdot \left(k \cdot \color{blue}{k}\right)} \]
                  7. associate-*l*N/A

                    \[\leadsto \ell \cdot \frac{\ell}{t \cdot \color{blue}{\left(\left(t \cdot t\right) \cdot \left(k \cdot k\right)\right)}} \]
                  8. lower-*.f64N/A

                    \[\leadsto \ell \cdot \frac{\ell}{t \cdot \color{blue}{\left(\left(t \cdot t\right) \cdot \left(k \cdot k\right)\right)}} \]
                  9. lower-*.f6458.1%

                    \[\leadsto \ell \cdot \frac{\ell}{t \cdot \left(\left(t \cdot t\right) \cdot \color{blue}{\left(k \cdot k\right)}\right)} \]
                8. Applied rewrites58.1%

                  \[\leadsto \ell \cdot \frac{\ell}{t \cdot \color{blue}{\left(\left(t \cdot t\right) \cdot \left(k \cdot k\right)\right)}} \]
                9. Step-by-step derivation
                  1. lift-/.f64N/A

                    \[\leadsto \ell \cdot \frac{\ell}{\color{blue}{t \cdot \left(\left(t \cdot t\right) \cdot \left(k \cdot k\right)\right)}} \]
                  2. lift-*.f64N/A

                    \[\leadsto \ell \cdot \frac{\ell}{t \cdot \color{blue}{\left(\left(t \cdot t\right) \cdot \left(k \cdot k\right)\right)}} \]
                  3. associate-/r*N/A

                    \[\leadsto \ell \cdot \frac{\frac{\ell}{t}}{\color{blue}{\left(t \cdot t\right) \cdot \left(k \cdot k\right)}} \]
                  4. lift-/.f64N/A

                    \[\leadsto \ell \cdot \frac{\frac{\ell}{t}}{\color{blue}{\left(t \cdot t\right)} \cdot \left(k \cdot k\right)} \]
                  5. lift-*.f64N/A

                    \[\leadsto \ell \cdot \frac{\frac{\ell}{t}}{\left(t \cdot t\right) \cdot \color{blue}{\left(k \cdot k\right)}} \]
                  6. lift-*.f64N/A

                    \[\leadsto \ell \cdot \frac{\frac{\ell}{t}}{\left(t \cdot t\right) \cdot \left(\color{blue}{k} \cdot k\right)} \]
                  7. lift-*.f64N/A

                    \[\leadsto \ell \cdot \frac{\frac{\ell}{t}}{\left(t \cdot t\right) \cdot \left(k \cdot \color{blue}{k}\right)} \]
                  8. unswap-sqrN/A

                    \[\leadsto \ell \cdot \frac{\frac{\ell}{t}}{\left(t \cdot k\right) \cdot \color{blue}{\left(t \cdot k\right)}} \]
                  9. associate-/r*N/A

                    \[\leadsto \ell \cdot \frac{\frac{\frac{\ell}{t}}{t \cdot k}}{\color{blue}{t \cdot k}} \]
                  10. lower-/.f64N/A

                    \[\leadsto \ell \cdot \frac{\frac{\frac{\ell}{t}}{t \cdot k}}{\color{blue}{t \cdot k}} \]
                  11. lower-/.f64N/A

                    \[\leadsto \ell \cdot \frac{\frac{\frac{\ell}{t}}{t \cdot k}}{\color{blue}{t} \cdot k} \]
                  12. *-commutativeN/A

                    \[\leadsto \ell \cdot \frac{\frac{\frac{\ell}{t}}{k \cdot t}}{t \cdot k} \]
                  13. lift-*.f64N/A

                    \[\leadsto \ell \cdot \frac{\frac{\frac{\ell}{t}}{k \cdot t}}{t \cdot k} \]
                  14. *-commutativeN/A

                    \[\leadsto \ell \cdot \frac{\frac{\frac{\ell}{t}}{k \cdot t}}{k \cdot \color{blue}{t}} \]
                  15. lift-*.f6469.3%

                    \[\leadsto \ell \cdot \frac{\frac{\frac{\ell}{t}}{k \cdot t}}{k \cdot \color{blue}{t}} \]
                10. Applied rewrites69.3%

                  \[\leadsto \ell \cdot \frac{\frac{\frac{\ell}{t}}{k \cdot t}}{\color{blue}{k \cdot t}} \]
              3. Recombined 2 regimes into one program.
              4. Add Preprocessing

              Alternative 17: 69.8% accurate, 4.8× speedup?

              \[\begin{array}{l} t_1 := \left|k\right| \cdot t\\ \mathbf{if}\;\left|k\right| \leq 7.2 \cdot 10^{+35}:\\ \;\;\;\;\ell \cdot \frac{\frac{\frac{\ell}{t}}{t\_1}}{t\_1}\\ \mathbf{else}:\\ \;\;\;\;\frac{\frac{\ell \cdot \ell}{\left(t\_1 \cdot t\right) \cdot \left|k\right|}}{t}\\ \end{array} \]
              (FPCore (t l k)
                :precision binary64
                (let* ((t_1 (* (fabs k) t)))
                (if (<= (fabs k) 7.2e+35)
                  (* l (/ (/ (/ l t) t_1) t_1))
                  (/ (/ (* l l) (* (* t_1 t) (fabs k))) t))))
              double code(double t, double l, double k) {
              	double t_1 = fabs(k) * t;
              	double tmp;
              	if (fabs(k) <= 7.2e+35) {
              		tmp = l * (((l / t) / t_1) / t_1);
              	} else {
              		tmp = ((l * l) / ((t_1 * t) * fabs(k))) / t;
              	}
              	return tmp;
              }
              
              module fmin_fmax_functions
                  implicit none
                  private
                  public fmax
                  public fmin
              
                  interface fmax
                      module procedure fmax88
                      module procedure fmax44
                      module procedure fmax84
                      module procedure fmax48
                  end interface
                  interface fmin
                      module procedure fmin88
                      module procedure fmin44
                      module procedure fmin84
                      module procedure fmin48
                  end interface
              contains
                  real(8) function fmax88(x, y) result (res)
                      real(8), intent (in) :: x
                      real(8), intent (in) :: y
                      res = merge(y, merge(x, max(x, y), y /= y), x /= x)
                  end function
                  real(4) function fmax44(x, y) result (res)
                      real(4), intent (in) :: x
                      real(4), intent (in) :: y
                      res = merge(y, merge(x, max(x, y), y /= y), x /= x)
                  end function
                  real(8) function fmax84(x, y) result(res)
                      real(8), intent (in) :: x
                      real(4), intent (in) :: y
                      res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
                  end function
                  real(8) function fmax48(x, y) result(res)
                      real(4), intent (in) :: x
                      real(8), intent (in) :: y
                      res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
                  end function
                  real(8) function fmin88(x, y) result (res)
                      real(8), intent (in) :: x
                      real(8), intent (in) :: y
                      res = merge(y, merge(x, min(x, y), y /= y), x /= x)
                  end function
                  real(4) function fmin44(x, y) result (res)
                      real(4), intent (in) :: x
                      real(4), intent (in) :: y
                      res = merge(y, merge(x, min(x, y), y /= y), x /= x)
                  end function
                  real(8) function fmin84(x, y) result(res)
                      real(8), intent (in) :: x
                      real(4), intent (in) :: y
                      res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
                  end function
                  real(8) function fmin48(x, y) result(res)
                      real(4), intent (in) :: x
                      real(8), intent (in) :: y
                      res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
                  end function
              end module
              
              real(8) function code(t, l, k)
              use fmin_fmax_functions
                  real(8), intent (in) :: t
                  real(8), intent (in) :: l
                  real(8), intent (in) :: k
                  real(8) :: t_1
                  real(8) :: tmp
                  t_1 = abs(k) * t
                  if (abs(k) <= 7.2d+35) then
                      tmp = l * (((l / t) / t_1) / t_1)
                  else
                      tmp = ((l * l) / ((t_1 * t) * abs(k))) / t
                  end if
                  code = tmp
              end function
              
              public static double code(double t, double l, double k) {
              	double t_1 = Math.abs(k) * t;
              	double tmp;
              	if (Math.abs(k) <= 7.2e+35) {
              		tmp = l * (((l / t) / t_1) / t_1);
              	} else {
              		tmp = ((l * l) / ((t_1 * t) * Math.abs(k))) / t;
              	}
              	return tmp;
              }
              
              def code(t, l, k):
              	t_1 = math.fabs(k) * t
              	tmp = 0
              	if math.fabs(k) <= 7.2e+35:
              		tmp = l * (((l / t) / t_1) / t_1)
              	else:
              		tmp = ((l * l) / ((t_1 * t) * math.fabs(k))) / t
              	return tmp
              
              function code(t, l, k)
              	t_1 = Float64(abs(k) * t)
              	tmp = 0.0
              	if (abs(k) <= 7.2e+35)
              		tmp = Float64(l * Float64(Float64(Float64(l / t) / t_1) / t_1));
              	else
              		tmp = Float64(Float64(Float64(l * l) / Float64(Float64(t_1 * t) * abs(k))) / t);
              	end
              	return tmp
              end
              
              function tmp_2 = code(t, l, k)
              	t_1 = abs(k) * t;
              	tmp = 0.0;
              	if (abs(k) <= 7.2e+35)
              		tmp = l * (((l / t) / t_1) / t_1);
              	else
              		tmp = ((l * l) / ((t_1 * t) * abs(k))) / t;
              	end
              	tmp_2 = tmp;
              end
              
              code[t_, l_, k_] := Block[{t$95$1 = N[(N[Abs[k], $MachinePrecision] * t), $MachinePrecision]}, If[LessEqual[N[Abs[k], $MachinePrecision], 7.2e+35], N[(l * N[(N[(N[(l / t), $MachinePrecision] / t$95$1), $MachinePrecision] / t$95$1), $MachinePrecision]), $MachinePrecision], N[(N[(N[(l * l), $MachinePrecision] / N[(N[(t$95$1 * t), $MachinePrecision] * N[Abs[k], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / t), $MachinePrecision]]]
              
              \begin{array}{l}
              t_1 := \left|k\right| \cdot t\\
              \mathbf{if}\;\left|k\right| \leq 7.2 \cdot 10^{+35}:\\
              \;\;\;\;\ell \cdot \frac{\frac{\frac{\ell}{t}}{t\_1}}{t\_1}\\
              
              \mathbf{else}:\\
              \;\;\;\;\frac{\frac{\ell \cdot \ell}{\left(t\_1 \cdot t\right) \cdot \left|k\right|}}{t}\\
              
              
              \end{array}
              
              Derivation
              1. Split input into 2 regimes
              2. if k < 7.2000000000000001e35

                1. Initial program 54.7%

                  \[\frac{2}{\left(\left(\frac{{t}^{3}}{\ell \cdot \ell} \cdot \sin k\right) \cdot \tan k\right) \cdot \left(\left(1 + {\left(\frac{k}{t}\right)}^{2}\right) + 1\right)} \]
                2. Taylor expanded in k around 0

                  \[\leadsto \color{blue}{\frac{{\ell}^{2}}{{k}^{2} \cdot {t}^{3}}} \]
                3. Step-by-step derivation
                  1. lower-/.f64N/A

                    \[\leadsto \frac{{\ell}^{2}}{\color{blue}{{k}^{2} \cdot {t}^{3}}} \]
                  2. lower-pow.f64N/A

                    \[\leadsto \frac{{\ell}^{2}}{\color{blue}{{k}^{2}} \cdot {t}^{3}} \]
                  3. lower-*.f64N/A

                    \[\leadsto \frac{{\ell}^{2}}{{k}^{2} \cdot \color{blue}{{t}^{3}}} \]
                  4. lower-pow.f64N/A

                    \[\leadsto \frac{{\ell}^{2}}{{k}^{2} \cdot {\color{blue}{t}}^{3}} \]
                  5. lower-pow.f6451.2%

                    \[\leadsto \frac{{\ell}^{2}}{{k}^{2} \cdot {t}^{\color{blue}{3}}} \]
                4. Applied rewrites51.2%

                  \[\leadsto \color{blue}{\frac{{\ell}^{2}}{{k}^{2} \cdot {t}^{3}}} \]
                5. Step-by-step derivation
                  1. lift-/.f64N/A

                    \[\leadsto \frac{{\ell}^{2}}{\color{blue}{{k}^{2} \cdot {t}^{3}}} \]
                  2. lift-pow.f64N/A

                    \[\leadsto \frac{{\ell}^{2}}{\color{blue}{{k}^{2}} \cdot {t}^{3}} \]
                  3. pow2N/A

                    \[\leadsto \frac{\ell \cdot \ell}{\color{blue}{{k}^{2}} \cdot {t}^{3}} \]
                  4. associate-/l*N/A

                    \[\leadsto \ell \cdot \color{blue}{\frac{\ell}{{k}^{2} \cdot {t}^{3}}} \]
                  5. lower-*.f64N/A

                    \[\leadsto \ell \cdot \color{blue}{\frac{\ell}{{k}^{2} \cdot {t}^{3}}} \]
                  6. lower-/.f6455.1%

                    \[\leadsto \ell \cdot \frac{\ell}{\color{blue}{{k}^{2} \cdot {t}^{3}}} \]
                  7. lift-*.f64N/A

                    \[\leadsto \ell \cdot \frac{\ell}{{k}^{2} \cdot \color{blue}{{t}^{3}}} \]
                  8. *-commutativeN/A

                    \[\leadsto \ell \cdot \frac{\ell}{{t}^{3} \cdot \color{blue}{{k}^{2}}} \]
                  9. lift-pow.f64N/A

                    \[\leadsto \ell \cdot \frac{\ell}{{t}^{3} \cdot {k}^{\color{blue}{2}}} \]
                  10. pow2N/A

                    \[\leadsto \ell \cdot \frac{\ell}{{t}^{3} \cdot \left(k \cdot \color{blue}{k}\right)} \]
                  11. associate-*r*N/A

                    \[\leadsto \ell \cdot \frac{\ell}{\left({t}^{3} \cdot k\right) \cdot \color{blue}{k}} \]
                  12. lower-*.f64N/A

                    \[\leadsto \ell \cdot \frac{\ell}{\left({t}^{3} \cdot k\right) \cdot \color{blue}{k}} \]
                  13. lower-*.f6459.5%

                    \[\leadsto \ell \cdot \frac{\ell}{\left({t}^{3} \cdot k\right) \cdot k} \]
                  14. lift-pow.f64N/A

                    \[\leadsto \ell \cdot \frac{\ell}{\left({t}^{3} \cdot k\right) \cdot k} \]
                  15. unpow3N/A

                    \[\leadsto \ell \cdot \frac{\ell}{\left(\left(\left(t \cdot t\right) \cdot t\right) \cdot k\right) \cdot k} \]
                  16. lift-*.f64N/A

                    \[\leadsto \ell \cdot \frac{\ell}{\left(\left(\left(t \cdot t\right) \cdot t\right) \cdot k\right) \cdot k} \]
                  17. lower-*.f6459.5%

                    \[\leadsto \ell \cdot \frac{\ell}{\left(\left(\left(t \cdot t\right) \cdot t\right) \cdot k\right) \cdot k} \]
                6. Applied rewrites59.5%

                  \[\leadsto \ell \cdot \color{blue}{\frac{\ell}{\left(\left(\left(t \cdot t\right) \cdot t\right) \cdot k\right) \cdot k}} \]
                7. Step-by-step derivation
                  1. lift-*.f64N/A

                    \[\leadsto \ell \cdot \frac{\ell}{\left(\left(\left(t \cdot t\right) \cdot t\right) \cdot k\right) \cdot \color{blue}{k}} \]
                  2. lift-*.f64N/A

                    \[\leadsto \ell \cdot \frac{\ell}{\left(\left(\left(t \cdot t\right) \cdot t\right) \cdot k\right) \cdot k} \]
                  3. associate-*l*N/A

                    \[\leadsto \ell \cdot \frac{\ell}{\left(\left(t \cdot t\right) \cdot t\right) \cdot \color{blue}{\left(k \cdot k\right)}} \]
                  4. lift-*.f64N/A

                    \[\leadsto \ell \cdot \frac{\ell}{\left(\left(t \cdot t\right) \cdot t\right) \cdot \left(\color{blue}{k} \cdot k\right)} \]
                  5. *-commutativeN/A

                    \[\leadsto \ell \cdot \frac{\ell}{\left(t \cdot \left(t \cdot t\right)\right) \cdot \left(\color{blue}{k} \cdot k\right)} \]
                  6. lift-*.f64N/A

                    \[\leadsto \ell \cdot \frac{\ell}{\left(t \cdot \left(t \cdot t\right)\right) \cdot \left(k \cdot \color{blue}{k}\right)} \]
                  7. associate-*l*N/A

                    \[\leadsto \ell \cdot \frac{\ell}{t \cdot \color{blue}{\left(\left(t \cdot t\right) \cdot \left(k \cdot k\right)\right)}} \]
                  8. lower-*.f64N/A

                    \[\leadsto \ell \cdot \frac{\ell}{t \cdot \color{blue}{\left(\left(t \cdot t\right) \cdot \left(k \cdot k\right)\right)}} \]
                  9. lower-*.f6458.1%

                    \[\leadsto \ell \cdot \frac{\ell}{t \cdot \left(\left(t \cdot t\right) \cdot \color{blue}{\left(k \cdot k\right)}\right)} \]
                8. Applied rewrites58.1%

                  \[\leadsto \ell \cdot \frac{\ell}{t \cdot \color{blue}{\left(\left(t \cdot t\right) \cdot \left(k \cdot k\right)\right)}} \]
                9. Step-by-step derivation
                  1. lift-/.f64N/A

                    \[\leadsto \ell \cdot \frac{\ell}{\color{blue}{t \cdot \left(\left(t \cdot t\right) \cdot \left(k \cdot k\right)\right)}} \]
                  2. lift-*.f64N/A

                    \[\leadsto \ell \cdot \frac{\ell}{t \cdot \color{blue}{\left(\left(t \cdot t\right) \cdot \left(k \cdot k\right)\right)}} \]
                  3. associate-/r*N/A

                    \[\leadsto \ell \cdot \frac{\frac{\ell}{t}}{\color{blue}{\left(t \cdot t\right) \cdot \left(k \cdot k\right)}} \]
                  4. lift-/.f64N/A

                    \[\leadsto \ell \cdot \frac{\frac{\ell}{t}}{\color{blue}{\left(t \cdot t\right)} \cdot \left(k \cdot k\right)} \]
                  5. lift-*.f64N/A

                    \[\leadsto \ell \cdot \frac{\frac{\ell}{t}}{\left(t \cdot t\right) \cdot \color{blue}{\left(k \cdot k\right)}} \]
                  6. lift-*.f64N/A

                    \[\leadsto \ell \cdot \frac{\frac{\ell}{t}}{\left(t \cdot t\right) \cdot \left(\color{blue}{k} \cdot k\right)} \]
                  7. lift-*.f64N/A

                    \[\leadsto \ell \cdot \frac{\frac{\ell}{t}}{\left(t \cdot t\right) \cdot \left(k \cdot \color{blue}{k}\right)} \]
                  8. unswap-sqrN/A

                    \[\leadsto \ell \cdot \frac{\frac{\ell}{t}}{\left(t \cdot k\right) \cdot \color{blue}{\left(t \cdot k\right)}} \]
                  9. associate-/r*N/A

                    \[\leadsto \ell \cdot \frac{\frac{\frac{\ell}{t}}{t \cdot k}}{\color{blue}{t \cdot k}} \]
                  10. lower-/.f64N/A

                    \[\leadsto \ell \cdot \frac{\frac{\frac{\ell}{t}}{t \cdot k}}{\color{blue}{t \cdot k}} \]
                  11. lower-/.f64N/A

                    \[\leadsto \ell \cdot \frac{\frac{\frac{\ell}{t}}{t \cdot k}}{\color{blue}{t} \cdot k} \]
                  12. *-commutativeN/A

                    \[\leadsto \ell \cdot \frac{\frac{\frac{\ell}{t}}{k \cdot t}}{t \cdot k} \]
                  13. lift-*.f64N/A

                    \[\leadsto \ell \cdot \frac{\frac{\frac{\ell}{t}}{k \cdot t}}{t \cdot k} \]
                  14. *-commutativeN/A

                    \[\leadsto \ell \cdot \frac{\frac{\frac{\ell}{t}}{k \cdot t}}{k \cdot \color{blue}{t}} \]
                  15. lift-*.f6469.3%

                    \[\leadsto \ell \cdot \frac{\frac{\frac{\ell}{t}}{k \cdot t}}{k \cdot \color{blue}{t}} \]
                10. Applied rewrites69.3%

                  \[\leadsto \ell \cdot \frac{\frac{\frac{\ell}{t}}{k \cdot t}}{\color{blue}{k \cdot t}} \]

                if 7.2000000000000001e35 < k

                1. Initial program 54.7%

                  \[\frac{2}{\left(\left(\frac{{t}^{3}}{\ell \cdot \ell} \cdot \sin k\right) \cdot \tan k\right) \cdot \left(\left(1 + {\left(\frac{k}{t}\right)}^{2}\right) + 1\right)} \]
                2. Taylor expanded in k around 0

                  \[\leadsto \color{blue}{\frac{{\ell}^{2}}{{k}^{2} \cdot {t}^{3}}} \]
                3. Step-by-step derivation
                  1. lower-/.f64N/A

                    \[\leadsto \frac{{\ell}^{2}}{\color{blue}{{k}^{2} \cdot {t}^{3}}} \]
                  2. lower-pow.f64N/A

                    \[\leadsto \frac{{\ell}^{2}}{\color{blue}{{k}^{2}} \cdot {t}^{3}} \]
                  3. lower-*.f64N/A

                    \[\leadsto \frac{{\ell}^{2}}{{k}^{2} \cdot \color{blue}{{t}^{3}}} \]
                  4. lower-pow.f64N/A

                    \[\leadsto \frac{{\ell}^{2}}{{k}^{2} \cdot {\color{blue}{t}}^{3}} \]
                  5. lower-pow.f6451.2%

                    \[\leadsto \frac{{\ell}^{2}}{{k}^{2} \cdot {t}^{\color{blue}{3}}} \]
                4. Applied rewrites51.2%

                  \[\leadsto \color{blue}{\frac{{\ell}^{2}}{{k}^{2} \cdot {t}^{3}}} \]
                5. Step-by-step derivation
                  1. lift-/.f64N/A

                    \[\leadsto \frac{{\ell}^{2}}{\color{blue}{{k}^{2} \cdot {t}^{3}}} \]
                  2. lift-pow.f64N/A

                    \[\leadsto \frac{{\ell}^{2}}{\color{blue}{{k}^{2}} \cdot {t}^{3}} \]
                  3. pow2N/A

                    \[\leadsto \frac{\ell \cdot \ell}{\color{blue}{{k}^{2}} \cdot {t}^{3}} \]
                  4. associate-/l*N/A

                    \[\leadsto \ell \cdot \color{blue}{\frac{\ell}{{k}^{2} \cdot {t}^{3}}} \]
                  5. lower-*.f64N/A

                    \[\leadsto \ell \cdot \color{blue}{\frac{\ell}{{k}^{2} \cdot {t}^{3}}} \]
                  6. lower-/.f6455.1%

                    \[\leadsto \ell \cdot \frac{\ell}{\color{blue}{{k}^{2} \cdot {t}^{3}}} \]
                  7. lift-*.f64N/A

                    \[\leadsto \ell \cdot \frac{\ell}{{k}^{2} \cdot \color{blue}{{t}^{3}}} \]
                  8. *-commutativeN/A

                    \[\leadsto \ell \cdot \frac{\ell}{{t}^{3} \cdot \color{blue}{{k}^{2}}} \]
                  9. lift-pow.f64N/A

                    \[\leadsto \ell \cdot \frac{\ell}{{t}^{3} \cdot {k}^{\color{blue}{2}}} \]
                  10. pow2N/A

                    \[\leadsto \ell \cdot \frac{\ell}{{t}^{3} \cdot \left(k \cdot \color{blue}{k}\right)} \]
                  11. associate-*r*N/A

                    \[\leadsto \ell \cdot \frac{\ell}{\left({t}^{3} \cdot k\right) \cdot \color{blue}{k}} \]
                  12. lower-*.f64N/A

                    \[\leadsto \ell \cdot \frac{\ell}{\left({t}^{3} \cdot k\right) \cdot \color{blue}{k}} \]
                  13. lower-*.f6459.5%

                    \[\leadsto \ell \cdot \frac{\ell}{\left({t}^{3} \cdot k\right) \cdot k} \]
                  14. lift-pow.f64N/A

                    \[\leadsto \ell \cdot \frac{\ell}{\left({t}^{3} \cdot k\right) \cdot k} \]
                  15. unpow3N/A

                    \[\leadsto \ell \cdot \frac{\ell}{\left(\left(\left(t \cdot t\right) \cdot t\right) \cdot k\right) \cdot k} \]
                  16. lift-*.f64N/A

                    \[\leadsto \ell \cdot \frac{\ell}{\left(\left(\left(t \cdot t\right) \cdot t\right) \cdot k\right) \cdot k} \]
                  17. lower-*.f6459.5%

                    \[\leadsto \ell \cdot \frac{\ell}{\left(\left(\left(t \cdot t\right) \cdot t\right) \cdot k\right) \cdot k} \]
                6. Applied rewrites59.5%

                  \[\leadsto \ell \cdot \color{blue}{\frac{\ell}{\left(\left(\left(t \cdot t\right) \cdot t\right) \cdot k\right) \cdot k}} \]
                7. Step-by-step derivation
                  1. lift-*.f64N/A

                    \[\leadsto \ell \cdot \frac{\ell}{\left(\left(\left(t \cdot t\right) \cdot t\right) \cdot k\right) \cdot \color{blue}{k}} \]
                  2. lift-*.f64N/A

                    \[\leadsto \ell \cdot \frac{\ell}{\left(\left(\left(t \cdot t\right) \cdot t\right) \cdot k\right) \cdot k} \]
                  3. associate-*l*N/A

                    \[\leadsto \ell \cdot \frac{\ell}{\left(\left(t \cdot t\right) \cdot t\right) \cdot \color{blue}{\left(k \cdot k\right)}} \]
                  4. lift-*.f64N/A

                    \[\leadsto \ell \cdot \frac{\ell}{\left(\left(t \cdot t\right) \cdot t\right) \cdot \left(\color{blue}{k} \cdot k\right)} \]
                  5. *-commutativeN/A

                    \[\leadsto \ell \cdot \frac{\ell}{\left(t \cdot \left(t \cdot t\right)\right) \cdot \left(\color{blue}{k} \cdot k\right)} \]
                  6. lift-*.f64N/A

                    \[\leadsto \ell \cdot \frac{\ell}{\left(t \cdot \left(t \cdot t\right)\right) \cdot \left(k \cdot \color{blue}{k}\right)} \]
                  7. associate-*l*N/A

                    \[\leadsto \ell \cdot \frac{\ell}{t \cdot \color{blue}{\left(\left(t \cdot t\right) \cdot \left(k \cdot k\right)\right)}} \]
                  8. lower-*.f64N/A

                    \[\leadsto \ell \cdot \frac{\ell}{t \cdot \color{blue}{\left(\left(t \cdot t\right) \cdot \left(k \cdot k\right)\right)}} \]
                  9. lower-*.f6458.1%

                    \[\leadsto \ell \cdot \frac{\ell}{t \cdot \left(\left(t \cdot t\right) \cdot \color{blue}{\left(k \cdot k\right)}\right)} \]
                8. Applied rewrites58.1%

                  \[\leadsto \ell \cdot \frac{\ell}{t \cdot \color{blue}{\left(\left(t \cdot t\right) \cdot \left(k \cdot k\right)\right)}} \]
                9. Step-by-step derivation
                  1. lift-*.f64N/A

                    \[\leadsto \ell \cdot \color{blue}{\frac{\ell}{t \cdot \left(\left(t \cdot t\right) \cdot \left(k \cdot k\right)\right)}} \]
                  2. lift-/.f64N/A

                    \[\leadsto \ell \cdot \frac{\ell}{\color{blue}{t \cdot \left(\left(t \cdot t\right) \cdot \left(k \cdot k\right)\right)}} \]
                  3. associate-*r/N/A

                    \[\leadsto \frac{\ell \cdot \ell}{\color{blue}{t \cdot \left(\left(t \cdot t\right) \cdot \left(k \cdot k\right)\right)}} \]
                  4. lift-*.f64N/A

                    \[\leadsto \frac{\ell \cdot \ell}{\color{blue}{t} \cdot \left(\left(t \cdot t\right) \cdot \left(k \cdot k\right)\right)} \]
                  5. lift-*.f64N/A

                    \[\leadsto \frac{\ell \cdot \ell}{t \cdot \color{blue}{\left(\left(t \cdot t\right) \cdot \left(k \cdot k\right)\right)}} \]
                  6. *-commutativeN/A

                    \[\leadsto \frac{\ell \cdot \ell}{\left(\left(t \cdot t\right) \cdot \left(k \cdot k\right)\right) \cdot \color{blue}{t}} \]
                  7. associate-/r*N/A

                    \[\leadsto \frac{\frac{\ell \cdot \ell}{\left(t \cdot t\right) \cdot \left(k \cdot k\right)}}{\color{blue}{t}} \]
                  8. lower-/.f64N/A

                    \[\leadsto \frac{\frac{\ell \cdot \ell}{\left(t \cdot t\right) \cdot \left(k \cdot k\right)}}{\color{blue}{t}} \]
                  9. lower-/.f6454.5%

                    \[\leadsto \frac{\frac{\ell \cdot \ell}{\left(t \cdot t\right) \cdot \left(k \cdot k\right)}}{t} \]
                  10. lift-*.f64N/A

                    \[\leadsto \frac{\frac{\ell \cdot \ell}{\left(t \cdot t\right) \cdot \left(k \cdot k\right)}}{t} \]
                  11. lift-*.f64N/A

                    \[\leadsto \frac{\frac{\ell \cdot \ell}{\left(t \cdot t\right) \cdot \left(k \cdot k\right)}}{t} \]
                  12. lift-*.f64N/A

                    \[\leadsto \frac{\frac{\ell \cdot \ell}{\left(t \cdot t\right) \cdot \left(k \cdot k\right)}}{t} \]
                  13. unswap-sqrN/A

                    \[\leadsto \frac{\frac{\ell \cdot \ell}{\left(t \cdot k\right) \cdot \left(t \cdot k\right)}}{t} \]
                  14. associate-*r*N/A

                    \[\leadsto \frac{\frac{\ell \cdot \ell}{\left(\left(t \cdot k\right) \cdot t\right) \cdot k}}{t} \]
                  15. lower-*.f64N/A

                    \[\leadsto \frac{\frac{\ell \cdot \ell}{\left(\left(t \cdot k\right) \cdot t\right) \cdot k}}{t} \]
                  16. lower-*.f64N/A

                    \[\leadsto \frac{\frac{\ell \cdot \ell}{\left(\left(t \cdot k\right) \cdot t\right) \cdot k}}{t} \]
                  17. *-commutativeN/A

                    \[\leadsto \frac{\frac{\ell \cdot \ell}{\left(\left(k \cdot t\right) \cdot t\right) \cdot k}}{t} \]
                  18. lift-*.f6462.7%

                    \[\leadsto \frac{\frac{\ell \cdot \ell}{\left(\left(k \cdot t\right) \cdot t\right) \cdot k}}{t} \]
                10. Applied rewrites62.7%

                  \[\leadsto \frac{\frac{\ell \cdot \ell}{\left(\left(k \cdot t\right) \cdot t\right) \cdot k}}{\color{blue}{t}} \]
              3. Recombined 2 regimes into one program.
              4. Add Preprocessing

              Alternative 18: 67.6% accurate, 4.9× speedup?

              \[\begin{array}{l} t_1 := \left(\left(\left|k\right| \cdot t\right) \cdot t\right) \cdot \left|k\right|\\ \mathbf{if}\;\left|k\right| \leq 7.2 \cdot 10^{+35}:\\ \;\;\;\;\frac{\ell}{t\_1} \cdot \frac{\ell}{t}\\ \mathbf{else}:\\ \;\;\;\;\frac{\frac{\ell \cdot \ell}{t\_1}}{t}\\ \end{array} \]
              (FPCore (t l k)
                :precision binary64
                (let* ((t_1 (* (* (* (fabs k) t) t) (fabs k))))
                (if (<= (fabs k) 7.2e+35)
                  (* (/ l t_1) (/ l t))
                  (/ (/ (* l l) t_1) t))))
              double code(double t, double l, double k) {
              	double t_1 = ((fabs(k) * t) * t) * fabs(k);
              	double tmp;
              	if (fabs(k) <= 7.2e+35) {
              		tmp = (l / t_1) * (l / t);
              	} else {
              		tmp = ((l * l) / t_1) / t;
              	}
              	return tmp;
              }
              
              module fmin_fmax_functions
                  implicit none
                  private
                  public fmax
                  public fmin
              
                  interface fmax
                      module procedure fmax88
                      module procedure fmax44
                      module procedure fmax84
                      module procedure fmax48
                  end interface
                  interface fmin
                      module procedure fmin88
                      module procedure fmin44
                      module procedure fmin84
                      module procedure fmin48
                  end interface
              contains
                  real(8) function fmax88(x, y) result (res)
                      real(8), intent (in) :: x
                      real(8), intent (in) :: y
                      res = merge(y, merge(x, max(x, y), y /= y), x /= x)
                  end function
                  real(4) function fmax44(x, y) result (res)
                      real(4), intent (in) :: x
                      real(4), intent (in) :: y
                      res = merge(y, merge(x, max(x, y), y /= y), x /= x)
                  end function
                  real(8) function fmax84(x, y) result(res)
                      real(8), intent (in) :: x
                      real(4), intent (in) :: y
                      res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
                  end function
                  real(8) function fmax48(x, y) result(res)
                      real(4), intent (in) :: x
                      real(8), intent (in) :: y
                      res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
                  end function
                  real(8) function fmin88(x, y) result (res)
                      real(8), intent (in) :: x
                      real(8), intent (in) :: y
                      res = merge(y, merge(x, min(x, y), y /= y), x /= x)
                  end function
                  real(4) function fmin44(x, y) result (res)
                      real(4), intent (in) :: x
                      real(4), intent (in) :: y
                      res = merge(y, merge(x, min(x, y), y /= y), x /= x)
                  end function
                  real(8) function fmin84(x, y) result(res)
                      real(8), intent (in) :: x
                      real(4), intent (in) :: y
                      res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
                  end function
                  real(8) function fmin48(x, y) result(res)
                      real(4), intent (in) :: x
                      real(8), intent (in) :: y
                      res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
                  end function
              end module
              
              real(8) function code(t, l, k)
              use fmin_fmax_functions
                  real(8), intent (in) :: t
                  real(8), intent (in) :: l
                  real(8), intent (in) :: k
                  real(8) :: t_1
                  real(8) :: tmp
                  t_1 = ((abs(k) * t) * t) * abs(k)
                  if (abs(k) <= 7.2d+35) then
                      tmp = (l / t_1) * (l / t)
                  else
                      tmp = ((l * l) / t_1) / t
                  end if
                  code = tmp
              end function
              
              public static double code(double t, double l, double k) {
              	double t_1 = ((Math.abs(k) * t) * t) * Math.abs(k);
              	double tmp;
              	if (Math.abs(k) <= 7.2e+35) {
              		tmp = (l / t_1) * (l / t);
              	} else {
              		tmp = ((l * l) / t_1) / t;
              	}
              	return tmp;
              }
              
              def code(t, l, k):
              	t_1 = ((math.fabs(k) * t) * t) * math.fabs(k)
              	tmp = 0
              	if math.fabs(k) <= 7.2e+35:
              		tmp = (l / t_1) * (l / t)
              	else:
              		tmp = ((l * l) / t_1) / t
              	return tmp
              
              function code(t, l, k)
              	t_1 = Float64(Float64(Float64(abs(k) * t) * t) * abs(k))
              	tmp = 0.0
              	if (abs(k) <= 7.2e+35)
              		tmp = Float64(Float64(l / t_1) * Float64(l / t));
              	else
              		tmp = Float64(Float64(Float64(l * l) / t_1) / t);
              	end
              	return tmp
              end
              
              function tmp_2 = code(t, l, k)
              	t_1 = ((abs(k) * t) * t) * abs(k);
              	tmp = 0.0;
              	if (abs(k) <= 7.2e+35)
              		tmp = (l / t_1) * (l / t);
              	else
              		tmp = ((l * l) / t_1) / t;
              	end
              	tmp_2 = tmp;
              end
              
              code[t_, l_, k_] := Block[{t$95$1 = N[(N[(N[(N[Abs[k], $MachinePrecision] * t), $MachinePrecision] * t), $MachinePrecision] * N[Abs[k], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[N[Abs[k], $MachinePrecision], 7.2e+35], N[(N[(l / t$95$1), $MachinePrecision] * N[(l / t), $MachinePrecision]), $MachinePrecision], N[(N[(N[(l * l), $MachinePrecision] / t$95$1), $MachinePrecision] / t), $MachinePrecision]]]
              
              \begin{array}{l}
              t_1 := \left(\left(\left|k\right| \cdot t\right) \cdot t\right) \cdot \left|k\right|\\
              \mathbf{if}\;\left|k\right| \leq 7.2 \cdot 10^{+35}:\\
              \;\;\;\;\frac{\ell}{t\_1} \cdot \frac{\ell}{t}\\
              
              \mathbf{else}:\\
              \;\;\;\;\frac{\frac{\ell \cdot \ell}{t\_1}}{t}\\
              
              
              \end{array}
              
              Derivation
              1. Split input into 2 regimes
              2. if k < 7.2000000000000001e35

                1. Initial program 54.7%

                  \[\frac{2}{\left(\left(\frac{{t}^{3}}{\ell \cdot \ell} \cdot \sin k\right) \cdot \tan k\right) \cdot \left(\left(1 + {\left(\frac{k}{t}\right)}^{2}\right) + 1\right)} \]
                2. Taylor expanded in k around 0

                  \[\leadsto \color{blue}{\frac{{\ell}^{2}}{{k}^{2} \cdot {t}^{3}}} \]
                3. Step-by-step derivation
                  1. lower-/.f64N/A

                    \[\leadsto \frac{{\ell}^{2}}{\color{blue}{{k}^{2} \cdot {t}^{3}}} \]
                  2. lower-pow.f64N/A

                    \[\leadsto \frac{{\ell}^{2}}{\color{blue}{{k}^{2}} \cdot {t}^{3}} \]
                  3. lower-*.f64N/A

                    \[\leadsto \frac{{\ell}^{2}}{{k}^{2} \cdot \color{blue}{{t}^{3}}} \]
                  4. lower-pow.f64N/A

                    \[\leadsto \frac{{\ell}^{2}}{{k}^{2} \cdot {\color{blue}{t}}^{3}} \]
                  5. lower-pow.f6451.2%

                    \[\leadsto \frac{{\ell}^{2}}{{k}^{2} \cdot {t}^{\color{blue}{3}}} \]
                4. Applied rewrites51.2%

                  \[\leadsto \color{blue}{\frac{{\ell}^{2}}{{k}^{2} \cdot {t}^{3}}} \]
                5. Step-by-step derivation
                  1. lift-/.f64N/A

                    \[\leadsto \frac{{\ell}^{2}}{\color{blue}{{k}^{2} \cdot {t}^{3}}} \]
                  2. lift-pow.f64N/A

                    \[\leadsto \frac{{\ell}^{2}}{\color{blue}{{k}^{2}} \cdot {t}^{3}} \]
                  3. pow2N/A

                    \[\leadsto \frac{\ell \cdot \ell}{\color{blue}{{k}^{2}} \cdot {t}^{3}} \]
                  4. associate-/l*N/A

                    \[\leadsto \ell \cdot \color{blue}{\frac{\ell}{{k}^{2} \cdot {t}^{3}}} \]
                  5. lower-*.f64N/A

                    \[\leadsto \ell \cdot \color{blue}{\frac{\ell}{{k}^{2} \cdot {t}^{3}}} \]
                  6. lower-/.f6455.1%

                    \[\leadsto \ell \cdot \frac{\ell}{\color{blue}{{k}^{2} \cdot {t}^{3}}} \]
                  7. lift-*.f64N/A

                    \[\leadsto \ell \cdot \frac{\ell}{{k}^{2} \cdot \color{blue}{{t}^{3}}} \]
                  8. *-commutativeN/A

                    \[\leadsto \ell \cdot \frac{\ell}{{t}^{3} \cdot \color{blue}{{k}^{2}}} \]
                  9. lift-pow.f64N/A

                    \[\leadsto \ell \cdot \frac{\ell}{{t}^{3} \cdot {k}^{\color{blue}{2}}} \]
                  10. pow2N/A

                    \[\leadsto \ell \cdot \frac{\ell}{{t}^{3} \cdot \left(k \cdot \color{blue}{k}\right)} \]
                  11. associate-*r*N/A

                    \[\leadsto \ell \cdot \frac{\ell}{\left({t}^{3} \cdot k\right) \cdot \color{blue}{k}} \]
                  12. lower-*.f64N/A

                    \[\leadsto \ell \cdot \frac{\ell}{\left({t}^{3} \cdot k\right) \cdot \color{blue}{k}} \]
                  13. lower-*.f6459.5%

                    \[\leadsto \ell \cdot \frac{\ell}{\left({t}^{3} \cdot k\right) \cdot k} \]
                  14. lift-pow.f64N/A

                    \[\leadsto \ell \cdot \frac{\ell}{\left({t}^{3} \cdot k\right) \cdot k} \]
                  15. unpow3N/A

                    \[\leadsto \ell \cdot \frac{\ell}{\left(\left(\left(t \cdot t\right) \cdot t\right) \cdot k\right) \cdot k} \]
                  16. lift-*.f64N/A

                    \[\leadsto \ell \cdot \frac{\ell}{\left(\left(\left(t \cdot t\right) \cdot t\right) \cdot k\right) \cdot k} \]
                  17. lower-*.f6459.5%

                    \[\leadsto \ell \cdot \frac{\ell}{\left(\left(\left(t \cdot t\right) \cdot t\right) \cdot k\right) \cdot k} \]
                6. Applied rewrites59.5%

                  \[\leadsto \ell \cdot \color{blue}{\frac{\ell}{\left(\left(\left(t \cdot t\right) \cdot t\right) \cdot k\right) \cdot k}} \]
                7. Step-by-step derivation
                  1. lift-*.f64N/A

                    \[\leadsto \ell \cdot \frac{\ell}{\left(\left(\left(t \cdot t\right) \cdot t\right) \cdot k\right) \cdot \color{blue}{k}} \]
                  2. lift-*.f64N/A

                    \[\leadsto \ell \cdot \frac{\ell}{\left(\left(\left(t \cdot t\right) \cdot t\right) \cdot k\right) \cdot k} \]
                  3. associate-*l*N/A

                    \[\leadsto \ell \cdot \frac{\ell}{\left(\left(t \cdot t\right) \cdot t\right) \cdot \color{blue}{\left(k \cdot k\right)}} \]
                  4. lift-*.f64N/A

                    \[\leadsto \ell \cdot \frac{\ell}{\left(\left(t \cdot t\right) \cdot t\right) \cdot \left(\color{blue}{k} \cdot k\right)} \]
                  5. *-commutativeN/A

                    \[\leadsto \ell \cdot \frac{\ell}{\left(t \cdot \left(t \cdot t\right)\right) \cdot \left(\color{blue}{k} \cdot k\right)} \]
                  6. lift-*.f64N/A

                    \[\leadsto \ell \cdot \frac{\ell}{\left(t \cdot \left(t \cdot t\right)\right) \cdot \left(k \cdot \color{blue}{k}\right)} \]
                  7. associate-*l*N/A

                    \[\leadsto \ell \cdot \frac{\ell}{t \cdot \color{blue}{\left(\left(t \cdot t\right) \cdot \left(k \cdot k\right)\right)}} \]
                  8. lower-*.f64N/A

                    \[\leadsto \ell \cdot \frac{\ell}{t \cdot \color{blue}{\left(\left(t \cdot t\right) \cdot \left(k \cdot k\right)\right)}} \]
                  9. lower-*.f6458.1%

                    \[\leadsto \ell \cdot \frac{\ell}{t \cdot \left(\left(t \cdot t\right) \cdot \color{blue}{\left(k \cdot k\right)}\right)} \]
                8. Applied rewrites58.1%

                  \[\leadsto \ell \cdot \frac{\ell}{t \cdot \color{blue}{\left(\left(t \cdot t\right) \cdot \left(k \cdot k\right)\right)}} \]
                9. Step-by-step derivation
                  1. lift-*.f64N/A

                    \[\leadsto \ell \cdot \color{blue}{\frac{\ell}{t \cdot \left(\left(t \cdot t\right) \cdot \left(k \cdot k\right)\right)}} \]
                  2. lift-/.f64N/A

                    \[\leadsto \ell \cdot \frac{\ell}{\color{blue}{t \cdot \left(\left(t \cdot t\right) \cdot \left(k \cdot k\right)\right)}} \]
                  3. associate-*r/N/A

                    \[\leadsto \frac{\ell \cdot \ell}{\color{blue}{t \cdot \left(\left(t \cdot t\right) \cdot \left(k \cdot k\right)\right)}} \]
                  4. lift-*.f64N/A

                    \[\leadsto \frac{\ell \cdot \ell}{t \cdot \color{blue}{\left(\left(t \cdot t\right) \cdot \left(k \cdot k\right)\right)}} \]
                  5. *-commutativeN/A

                    \[\leadsto \frac{\ell \cdot \ell}{\left(\left(t \cdot t\right) \cdot \left(k \cdot k\right)\right) \cdot \color{blue}{t}} \]
                  6. times-fracN/A

                    \[\leadsto \frac{\ell}{\left(t \cdot t\right) \cdot \left(k \cdot k\right)} \cdot \color{blue}{\frac{\ell}{t}} \]
                  7. lift-/.f64N/A

                    \[\leadsto \frac{\ell}{\left(t \cdot t\right) \cdot \left(k \cdot k\right)} \cdot \frac{\ell}{\color{blue}{t}} \]
                  8. lower-*.f64N/A

                    \[\leadsto \frac{\ell}{\left(t \cdot t\right) \cdot \left(k \cdot k\right)} \cdot \color{blue}{\frac{\ell}{t}} \]
                  9. lower-/.f6458.4%

                    \[\leadsto \frac{\ell}{\left(t \cdot t\right) \cdot \left(k \cdot k\right)} \cdot \frac{\color{blue}{\ell}}{t} \]
                  10. lift-*.f64N/A

                    \[\leadsto \frac{\ell}{\left(t \cdot t\right) \cdot \left(k \cdot k\right)} \cdot \frac{\ell}{t} \]
                  11. lift-*.f64N/A

                    \[\leadsto \frac{\ell}{\left(t \cdot t\right) \cdot \left(k \cdot k\right)} \cdot \frac{\ell}{t} \]
                  12. lift-*.f64N/A

                    \[\leadsto \frac{\ell}{\left(t \cdot t\right) \cdot \left(k \cdot k\right)} \cdot \frac{\ell}{t} \]
                  13. unswap-sqrN/A

                    \[\leadsto \frac{\ell}{\left(t \cdot k\right) \cdot \left(t \cdot k\right)} \cdot \frac{\ell}{t} \]
                  14. associate-*r*N/A

                    \[\leadsto \frac{\ell}{\left(\left(t \cdot k\right) \cdot t\right) \cdot k} \cdot \frac{\ell}{t} \]
                  15. lower-*.f64N/A

                    \[\leadsto \frac{\ell}{\left(\left(t \cdot k\right) \cdot t\right) \cdot k} \cdot \frac{\ell}{t} \]
                  16. lower-*.f64N/A

                    \[\leadsto \frac{\ell}{\left(\left(t \cdot k\right) \cdot t\right) \cdot k} \cdot \frac{\ell}{t} \]
                  17. *-commutativeN/A

                    \[\leadsto \frac{\ell}{\left(\left(k \cdot t\right) \cdot t\right) \cdot k} \cdot \frac{\ell}{t} \]
                  18. lift-*.f6466.7%

                    \[\leadsto \frac{\ell}{\left(\left(k \cdot t\right) \cdot t\right) \cdot k} \cdot \frac{\ell}{t} \]
                10. Applied rewrites66.7%

                  \[\leadsto \frac{\ell}{\left(\left(k \cdot t\right) \cdot t\right) \cdot k} \cdot \color{blue}{\frac{\ell}{t}} \]

                if 7.2000000000000001e35 < k

                1. Initial program 54.7%

                  \[\frac{2}{\left(\left(\frac{{t}^{3}}{\ell \cdot \ell} \cdot \sin k\right) \cdot \tan k\right) \cdot \left(\left(1 + {\left(\frac{k}{t}\right)}^{2}\right) + 1\right)} \]
                2. Taylor expanded in k around 0

                  \[\leadsto \color{blue}{\frac{{\ell}^{2}}{{k}^{2} \cdot {t}^{3}}} \]
                3. Step-by-step derivation
                  1. lower-/.f64N/A

                    \[\leadsto \frac{{\ell}^{2}}{\color{blue}{{k}^{2} \cdot {t}^{3}}} \]
                  2. lower-pow.f64N/A

                    \[\leadsto \frac{{\ell}^{2}}{\color{blue}{{k}^{2}} \cdot {t}^{3}} \]
                  3. lower-*.f64N/A

                    \[\leadsto \frac{{\ell}^{2}}{{k}^{2} \cdot \color{blue}{{t}^{3}}} \]
                  4. lower-pow.f64N/A

                    \[\leadsto \frac{{\ell}^{2}}{{k}^{2} \cdot {\color{blue}{t}}^{3}} \]
                  5. lower-pow.f6451.2%

                    \[\leadsto \frac{{\ell}^{2}}{{k}^{2} \cdot {t}^{\color{blue}{3}}} \]
                4. Applied rewrites51.2%

                  \[\leadsto \color{blue}{\frac{{\ell}^{2}}{{k}^{2} \cdot {t}^{3}}} \]
                5. Step-by-step derivation
                  1. lift-/.f64N/A

                    \[\leadsto \frac{{\ell}^{2}}{\color{blue}{{k}^{2} \cdot {t}^{3}}} \]
                  2. lift-pow.f64N/A

                    \[\leadsto \frac{{\ell}^{2}}{\color{blue}{{k}^{2}} \cdot {t}^{3}} \]
                  3. pow2N/A

                    \[\leadsto \frac{\ell \cdot \ell}{\color{blue}{{k}^{2}} \cdot {t}^{3}} \]
                  4. associate-/l*N/A

                    \[\leadsto \ell \cdot \color{blue}{\frac{\ell}{{k}^{2} \cdot {t}^{3}}} \]
                  5. lower-*.f64N/A

                    \[\leadsto \ell \cdot \color{blue}{\frac{\ell}{{k}^{2} \cdot {t}^{3}}} \]
                  6. lower-/.f6455.1%

                    \[\leadsto \ell \cdot \frac{\ell}{\color{blue}{{k}^{2} \cdot {t}^{3}}} \]
                  7. lift-*.f64N/A

                    \[\leadsto \ell \cdot \frac{\ell}{{k}^{2} \cdot \color{blue}{{t}^{3}}} \]
                  8. *-commutativeN/A

                    \[\leadsto \ell \cdot \frac{\ell}{{t}^{3} \cdot \color{blue}{{k}^{2}}} \]
                  9. lift-pow.f64N/A

                    \[\leadsto \ell \cdot \frac{\ell}{{t}^{3} \cdot {k}^{\color{blue}{2}}} \]
                  10. pow2N/A

                    \[\leadsto \ell \cdot \frac{\ell}{{t}^{3} \cdot \left(k \cdot \color{blue}{k}\right)} \]
                  11. associate-*r*N/A

                    \[\leadsto \ell \cdot \frac{\ell}{\left({t}^{3} \cdot k\right) \cdot \color{blue}{k}} \]
                  12. lower-*.f64N/A

                    \[\leadsto \ell \cdot \frac{\ell}{\left({t}^{3} \cdot k\right) \cdot \color{blue}{k}} \]
                  13. lower-*.f6459.5%

                    \[\leadsto \ell \cdot \frac{\ell}{\left({t}^{3} \cdot k\right) \cdot k} \]
                  14. lift-pow.f64N/A

                    \[\leadsto \ell \cdot \frac{\ell}{\left({t}^{3} \cdot k\right) \cdot k} \]
                  15. unpow3N/A

                    \[\leadsto \ell \cdot \frac{\ell}{\left(\left(\left(t \cdot t\right) \cdot t\right) \cdot k\right) \cdot k} \]
                  16. lift-*.f64N/A

                    \[\leadsto \ell \cdot \frac{\ell}{\left(\left(\left(t \cdot t\right) \cdot t\right) \cdot k\right) \cdot k} \]
                  17. lower-*.f6459.5%

                    \[\leadsto \ell \cdot \frac{\ell}{\left(\left(\left(t \cdot t\right) \cdot t\right) \cdot k\right) \cdot k} \]
                6. Applied rewrites59.5%

                  \[\leadsto \ell \cdot \color{blue}{\frac{\ell}{\left(\left(\left(t \cdot t\right) \cdot t\right) \cdot k\right) \cdot k}} \]
                7. Step-by-step derivation
                  1. lift-*.f64N/A

                    \[\leadsto \ell \cdot \frac{\ell}{\left(\left(\left(t \cdot t\right) \cdot t\right) \cdot k\right) \cdot \color{blue}{k}} \]
                  2. lift-*.f64N/A

                    \[\leadsto \ell \cdot \frac{\ell}{\left(\left(\left(t \cdot t\right) \cdot t\right) \cdot k\right) \cdot k} \]
                  3. associate-*l*N/A

                    \[\leadsto \ell \cdot \frac{\ell}{\left(\left(t \cdot t\right) \cdot t\right) \cdot \color{blue}{\left(k \cdot k\right)}} \]
                  4. lift-*.f64N/A

                    \[\leadsto \ell \cdot \frac{\ell}{\left(\left(t \cdot t\right) \cdot t\right) \cdot \left(\color{blue}{k} \cdot k\right)} \]
                  5. *-commutativeN/A

                    \[\leadsto \ell \cdot \frac{\ell}{\left(t \cdot \left(t \cdot t\right)\right) \cdot \left(\color{blue}{k} \cdot k\right)} \]
                  6. lift-*.f64N/A

                    \[\leadsto \ell \cdot \frac{\ell}{\left(t \cdot \left(t \cdot t\right)\right) \cdot \left(k \cdot \color{blue}{k}\right)} \]
                  7. associate-*l*N/A

                    \[\leadsto \ell \cdot \frac{\ell}{t \cdot \color{blue}{\left(\left(t \cdot t\right) \cdot \left(k \cdot k\right)\right)}} \]
                  8. lower-*.f64N/A

                    \[\leadsto \ell \cdot \frac{\ell}{t \cdot \color{blue}{\left(\left(t \cdot t\right) \cdot \left(k \cdot k\right)\right)}} \]
                  9. lower-*.f6458.1%

                    \[\leadsto \ell \cdot \frac{\ell}{t \cdot \left(\left(t \cdot t\right) \cdot \color{blue}{\left(k \cdot k\right)}\right)} \]
                8. Applied rewrites58.1%

                  \[\leadsto \ell \cdot \frac{\ell}{t \cdot \color{blue}{\left(\left(t \cdot t\right) \cdot \left(k \cdot k\right)\right)}} \]
                9. Step-by-step derivation
                  1. lift-*.f64N/A

                    \[\leadsto \ell \cdot \color{blue}{\frac{\ell}{t \cdot \left(\left(t \cdot t\right) \cdot \left(k \cdot k\right)\right)}} \]
                  2. lift-/.f64N/A

                    \[\leadsto \ell \cdot \frac{\ell}{\color{blue}{t \cdot \left(\left(t \cdot t\right) \cdot \left(k \cdot k\right)\right)}} \]
                  3. associate-*r/N/A

                    \[\leadsto \frac{\ell \cdot \ell}{\color{blue}{t \cdot \left(\left(t \cdot t\right) \cdot \left(k \cdot k\right)\right)}} \]
                  4. lift-*.f64N/A

                    \[\leadsto \frac{\ell \cdot \ell}{\color{blue}{t} \cdot \left(\left(t \cdot t\right) \cdot \left(k \cdot k\right)\right)} \]
                  5. lift-*.f64N/A

                    \[\leadsto \frac{\ell \cdot \ell}{t \cdot \color{blue}{\left(\left(t \cdot t\right) \cdot \left(k \cdot k\right)\right)}} \]
                  6. *-commutativeN/A

                    \[\leadsto \frac{\ell \cdot \ell}{\left(\left(t \cdot t\right) \cdot \left(k \cdot k\right)\right) \cdot \color{blue}{t}} \]
                  7. associate-/r*N/A

                    \[\leadsto \frac{\frac{\ell \cdot \ell}{\left(t \cdot t\right) \cdot \left(k \cdot k\right)}}{\color{blue}{t}} \]
                  8. lower-/.f64N/A

                    \[\leadsto \frac{\frac{\ell \cdot \ell}{\left(t \cdot t\right) \cdot \left(k \cdot k\right)}}{\color{blue}{t}} \]
                  9. lower-/.f6454.5%

                    \[\leadsto \frac{\frac{\ell \cdot \ell}{\left(t \cdot t\right) \cdot \left(k \cdot k\right)}}{t} \]
                  10. lift-*.f64N/A

                    \[\leadsto \frac{\frac{\ell \cdot \ell}{\left(t \cdot t\right) \cdot \left(k \cdot k\right)}}{t} \]
                  11. lift-*.f64N/A

                    \[\leadsto \frac{\frac{\ell \cdot \ell}{\left(t \cdot t\right) \cdot \left(k \cdot k\right)}}{t} \]
                  12. lift-*.f64N/A

                    \[\leadsto \frac{\frac{\ell \cdot \ell}{\left(t \cdot t\right) \cdot \left(k \cdot k\right)}}{t} \]
                  13. unswap-sqrN/A

                    \[\leadsto \frac{\frac{\ell \cdot \ell}{\left(t \cdot k\right) \cdot \left(t \cdot k\right)}}{t} \]
                  14. associate-*r*N/A

                    \[\leadsto \frac{\frac{\ell \cdot \ell}{\left(\left(t \cdot k\right) \cdot t\right) \cdot k}}{t} \]
                  15. lower-*.f64N/A

                    \[\leadsto \frac{\frac{\ell \cdot \ell}{\left(\left(t \cdot k\right) \cdot t\right) \cdot k}}{t} \]
                  16. lower-*.f64N/A

                    \[\leadsto \frac{\frac{\ell \cdot \ell}{\left(\left(t \cdot k\right) \cdot t\right) \cdot k}}{t} \]
                  17. *-commutativeN/A

                    \[\leadsto \frac{\frac{\ell \cdot \ell}{\left(\left(k \cdot t\right) \cdot t\right) \cdot k}}{t} \]
                  18. lift-*.f6462.7%

                    \[\leadsto \frac{\frac{\ell \cdot \ell}{\left(\left(k \cdot t\right) \cdot t\right) \cdot k}}{t} \]
                10. Applied rewrites62.7%

                  \[\leadsto \frac{\frac{\ell \cdot \ell}{\left(\left(k \cdot t\right) \cdot t\right) \cdot k}}{\color{blue}{t}} \]
              3. Recombined 2 regimes into one program.
              4. Add Preprocessing

              Alternative 19: 67.0% accurate, 4.9× speedup?

              \[\begin{array}{l} t_1 := \left|k\right| \cdot t\\ \mathbf{if}\;\left|k\right| \leq 5 \cdot 10^{+169}:\\ \;\;\;\;\ell \cdot \frac{\frac{\ell}{t}}{\left(t\_1 \cdot t\right) \cdot \left|k\right|}\\ \mathbf{else}:\\ \;\;\;\;\ell \cdot \frac{\ell}{t \cdot \left(\left(t\_1 \cdot \left|k\right|\right) \cdot t\right)}\\ \end{array} \]
              (FPCore (t l k)
                :precision binary64
                (let* ((t_1 (* (fabs k) t)))
                (if (<= (fabs k) 5e+169)
                  (* l (/ (/ l t) (* (* t_1 t) (fabs k))))
                  (* l (/ l (* t (* (* t_1 (fabs k)) t)))))))
              double code(double t, double l, double k) {
              	double t_1 = fabs(k) * t;
              	double tmp;
              	if (fabs(k) <= 5e+169) {
              		tmp = l * ((l / t) / ((t_1 * t) * fabs(k)));
              	} else {
              		tmp = l * (l / (t * ((t_1 * fabs(k)) * t)));
              	}
              	return tmp;
              }
              
              module fmin_fmax_functions
                  implicit none
                  private
                  public fmax
                  public fmin
              
                  interface fmax
                      module procedure fmax88
                      module procedure fmax44
                      module procedure fmax84
                      module procedure fmax48
                  end interface
                  interface fmin
                      module procedure fmin88
                      module procedure fmin44
                      module procedure fmin84
                      module procedure fmin48
                  end interface
              contains
                  real(8) function fmax88(x, y) result (res)
                      real(8), intent (in) :: x
                      real(8), intent (in) :: y
                      res = merge(y, merge(x, max(x, y), y /= y), x /= x)
                  end function
                  real(4) function fmax44(x, y) result (res)
                      real(4), intent (in) :: x
                      real(4), intent (in) :: y
                      res = merge(y, merge(x, max(x, y), y /= y), x /= x)
                  end function
                  real(8) function fmax84(x, y) result(res)
                      real(8), intent (in) :: x
                      real(4), intent (in) :: y
                      res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
                  end function
                  real(8) function fmax48(x, y) result(res)
                      real(4), intent (in) :: x
                      real(8), intent (in) :: y
                      res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
                  end function
                  real(8) function fmin88(x, y) result (res)
                      real(8), intent (in) :: x
                      real(8), intent (in) :: y
                      res = merge(y, merge(x, min(x, y), y /= y), x /= x)
                  end function
                  real(4) function fmin44(x, y) result (res)
                      real(4), intent (in) :: x
                      real(4), intent (in) :: y
                      res = merge(y, merge(x, min(x, y), y /= y), x /= x)
                  end function
                  real(8) function fmin84(x, y) result(res)
                      real(8), intent (in) :: x
                      real(4), intent (in) :: y
                      res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
                  end function
                  real(8) function fmin48(x, y) result(res)
                      real(4), intent (in) :: x
                      real(8), intent (in) :: y
                      res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
                  end function
              end module
              
              real(8) function code(t, l, k)
              use fmin_fmax_functions
                  real(8), intent (in) :: t
                  real(8), intent (in) :: l
                  real(8), intent (in) :: k
                  real(8) :: t_1
                  real(8) :: tmp
                  t_1 = abs(k) * t
                  if (abs(k) <= 5d+169) then
                      tmp = l * ((l / t) / ((t_1 * t) * abs(k)))
                  else
                      tmp = l * (l / (t * ((t_1 * abs(k)) * t)))
                  end if
                  code = tmp
              end function
              
              public static double code(double t, double l, double k) {
              	double t_1 = Math.abs(k) * t;
              	double tmp;
              	if (Math.abs(k) <= 5e+169) {
              		tmp = l * ((l / t) / ((t_1 * t) * Math.abs(k)));
              	} else {
              		tmp = l * (l / (t * ((t_1 * Math.abs(k)) * t)));
              	}
              	return tmp;
              }
              
              def code(t, l, k):
              	t_1 = math.fabs(k) * t
              	tmp = 0
              	if math.fabs(k) <= 5e+169:
              		tmp = l * ((l / t) / ((t_1 * t) * math.fabs(k)))
              	else:
              		tmp = l * (l / (t * ((t_1 * math.fabs(k)) * t)))
              	return tmp
              
              function code(t, l, k)
              	t_1 = Float64(abs(k) * t)
              	tmp = 0.0
              	if (abs(k) <= 5e+169)
              		tmp = Float64(l * Float64(Float64(l / t) / Float64(Float64(t_1 * t) * abs(k))));
              	else
              		tmp = Float64(l * Float64(l / Float64(t * Float64(Float64(t_1 * abs(k)) * t))));
              	end
              	return tmp
              end
              
              function tmp_2 = code(t, l, k)
              	t_1 = abs(k) * t;
              	tmp = 0.0;
              	if (abs(k) <= 5e+169)
              		tmp = l * ((l / t) / ((t_1 * t) * abs(k)));
              	else
              		tmp = l * (l / (t * ((t_1 * abs(k)) * t)));
              	end
              	tmp_2 = tmp;
              end
              
              code[t_, l_, k_] := Block[{t$95$1 = N[(N[Abs[k], $MachinePrecision] * t), $MachinePrecision]}, If[LessEqual[N[Abs[k], $MachinePrecision], 5e+169], N[(l * N[(N[(l / t), $MachinePrecision] / N[(N[(t$95$1 * t), $MachinePrecision] * N[Abs[k], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(l * N[(l / N[(t * N[(N[(t$95$1 * N[Abs[k], $MachinePrecision]), $MachinePrecision] * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
              
              \begin{array}{l}
              t_1 := \left|k\right| \cdot t\\
              \mathbf{if}\;\left|k\right| \leq 5 \cdot 10^{+169}:\\
              \;\;\;\;\ell \cdot \frac{\frac{\ell}{t}}{\left(t\_1 \cdot t\right) \cdot \left|k\right|}\\
              
              \mathbf{else}:\\
              \;\;\;\;\ell \cdot \frac{\ell}{t \cdot \left(\left(t\_1 \cdot \left|k\right|\right) \cdot t\right)}\\
              
              
              \end{array}
              
              Derivation
              1. Split input into 2 regimes
              2. if k < 5.0000000000000002e169

                1. Initial program 54.7%

                  \[\frac{2}{\left(\left(\frac{{t}^{3}}{\ell \cdot \ell} \cdot \sin k\right) \cdot \tan k\right) \cdot \left(\left(1 + {\left(\frac{k}{t}\right)}^{2}\right) + 1\right)} \]
                2. Taylor expanded in k around 0

                  \[\leadsto \color{blue}{\frac{{\ell}^{2}}{{k}^{2} \cdot {t}^{3}}} \]
                3. Step-by-step derivation
                  1. lower-/.f64N/A

                    \[\leadsto \frac{{\ell}^{2}}{\color{blue}{{k}^{2} \cdot {t}^{3}}} \]
                  2. lower-pow.f64N/A

                    \[\leadsto \frac{{\ell}^{2}}{\color{blue}{{k}^{2}} \cdot {t}^{3}} \]
                  3. lower-*.f64N/A

                    \[\leadsto \frac{{\ell}^{2}}{{k}^{2} \cdot \color{blue}{{t}^{3}}} \]
                  4. lower-pow.f64N/A

                    \[\leadsto \frac{{\ell}^{2}}{{k}^{2} \cdot {\color{blue}{t}}^{3}} \]
                  5. lower-pow.f6451.2%

                    \[\leadsto \frac{{\ell}^{2}}{{k}^{2} \cdot {t}^{\color{blue}{3}}} \]
                4. Applied rewrites51.2%

                  \[\leadsto \color{blue}{\frac{{\ell}^{2}}{{k}^{2} \cdot {t}^{3}}} \]
                5. Step-by-step derivation
                  1. lift-/.f64N/A

                    \[\leadsto \frac{{\ell}^{2}}{\color{blue}{{k}^{2} \cdot {t}^{3}}} \]
                  2. lift-pow.f64N/A

                    \[\leadsto \frac{{\ell}^{2}}{\color{blue}{{k}^{2}} \cdot {t}^{3}} \]
                  3. pow2N/A

                    \[\leadsto \frac{\ell \cdot \ell}{\color{blue}{{k}^{2}} \cdot {t}^{3}} \]
                  4. associate-/l*N/A

                    \[\leadsto \ell \cdot \color{blue}{\frac{\ell}{{k}^{2} \cdot {t}^{3}}} \]
                  5. lower-*.f64N/A

                    \[\leadsto \ell \cdot \color{blue}{\frac{\ell}{{k}^{2} \cdot {t}^{3}}} \]
                  6. lower-/.f6455.1%

                    \[\leadsto \ell \cdot \frac{\ell}{\color{blue}{{k}^{2} \cdot {t}^{3}}} \]
                  7. lift-*.f64N/A

                    \[\leadsto \ell \cdot \frac{\ell}{{k}^{2} \cdot \color{blue}{{t}^{3}}} \]
                  8. *-commutativeN/A

                    \[\leadsto \ell \cdot \frac{\ell}{{t}^{3} \cdot \color{blue}{{k}^{2}}} \]
                  9. lift-pow.f64N/A

                    \[\leadsto \ell \cdot \frac{\ell}{{t}^{3} \cdot {k}^{\color{blue}{2}}} \]
                  10. pow2N/A

                    \[\leadsto \ell \cdot \frac{\ell}{{t}^{3} \cdot \left(k \cdot \color{blue}{k}\right)} \]
                  11. associate-*r*N/A

                    \[\leadsto \ell \cdot \frac{\ell}{\left({t}^{3} \cdot k\right) \cdot \color{blue}{k}} \]
                  12. lower-*.f64N/A

                    \[\leadsto \ell \cdot \frac{\ell}{\left({t}^{3} \cdot k\right) \cdot \color{blue}{k}} \]
                  13. lower-*.f6459.5%

                    \[\leadsto \ell \cdot \frac{\ell}{\left({t}^{3} \cdot k\right) \cdot k} \]
                  14. lift-pow.f64N/A

                    \[\leadsto \ell \cdot \frac{\ell}{\left({t}^{3} \cdot k\right) \cdot k} \]
                  15. unpow3N/A

                    \[\leadsto \ell \cdot \frac{\ell}{\left(\left(\left(t \cdot t\right) \cdot t\right) \cdot k\right) \cdot k} \]
                  16. lift-*.f64N/A

                    \[\leadsto \ell \cdot \frac{\ell}{\left(\left(\left(t \cdot t\right) \cdot t\right) \cdot k\right) \cdot k} \]
                  17. lower-*.f6459.5%

                    \[\leadsto \ell \cdot \frac{\ell}{\left(\left(\left(t \cdot t\right) \cdot t\right) \cdot k\right) \cdot k} \]
                6. Applied rewrites59.5%

                  \[\leadsto \ell \cdot \color{blue}{\frac{\ell}{\left(\left(\left(t \cdot t\right) \cdot t\right) \cdot k\right) \cdot k}} \]
                7. Step-by-step derivation
                  1. lift-*.f64N/A

                    \[\leadsto \ell \cdot \frac{\ell}{\left(\left(\left(t \cdot t\right) \cdot t\right) \cdot k\right) \cdot \color{blue}{k}} \]
                  2. lift-*.f64N/A

                    \[\leadsto \ell \cdot \frac{\ell}{\left(\left(\left(t \cdot t\right) \cdot t\right) \cdot k\right) \cdot k} \]
                  3. associate-*l*N/A

                    \[\leadsto \ell \cdot \frac{\ell}{\left(\left(t \cdot t\right) \cdot t\right) \cdot \color{blue}{\left(k \cdot k\right)}} \]
                  4. lift-*.f64N/A

                    \[\leadsto \ell \cdot \frac{\ell}{\left(\left(t \cdot t\right) \cdot t\right) \cdot \left(\color{blue}{k} \cdot k\right)} \]
                  5. *-commutativeN/A

                    \[\leadsto \ell \cdot \frac{\ell}{\left(t \cdot \left(t \cdot t\right)\right) \cdot \left(\color{blue}{k} \cdot k\right)} \]
                  6. lift-*.f64N/A

                    \[\leadsto \ell \cdot \frac{\ell}{\left(t \cdot \left(t \cdot t\right)\right) \cdot \left(k \cdot \color{blue}{k}\right)} \]
                  7. associate-*l*N/A

                    \[\leadsto \ell \cdot \frac{\ell}{t \cdot \color{blue}{\left(\left(t \cdot t\right) \cdot \left(k \cdot k\right)\right)}} \]
                  8. lower-*.f64N/A

                    \[\leadsto \ell \cdot \frac{\ell}{t \cdot \color{blue}{\left(\left(t \cdot t\right) \cdot \left(k \cdot k\right)\right)}} \]
                  9. lower-*.f6458.1%

                    \[\leadsto \ell \cdot \frac{\ell}{t \cdot \left(\left(t \cdot t\right) \cdot \color{blue}{\left(k \cdot k\right)}\right)} \]
                8. Applied rewrites58.1%

                  \[\leadsto \ell \cdot \frac{\ell}{t \cdot \color{blue}{\left(\left(t \cdot t\right) \cdot \left(k \cdot k\right)\right)}} \]
                9. Step-by-step derivation
                  1. lift-/.f64N/A

                    \[\leadsto \ell \cdot \frac{\ell}{\color{blue}{t \cdot \left(\left(t \cdot t\right) \cdot \left(k \cdot k\right)\right)}} \]
                  2. lift-*.f64N/A

                    \[\leadsto \ell \cdot \frac{\ell}{t \cdot \color{blue}{\left(\left(t \cdot t\right) \cdot \left(k \cdot k\right)\right)}} \]
                  3. associate-/r*N/A

                    \[\leadsto \ell \cdot \frac{\frac{\ell}{t}}{\color{blue}{\left(t \cdot t\right) \cdot \left(k \cdot k\right)}} \]
                  4. lift-/.f64N/A

                    \[\leadsto \ell \cdot \frac{\frac{\ell}{t}}{\color{blue}{\left(t \cdot t\right)} \cdot \left(k \cdot k\right)} \]
                  5. lower-/.f6458.4%

                    \[\leadsto \ell \cdot \frac{\frac{\ell}{t}}{\color{blue}{\left(t \cdot t\right) \cdot \left(k \cdot k\right)}} \]
                  6. lift-*.f64N/A

                    \[\leadsto \ell \cdot \frac{\frac{\ell}{t}}{\left(t \cdot t\right) \cdot \color{blue}{\left(k \cdot k\right)}} \]
                  7. lift-*.f64N/A

                    \[\leadsto \ell \cdot \frac{\frac{\ell}{t}}{\left(t \cdot t\right) \cdot \left(\color{blue}{k} \cdot k\right)} \]
                  8. lift-*.f64N/A

                    \[\leadsto \ell \cdot \frac{\frac{\ell}{t}}{\left(t \cdot t\right) \cdot \left(k \cdot \color{blue}{k}\right)} \]
                  9. unswap-sqrN/A

                    \[\leadsto \ell \cdot \frac{\frac{\ell}{t}}{\left(t \cdot k\right) \cdot \color{blue}{\left(t \cdot k\right)}} \]
                  10. associate-*r*N/A

                    \[\leadsto \ell \cdot \frac{\frac{\ell}{t}}{\left(\left(t \cdot k\right) \cdot t\right) \cdot \color{blue}{k}} \]
                  11. lower-*.f64N/A

                    \[\leadsto \ell \cdot \frac{\frac{\ell}{t}}{\left(\left(t \cdot k\right) \cdot t\right) \cdot \color{blue}{k}} \]
                  12. lower-*.f64N/A

                    \[\leadsto \ell \cdot \frac{\frac{\ell}{t}}{\left(\left(t \cdot k\right) \cdot t\right) \cdot k} \]
                  13. *-commutativeN/A

                    \[\leadsto \ell \cdot \frac{\frac{\ell}{t}}{\left(\left(k \cdot t\right) \cdot t\right) \cdot k} \]
                  14. lift-*.f6466.7%

                    \[\leadsto \ell \cdot \frac{\frac{\ell}{t}}{\left(\left(k \cdot t\right) \cdot t\right) \cdot k} \]
                10. Applied rewrites66.7%

                  \[\leadsto \ell \cdot \frac{\frac{\ell}{t}}{\color{blue}{\left(\left(k \cdot t\right) \cdot t\right) \cdot k}} \]

                if 5.0000000000000002e169 < k

                1. Initial program 54.7%

                  \[\frac{2}{\left(\left(\frac{{t}^{3}}{\ell \cdot \ell} \cdot \sin k\right) \cdot \tan k\right) \cdot \left(\left(1 + {\left(\frac{k}{t}\right)}^{2}\right) + 1\right)} \]
                2. Taylor expanded in k around 0

                  \[\leadsto \color{blue}{\frac{{\ell}^{2}}{{k}^{2} \cdot {t}^{3}}} \]
                3. Step-by-step derivation
                  1. lower-/.f64N/A

                    \[\leadsto \frac{{\ell}^{2}}{\color{blue}{{k}^{2} \cdot {t}^{3}}} \]
                  2. lower-pow.f64N/A

                    \[\leadsto \frac{{\ell}^{2}}{\color{blue}{{k}^{2}} \cdot {t}^{3}} \]
                  3. lower-*.f64N/A

                    \[\leadsto \frac{{\ell}^{2}}{{k}^{2} \cdot \color{blue}{{t}^{3}}} \]
                  4. lower-pow.f64N/A

                    \[\leadsto \frac{{\ell}^{2}}{{k}^{2} \cdot {\color{blue}{t}}^{3}} \]
                  5. lower-pow.f6451.2%

                    \[\leadsto \frac{{\ell}^{2}}{{k}^{2} \cdot {t}^{\color{blue}{3}}} \]
                4. Applied rewrites51.2%

                  \[\leadsto \color{blue}{\frac{{\ell}^{2}}{{k}^{2} \cdot {t}^{3}}} \]
                5. Step-by-step derivation
                  1. lift-/.f64N/A

                    \[\leadsto \frac{{\ell}^{2}}{\color{blue}{{k}^{2} \cdot {t}^{3}}} \]
                  2. lift-pow.f64N/A

                    \[\leadsto \frac{{\ell}^{2}}{\color{blue}{{k}^{2}} \cdot {t}^{3}} \]
                  3. pow2N/A

                    \[\leadsto \frac{\ell \cdot \ell}{\color{blue}{{k}^{2}} \cdot {t}^{3}} \]
                  4. associate-/l*N/A

                    \[\leadsto \ell \cdot \color{blue}{\frac{\ell}{{k}^{2} \cdot {t}^{3}}} \]
                  5. lower-*.f64N/A

                    \[\leadsto \ell \cdot \color{blue}{\frac{\ell}{{k}^{2} \cdot {t}^{3}}} \]
                  6. lower-/.f6455.1%

                    \[\leadsto \ell \cdot \frac{\ell}{\color{blue}{{k}^{2} \cdot {t}^{3}}} \]
                  7. lift-*.f64N/A

                    \[\leadsto \ell \cdot \frac{\ell}{{k}^{2} \cdot \color{blue}{{t}^{3}}} \]
                  8. *-commutativeN/A

                    \[\leadsto \ell \cdot \frac{\ell}{{t}^{3} \cdot \color{blue}{{k}^{2}}} \]
                  9. lift-pow.f64N/A

                    \[\leadsto \ell \cdot \frac{\ell}{{t}^{3} \cdot {k}^{\color{blue}{2}}} \]
                  10. pow2N/A

                    \[\leadsto \ell \cdot \frac{\ell}{{t}^{3} \cdot \left(k \cdot \color{blue}{k}\right)} \]
                  11. associate-*r*N/A

                    \[\leadsto \ell \cdot \frac{\ell}{\left({t}^{3} \cdot k\right) \cdot \color{blue}{k}} \]
                  12. lower-*.f64N/A

                    \[\leadsto \ell \cdot \frac{\ell}{\left({t}^{3} \cdot k\right) \cdot \color{blue}{k}} \]
                  13. lower-*.f6459.5%

                    \[\leadsto \ell \cdot \frac{\ell}{\left({t}^{3} \cdot k\right) \cdot k} \]
                  14. lift-pow.f64N/A

                    \[\leadsto \ell \cdot \frac{\ell}{\left({t}^{3} \cdot k\right) \cdot k} \]
                  15. unpow3N/A

                    \[\leadsto \ell \cdot \frac{\ell}{\left(\left(\left(t \cdot t\right) \cdot t\right) \cdot k\right) \cdot k} \]
                  16. lift-*.f64N/A

                    \[\leadsto \ell \cdot \frac{\ell}{\left(\left(\left(t \cdot t\right) \cdot t\right) \cdot k\right) \cdot k} \]
                  17. lower-*.f6459.5%

                    \[\leadsto \ell \cdot \frac{\ell}{\left(\left(\left(t \cdot t\right) \cdot t\right) \cdot k\right) \cdot k} \]
                6. Applied rewrites59.5%

                  \[\leadsto \ell \cdot \color{blue}{\frac{\ell}{\left(\left(\left(t \cdot t\right) \cdot t\right) \cdot k\right) \cdot k}} \]
                7. Step-by-step derivation
                  1. lift-*.f64N/A

                    \[\leadsto \ell \cdot \frac{\ell}{\left(\left(\left(t \cdot t\right) \cdot t\right) \cdot k\right) \cdot \color{blue}{k}} \]
                  2. lift-*.f64N/A

                    \[\leadsto \ell \cdot \frac{\ell}{\left(\left(\left(t \cdot t\right) \cdot t\right) \cdot k\right) \cdot k} \]
                  3. associate-*l*N/A

                    \[\leadsto \ell \cdot \frac{\ell}{\left(\left(t \cdot t\right) \cdot t\right) \cdot \color{blue}{\left(k \cdot k\right)}} \]
                  4. lift-*.f64N/A

                    \[\leadsto \ell \cdot \frac{\ell}{\left(\left(t \cdot t\right) \cdot t\right) \cdot \left(\color{blue}{k} \cdot k\right)} \]
                  5. *-commutativeN/A

                    \[\leadsto \ell \cdot \frac{\ell}{\left(t \cdot \left(t \cdot t\right)\right) \cdot \left(\color{blue}{k} \cdot k\right)} \]
                  6. lift-*.f64N/A

                    \[\leadsto \ell \cdot \frac{\ell}{\left(t \cdot \left(t \cdot t\right)\right) \cdot \left(k \cdot \color{blue}{k}\right)} \]
                  7. associate-*l*N/A

                    \[\leadsto \ell \cdot \frac{\ell}{t \cdot \color{blue}{\left(\left(t \cdot t\right) \cdot \left(k \cdot k\right)\right)}} \]
                  8. lower-*.f64N/A

                    \[\leadsto \ell \cdot \frac{\ell}{t \cdot \color{blue}{\left(\left(t \cdot t\right) \cdot \left(k \cdot k\right)\right)}} \]
                  9. lower-*.f6458.1%

                    \[\leadsto \ell \cdot \frac{\ell}{t \cdot \left(\left(t \cdot t\right) \cdot \color{blue}{\left(k \cdot k\right)}\right)} \]
                8. Applied rewrites58.1%

                  \[\leadsto \ell \cdot \frac{\ell}{t \cdot \color{blue}{\left(\left(t \cdot t\right) \cdot \left(k \cdot k\right)\right)}} \]
                9. Step-by-step derivation
                  1. lift-*.f64N/A

                    \[\leadsto \ell \cdot \frac{\ell}{t \cdot \left(\left(t \cdot t\right) \cdot \color{blue}{\left(k \cdot k\right)}\right)} \]
                  2. *-commutativeN/A

                    \[\leadsto \ell \cdot \frac{\ell}{t \cdot \left(\left(k \cdot k\right) \cdot \color{blue}{\left(t \cdot t\right)}\right)} \]
                  3. lift-*.f64N/A

                    \[\leadsto \ell \cdot \frac{\ell}{t \cdot \left(\left(k \cdot k\right) \cdot \left(t \cdot \color{blue}{t}\right)\right)} \]
                  4. associate-*r*N/A

                    \[\leadsto \ell \cdot \frac{\ell}{t \cdot \left(\left(\left(k \cdot k\right) \cdot t\right) \cdot \color{blue}{t}\right)} \]
                  5. lower-*.f64N/A

                    \[\leadsto \ell \cdot \frac{\ell}{t \cdot \left(\left(\left(k \cdot k\right) \cdot t\right) \cdot \color{blue}{t}\right)} \]
                  6. *-commutativeN/A

                    \[\leadsto \ell \cdot \frac{\ell}{t \cdot \left(\left(t \cdot \left(k \cdot k\right)\right) \cdot t\right)} \]
                  7. lift-*.f64N/A

                    \[\leadsto \ell \cdot \frac{\ell}{t \cdot \left(\left(t \cdot \left(k \cdot k\right)\right) \cdot t\right)} \]
                  8. associate-*r*N/A

                    \[\leadsto \ell \cdot \frac{\ell}{t \cdot \left(\left(\left(t \cdot k\right) \cdot k\right) \cdot t\right)} \]
                  9. lower-*.f64N/A

                    \[\leadsto \ell \cdot \frac{\ell}{t \cdot \left(\left(\left(t \cdot k\right) \cdot k\right) \cdot t\right)} \]
                  10. *-commutativeN/A

                    \[\leadsto \ell \cdot \frac{\ell}{t \cdot \left(\left(\left(k \cdot t\right) \cdot k\right) \cdot t\right)} \]
                  11. lift-*.f6464.7%

                    \[\leadsto \ell \cdot \frac{\ell}{t \cdot \left(\left(\left(k \cdot t\right) \cdot k\right) \cdot t\right)} \]
                10. Applied rewrites64.7%

                  \[\leadsto \ell \cdot \frac{\ell}{t \cdot \left(\left(\left(k \cdot t\right) \cdot k\right) \cdot \color{blue}{t}\right)} \]
              3. Recombined 2 regimes into one program.
              4. Add Preprocessing

              Alternative 20: 66.7% accurate, 6.5× speedup?

              \[\frac{\ell}{\left(\left(k \cdot t\right) \cdot t\right) \cdot k} \cdot \frac{\ell}{t} \]
              (FPCore (t l k)
                :precision binary64
                (* (/ l (* (* (* k t) t) k)) (/ l t)))
              double code(double t, double l, double k) {
              	return (l / (((k * t) * t) * k)) * (l / t);
              }
              
              module fmin_fmax_functions
                  implicit none
                  private
                  public fmax
                  public fmin
              
                  interface fmax
                      module procedure fmax88
                      module procedure fmax44
                      module procedure fmax84
                      module procedure fmax48
                  end interface
                  interface fmin
                      module procedure fmin88
                      module procedure fmin44
                      module procedure fmin84
                      module procedure fmin48
                  end interface
              contains
                  real(8) function fmax88(x, y) result (res)
                      real(8), intent (in) :: x
                      real(8), intent (in) :: y
                      res = merge(y, merge(x, max(x, y), y /= y), x /= x)
                  end function
                  real(4) function fmax44(x, y) result (res)
                      real(4), intent (in) :: x
                      real(4), intent (in) :: y
                      res = merge(y, merge(x, max(x, y), y /= y), x /= x)
                  end function
                  real(8) function fmax84(x, y) result(res)
                      real(8), intent (in) :: x
                      real(4), intent (in) :: y
                      res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
                  end function
                  real(8) function fmax48(x, y) result(res)
                      real(4), intent (in) :: x
                      real(8), intent (in) :: y
                      res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
                  end function
                  real(8) function fmin88(x, y) result (res)
                      real(8), intent (in) :: x
                      real(8), intent (in) :: y
                      res = merge(y, merge(x, min(x, y), y /= y), x /= x)
                  end function
                  real(4) function fmin44(x, y) result (res)
                      real(4), intent (in) :: x
                      real(4), intent (in) :: y
                      res = merge(y, merge(x, min(x, y), y /= y), x /= x)
                  end function
                  real(8) function fmin84(x, y) result(res)
                      real(8), intent (in) :: x
                      real(4), intent (in) :: y
                      res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
                  end function
                  real(8) function fmin48(x, y) result(res)
                      real(4), intent (in) :: x
                      real(8), intent (in) :: y
                      res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
                  end function
              end module
              
              real(8) function code(t, l, k)
              use fmin_fmax_functions
                  real(8), intent (in) :: t
                  real(8), intent (in) :: l
                  real(8), intent (in) :: k
                  code = (l / (((k * t) * t) * k)) * (l / t)
              end function
              
              public static double code(double t, double l, double k) {
              	return (l / (((k * t) * t) * k)) * (l / t);
              }
              
              def code(t, l, k):
              	return (l / (((k * t) * t) * k)) * (l / t)
              
              function code(t, l, k)
              	return Float64(Float64(l / Float64(Float64(Float64(k * t) * t) * k)) * Float64(l / t))
              end
              
              function tmp = code(t, l, k)
              	tmp = (l / (((k * t) * t) * k)) * (l / t);
              end
              
              code[t_, l_, k_] := N[(N[(l / N[(N[(N[(k * t), $MachinePrecision] * t), $MachinePrecision] * k), $MachinePrecision]), $MachinePrecision] * N[(l / t), $MachinePrecision]), $MachinePrecision]
              
              \frac{\ell}{\left(\left(k \cdot t\right) \cdot t\right) \cdot k} \cdot \frac{\ell}{t}
              
              Derivation
              1. Initial program 54.7%

                \[\frac{2}{\left(\left(\frac{{t}^{3}}{\ell \cdot \ell} \cdot \sin k\right) \cdot \tan k\right) \cdot \left(\left(1 + {\left(\frac{k}{t}\right)}^{2}\right) + 1\right)} \]
              2. Taylor expanded in k around 0

                \[\leadsto \color{blue}{\frac{{\ell}^{2}}{{k}^{2} \cdot {t}^{3}}} \]
              3. Step-by-step derivation
                1. lower-/.f64N/A

                  \[\leadsto \frac{{\ell}^{2}}{\color{blue}{{k}^{2} \cdot {t}^{3}}} \]
                2. lower-pow.f64N/A

                  \[\leadsto \frac{{\ell}^{2}}{\color{blue}{{k}^{2}} \cdot {t}^{3}} \]
                3. lower-*.f64N/A

                  \[\leadsto \frac{{\ell}^{2}}{{k}^{2} \cdot \color{blue}{{t}^{3}}} \]
                4. lower-pow.f64N/A

                  \[\leadsto \frac{{\ell}^{2}}{{k}^{2} \cdot {\color{blue}{t}}^{3}} \]
                5. lower-pow.f6451.2%

                  \[\leadsto \frac{{\ell}^{2}}{{k}^{2} \cdot {t}^{\color{blue}{3}}} \]
              4. Applied rewrites51.2%

                \[\leadsto \color{blue}{\frac{{\ell}^{2}}{{k}^{2} \cdot {t}^{3}}} \]
              5. Step-by-step derivation
                1. lift-/.f64N/A

                  \[\leadsto \frac{{\ell}^{2}}{\color{blue}{{k}^{2} \cdot {t}^{3}}} \]
                2. lift-pow.f64N/A

                  \[\leadsto \frac{{\ell}^{2}}{\color{blue}{{k}^{2}} \cdot {t}^{3}} \]
                3. pow2N/A

                  \[\leadsto \frac{\ell \cdot \ell}{\color{blue}{{k}^{2}} \cdot {t}^{3}} \]
                4. associate-/l*N/A

                  \[\leadsto \ell \cdot \color{blue}{\frac{\ell}{{k}^{2} \cdot {t}^{3}}} \]
                5. lower-*.f64N/A

                  \[\leadsto \ell \cdot \color{blue}{\frac{\ell}{{k}^{2} \cdot {t}^{3}}} \]
                6. lower-/.f6455.1%

                  \[\leadsto \ell \cdot \frac{\ell}{\color{blue}{{k}^{2} \cdot {t}^{3}}} \]
                7. lift-*.f64N/A

                  \[\leadsto \ell \cdot \frac{\ell}{{k}^{2} \cdot \color{blue}{{t}^{3}}} \]
                8. *-commutativeN/A

                  \[\leadsto \ell \cdot \frac{\ell}{{t}^{3} \cdot \color{blue}{{k}^{2}}} \]
                9. lift-pow.f64N/A

                  \[\leadsto \ell \cdot \frac{\ell}{{t}^{3} \cdot {k}^{\color{blue}{2}}} \]
                10. pow2N/A

                  \[\leadsto \ell \cdot \frac{\ell}{{t}^{3} \cdot \left(k \cdot \color{blue}{k}\right)} \]
                11. associate-*r*N/A

                  \[\leadsto \ell \cdot \frac{\ell}{\left({t}^{3} \cdot k\right) \cdot \color{blue}{k}} \]
                12. lower-*.f64N/A

                  \[\leadsto \ell \cdot \frac{\ell}{\left({t}^{3} \cdot k\right) \cdot \color{blue}{k}} \]
                13. lower-*.f6459.5%

                  \[\leadsto \ell \cdot \frac{\ell}{\left({t}^{3} \cdot k\right) \cdot k} \]
                14. lift-pow.f64N/A

                  \[\leadsto \ell \cdot \frac{\ell}{\left({t}^{3} \cdot k\right) \cdot k} \]
                15. unpow3N/A

                  \[\leadsto \ell \cdot \frac{\ell}{\left(\left(\left(t \cdot t\right) \cdot t\right) \cdot k\right) \cdot k} \]
                16. lift-*.f64N/A

                  \[\leadsto \ell \cdot \frac{\ell}{\left(\left(\left(t \cdot t\right) \cdot t\right) \cdot k\right) \cdot k} \]
                17. lower-*.f6459.5%

                  \[\leadsto \ell \cdot \frac{\ell}{\left(\left(\left(t \cdot t\right) \cdot t\right) \cdot k\right) \cdot k} \]
              6. Applied rewrites59.5%

                \[\leadsto \ell \cdot \color{blue}{\frac{\ell}{\left(\left(\left(t \cdot t\right) \cdot t\right) \cdot k\right) \cdot k}} \]
              7. Step-by-step derivation
                1. lift-*.f64N/A

                  \[\leadsto \ell \cdot \frac{\ell}{\left(\left(\left(t \cdot t\right) \cdot t\right) \cdot k\right) \cdot \color{blue}{k}} \]
                2. lift-*.f64N/A

                  \[\leadsto \ell \cdot \frac{\ell}{\left(\left(\left(t \cdot t\right) \cdot t\right) \cdot k\right) \cdot k} \]
                3. associate-*l*N/A

                  \[\leadsto \ell \cdot \frac{\ell}{\left(\left(t \cdot t\right) \cdot t\right) \cdot \color{blue}{\left(k \cdot k\right)}} \]
                4. lift-*.f64N/A

                  \[\leadsto \ell \cdot \frac{\ell}{\left(\left(t \cdot t\right) \cdot t\right) \cdot \left(\color{blue}{k} \cdot k\right)} \]
                5. *-commutativeN/A

                  \[\leadsto \ell \cdot \frac{\ell}{\left(t \cdot \left(t \cdot t\right)\right) \cdot \left(\color{blue}{k} \cdot k\right)} \]
                6. lift-*.f64N/A

                  \[\leadsto \ell \cdot \frac{\ell}{\left(t \cdot \left(t \cdot t\right)\right) \cdot \left(k \cdot \color{blue}{k}\right)} \]
                7. associate-*l*N/A

                  \[\leadsto \ell \cdot \frac{\ell}{t \cdot \color{blue}{\left(\left(t \cdot t\right) \cdot \left(k \cdot k\right)\right)}} \]
                8. lower-*.f64N/A

                  \[\leadsto \ell \cdot \frac{\ell}{t \cdot \color{blue}{\left(\left(t \cdot t\right) \cdot \left(k \cdot k\right)\right)}} \]
                9. lower-*.f6458.1%

                  \[\leadsto \ell \cdot \frac{\ell}{t \cdot \left(\left(t \cdot t\right) \cdot \color{blue}{\left(k \cdot k\right)}\right)} \]
              8. Applied rewrites58.1%

                \[\leadsto \ell \cdot \frac{\ell}{t \cdot \color{blue}{\left(\left(t \cdot t\right) \cdot \left(k \cdot k\right)\right)}} \]
              9. Step-by-step derivation
                1. lift-*.f64N/A

                  \[\leadsto \ell \cdot \color{blue}{\frac{\ell}{t \cdot \left(\left(t \cdot t\right) \cdot \left(k \cdot k\right)\right)}} \]
                2. lift-/.f64N/A

                  \[\leadsto \ell \cdot \frac{\ell}{\color{blue}{t \cdot \left(\left(t \cdot t\right) \cdot \left(k \cdot k\right)\right)}} \]
                3. associate-*r/N/A

                  \[\leadsto \frac{\ell \cdot \ell}{\color{blue}{t \cdot \left(\left(t \cdot t\right) \cdot \left(k \cdot k\right)\right)}} \]
                4. lift-*.f64N/A

                  \[\leadsto \frac{\ell \cdot \ell}{t \cdot \color{blue}{\left(\left(t \cdot t\right) \cdot \left(k \cdot k\right)\right)}} \]
                5. *-commutativeN/A

                  \[\leadsto \frac{\ell \cdot \ell}{\left(\left(t \cdot t\right) \cdot \left(k \cdot k\right)\right) \cdot \color{blue}{t}} \]
                6. times-fracN/A

                  \[\leadsto \frac{\ell}{\left(t \cdot t\right) \cdot \left(k \cdot k\right)} \cdot \color{blue}{\frac{\ell}{t}} \]
                7. lift-/.f64N/A

                  \[\leadsto \frac{\ell}{\left(t \cdot t\right) \cdot \left(k \cdot k\right)} \cdot \frac{\ell}{\color{blue}{t}} \]
                8. lower-*.f64N/A

                  \[\leadsto \frac{\ell}{\left(t \cdot t\right) \cdot \left(k \cdot k\right)} \cdot \color{blue}{\frac{\ell}{t}} \]
                9. lower-/.f6458.4%

                  \[\leadsto \frac{\ell}{\left(t \cdot t\right) \cdot \left(k \cdot k\right)} \cdot \frac{\color{blue}{\ell}}{t} \]
                10. lift-*.f64N/A

                  \[\leadsto \frac{\ell}{\left(t \cdot t\right) \cdot \left(k \cdot k\right)} \cdot \frac{\ell}{t} \]
                11. lift-*.f64N/A

                  \[\leadsto \frac{\ell}{\left(t \cdot t\right) \cdot \left(k \cdot k\right)} \cdot \frac{\ell}{t} \]
                12. lift-*.f64N/A

                  \[\leadsto \frac{\ell}{\left(t \cdot t\right) \cdot \left(k \cdot k\right)} \cdot \frac{\ell}{t} \]
                13. unswap-sqrN/A

                  \[\leadsto \frac{\ell}{\left(t \cdot k\right) \cdot \left(t \cdot k\right)} \cdot \frac{\ell}{t} \]
                14. associate-*r*N/A

                  \[\leadsto \frac{\ell}{\left(\left(t \cdot k\right) \cdot t\right) \cdot k} \cdot \frac{\ell}{t} \]
                15. lower-*.f64N/A

                  \[\leadsto \frac{\ell}{\left(\left(t \cdot k\right) \cdot t\right) \cdot k} \cdot \frac{\ell}{t} \]
                16. lower-*.f64N/A

                  \[\leadsto \frac{\ell}{\left(\left(t \cdot k\right) \cdot t\right) \cdot k} \cdot \frac{\ell}{t} \]
                17. *-commutativeN/A

                  \[\leadsto \frac{\ell}{\left(\left(k \cdot t\right) \cdot t\right) \cdot k} \cdot \frac{\ell}{t} \]
                18. lift-*.f6466.7%

                  \[\leadsto \frac{\ell}{\left(\left(k \cdot t\right) \cdot t\right) \cdot k} \cdot \frac{\ell}{t} \]
              10. Applied rewrites66.7%

                \[\leadsto \frac{\ell}{\left(\left(k \cdot t\right) \cdot t\right) \cdot k} \cdot \color{blue}{\frac{\ell}{t}} \]
              11. Add Preprocessing

              Alternative 21: 65.9% accurate, 6.8× speedup?

              \[\ell \cdot \frac{\ell}{t \cdot \left(\left(\left(k \cdot t\right) \cdot k\right) \cdot t\right)} \]
              (FPCore (t l k)
                :precision binary64
                (* l (/ l (* t (* (* (* k t) k) t)))))
              double code(double t, double l, double k) {
              	return l * (l / (t * (((k * t) * k) * t)));
              }
              
              module fmin_fmax_functions
                  implicit none
                  private
                  public fmax
                  public fmin
              
                  interface fmax
                      module procedure fmax88
                      module procedure fmax44
                      module procedure fmax84
                      module procedure fmax48
                  end interface
                  interface fmin
                      module procedure fmin88
                      module procedure fmin44
                      module procedure fmin84
                      module procedure fmin48
                  end interface
              contains
                  real(8) function fmax88(x, y) result (res)
                      real(8), intent (in) :: x
                      real(8), intent (in) :: y
                      res = merge(y, merge(x, max(x, y), y /= y), x /= x)
                  end function
                  real(4) function fmax44(x, y) result (res)
                      real(4), intent (in) :: x
                      real(4), intent (in) :: y
                      res = merge(y, merge(x, max(x, y), y /= y), x /= x)
                  end function
                  real(8) function fmax84(x, y) result(res)
                      real(8), intent (in) :: x
                      real(4), intent (in) :: y
                      res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
                  end function
                  real(8) function fmax48(x, y) result(res)
                      real(4), intent (in) :: x
                      real(8), intent (in) :: y
                      res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
                  end function
                  real(8) function fmin88(x, y) result (res)
                      real(8), intent (in) :: x
                      real(8), intent (in) :: y
                      res = merge(y, merge(x, min(x, y), y /= y), x /= x)
                  end function
                  real(4) function fmin44(x, y) result (res)
                      real(4), intent (in) :: x
                      real(4), intent (in) :: y
                      res = merge(y, merge(x, min(x, y), y /= y), x /= x)
                  end function
                  real(8) function fmin84(x, y) result(res)
                      real(8), intent (in) :: x
                      real(4), intent (in) :: y
                      res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
                  end function
                  real(8) function fmin48(x, y) result(res)
                      real(4), intent (in) :: x
                      real(8), intent (in) :: y
                      res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
                  end function
              end module
              
              real(8) function code(t, l, k)
              use fmin_fmax_functions
                  real(8), intent (in) :: t
                  real(8), intent (in) :: l
                  real(8), intent (in) :: k
                  code = l * (l / (t * (((k * t) * k) * t)))
              end function
              
              public static double code(double t, double l, double k) {
              	return l * (l / (t * (((k * t) * k) * t)));
              }
              
              def code(t, l, k):
              	return l * (l / (t * (((k * t) * k) * t)))
              
              function code(t, l, k)
              	return Float64(l * Float64(l / Float64(t * Float64(Float64(Float64(k * t) * k) * t))))
              end
              
              function tmp = code(t, l, k)
              	tmp = l * (l / (t * (((k * t) * k) * t)));
              end
              
              code[t_, l_, k_] := N[(l * N[(l / N[(t * N[(N[(N[(k * t), $MachinePrecision] * k), $MachinePrecision] * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
              
              \ell \cdot \frac{\ell}{t \cdot \left(\left(\left(k \cdot t\right) \cdot k\right) \cdot t\right)}
              
              Derivation
              1. Initial program 54.7%

                \[\frac{2}{\left(\left(\frac{{t}^{3}}{\ell \cdot \ell} \cdot \sin k\right) \cdot \tan k\right) \cdot \left(\left(1 + {\left(\frac{k}{t}\right)}^{2}\right) + 1\right)} \]
              2. Taylor expanded in k around 0

                \[\leadsto \color{blue}{\frac{{\ell}^{2}}{{k}^{2} \cdot {t}^{3}}} \]
              3. Step-by-step derivation
                1. lower-/.f64N/A

                  \[\leadsto \frac{{\ell}^{2}}{\color{blue}{{k}^{2} \cdot {t}^{3}}} \]
                2. lower-pow.f64N/A

                  \[\leadsto \frac{{\ell}^{2}}{\color{blue}{{k}^{2}} \cdot {t}^{3}} \]
                3. lower-*.f64N/A

                  \[\leadsto \frac{{\ell}^{2}}{{k}^{2} \cdot \color{blue}{{t}^{3}}} \]
                4. lower-pow.f64N/A

                  \[\leadsto \frac{{\ell}^{2}}{{k}^{2} \cdot {\color{blue}{t}}^{3}} \]
                5. lower-pow.f6451.2%

                  \[\leadsto \frac{{\ell}^{2}}{{k}^{2} \cdot {t}^{\color{blue}{3}}} \]
              4. Applied rewrites51.2%

                \[\leadsto \color{blue}{\frac{{\ell}^{2}}{{k}^{2} \cdot {t}^{3}}} \]
              5. Step-by-step derivation
                1. lift-/.f64N/A

                  \[\leadsto \frac{{\ell}^{2}}{\color{blue}{{k}^{2} \cdot {t}^{3}}} \]
                2. lift-pow.f64N/A

                  \[\leadsto \frac{{\ell}^{2}}{\color{blue}{{k}^{2}} \cdot {t}^{3}} \]
                3. pow2N/A

                  \[\leadsto \frac{\ell \cdot \ell}{\color{blue}{{k}^{2}} \cdot {t}^{3}} \]
                4. associate-/l*N/A

                  \[\leadsto \ell \cdot \color{blue}{\frac{\ell}{{k}^{2} \cdot {t}^{3}}} \]
                5. lower-*.f64N/A

                  \[\leadsto \ell \cdot \color{blue}{\frac{\ell}{{k}^{2} \cdot {t}^{3}}} \]
                6. lower-/.f6455.1%

                  \[\leadsto \ell \cdot \frac{\ell}{\color{blue}{{k}^{2} \cdot {t}^{3}}} \]
                7. lift-*.f64N/A

                  \[\leadsto \ell \cdot \frac{\ell}{{k}^{2} \cdot \color{blue}{{t}^{3}}} \]
                8. *-commutativeN/A

                  \[\leadsto \ell \cdot \frac{\ell}{{t}^{3} \cdot \color{blue}{{k}^{2}}} \]
                9. lift-pow.f64N/A

                  \[\leadsto \ell \cdot \frac{\ell}{{t}^{3} \cdot {k}^{\color{blue}{2}}} \]
                10. pow2N/A

                  \[\leadsto \ell \cdot \frac{\ell}{{t}^{3} \cdot \left(k \cdot \color{blue}{k}\right)} \]
                11. associate-*r*N/A

                  \[\leadsto \ell \cdot \frac{\ell}{\left({t}^{3} \cdot k\right) \cdot \color{blue}{k}} \]
                12. lower-*.f64N/A

                  \[\leadsto \ell \cdot \frac{\ell}{\left({t}^{3} \cdot k\right) \cdot \color{blue}{k}} \]
                13. lower-*.f6459.5%

                  \[\leadsto \ell \cdot \frac{\ell}{\left({t}^{3} \cdot k\right) \cdot k} \]
                14. lift-pow.f64N/A

                  \[\leadsto \ell \cdot \frac{\ell}{\left({t}^{3} \cdot k\right) \cdot k} \]
                15. unpow3N/A

                  \[\leadsto \ell \cdot \frac{\ell}{\left(\left(\left(t \cdot t\right) \cdot t\right) \cdot k\right) \cdot k} \]
                16. lift-*.f64N/A

                  \[\leadsto \ell \cdot \frac{\ell}{\left(\left(\left(t \cdot t\right) \cdot t\right) \cdot k\right) \cdot k} \]
                17. lower-*.f6459.5%

                  \[\leadsto \ell \cdot \frac{\ell}{\left(\left(\left(t \cdot t\right) \cdot t\right) \cdot k\right) \cdot k} \]
              6. Applied rewrites59.5%

                \[\leadsto \ell \cdot \color{blue}{\frac{\ell}{\left(\left(\left(t \cdot t\right) \cdot t\right) \cdot k\right) \cdot k}} \]
              7. Step-by-step derivation
                1. lift-*.f64N/A

                  \[\leadsto \ell \cdot \frac{\ell}{\left(\left(\left(t \cdot t\right) \cdot t\right) \cdot k\right) \cdot \color{blue}{k}} \]
                2. lift-*.f64N/A

                  \[\leadsto \ell \cdot \frac{\ell}{\left(\left(\left(t \cdot t\right) \cdot t\right) \cdot k\right) \cdot k} \]
                3. associate-*l*N/A

                  \[\leadsto \ell \cdot \frac{\ell}{\left(\left(t \cdot t\right) \cdot t\right) \cdot \color{blue}{\left(k \cdot k\right)}} \]
                4. lift-*.f64N/A

                  \[\leadsto \ell \cdot \frac{\ell}{\left(\left(t \cdot t\right) \cdot t\right) \cdot \left(\color{blue}{k} \cdot k\right)} \]
                5. *-commutativeN/A

                  \[\leadsto \ell \cdot \frac{\ell}{\left(t \cdot \left(t \cdot t\right)\right) \cdot \left(\color{blue}{k} \cdot k\right)} \]
                6. lift-*.f64N/A

                  \[\leadsto \ell \cdot \frac{\ell}{\left(t \cdot \left(t \cdot t\right)\right) \cdot \left(k \cdot \color{blue}{k}\right)} \]
                7. associate-*l*N/A

                  \[\leadsto \ell \cdot \frac{\ell}{t \cdot \color{blue}{\left(\left(t \cdot t\right) \cdot \left(k \cdot k\right)\right)}} \]
                8. lower-*.f64N/A

                  \[\leadsto \ell \cdot \frac{\ell}{t \cdot \color{blue}{\left(\left(t \cdot t\right) \cdot \left(k \cdot k\right)\right)}} \]
                9. lower-*.f6458.1%

                  \[\leadsto \ell \cdot \frac{\ell}{t \cdot \left(\left(t \cdot t\right) \cdot \color{blue}{\left(k \cdot k\right)}\right)} \]
              8. Applied rewrites58.1%

                \[\leadsto \ell \cdot \frac{\ell}{t \cdot \color{blue}{\left(\left(t \cdot t\right) \cdot \left(k \cdot k\right)\right)}} \]
              9. Step-by-step derivation
                1. lift-*.f64N/A

                  \[\leadsto \ell \cdot \frac{\ell}{t \cdot \left(\left(t \cdot t\right) \cdot \color{blue}{\left(k \cdot k\right)}\right)} \]
                2. *-commutativeN/A

                  \[\leadsto \ell \cdot \frac{\ell}{t \cdot \left(\left(k \cdot k\right) \cdot \color{blue}{\left(t \cdot t\right)}\right)} \]
                3. lift-*.f64N/A

                  \[\leadsto \ell \cdot \frac{\ell}{t \cdot \left(\left(k \cdot k\right) \cdot \left(t \cdot \color{blue}{t}\right)\right)} \]
                4. associate-*r*N/A

                  \[\leadsto \ell \cdot \frac{\ell}{t \cdot \left(\left(\left(k \cdot k\right) \cdot t\right) \cdot \color{blue}{t}\right)} \]
                5. lower-*.f64N/A

                  \[\leadsto \ell \cdot \frac{\ell}{t \cdot \left(\left(\left(k \cdot k\right) \cdot t\right) \cdot \color{blue}{t}\right)} \]
                6. *-commutativeN/A

                  \[\leadsto \ell \cdot \frac{\ell}{t \cdot \left(\left(t \cdot \left(k \cdot k\right)\right) \cdot t\right)} \]
                7. lift-*.f64N/A

                  \[\leadsto \ell \cdot \frac{\ell}{t \cdot \left(\left(t \cdot \left(k \cdot k\right)\right) \cdot t\right)} \]
                8. associate-*r*N/A

                  \[\leadsto \ell \cdot \frac{\ell}{t \cdot \left(\left(\left(t \cdot k\right) \cdot k\right) \cdot t\right)} \]
                9. lower-*.f64N/A

                  \[\leadsto \ell \cdot \frac{\ell}{t \cdot \left(\left(\left(t \cdot k\right) \cdot k\right) \cdot t\right)} \]
                10. *-commutativeN/A

                  \[\leadsto \ell \cdot \frac{\ell}{t \cdot \left(\left(\left(k \cdot t\right) \cdot k\right) \cdot t\right)} \]
                11. lift-*.f6464.7%

                  \[\leadsto \ell \cdot \frac{\ell}{t \cdot \left(\left(\left(k \cdot t\right) \cdot k\right) \cdot t\right)} \]
              10. Applied rewrites64.7%

                \[\leadsto \ell \cdot \frac{\ell}{t \cdot \left(\left(\left(k \cdot t\right) \cdot k\right) \cdot \color{blue}{t}\right)} \]
              11. Add Preprocessing

              Alternative 22: 64.7% accurate, 6.8× speedup?

              \[\ell \cdot \frac{\ell}{t \cdot \left(\left(k \cdot t\right) \cdot \left(k \cdot t\right)\right)} \]
              (FPCore (t l k)
                :precision binary64
                (* l (/ l (* t (* (* k t) (* k t))))))
              double code(double t, double l, double k) {
              	return l * (l / (t * ((k * t) * (k * t))));
              }
              
              module fmin_fmax_functions
                  implicit none
                  private
                  public fmax
                  public fmin
              
                  interface fmax
                      module procedure fmax88
                      module procedure fmax44
                      module procedure fmax84
                      module procedure fmax48
                  end interface
                  interface fmin
                      module procedure fmin88
                      module procedure fmin44
                      module procedure fmin84
                      module procedure fmin48
                  end interface
              contains
                  real(8) function fmax88(x, y) result (res)
                      real(8), intent (in) :: x
                      real(8), intent (in) :: y
                      res = merge(y, merge(x, max(x, y), y /= y), x /= x)
                  end function
                  real(4) function fmax44(x, y) result (res)
                      real(4), intent (in) :: x
                      real(4), intent (in) :: y
                      res = merge(y, merge(x, max(x, y), y /= y), x /= x)
                  end function
                  real(8) function fmax84(x, y) result(res)
                      real(8), intent (in) :: x
                      real(4), intent (in) :: y
                      res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
                  end function
                  real(8) function fmax48(x, y) result(res)
                      real(4), intent (in) :: x
                      real(8), intent (in) :: y
                      res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
                  end function
                  real(8) function fmin88(x, y) result (res)
                      real(8), intent (in) :: x
                      real(8), intent (in) :: y
                      res = merge(y, merge(x, min(x, y), y /= y), x /= x)
                  end function
                  real(4) function fmin44(x, y) result (res)
                      real(4), intent (in) :: x
                      real(4), intent (in) :: y
                      res = merge(y, merge(x, min(x, y), y /= y), x /= x)
                  end function
                  real(8) function fmin84(x, y) result(res)
                      real(8), intent (in) :: x
                      real(4), intent (in) :: y
                      res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
                  end function
                  real(8) function fmin48(x, y) result(res)
                      real(4), intent (in) :: x
                      real(8), intent (in) :: y
                      res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
                  end function
              end module
              
              real(8) function code(t, l, k)
              use fmin_fmax_functions
                  real(8), intent (in) :: t
                  real(8), intent (in) :: l
                  real(8), intent (in) :: k
                  code = l * (l / (t * ((k * t) * (k * t))))
              end function
              
              public static double code(double t, double l, double k) {
              	return l * (l / (t * ((k * t) * (k * t))));
              }
              
              def code(t, l, k):
              	return l * (l / (t * ((k * t) * (k * t))))
              
              function code(t, l, k)
              	return Float64(l * Float64(l / Float64(t * Float64(Float64(k * t) * Float64(k * t)))))
              end
              
              function tmp = code(t, l, k)
              	tmp = l * (l / (t * ((k * t) * (k * t))));
              end
              
              code[t_, l_, k_] := N[(l * N[(l / N[(t * N[(N[(k * t), $MachinePrecision] * N[(k * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
              
              \ell \cdot \frac{\ell}{t \cdot \left(\left(k \cdot t\right) \cdot \left(k \cdot t\right)\right)}
              
              Derivation
              1. Initial program 54.7%

                \[\frac{2}{\left(\left(\frac{{t}^{3}}{\ell \cdot \ell} \cdot \sin k\right) \cdot \tan k\right) \cdot \left(\left(1 + {\left(\frac{k}{t}\right)}^{2}\right) + 1\right)} \]
              2. Taylor expanded in k around 0

                \[\leadsto \color{blue}{\frac{{\ell}^{2}}{{k}^{2} \cdot {t}^{3}}} \]
              3. Step-by-step derivation
                1. lower-/.f64N/A

                  \[\leadsto \frac{{\ell}^{2}}{\color{blue}{{k}^{2} \cdot {t}^{3}}} \]
                2. lower-pow.f64N/A

                  \[\leadsto \frac{{\ell}^{2}}{\color{blue}{{k}^{2}} \cdot {t}^{3}} \]
                3. lower-*.f64N/A

                  \[\leadsto \frac{{\ell}^{2}}{{k}^{2} \cdot \color{blue}{{t}^{3}}} \]
                4. lower-pow.f64N/A

                  \[\leadsto \frac{{\ell}^{2}}{{k}^{2} \cdot {\color{blue}{t}}^{3}} \]
                5. lower-pow.f6451.2%

                  \[\leadsto \frac{{\ell}^{2}}{{k}^{2} \cdot {t}^{\color{blue}{3}}} \]
              4. Applied rewrites51.2%

                \[\leadsto \color{blue}{\frac{{\ell}^{2}}{{k}^{2} \cdot {t}^{3}}} \]
              5. Step-by-step derivation
                1. lift-/.f64N/A

                  \[\leadsto \frac{{\ell}^{2}}{\color{blue}{{k}^{2} \cdot {t}^{3}}} \]
                2. lift-pow.f64N/A

                  \[\leadsto \frac{{\ell}^{2}}{\color{blue}{{k}^{2}} \cdot {t}^{3}} \]
                3. pow2N/A

                  \[\leadsto \frac{\ell \cdot \ell}{\color{blue}{{k}^{2}} \cdot {t}^{3}} \]
                4. associate-/l*N/A

                  \[\leadsto \ell \cdot \color{blue}{\frac{\ell}{{k}^{2} \cdot {t}^{3}}} \]
                5. lower-*.f64N/A

                  \[\leadsto \ell \cdot \color{blue}{\frac{\ell}{{k}^{2} \cdot {t}^{3}}} \]
                6. lower-/.f6455.1%

                  \[\leadsto \ell \cdot \frac{\ell}{\color{blue}{{k}^{2} \cdot {t}^{3}}} \]
                7. lift-*.f64N/A

                  \[\leadsto \ell \cdot \frac{\ell}{{k}^{2} \cdot \color{blue}{{t}^{3}}} \]
                8. *-commutativeN/A

                  \[\leadsto \ell \cdot \frac{\ell}{{t}^{3} \cdot \color{blue}{{k}^{2}}} \]
                9. lift-pow.f64N/A

                  \[\leadsto \ell \cdot \frac{\ell}{{t}^{3} \cdot {k}^{\color{blue}{2}}} \]
                10. pow2N/A

                  \[\leadsto \ell \cdot \frac{\ell}{{t}^{3} \cdot \left(k \cdot \color{blue}{k}\right)} \]
                11. associate-*r*N/A

                  \[\leadsto \ell \cdot \frac{\ell}{\left({t}^{3} \cdot k\right) \cdot \color{blue}{k}} \]
                12. lower-*.f64N/A

                  \[\leadsto \ell \cdot \frac{\ell}{\left({t}^{3} \cdot k\right) \cdot \color{blue}{k}} \]
                13. lower-*.f6459.5%

                  \[\leadsto \ell \cdot \frac{\ell}{\left({t}^{3} \cdot k\right) \cdot k} \]
                14. lift-pow.f64N/A

                  \[\leadsto \ell \cdot \frac{\ell}{\left({t}^{3} \cdot k\right) \cdot k} \]
                15. unpow3N/A

                  \[\leadsto \ell \cdot \frac{\ell}{\left(\left(\left(t \cdot t\right) \cdot t\right) \cdot k\right) \cdot k} \]
                16. lift-*.f64N/A

                  \[\leadsto \ell \cdot \frac{\ell}{\left(\left(\left(t \cdot t\right) \cdot t\right) \cdot k\right) \cdot k} \]
                17. lower-*.f6459.5%

                  \[\leadsto \ell \cdot \frac{\ell}{\left(\left(\left(t \cdot t\right) \cdot t\right) \cdot k\right) \cdot k} \]
              6. Applied rewrites59.5%

                \[\leadsto \ell \cdot \color{blue}{\frac{\ell}{\left(\left(\left(t \cdot t\right) \cdot t\right) \cdot k\right) \cdot k}} \]
              7. Step-by-step derivation
                1. lift-*.f64N/A

                  \[\leadsto \ell \cdot \frac{\ell}{\left(\left(\left(t \cdot t\right) \cdot t\right) \cdot k\right) \cdot \color{blue}{k}} \]
                2. lift-*.f64N/A

                  \[\leadsto \ell \cdot \frac{\ell}{\left(\left(\left(t \cdot t\right) \cdot t\right) \cdot k\right) \cdot k} \]
                3. associate-*l*N/A

                  \[\leadsto \ell \cdot \frac{\ell}{\left(\left(t \cdot t\right) \cdot t\right) \cdot \color{blue}{\left(k \cdot k\right)}} \]
                4. lift-*.f64N/A

                  \[\leadsto \ell \cdot \frac{\ell}{\left(\left(t \cdot t\right) \cdot t\right) \cdot \left(\color{blue}{k} \cdot k\right)} \]
                5. *-commutativeN/A

                  \[\leadsto \ell \cdot \frac{\ell}{\left(t \cdot \left(t \cdot t\right)\right) \cdot \left(\color{blue}{k} \cdot k\right)} \]
                6. lift-*.f64N/A

                  \[\leadsto \ell \cdot \frac{\ell}{\left(t \cdot \left(t \cdot t\right)\right) \cdot \left(k \cdot \color{blue}{k}\right)} \]
                7. associate-*l*N/A

                  \[\leadsto \ell \cdot \frac{\ell}{t \cdot \color{blue}{\left(\left(t \cdot t\right) \cdot \left(k \cdot k\right)\right)}} \]
                8. lower-*.f64N/A

                  \[\leadsto \ell \cdot \frac{\ell}{t \cdot \color{blue}{\left(\left(t \cdot t\right) \cdot \left(k \cdot k\right)\right)}} \]
                9. lower-*.f6458.1%

                  \[\leadsto \ell \cdot \frac{\ell}{t \cdot \left(\left(t \cdot t\right) \cdot \color{blue}{\left(k \cdot k\right)}\right)} \]
              8. Applied rewrites58.1%

                \[\leadsto \ell \cdot \frac{\ell}{t \cdot \color{blue}{\left(\left(t \cdot t\right) \cdot \left(k \cdot k\right)\right)}} \]
              9. Step-by-step derivation
                1. lift-*.f64N/A

                  \[\leadsto \ell \cdot \frac{\ell}{t \cdot \left(\left(t \cdot t\right) \cdot \color{blue}{\left(k \cdot k\right)}\right)} \]
                2. lift-*.f64N/A

                  \[\leadsto \ell \cdot \frac{\ell}{t \cdot \left(\left(t \cdot t\right) \cdot \left(\color{blue}{k} \cdot k\right)\right)} \]
                3. lift-*.f64N/A

                  \[\leadsto \ell \cdot \frac{\ell}{t \cdot \left(\left(t \cdot t\right) \cdot \left(k \cdot \color{blue}{k}\right)\right)} \]
                4. unswap-sqrN/A

                  \[\leadsto \ell \cdot \frac{\ell}{t \cdot \left(\left(t \cdot k\right) \cdot \color{blue}{\left(t \cdot k\right)}\right)} \]
                5. lower-*.f64N/A

                  \[\leadsto \ell \cdot \frac{\ell}{t \cdot \left(\left(t \cdot k\right) \cdot \color{blue}{\left(t \cdot k\right)}\right)} \]
                6. *-commutativeN/A

                  \[\leadsto \ell \cdot \frac{\ell}{t \cdot \left(\left(k \cdot t\right) \cdot \left(\color{blue}{t} \cdot k\right)\right)} \]
                7. lift-*.f64N/A

                  \[\leadsto \ell \cdot \frac{\ell}{t \cdot \left(\left(k \cdot t\right) \cdot \left(\color{blue}{t} \cdot k\right)\right)} \]
                8. *-commutativeN/A

                  \[\leadsto \ell \cdot \frac{\ell}{t \cdot \left(\left(k \cdot t\right) \cdot \left(k \cdot \color{blue}{t}\right)\right)} \]
                9. lift-*.f6465.9%

                  \[\leadsto \ell \cdot \frac{\ell}{t \cdot \left(\left(k \cdot t\right) \cdot \left(k \cdot \color{blue}{t}\right)\right)} \]
              10. Applied rewrites65.9%

                \[\leadsto \ell \cdot \frac{\ell}{t \cdot \left(\left(k \cdot t\right) \cdot \color{blue}{\left(k \cdot t\right)}\right)} \]
              11. Add Preprocessing

              Reproduce

              ?
              herbie shell --seed 2025210 
              (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))))