Toniolo and Linder, Equation (10+)

Percentage Accurate: 54.6% → 84.3%
Time: 9.4s
Alternatives: 29
Speedup: 1.6×

Specification

?
\[\begin{array}{l} \\ \frac{2}{\left(\left(\frac{{t}^{3}}{\ell \cdot \ell} \cdot \sin k\right) \cdot \tan k\right) \cdot \left(\left(1 + {\left(\frac{k}{t}\right)}^{2}\right) + 1\right)} \end{array} \]
(FPCore (t l k)
 :precision binary64
 (/
  2.0
  (*
   (* (* (/ (pow t 3.0) (* l l)) (sin k)) (tan k))
   (+ (+ 1.0 (pow (/ k t) 2.0)) 1.0))))
double code(double t, double l, double k) {
	return 2.0 / ((((pow(t, 3.0) / (l * l)) * sin(k)) * tan(k)) * ((1.0 + pow((k / t), 2.0)) + 1.0));
}
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]
\begin{array}{l}

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

Sampling outcomes in binary64 precision:

Local Percentage Accuracy vs ?

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

Accuracy vs Speed?

Herbie found 29 alternatives:

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

Initial Program: 54.6% accurate, 1.0× speedup?

\[\begin{array}{l} \\ \frac{2}{\left(\left(\frac{{t}^{3}}{\ell \cdot \ell} \cdot \sin k\right) \cdot \tan k\right) \cdot \left(\left(1 + {\left(\frac{k}{t}\right)}^{2}\right) + 1\right)} \end{array} \]
(FPCore (t l k)
 :precision binary64
 (/
  2.0
  (*
   (* (* (/ (pow t 3.0) (* l l)) (sin k)) (tan k))
   (+ (+ 1.0 (pow (/ k t) 2.0)) 1.0))))
double code(double t, double l, double k) {
	return 2.0 / ((((pow(t, 3.0) / (l * l)) * sin(k)) * tan(k)) * ((1.0 + pow((k / t), 2.0)) + 1.0));
}
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]
\begin{array}{l}

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

Alternative 1: 84.3% accurate, 0.5× speedup?

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

\\
\begin{array}{l}
t_2 := \log l\_m \cdot 2\\
t_3 := \log t\_m \cdot 3\\
t\_s \cdot \begin{array}{l}
\mathbf{if}\;t\_m \leq 9 \cdot 10^{-6}:\\
\;\;\;\;\frac{2}{\left(\frac{k}{l\_m} \cdot \frac{k}{l\_m}\right) \cdot \frac{t\_m \cdot {\sin k}^{2}}{\cos k}}\\

\mathbf{else}:\\
\;\;\;\;\frac{2}{\left(\left(e^{\frac{t\_3 \cdot t\_3 - t\_2 \cdot t\_2}{t\_3 + t\_2}} \cdot \sin k\right) \cdot \tan k\right) \cdot \left(\left(1 + \frac{k}{t\_m} \cdot \frac{k}{t\_m}\right) + 1\right)}\\


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

    1. Initial program 48.7%

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \frac{2}{\left(\left(k \cdot k\right) \cdot \frac{t}{{\ell}^{2}}\right) \cdot \left(k \cdot k\right)} \]
      6. pow2N/A

        \[\leadsto \frac{2}{\left(\left(k \cdot k\right) \cdot \frac{t}{\ell \cdot \ell}\right) \cdot \left(k \cdot k\right)} \]
      7. lift-*.f6455.0

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

      \[\leadsto \frac{2}{\left(\left(k \cdot k\right) \cdot \frac{t}{\ell \cdot \ell}\right) \cdot \left(\color{blue}{k} \cdot k\right)} \]
    9. 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}}} \]
    10. Step-by-step derivation
      1. times-fracN/A

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \frac{2}{\left(\frac{k}{\ell} \cdot \frac{k}{\ell}\right) \cdot \frac{t \cdot {\sin k}^{2}}{\cos k}} \]
      13. lower-cos.f6472.8

        \[\leadsto \frac{2}{\left(\frac{k}{\ell} \cdot \frac{k}{\ell}\right) \cdot \frac{t \cdot {\sin k}^{2}}{\cos k}} \]
    11. Applied rewrites72.8%

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

    if 9.00000000000000023e-6 < t

    1. Initial program 67.1%

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

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

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

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

        \[\leadsto \frac{2}{\left(\left(\frac{\color{blue}{e^{\log t \cdot 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)} \]
      5. pow2N/A

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

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

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

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

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

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

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

        \[\leadsto \frac{2}{\left(\left(e^{\log t \cdot 3 - \color{blue}{\log \ell \cdot 2}} \cdot \sin k\right) \cdot \tan k\right) \cdot \left(\left(1 + {\left(\frac{k}{t}\right)}^{2}\right) + 1\right)} \]
      13. lower-log.f6442.3

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 2: 83.1% accurate, 0.2× speedup?

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

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

\mathbf{elif}\;t\_2 \leq 0:\\
\;\;\;\;\frac{2}{\frac{{\left(k \cdot t\_m\right)}^{2} \cdot \left(\left(k \cdot k\right) \cdot 0.3333333333333333 + 2\right) + {k}^{4}}{l\_m \cdot l\_m} \cdot t\_m}\\

\mathbf{elif}\;t\_2 \leq 2 \cdot 10^{+275}:\\
\;\;\;\;t\_2\\

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


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

    1. Initial program 83.4%

      \[\frac{2}{\left(\left(\frac{{t}^{3}}{\ell \cdot \ell} \cdot \sin k\right) \cdot \tan k\right) \cdot \left(\left(1 + {\left(\frac{k}{t}\right)}^{2}\right) + 1\right)} \]
    2. Add Preprocessing
    3. Applied rewrites79.5%

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

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

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

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

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

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

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

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

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

    if -5.00000000000000003e-184 < (/.f64 #s(literal 2 binary64) (*.f64 (*.f64 (*.f64 (/.f64 (pow.f64 t #s(literal 3 binary64)) (*.f64 l l)) (sin.f64 k)) (tan.f64 k)) (+.f64 (+.f64 #s(literal 1 binary64) (pow.f64 (/.f64 k t) #s(literal 2 binary64))) #s(literal 1 binary64)))) < 0.0

    1. Initial program 77.8%

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

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

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

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

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

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

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

        \[\leadsto \frac{2}{\left(\frac{{k}^{2} \cdot \left({t}^{2} \cdot \left(2 + \frac{1}{3} \cdot {k}^{2}\right)\right)}{{\ell}^{2}} + \frac{{k}^{4}}{{\ell}^{2}}\right) \cdot t} \]
    8. Applied rewrites83.6%

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

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

    1. Initial program 95.8%

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

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

    1. Initial program 18.5%

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \frac{2}{\left(\left(k \cdot k\right) \cdot \frac{t}{{\ell}^{2}}\right) \cdot \left(k \cdot k\right)} \]
      6. pow2N/A

        \[\leadsto \frac{2}{\left(\left(k \cdot k\right) \cdot \frac{t}{\ell \cdot \ell}\right) \cdot \left(k \cdot k\right)} \]
      7. lift-*.f6445.0

        \[\leadsto \frac{2}{\left(\left(k \cdot k\right) \cdot \frac{t}{\ell \cdot \ell}\right) \cdot \left(k \cdot k\right)} \]
    8. Applied rewrites45.0%

      \[\leadsto \frac{2}{\left(\left(k \cdot k\right) \cdot \frac{t}{\ell \cdot \ell}\right) \cdot \left(\color{blue}{k} \cdot k\right)} \]
    9. 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}}} \]
    10. Step-by-step derivation
      1. times-fracN/A

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \frac{2}{\left(\frac{k}{\ell} \cdot \frac{k}{\ell}\right) \cdot \frac{t \cdot {\sin k}^{2}}{\cos k}} \]
      13. lower-cos.f6477.0

        \[\leadsto \frac{2}{\left(\frac{k}{\ell} \cdot \frac{k}{\ell}\right) \cdot \frac{t \cdot {\sin k}^{2}}{\cos k}} \]
    11. Applied rewrites77.0%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;\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)} \leq -5 \cdot 10^{-184}:\\ \;\;\;\;\frac{\frac{2}{\frac{\frac{{t}^{3}}{\ell}}{\ell} \cdot \left(\sin k \cdot \tan k\right)}}{\left(\frac{k \cdot k}{t \cdot t} + 1\right) + 1}\\ \mathbf{elif}\;\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)} \leq 0:\\ \;\;\;\;\frac{2}{\frac{{\left(k \cdot t\right)}^{2} \cdot \left(\left(k \cdot k\right) \cdot 0.3333333333333333 + 2\right) + {k}^{4}}{\ell \cdot \ell} \cdot t}\\ \mathbf{elif}\;\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)} \leq 2 \cdot 10^{+275}:\\ \;\;\;\;\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)}\\ \mathbf{else}:\\ \;\;\;\;\frac{2}{\left(\frac{k}{\ell} \cdot \frac{k}{\ell}\right) \cdot \frac{t \cdot {\sin k}^{2}}{\cos k}}\\ \end{array} \]
  5. Add Preprocessing

Alternative 3: 83.0% accurate, 0.3× speedup?

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

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

\mathbf{elif}\;t\_3 \leq 0:\\
\;\;\;\;\frac{2}{\frac{{\left(k \cdot t\_m\right)}^{2} \cdot \left(\left(k \cdot k\right) \cdot 0.3333333333333333 + 2\right) + {k}^{4}}{l\_m \cdot l\_m} \cdot t\_m}\\

\mathbf{elif}\;t\_3 \leq 2 \cdot 10^{+275}:\\
\;\;\;\;\frac{2}{\left(\left(\frac{\left(t\_m \cdot t\_m\right) \cdot t\_m}{l\_m \cdot l\_m} \cdot \sin k\right) \cdot \tan k\right) \cdot \left(\left(1 + t\_2\right) + 1\right)}\\

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


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

    1. Initial program 83.4%

      \[\frac{2}{\left(\left(\frac{{t}^{3}}{\ell \cdot \ell} \cdot \sin k\right) \cdot \tan k\right) \cdot \left(\left(1 + {\left(\frac{k}{t}\right)}^{2}\right) + 1\right)} \]
    2. Add Preprocessing
    3. Applied rewrites79.5%

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

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

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

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

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

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

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

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

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

    if -5.00000000000000003e-184 < (/.f64 #s(literal 2 binary64) (*.f64 (*.f64 (*.f64 (/.f64 (pow.f64 t #s(literal 3 binary64)) (*.f64 l l)) (sin.f64 k)) (tan.f64 k)) (+.f64 (+.f64 #s(literal 1 binary64) (pow.f64 (/.f64 k t) #s(literal 2 binary64))) #s(literal 1 binary64)))) < 0.0

    1. Initial program 77.8%

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

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

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

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

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

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

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

        \[\leadsto \frac{2}{\left(\frac{{k}^{2} \cdot \left({t}^{2} \cdot \left(2 + \frac{1}{3} \cdot {k}^{2}\right)\right)}{{\ell}^{2}} + \frac{{k}^{4}}{{\ell}^{2}}\right) \cdot t} \]
    8. Applied rewrites83.6%

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

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

    1. Initial program 95.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    1. Initial program 18.5%

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \frac{2}{\left(\left(k \cdot k\right) \cdot \frac{t}{{\ell}^{2}}\right) \cdot \left(k \cdot k\right)} \]
      6. pow2N/A

        \[\leadsto \frac{2}{\left(\left(k \cdot k\right) \cdot \frac{t}{\ell \cdot \ell}\right) \cdot \left(k \cdot k\right)} \]
      7. lift-*.f6445.0

        \[\leadsto \frac{2}{\left(\left(k \cdot k\right) \cdot \frac{t}{\ell \cdot \ell}\right) \cdot \left(k \cdot k\right)} \]
    8. Applied rewrites45.0%

      \[\leadsto \frac{2}{\left(\left(k \cdot k\right) \cdot \frac{t}{\ell \cdot \ell}\right) \cdot \left(\color{blue}{k} \cdot k\right)} \]
    9. 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}}} \]
    10. Step-by-step derivation
      1. times-fracN/A

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \frac{2}{\left(\frac{k}{\ell} \cdot \frac{k}{\ell}\right) \cdot \frac{t \cdot {\sin k}^{2}}{\cos k}} \]
      13. lower-cos.f6477.0

        \[\leadsto \frac{2}{\left(\frac{k}{\ell} \cdot \frac{k}{\ell}\right) \cdot \frac{t \cdot {\sin k}^{2}}{\cos k}} \]
    11. Applied rewrites77.0%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;\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)} \leq -5 \cdot 10^{-184}:\\ \;\;\;\;\frac{\frac{2}{\frac{\frac{{t}^{3}}{\ell}}{\ell} \cdot \left(\sin k \cdot \tan k\right)}}{\left(\frac{k \cdot k}{t \cdot t} + 1\right) + 1}\\ \mathbf{elif}\;\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)} \leq 0:\\ \;\;\;\;\frac{2}{\frac{{\left(k \cdot t\right)}^{2} \cdot \left(\left(k \cdot k\right) \cdot 0.3333333333333333 + 2\right) + {k}^{4}}{\ell \cdot \ell} \cdot t}\\ \mathbf{elif}\;\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)} \leq 2 \cdot 10^{+275}:\\ \;\;\;\;\frac{2}{\left(\left(\frac{\left(t \cdot t\right) \cdot t}{\ell \cdot \ell} \cdot \sin k\right) \cdot \tan k\right) \cdot \left(\left(1 + \frac{k \cdot k}{t \cdot t}\right) + 1\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{2}{\left(\frac{k}{\ell} \cdot \frac{k}{\ell}\right) \cdot \frac{t \cdot {\sin k}^{2}}{\cos k}}\\ \end{array} \]
  5. Add Preprocessing

Alternative 4: 83.1% accurate, 0.3× speedup?

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

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

\mathbf{elif}\;t\_2 \leq 0:\\
\;\;\;\;\frac{2}{\frac{{\left(k \cdot t\_m\right)}^{2} \cdot \left(\left(k \cdot k\right) \cdot 0.3333333333333333 + 2\right) + {k}^{4}}{l\_m \cdot l\_m} \cdot t\_m}\\

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

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


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

    1. Initial program 83.4%

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

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

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

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

        \[\leadsto \frac{2}{\left(\left(\frac{\color{blue}{e^{\log t \cdot 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)} \]
      5. pow2N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -5.00000000000000003e-184 < (/.f64 #s(literal 2 binary64) (*.f64 (*.f64 (*.f64 (/.f64 (pow.f64 t #s(literal 3 binary64)) (*.f64 l l)) (sin.f64 k)) (tan.f64 k)) (+.f64 (+.f64 #s(literal 1 binary64) (pow.f64 (/.f64 k t) #s(literal 2 binary64))) #s(literal 1 binary64)))) < 0.0

    1. Initial program 77.8%

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

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

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

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

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

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

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

        \[\leadsto \frac{2}{\left(\frac{{k}^{2} \cdot \left({t}^{2} \cdot \left(2 + \frac{1}{3} \cdot {k}^{2}\right)\right)}{{\ell}^{2}} + \frac{{k}^{4}}{{\ell}^{2}}\right) \cdot t} \]
    8. Applied rewrites83.6%

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

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

    1. Initial program 95.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    1. Initial program 18.5%

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \frac{2}{\left(\left(k \cdot k\right) \cdot \frac{t}{{\ell}^{2}}\right) \cdot \left(k \cdot k\right)} \]
      6. pow2N/A

        \[\leadsto \frac{2}{\left(\left(k \cdot k\right) \cdot \frac{t}{\ell \cdot \ell}\right) \cdot \left(k \cdot k\right)} \]
      7. lift-*.f6445.0

        \[\leadsto \frac{2}{\left(\left(k \cdot k\right) \cdot \frac{t}{\ell \cdot \ell}\right) \cdot \left(k \cdot k\right)} \]
    8. Applied rewrites45.0%

      \[\leadsto \frac{2}{\left(\left(k \cdot k\right) \cdot \frac{t}{\ell \cdot \ell}\right) \cdot \left(\color{blue}{k} \cdot k\right)} \]
    9. 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}}} \]
    10. Step-by-step derivation
      1. times-fracN/A

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \frac{2}{\left(\frac{k}{\ell} \cdot \frac{k}{\ell}\right) \cdot \frac{t \cdot {\sin k}^{2}}{\cos k}} \]
      13. lower-cos.f6477.0

        \[\leadsto \frac{2}{\left(\frac{k}{\ell} \cdot \frac{k}{\ell}\right) \cdot \frac{t \cdot {\sin k}^{2}}{\cos k}} \]
    11. Applied rewrites77.0%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;\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)} \leq -5 \cdot 10^{-184}:\\ \;\;\;\;\frac{2}{\frac{\frac{{t}^{3}}{\ell} \cdot \left(\tan k \cdot \sin k\right)}{\ell} \cdot \left(\left(1 + \frac{k}{t} \cdot \frac{k}{t}\right) + 1\right)}\\ \mathbf{elif}\;\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)} \leq 0:\\ \;\;\;\;\frac{2}{\frac{{\left(k \cdot t\right)}^{2} \cdot \left(\left(k \cdot k\right) \cdot 0.3333333333333333 + 2\right) + {k}^{4}}{\ell \cdot \ell} \cdot t}\\ \mathbf{elif}\;\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)} \leq 2 \cdot 10^{+275}:\\ \;\;\;\;\frac{2}{\left(\left(\frac{\left(t \cdot t\right) \cdot t}{\ell \cdot \ell} \cdot \sin k\right) \cdot \tan k\right) \cdot \left(\left(1 + \frac{k \cdot k}{t \cdot t}\right) + 1\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{2}{\left(\frac{k}{\ell} \cdot \frac{k}{\ell}\right) \cdot \frac{t \cdot {\sin k}^{2}}{\cos k}}\\ \end{array} \]
  5. Add Preprocessing

Alternative 5: 69.2% accurate, 0.4× speedup?

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

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

\mathbf{elif}\;t\_2 \leq 2 \cdot 10^{+275}:\\
\;\;\;\;\frac{2}{\left(\left(\frac{\left(t\_m \cdot t\_m\right) \cdot t\_m}{l\_m \cdot l\_m} \cdot \sin k\right) \cdot \tan k\right) \cdot 2}\\

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


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

    1. Initial program 79.0%

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

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

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

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

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

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

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

        \[\leadsto \frac{\ell \cdot \ell}{\left(k \cdot k\right) \cdot {\color{blue}{t}}^{3}} \]
      7. lift-pow.f6468.3

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

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

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

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

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

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

        \[\leadsto \frac{\ell \cdot \ell}{\left(k \cdot k\right) \cdot \left(\left(t \cdot t\right) \cdot t\right)} \]
      6. lift-*.f6468.3

        \[\leadsto \frac{\ell \cdot \ell}{\left(k \cdot k\right) \cdot \left(\left(t \cdot t\right) \cdot t\right)} \]
    7. Applied rewrites68.3%

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

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

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

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

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

        \[\leadsto \frac{\ell \cdot \ell}{{k}^{2} \cdot \left(\left(t \cdot t\right) \cdot t\right)} \]
      6. pow2N/A

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

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

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

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

        \[\leadsto \frac{\ell \cdot \ell}{{\left(k \cdot t\right)}^{2} \cdot t} \]
      11. lower-*.f6477.7

        \[\leadsto \frac{\ell \cdot \ell}{{\left(k \cdot t\right)}^{2} \cdot t} \]
    9. Applied rewrites77.7%

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

    if 2.0000000000000001e-253 < (/.f64 #s(literal 2 binary64) (*.f64 (*.f64 (*.f64 (/.f64 (pow.f64 t #s(literal 3 binary64)) (*.f64 l l)) (sin.f64 k)) (tan.f64 k)) (+.f64 (+.f64 #s(literal 1 binary64) (pow.f64 (/.f64 k t) #s(literal 2 binary64))) #s(literal 1 binary64)))) < 1.99999999999999992e275

    1. Initial program 95.6%

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

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

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

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

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

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

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

          \[\leadsto \frac{2}{\left(\left(\frac{\color{blue}{\left(t \cdot t\right)} \cdot t}{\ell \cdot \ell} \cdot \sin k\right) \cdot \tan k\right) \cdot 2} \]
        6. lift-*.f6442.7

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

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

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

      1. Initial program 18.5%

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

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

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

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

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

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

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

          \[\leadsto \frac{2}{\left(\left({t}^{2} \cdot \left(\frac{1}{3} \cdot \frac{{k}^{2}}{{\ell}^{2}} + 2 \cdot \frac{1}{{\ell}^{2}}\right) + \frac{{k}^{2}}{{\ell}^{2}}\right) \cdot t\right) \cdot \left(k \cdot k\right)} \]
      8. Applied rewrites36.3%

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

        \[\leadsto \frac{2}{\left(\frac{{k}^{2}}{{\ell}^{2}} \cdot t\right) \cdot \left(k \cdot k\right)} \]
      10. Step-by-step derivation
        1. pow2N/A

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

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

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

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

          \[\leadsto \frac{2}{\left(\left(\frac{k}{\ell} \cdot \frac{k}{\ell}\right) \cdot t\right) \cdot \left(k \cdot k\right)} \]
        6. lower-/.f6455.6

          \[\leadsto \frac{2}{\left(\left(\frac{k}{\ell} \cdot \frac{k}{\ell}\right) \cdot t\right) \cdot \left(k \cdot k\right)} \]
      11. Applied rewrites55.6%

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

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

    Alternative 6: 69.0% accurate, 0.4× speedup?

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

      1. Initial program 79.0%

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

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

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

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

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

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

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

          \[\leadsto \frac{\ell \cdot \ell}{\left(k \cdot k\right) \cdot {\color{blue}{t}}^{3}} \]
        7. lift-pow.f6468.3

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

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

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

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

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

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

          \[\leadsto \frac{\ell \cdot \ell}{\left(k \cdot k\right) \cdot \left(\left(t \cdot t\right) \cdot t\right)} \]
        6. lift-*.f6468.3

          \[\leadsto \frac{\ell \cdot \ell}{\left(k \cdot k\right) \cdot \left(\left(t \cdot t\right) \cdot t\right)} \]
      7. Applied rewrites68.3%

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

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

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

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

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

          \[\leadsto \frac{\ell \cdot \ell}{{k}^{2} \cdot \left(\left(t \cdot t\right) \cdot t\right)} \]
        6. pow2N/A

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

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

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

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

          \[\leadsto \frac{\ell \cdot \ell}{{\left(k \cdot t\right)}^{2} \cdot t} \]
        11. lower-*.f6477.7

          \[\leadsto \frac{\ell \cdot \ell}{{\left(k \cdot t\right)}^{2} \cdot t} \]
      9. Applied rewrites77.7%

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

      if 2.0000000000000001e-253 < (/.f64 #s(literal 2 binary64) (*.f64 (*.f64 (*.f64 (/.f64 (pow.f64 t #s(literal 3 binary64)) (*.f64 l l)) (sin.f64 k)) (tan.f64 k)) (+.f64 (+.f64 #s(literal 1 binary64) (pow.f64 (/.f64 k t) #s(literal 2 binary64))) #s(literal 1 binary64)))) < 1.99999999999999992e275

      1. Initial program 95.6%

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

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

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

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

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

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

          1. Initial program 18.5%

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

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

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

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

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

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

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

              \[\leadsto \frac{2}{\left(\left({t}^{2} \cdot \left(\frac{1}{3} \cdot \frac{{k}^{2}}{{\ell}^{2}} + 2 \cdot \frac{1}{{\ell}^{2}}\right) + \frac{{k}^{2}}{{\ell}^{2}}\right) \cdot t\right) \cdot \left(k \cdot k\right)} \]
          8. Applied rewrites36.3%

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

            \[\leadsto \frac{2}{\left(\frac{{k}^{2}}{{\ell}^{2}} \cdot t\right) \cdot \left(k \cdot k\right)} \]
          10. Step-by-step derivation
            1. pow2N/A

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

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

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

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

              \[\leadsto \frac{2}{\left(\left(\frac{k}{\ell} \cdot \frac{k}{\ell}\right) \cdot t\right) \cdot \left(k \cdot k\right)} \]
            6. lower-/.f6455.6

              \[\leadsto \frac{2}{\left(\left(\frac{k}{\ell} \cdot \frac{k}{\ell}\right) \cdot t\right) \cdot \left(k \cdot k\right)} \]
          11. Applied rewrites55.6%

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

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

        Alternative 7: 84.3% accurate, 0.5× speedup?

        \[\begin{array}{l} l_m = \left|\ell\right| \\ t\_m = \left|t\right| \\ t\_s = \mathsf{copysign}\left(1, t\right) \\ t\_s \cdot \begin{array}{l} \mathbf{if}\;t\_m \leq 9 \cdot 10^{-6}:\\ \;\;\;\;\frac{2}{\left(\frac{k}{l\_m} \cdot \frac{k}{l\_m}\right) \cdot \frac{t\_m \cdot {\sin k}^{2}}{\cos k}}\\ \mathbf{else}:\\ \;\;\;\;\frac{2}{\left(\left(e^{\frac{{\log t\_m}^{2} \cdot 9 - {\log l\_m}^{2} \cdot 4}{\log t\_m \cdot 3 + \log l\_m \cdot 2}} \cdot \sin k\right) \cdot \tan k\right) \cdot \left(\left(1 + \frac{k}{t\_m} \cdot \frac{k}{t\_m}\right) + 1\right)}\\ \end{array} \end{array} \]
        l_m = (fabs.f64 l)
        t\_m = (fabs.f64 t)
        t\_s = (copysign.f64 #s(literal 1 binary64) t)
        (FPCore (t_s t_m l_m k)
         :precision binary64
         (*
          t_s
          (if (<= t_m 9e-6)
            (/ 2.0 (* (* (/ k l_m) (/ k l_m)) (/ (* t_m (pow (sin k) 2.0)) (cos k))))
            (/
             2.0
             (*
              (*
               (*
                (exp
                 (/
                  (- (* (pow (log t_m) 2.0) 9.0) (* (pow (log l_m) 2.0) 4.0))
                  (+ (* (log t_m) 3.0) (* (log l_m) 2.0))))
                (sin k))
               (tan k))
              (+ (+ 1.0 (* (/ k t_m) (/ k t_m))) 1.0))))))
        l_m = fabs(l);
        t\_m = fabs(t);
        t\_s = copysign(1.0, t);
        double code(double t_s, double t_m, double l_m, double k) {
        	double tmp;
        	if (t_m <= 9e-6) {
        		tmp = 2.0 / (((k / l_m) * (k / l_m)) * ((t_m * pow(sin(k), 2.0)) / cos(k)));
        	} else {
        		tmp = 2.0 / (((exp((((pow(log(t_m), 2.0) * 9.0) - (pow(log(l_m), 2.0) * 4.0)) / ((log(t_m) * 3.0) + (log(l_m) * 2.0)))) * sin(k)) * tan(k)) * ((1.0 + ((k / t_m) * (k / t_m))) + 1.0));
        	}
        	return t_s * tmp;
        }
        
        l_m =     private
        t\_m =     private
        t\_s =     private
        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_s, t_m, l_m, k)
        use fmin_fmax_functions
            real(8), intent (in) :: t_s
            real(8), intent (in) :: t_m
            real(8), intent (in) :: l_m
            real(8), intent (in) :: k
            real(8) :: tmp
            if (t_m <= 9d-6) then
                tmp = 2.0d0 / (((k / l_m) * (k / l_m)) * ((t_m * (sin(k) ** 2.0d0)) / cos(k)))
            else
                tmp = 2.0d0 / (((exp(((((log(t_m) ** 2.0d0) * 9.0d0) - ((log(l_m) ** 2.0d0) * 4.0d0)) / ((log(t_m) * 3.0d0) + (log(l_m) * 2.0d0)))) * sin(k)) * tan(k)) * ((1.0d0 + ((k / t_m) * (k / t_m))) + 1.0d0))
            end if
            code = t_s * tmp
        end function
        
        l_m = Math.abs(l);
        t\_m = Math.abs(t);
        t\_s = Math.copySign(1.0, t);
        public static double code(double t_s, double t_m, double l_m, double k) {
        	double tmp;
        	if (t_m <= 9e-6) {
        		tmp = 2.0 / (((k / l_m) * (k / l_m)) * ((t_m * Math.pow(Math.sin(k), 2.0)) / Math.cos(k)));
        	} else {
        		tmp = 2.0 / (((Math.exp((((Math.pow(Math.log(t_m), 2.0) * 9.0) - (Math.pow(Math.log(l_m), 2.0) * 4.0)) / ((Math.log(t_m) * 3.0) + (Math.log(l_m) * 2.0)))) * Math.sin(k)) * Math.tan(k)) * ((1.0 + ((k / t_m) * (k / t_m))) + 1.0));
        	}
        	return t_s * tmp;
        }
        
        l_m = math.fabs(l)
        t\_m = math.fabs(t)
        t\_s = math.copysign(1.0, t)
        def code(t_s, t_m, l_m, k):
        	tmp = 0
        	if t_m <= 9e-6:
        		tmp = 2.0 / (((k / l_m) * (k / l_m)) * ((t_m * math.pow(math.sin(k), 2.0)) / math.cos(k)))
        	else:
        		tmp = 2.0 / (((math.exp((((math.pow(math.log(t_m), 2.0) * 9.0) - (math.pow(math.log(l_m), 2.0) * 4.0)) / ((math.log(t_m) * 3.0) + (math.log(l_m) * 2.0)))) * math.sin(k)) * math.tan(k)) * ((1.0 + ((k / t_m) * (k / t_m))) + 1.0))
        	return t_s * tmp
        
        l_m = abs(l)
        t\_m = abs(t)
        t\_s = copysign(1.0, t)
        function code(t_s, t_m, l_m, k)
        	tmp = 0.0
        	if (t_m <= 9e-6)
        		tmp = Float64(2.0 / Float64(Float64(Float64(k / l_m) * Float64(k / l_m)) * Float64(Float64(t_m * (sin(k) ^ 2.0)) / cos(k))));
        	else
        		tmp = Float64(2.0 / Float64(Float64(Float64(exp(Float64(Float64(Float64((log(t_m) ^ 2.0) * 9.0) - Float64((log(l_m) ^ 2.0) * 4.0)) / Float64(Float64(log(t_m) * 3.0) + Float64(log(l_m) * 2.0)))) * sin(k)) * tan(k)) * Float64(Float64(1.0 + Float64(Float64(k / t_m) * Float64(k / t_m))) + 1.0)));
        	end
        	return Float64(t_s * tmp)
        end
        
        l_m = abs(l);
        t\_m = abs(t);
        t\_s = sign(t) * abs(1.0);
        function tmp_2 = code(t_s, t_m, l_m, k)
        	tmp = 0.0;
        	if (t_m <= 9e-6)
        		tmp = 2.0 / (((k / l_m) * (k / l_m)) * ((t_m * (sin(k) ^ 2.0)) / cos(k)));
        	else
        		tmp = 2.0 / (((exp(((((log(t_m) ^ 2.0) * 9.0) - ((log(l_m) ^ 2.0) * 4.0)) / ((log(t_m) * 3.0) + (log(l_m) * 2.0)))) * sin(k)) * tan(k)) * ((1.0 + ((k / t_m) * (k / t_m))) + 1.0));
        	end
        	tmp_2 = t_s * tmp;
        end
        
        l_m = N[Abs[l], $MachinePrecision]
        t\_m = N[Abs[t], $MachinePrecision]
        t\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[t]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
        code[t$95$s_, t$95$m_, l$95$m_, k_] := N[(t$95$s * If[LessEqual[t$95$m, 9e-6], N[(2.0 / N[(N[(N[(k / l$95$m), $MachinePrecision] * N[(k / l$95$m), $MachinePrecision]), $MachinePrecision] * N[(N[(t$95$m * N[Power[N[Sin[k], $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision] / N[Cos[k], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(2.0 / N[(N[(N[(N[Exp[N[(N[(N[(N[Power[N[Log[t$95$m], $MachinePrecision], 2.0], $MachinePrecision] * 9.0), $MachinePrecision] - N[(N[Power[N[Log[l$95$m], $MachinePrecision], 2.0], $MachinePrecision] * 4.0), $MachinePrecision]), $MachinePrecision] / N[(N[(N[Log[t$95$m], $MachinePrecision] * 3.0), $MachinePrecision] + N[(N[Log[l$95$m], $MachinePrecision] * 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[Sin[k], $MachinePrecision]), $MachinePrecision] * N[Tan[k], $MachinePrecision]), $MachinePrecision] * N[(N[(1.0 + N[(N[(k / t$95$m), $MachinePrecision] * N[(k / t$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]), $MachinePrecision]
        
        \begin{array}{l}
        l_m = \left|\ell\right|
        \\
        t\_m = \left|t\right|
        \\
        t\_s = \mathsf{copysign}\left(1, t\right)
        
        \\
        t\_s \cdot \begin{array}{l}
        \mathbf{if}\;t\_m \leq 9 \cdot 10^{-6}:\\
        \;\;\;\;\frac{2}{\left(\frac{k}{l\_m} \cdot \frac{k}{l\_m}\right) \cdot \frac{t\_m \cdot {\sin k}^{2}}{\cos k}}\\
        
        \mathbf{else}:\\
        \;\;\;\;\frac{2}{\left(\left(e^{\frac{{\log t\_m}^{2} \cdot 9 - {\log l\_m}^{2} \cdot 4}{\log t\_m \cdot 3 + \log l\_m \cdot 2}} \cdot \sin k\right) \cdot \tan k\right) \cdot \left(\left(1 + \frac{k}{t\_m} \cdot \frac{k}{t\_m}\right) + 1\right)}\\
        
        
        \end{array}
        \end{array}
        
        Derivation
        1. Split input into 2 regimes
        2. if t < 9.00000000000000023e-6

          1. Initial program 48.7%

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

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

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

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

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

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

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

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

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

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

              \[\leadsto \frac{2}{\left(\left(k \cdot k\right) \cdot \frac{t}{{\ell}^{2}}\right) \cdot \left(k \cdot k\right)} \]
            6. pow2N/A

              \[\leadsto \frac{2}{\left(\left(k \cdot k\right) \cdot \frac{t}{\ell \cdot \ell}\right) \cdot \left(k \cdot k\right)} \]
            7. lift-*.f6455.0

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

            \[\leadsto \frac{2}{\left(\left(k \cdot k\right) \cdot \frac{t}{\ell \cdot \ell}\right) \cdot \left(\color{blue}{k} \cdot k\right)} \]
          9. 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}}} \]
          10. Step-by-step derivation
            1. times-fracN/A

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

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

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

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

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

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

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

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

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

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

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

              \[\leadsto \frac{2}{\left(\frac{k}{\ell} \cdot \frac{k}{\ell}\right) \cdot \frac{t \cdot {\sin k}^{2}}{\cos k}} \]
            13. lower-cos.f6472.8

              \[\leadsto \frac{2}{\left(\frac{k}{\ell} \cdot \frac{k}{\ell}\right) \cdot \frac{t \cdot {\sin k}^{2}}{\cos k}} \]
          11. Applied rewrites72.8%

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

          if 9.00000000000000023e-6 < t

          1. Initial program 67.1%

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

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

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

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

              \[\leadsto \frac{2}{\left(\left(\frac{\color{blue}{e^{\log t \cdot 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)} \]
            5. pow2N/A

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

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

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

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

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

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

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

              \[\leadsto \frac{2}{\left(\left(e^{\log t \cdot 3 - \color{blue}{\log \ell \cdot 2}} \cdot \sin k\right) \cdot \tan k\right) \cdot \left(\left(1 + {\left(\frac{k}{t}\right)}^{2}\right) + 1\right)} \]
            13. lower-log.f6442.3

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

            \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq 9 \cdot 10^{-6}:\\ \;\;\;\;\frac{2}{\left(\frac{k}{\ell} \cdot \frac{k}{\ell}\right) \cdot \frac{t \cdot {\sin k}^{2}}{\cos k}}\\ \mathbf{else}:\\ \;\;\;\;\frac{2}{\left(\left(e^{\frac{{\log t}^{2} \cdot 9 - {\log \ell}^{2} \cdot 4}{\log t \cdot 3 + \log \ell \cdot 2}} \cdot \sin k\right) \cdot \tan k\right) \cdot \left(\left(1 + \frac{k}{t} \cdot \frac{k}{t}\right) + 1\right)}\\ \end{array} \]
          12. Add Preprocessing

          Alternative 8: 80.6% accurate, 0.5× speedup?

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

            1. Initial program 80.1%

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

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

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

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

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

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

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

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

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

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

            1. Initial program 18.5%

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

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

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

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

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

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

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

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

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

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

                \[\leadsto \frac{2}{\left(\left(k \cdot k\right) \cdot \frac{t}{{\ell}^{2}}\right) \cdot \left(k \cdot k\right)} \]
              6. pow2N/A

                \[\leadsto \frac{2}{\left(\left(k \cdot k\right) \cdot \frac{t}{\ell \cdot \ell}\right) \cdot \left(k \cdot k\right)} \]
              7. lift-*.f6445.0

                \[\leadsto \frac{2}{\left(\left(k \cdot k\right) \cdot \frac{t}{\ell \cdot \ell}\right) \cdot \left(k \cdot k\right)} \]
            8. Applied rewrites45.0%

              \[\leadsto \frac{2}{\left(\left(k \cdot k\right) \cdot \frac{t}{\ell \cdot \ell}\right) \cdot \left(\color{blue}{k} \cdot k\right)} \]
            9. 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}}} \]
            10. Step-by-step derivation
              1. times-fracN/A

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

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

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

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

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

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

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

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

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

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

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

                \[\leadsto \frac{2}{\left(\frac{k}{\ell} \cdot \frac{k}{\ell}\right) \cdot \frac{t \cdot {\sin k}^{2}}{\cos k}} \]
              13. lower-cos.f6477.0

                \[\leadsto \frac{2}{\left(\frac{k}{\ell} \cdot \frac{k}{\ell}\right) \cdot \frac{t \cdot {\sin k}^{2}}{\cos k}} \]
            11. Applied rewrites77.0%

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

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

          Alternative 9: 80.6% accurate, 0.5× speedup?

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

            1. Initial program 80.1%

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

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

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

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

                \[\leadsto \frac{2}{\left(\left(\frac{\color{blue}{e^{\log t \cdot 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)} \]
              5. pow2N/A

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

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

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

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

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

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

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

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

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

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

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

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

            1. Initial program 18.5%

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

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

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

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

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

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

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

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

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

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

                \[\leadsto \frac{2}{\left(\left(k \cdot k\right) \cdot \frac{t}{{\ell}^{2}}\right) \cdot \left(k \cdot k\right)} \]
              6. pow2N/A

                \[\leadsto \frac{2}{\left(\left(k \cdot k\right) \cdot \frac{t}{\ell \cdot \ell}\right) \cdot \left(k \cdot k\right)} \]
              7. lift-*.f6445.0

                \[\leadsto \frac{2}{\left(\left(k \cdot k\right) \cdot \frac{t}{\ell \cdot \ell}\right) \cdot \left(k \cdot k\right)} \]
            8. Applied rewrites45.0%

              \[\leadsto \frac{2}{\left(\left(k \cdot k\right) \cdot \frac{t}{\ell \cdot \ell}\right) \cdot \left(\color{blue}{k} \cdot k\right)} \]
            9. 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}}} \]
            10. Step-by-step derivation
              1. times-fracN/A

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

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

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

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

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

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

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

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

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

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

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

                \[\leadsto \frac{2}{\left(\frac{k}{\ell} \cdot \frac{k}{\ell}\right) \cdot \frac{t \cdot {\sin k}^{2}}{\cos k}} \]
              13. lower-cos.f6477.0

                \[\leadsto \frac{2}{\left(\frac{k}{\ell} \cdot \frac{k}{\ell}\right) \cdot \frac{t \cdot {\sin k}^{2}}{\cos k}} \]
            11. Applied rewrites77.0%

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

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

          Alternative 10: 80.0% accurate, 0.5× speedup?

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

            1. Initial program 80.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

            1. Initial program 18.5%

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

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

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

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

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

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

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

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

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

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

                \[\leadsto \frac{2}{\left(\left(k \cdot k\right) \cdot \frac{t}{{\ell}^{2}}\right) \cdot \left(k \cdot k\right)} \]
              6. pow2N/A

                \[\leadsto \frac{2}{\left(\left(k \cdot k\right) \cdot \frac{t}{\ell \cdot \ell}\right) \cdot \left(k \cdot k\right)} \]
              7. lift-*.f6445.0

                \[\leadsto \frac{2}{\left(\left(k \cdot k\right) \cdot \frac{t}{\ell \cdot \ell}\right) \cdot \left(k \cdot k\right)} \]
            8. Applied rewrites45.0%

              \[\leadsto \frac{2}{\left(\left(k \cdot k\right) \cdot \frac{t}{\ell \cdot \ell}\right) \cdot \left(\color{blue}{k} \cdot k\right)} \]
            9. 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}}} \]
            10. Step-by-step derivation
              1. times-fracN/A

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

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

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

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

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

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

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

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

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

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

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

                \[\leadsto \frac{2}{\left(\frac{k}{\ell} \cdot \frac{k}{\ell}\right) \cdot \frac{t \cdot {\sin k}^{2}}{\cos k}} \]
              13. lower-cos.f6477.0

                \[\leadsto \frac{2}{\left(\frac{k}{\ell} \cdot \frac{k}{\ell}\right) \cdot \frac{t \cdot {\sin k}^{2}}{\cos k}} \]
            11. Applied rewrites77.0%

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

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

          Alternative 11: 84.4% accurate, 0.6× speedup?

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

            1. Initial program 48.7%

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

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

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

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

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

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

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

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

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

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

                \[\leadsto \frac{2}{\left(\left(k \cdot k\right) \cdot \frac{t}{{\ell}^{2}}\right) \cdot \left(k \cdot k\right)} \]
              6. pow2N/A

                \[\leadsto \frac{2}{\left(\left(k \cdot k\right) \cdot \frac{t}{\ell \cdot \ell}\right) \cdot \left(k \cdot k\right)} \]
              7. lift-*.f6455.0

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

              \[\leadsto \frac{2}{\left(\left(k \cdot k\right) \cdot \frac{t}{\ell \cdot \ell}\right) \cdot \left(\color{blue}{k} \cdot k\right)} \]
            9. 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}}} \]
            10. Step-by-step derivation
              1. times-fracN/A

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

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

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

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

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

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

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

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

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

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

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

                \[\leadsto \frac{2}{\left(\frac{k}{\ell} \cdot \frac{k}{\ell}\right) \cdot \frac{t \cdot {\sin k}^{2}}{\cos k}} \]
              13. lower-cos.f6472.8

                \[\leadsto \frac{2}{\left(\frac{k}{\ell} \cdot \frac{k}{\ell}\right) \cdot \frac{t \cdot {\sin k}^{2}}{\cos k}} \]
            11. Applied rewrites72.8%

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

            if 9.00000000000000023e-6 < t

            1. Initial program 67.1%

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

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

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

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

                \[\leadsto \frac{2}{\left(\left(\frac{\color{blue}{e^{\log t \cdot 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)} \]
              5. pow2N/A

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

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

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

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

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

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

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

                \[\leadsto \frac{2}{\left(\left(e^{\log t \cdot 3 - \color{blue}{\log \ell \cdot 2}} \cdot \sin k\right) \cdot \tan k\right) \cdot \left(\left(1 + {\left(\frac{k}{t}\right)}^{2}\right) + 1\right)} \]
              13. lower-log.f6442.3

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

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

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

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

                \[\leadsto \frac{2}{\left(\left(e^{\log t \cdot 3 - \log \ell \cdot 2} \cdot {\sin k}^{\color{blue}{\left(\mathsf{neg}\left(-1\right)\right)}}\right) \cdot \tan k\right) \cdot \left(\left(1 + {\left(\frac{k}{t}\right)}^{2}\right) + 1\right)} \]
              4. pow-negN/A

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

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

                \[\leadsto \frac{2}{\left(\left(e^{\log t \cdot 3 - \log \ell \cdot 2} \cdot \frac{1}{\color{blue}{{\sin k}^{-1}}}\right) \cdot \tan k\right) \cdot \left(\left(1 + {\left(\frac{k}{t}\right)}^{2}\right) + 1\right)} \]
              7. lift-sin.f6442.3

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

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

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

          Alternative 12: 69.9% accurate, 0.6× speedup?

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

            1. Initial program 80.1%

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

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

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

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

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

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

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

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

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

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

            1. Initial program 18.5%

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

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

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

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

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

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

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

                \[\leadsto \frac{2}{\left(\left({t}^{2} \cdot \left(\frac{1}{3} \cdot \frac{{k}^{2}}{{\ell}^{2}} + 2 \cdot \frac{1}{{\ell}^{2}}\right) + \frac{{k}^{2}}{{\ell}^{2}}\right) \cdot t\right) \cdot \left(k \cdot k\right)} \]
            8. Applied rewrites36.3%

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

              \[\leadsto \frac{2}{\left(\frac{{k}^{2}}{{\ell}^{2}} \cdot t\right) \cdot \left(k \cdot k\right)} \]
            10. Step-by-step derivation
              1. pow2N/A

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

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

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

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

                \[\leadsto \frac{2}{\left(\left(\frac{k}{\ell} \cdot \frac{k}{\ell}\right) \cdot t\right) \cdot \left(k \cdot k\right)} \]
              6. lower-/.f6455.6

                \[\leadsto \frac{2}{\left(\left(\frac{k}{\ell} \cdot \frac{k}{\ell}\right) \cdot t\right) \cdot \left(k \cdot k\right)} \]
            11. Applied rewrites55.6%

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

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

          Alternative 13: 84.4% accurate, 0.7× speedup?

          \[\begin{array}{l} l_m = \left|\ell\right| \\ t\_m = \left|t\right| \\ t\_s = \mathsf{copysign}\left(1, t\right) \\ t\_s \cdot \begin{array}{l} \mathbf{if}\;t\_m \leq 9 \cdot 10^{-6}:\\ \;\;\;\;\frac{2}{\left(\frac{k}{l\_m} \cdot \frac{k}{l\_m}\right) \cdot \frac{t\_m \cdot {\sin k}^{2}}{\cos k}}\\ \mathbf{else}:\\ \;\;\;\;\frac{2}{\left(\left(e^{\log t\_m \cdot 3 - \log l\_m \cdot 2} \cdot \sin k\right) \cdot \frac{\sin k}{\cos k}\right) \cdot \left(\left(1 + \frac{k}{t\_m} \cdot \frac{k}{t\_m}\right) + 1\right)}\\ \end{array} \end{array} \]
          l_m = (fabs.f64 l)
          t\_m = (fabs.f64 t)
          t\_s = (copysign.f64 #s(literal 1 binary64) t)
          (FPCore (t_s t_m l_m k)
           :precision binary64
           (*
            t_s
            (if (<= t_m 9e-6)
              (/ 2.0 (* (* (/ k l_m) (/ k l_m)) (/ (* t_m (pow (sin k) 2.0)) (cos k))))
              (/
               2.0
               (*
                (*
                 (* (exp (- (* (log t_m) 3.0) (* (log l_m) 2.0))) (sin k))
                 (/ (sin k) (cos k)))
                (+ (+ 1.0 (* (/ k t_m) (/ k t_m))) 1.0))))))
          l_m = fabs(l);
          t\_m = fabs(t);
          t\_s = copysign(1.0, t);
          double code(double t_s, double t_m, double l_m, double k) {
          	double tmp;
          	if (t_m <= 9e-6) {
          		tmp = 2.0 / (((k / l_m) * (k / l_m)) * ((t_m * pow(sin(k), 2.0)) / cos(k)));
          	} else {
          		tmp = 2.0 / (((exp(((log(t_m) * 3.0) - (log(l_m) * 2.0))) * sin(k)) * (sin(k) / cos(k))) * ((1.0 + ((k / t_m) * (k / t_m))) + 1.0));
          	}
          	return t_s * tmp;
          }
          
          l_m =     private
          t\_m =     private
          t\_s =     private
          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_s, t_m, l_m, k)
          use fmin_fmax_functions
              real(8), intent (in) :: t_s
              real(8), intent (in) :: t_m
              real(8), intent (in) :: l_m
              real(8), intent (in) :: k
              real(8) :: tmp
              if (t_m <= 9d-6) then
                  tmp = 2.0d0 / (((k / l_m) * (k / l_m)) * ((t_m * (sin(k) ** 2.0d0)) / cos(k)))
              else
                  tmp = 2.0d0 / (((exp(((log(t_m) * 3.0d0) - (log(l_m) * 2.0d0))) * sin(k)) * (sin(k) / cos(k))) * ((1.0d0 + ((k / t_m) * (k / t_m))) + 1.0d0))
              end if
              code = t_s * tmp
          end function
          
          l_m = Math.abs(l);
          t\_m = Math.abs(t);
          t\_s = Math.copySign(1.0, t);
          public static double code(double t_s, double t_m, double l_m, double k) {
          	double tmp;
          	if (t_m <= 9e-6) {
          		tmp = 2.0 / (((k / l_m) * (k / l_m)) * ((t_m * Math.pow(Math.sin(k), 2.0)) / Math.cos(k)));
          	} else {
          		tmp = 2.0 / (((Math.exp(((Math.log(t_m) * 3.0) - (Math.log(l_m) * 2.0))) * Math.sin(k)) * (Math.sin(k) / Math.cos(k))) * ((1.0 + ((k / t_m) * (k / t_m))) + 1.0));
          	}
          	return t_s * tmp;
          }
          
          l_m = math.fabs(l)
          t\_m = math.fabs(t)
          t\_s = math.copysign(1.0, t)
          def code(t_s, t_m, l_m, k):
          	tmp = 0
          	if t_m <= 9e-6:
          		tmp = 2.0 / (((k / l_m) * (k / l_m)) * ((t_m * math.pow(math.sin(k), 2.0)) / math.cos(k)))
          	else:
          		tmp = 2.0 / (((math.exp(((math.log(t_m) * 3.0) - (math.log(l_m) * 2.0))) * math.sin(k)) * (math.sin(k) / math.cos(k))) * ((1.0 + ((k / t_m) * (k / t_m))) + 1.0))
          	return t_s * tmp
          
          l_m = abs(l)
          t\_m = abs(t)
          t\_s = copysign(1.0, t)
          function code(t_s, t_m, l_m, k)
          	tmp = 0.0
          	if (t_m <= 9e-6)
          		tmp = Float64(2.0 / Float64(Float64(Float64(k / l_m) * Float64(k / l_m)) * Float64(Float64(t_m * (sin(k) ^ 2.0)) / cos(k))));
          	else
          		tmp = Float64(2.0 / Float64(Float64(Float64(exp(Float64(Float64(log(t_m) * 3.0) - Float64(log(l_m) * 2.0))) * sin(k)) * Float64(sin(k) / cos(k))) * Float64(Float64(1.0 + Float64(Float64(k / t_m) * Float64(k / t_m))) + 1.0)));
          	end
          	return Float64(t_s * tmp)
          end
          
          l_m = abs(l);
          t\_m = abs(t);
          t\_s = sign(t) * abs(1.0);
          function tmp_2 = code(t_s, t_m, l_m, k)
          	tmp = 0.0;
          	if (t_m <= 9e-6)
          		tmp = 2.0 / (((k / l_m) * (k / l_m)) * ((t_m * (sin(k) ^ 2.0)) / cos(k)));
          	else
          		tmp = 2.0 / (((exp(((log(t_m) * 3.0) - (log(l_m) * 2.0))) * sin(k)) * (sin(k) / cos(k))) * ((1.0 + ((k / t_m) * (k / t_m))) + 1.0));
          	end
          	tmp_2 = t_s * tmp;
          end
          
          l_m = N[Abs[l], $MachinePrecision]
          t\_m = N[Abs[t], $MachinePrecision]
          t\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[t]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
          code[t$95$s_, t$95$m_, l$95$m_, k_] := N[(t$95$s * If[LessEqual[t$95$m, 9e-6], N[(2.0 / N[(N[(N[(k / l$95$m), $MachinePrecision] * N[(k / l$95$m), $MachinePrecision]), $MachinePrecision] * N[(N[(t$95$m * N[Power[N[Sin[k], $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision] / N[Cos[k], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(2.0 / N[(N[(N[(N[Exp[N[(N[(N[Log[t$95$m], $MachinePrecision] * 3.0), $MachinePrecision] - N[(N[Log[l$95$m], $MachinePrecision] * 2.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[Sin[k], $MachinePrecision]), $MachinePrecision] * N[(N[Sin[k], $MachinePrecision] / N[Cos[k], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(N[(1.0 + N[(N[(k / t$95$m), $MachinePrecision] * N[(k / t$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]), $MachinePrecision]
          
          \begin{array}{l}
          l_m = \left|\ell\right|
          \\
          t\_m = \left|t\right|
          \\
          t\_s = \mathsf{copysign}\left(1, t\right)
          
          \\
          t\_s \cdot \begin{array}{l}
          \mathbf{if}\;t\_m \leq 9 \cdot 10^{-6}:\\
          \;\;\;\;\frac{2}{\left(\frac{k}{l\_m} \cdot \frac{k}{l\_m}\right) \cdot \frac{t\_m \cdot {\sin k}^{2}}{\cos k}}\\
          
          \mathbf{else}:\\
          \;\;\;\;\frac{2}{\left(\left(e^{\log t\_m \cdot 3 - \log l\_m \cdot 2} \cdot \sin k\right) \cdot \frac{\sin k}{\cos k}\right) \cdot \left(\left(1 + \frac{k}{t\_m} \cdot \frac{k}{t\_m}\right) + 1\right)}\\
          
          
          \end{array}
          \end{array}
          
          Derivation
          1. Split input into 2 regimes
          2. if t < 9.00000000000000023e-6

            1. Initial program 48.7%

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

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

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

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

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

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

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

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

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

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

                \[\leadsto \frac{2}{\left(\left(k \cdot k\right) \cdot \frac{t}{{\ell}^{2}}\right) \cdot \left(k \cdot k\right)} \]
              6. pow2N/A

                \[\leadsto \frac{2}{\left(\left(k \cdot k\right) \cdot \frac{t}{\ell \cdot \ell}\right) \cdot \left(k \cdot k\right)} \]
              7. lift-*.f6455.0

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

              \[\leadsto \frac{2}{\left(\left(k \cdot k\right) \cdot \frac{t}{\ell \cdot \ell}\right) \cdot \left(\color{blue}{k} \cdot k\right)} \]
            9. 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}}} \]
            10. Step-by-step derivation
              1. times-fracN/A

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

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

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

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

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

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

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

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

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

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

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

                \[\leadsto \frac{2}{\left(\frac{k}{\ell} \cdot \frac{k}{\ell}\right) \cdot \frac{t \cdot {\sin k}^{2}}{\cos k}} \]
              13. lower-cos.f6472.8

                \[\leadsto \frac{2}{\left(\frac{k}{\ell} \cdot \frac{k}{\ell}\right) \cdot \frac{t \cdot {\sin k}^{2}}{\cos k}} \]
            11. Applied rewrites72.8%

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

            if 9.00000000000000023e-6 < t

            1. Initial program 67.1%

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

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

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

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

                \[\leadsto \frac{2}{\left(\left(\frac{\color{blue}{e^{\log t \cdot 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)} \]
              5. pow2N/A

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

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

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

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

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

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

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

                \[\leadsto \frac{2}{\left(\left(e^{\log t \cdot 3 - \color{blue}{\log \ell \cdot 2}} \cdot \sin k\right) \cdot \tan k\right) \cdot \left(\left(1 + {\left(\frac{k}{t}\right)}^{2}\right) + 1\right)} \]
              13. lower-log.f6442.3

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

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

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

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

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

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

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

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

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

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

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

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

                \[\leadsto \frac{2}{\left(\left(e^{\log t \cdot 3 - \log \ell \cdot 2} \cdot \sin k\right) \cdot \frac{\color{blue}{\sin k}}{\cos k}\right) \cdot \left(\left(1 + \frac{k}{t} \cdot \frac{k}{t}\right) + 1\right)} \]
              5. lift-cos.f6442.3

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

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

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

          Alternative 14: 68.5% accurate, 0.8× speedup?

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

            1. Initial program 80.1%

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

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

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

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

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

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

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

                \[\leadsto \frac{\ell \cdot \ell}{\left(k \cdot k\right) \cdot {\color{blue}{t}}^{3}} \]
              7. lift-pow.f6464.6

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

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

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

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

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

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

                \[\leadsto \frac{\ell \cdot \ell}{\left(k \cdot k\right) \cdot \left(\left(t \cdot t\right) \cdot t\right)} \]
              6. lift-*.f6464.5

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

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

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

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

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

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

                \[\leadsto \frac{\ell \cdot \ell}{{k}^{2} \cdot \left(\left(t \cdot t\right) \cdot t\right)} \]
              6. pow2N/A

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

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

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

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

                \[\leadsto \frac{\ell \cdot \ell}{{\left(k \cdot t\right)}^{2} \cdot t} \]
              11. lower-*.f6473.4

                \[\leadsto \frac{\ell \cdot \ell}{{\left(k \cdot t\right)}^{2} \cdot t} \]
            9. Applied rewrites73.4%

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

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

            1. Initial program 18.5%

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

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

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

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

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

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

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

                \[\leadsto \frac{2}{\left(\left({t}^{2} \cdot \left(\frac{1}{3} \cdot \frac{{k}^{2}}{{\ell}^{2}} + 2 \cdot \frac{1}{{\ell}^{2}}\right) + \frac{{k}^{2}}{{\ell}^{2}}\right) \cdot t\right) \cdot \left(k \cdot k\right)} \]
            8. Applied rewrites36.3%

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

              \[\leadsto \frac{2}{\left(\frac{{k}^{2}}{{\ell}^{2}} \cdot t\right) \cdot \left(k \cdot k\right)} \]
            10. Step-by-step derivation
              1. pow2N/A

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

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

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

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

                \[\leadsto \frac{2}{\left(\left(\frac{k}{\ell} \cdot \frac{k}{\ell}\right) \cdot t\right) \cdot \left(k \cdot k\right)} \]
              6. lower-/.f6455.6

                \[\leadsto \frac{2}{\left(\left(\frac{k}{\ell} \cdot \frac{k}{\ell}\right) \cdot t\right) \cdot \left(k \cdot k\right)} \]
            11. Applied rewrites55.6%

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

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

          Alternative 15: 66.0% accurate, 0.8× speedup?

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

            1. Initial program 80.1%

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

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

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

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

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

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

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

                \[\leadsto \frac{\ell \cdot \ell}{\left(k \cdot k\right) \cdot {\color{blue}{t}}^{3}} \]
              7. lift-pow.f6464.6

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

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

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

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

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

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

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

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

                \[\leadsto \frac{\ell \cdot \ell}{k \cdot \left({t}^{3} \cdot \color{blue}{k}\right)} \]
              8. lift-pow.f6471.5

                \[\leadsto \frac{\ell \cdot \ell}{k \cdot \left({t}^{3} \cdot k\right)} \]
            7. Applied rewrites71.5%

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

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

            1. Initial program 18.5%

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

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

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

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

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

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

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

                \[\leadsto \frac{2}{\left(\left({t}^{2} \cdot \left(\frac{1}{3} \cdot \frac{{k}^{2}}{{\ell}^{2}} + 2 \cdot \frac{1}{{\ell}^{2}}\right) + \frac{{k}^{2}}{{\ell}^{2}}\right) \cdot t\right) \cdot \left(k \cdot k\right)} \]
            8. Applied rewrites36.3%

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

              \[\leadsto \frac{2}{\left(\frac{{k}^{2}}{{\ell}^{2}} \cdot t\right) \cdot \left(k \cdot k\right)} \]
            10. Step-by-step derivation
              1. pow2N/A

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

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

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

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

                \[\leadsto \frac{2}{\left(\left(\frac{k}{\ell} \cdot \frac{k}{\ell}\right) \cdot t\right) \cdot \left(k \cdot k\right)} \]
              6. lower-/.f6455.6

                \[\leadsto \frac{2}{\left(\left(\frac{k}{\ell} \cdot \frac{k}{\ell}\right) \cdot t\right) \cdot \left(k \cdot k\right)} \]
            11. Applied rewrites55.6%

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

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

          Alternative 16: 84.4% accurate, 0.8× speedup?

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

            1. Initial program 48.7%

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

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

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

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

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

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

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

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

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

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

                \[\leadsto \frac{2}{\left(\left(k \cdot k\right) \cdot \frac{t}{{\ell}^{2}}\right) \cdot \left(k \cdot k\right)} \]
              6. pow2N/A

                \[\leadsto \frac{2}{\left(\left(k \cdot k\right) \cdot \frac{t}{\ell \cdot \ell}\right) \cdot \left(k \cdot k\right)} \]
              7. lift-*.f6455.0

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

              \[\leadsto \frac{2}{\left(\left(k \cdot k\right) \cdot \frac{t}{\ell \cdot \ell}\right) \cdot \left(\color{blue}{k} \cdot k\right)} \]
            9. 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}}} \]
            10. Step-by-step derivation
              1. times-fracN/A

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

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

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

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

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

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

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

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

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

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

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

                \[\leadsto \frac{2}{\left(\frac{k}{\ell} \cdot \frac{k}{\ell}\right) \cdot \frac{t \cdot {\sin k}^{2}}{\cos k}} \]
              13. lower-cos.f6472.8

                \[\leadsto \frac{2}{\left(\frac{k}{\ell} \cdot \frac{k}{\ell}\right) \cdot \frac{t \cdot {\sin k}^{2}}{\cos k}} \]
            11. Applied rewrites72.8%

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

            if 9.00000000000000023e-6 < t

            1. Initial program 67.1%

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

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

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

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

                \[\leadsto \frac{2}{\left(\left(\frac{\color{blue}{e^{\log t \cdot 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)} \]
              5. pow2N/A

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

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

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

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

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

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

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

                \[\leadsto \frac{2}{\left(\left(e^{\log t \cdot 3 - \color{blue}{\log \ell \cdot 2}} \cdot \sin k\right) \cdot \tan k\right) \cdot \left(\left(1 + {\left(\frac{k}{t}\right)}^{2}\right) + 1\right)} \]
              13. lower-log.f6442.3

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

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

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

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

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

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

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

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

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

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

          Alternative 17: 83.7% accurate, 0.8× speedup?

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

            1. Initial program 48.7%

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

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

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

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

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

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

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

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

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

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

                \[\leadsto \frac{2}{\left(\left(k \cdot k\right) \cdot \frac{t}{{\ell}^{2}}\right) \cdot \left(k \cdot k\right)} \]
              6. pow2N/A

                \[\leadsto \frac{2}{\left(\left(k \cdot k\right) \cdot \frac{t}{\ell \cdot \ell}\right) \cdot \left(k \cdot k\right)} \]
              7. lift-*.f6455.0

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

              \[\leadsto \frac{2}{\left(\left(k \cdot k\right) \cdot \frac{t}{\ell \cdot \ell}\right) \cdot \left(\color{blue}{k} \cdot k\right)} \]
            9. 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}}} \]
            10. Step-by-step derivation
              1. times-fracN/A

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

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

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

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

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

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

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

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

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

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

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

                \[\leadsto \frac{2}{\left(\frac{k}{\ell} \cdot \frac{k}{\ell}\right) \cdot \frac{t \cdot {\sin k}^{2}}{\cos k}} \]
              13. lower-cos.f6472.8

                \[\leadsto \frac{2}{\left(\frac{k}{\ell} \cdot \frac{k}{\ell}\right) \cdot \frac{t \cdot {\sin k}^{2}}{\cos k}} \]
            11. Applied rewrites72.8%

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

            if 9.00000000000000023e-6 < t

            1. Initial program 67.1%

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

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

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

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

                \[\leadsto \frac{2}{\left(\left(\frac{\color{blue}{e^{\log t \cdot 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)} \]
              5. pow2N/A

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

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

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

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

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

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

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

                \[\leadsto \frac{2}{\left(\left(e^{\log t \cdot 3 - \color{blue}{\log \ell \cdot 2}} \cdot \sin k\right) \cdot \tan k\right) \cdot \left(\left(1 + {\left(\frac{k}{t}\right)}^{2}\right) + 1\right)} \]
              13. lower-log.f6442.3

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

              \[\leadsto \frac{2}{\left(\left(\color{blue}{e^{\log t \cdot 3 - \log \ell \cdot 2}} \cdot \sin k\right) \cdot \tan k\right) \cdot \left(\left(1 + {\left(\frac{k}{t}\right)}^{2}\right) + 1\right)} \]
            5. Step-by-step derivation
              1. lift-/.f64N/A

                \[\leadsto \frac{2}{\left(\left(e^{\log t \cdot 3 - \log \ell \cdot 2} \cdot \sin k\right) \cdot \tan k\right) \cdot \left(\left(1 + {\color{blue}{\left(\frac{k}{t}\right)}}^{2}\right) + 1\right)} \]
              2. lift-pow.f64N/A

                \[\leadsto \frac{2}{\left(\left(e^{\log t \cdot 3 - \log \ell \cdot 2} \cdot \sin k\right) \cdot \tan k\right) \cdot \left(\left(1 + \color{blue}{{\left(\frac{k}{t}\right)}^{2}}\right) + 1\right)} \]
              3. unpow2N/A

                \[\leadsto \frac{2}{\left(\left(e^{\log t \cdot 3 - \log \ell \cdot 2} \cdot \sin k\right) \cdot \tan k\right) \cdot \left(\left(1 + \color{blue}{\frac{k}{t} \cdot \frac{k}{t}}\right) + 1\right)} \]
              4. times-fracN/A

                \[\leadsto \frac{2}{\left(\left(e^{\log t \cdot 3 - \log \ell \cdot 2} \cdot \sin k\right) \cdot \tan k\right) \cdot \left(\left(1 + \color{blue}{\frac{k \cdot k}{t \cdot t}}\right) + 1\right)} \]
              5. pow2N/A

                \[\leadsto \frac{2}{\left(\left(e^{\log t \cdot 3 - \log \ell \cdot 2} \cdot \sin k\right) \cdot \tan k\right) \cdot \left(\left(1 + \frac{k \cdot k}{\color{blue}{{t}^{2}}}\right) + 1\right)} \]
              6. associate-/l*N/A

                \[\leadsto \frac{2}{\left(\left(e^{\log t \cdot 3 - \log \ell \cdot 2} \cdot \sin k\right) \cdot \tan k\right) \cdot \left(\left(1 + \color{blue}{k \cdot \frac{k}{{t}^{2}}}\right) + 1\right)} \]
              7. lower-*.f64N/A

                \[\leadsto \frac{2}{\left(\left(e^{\log t \cdot 3 - \log \ell \cdot 2} \cdot \sin k\right) \cdot \tan k\right) \cdot \left(\left(1 + \color{blue}{k \cdot \frac{k}{{t}^{2}}}\right) + 1\right)} \]
              8. lower-/.f64N/A

                \[\leadsto \frac{2}{\left(\left(e^{\log t \cdot 3 - \log \ell \cdot 2} \cdot \sin k\right) \cdot \tan k\right) \cdot \left(\left(1 + k \cdot \color{blue}{\frac{k}{{t}^{2}}}\right) + 1\right)} \]
              9. pow2N/A

                \[\leadsto \frac{2}{\left(\left(e^{\log t \cdot 3 - \log \ell \cdot 2} \cdot \sin k\right) \cdot \tan k\right) \cdot \left(\left(1 + k \cdot \frac{k}{\color{blue}{t \cdot t}}\right) + 1\right)} \]
              10. lift-*.f6442.3

                \[\leadsto \frac{2}{\left(\left(e^{\log t \cdot 3 - \log \ell \cdot 2} \cdot \sin k\right) \cdot \tan k\right) \cdot \left(\left(1 + k \cdot \frac{k}{\color{blue}{t \cdot t}}\right) + 1\right)} \]
            6. Applied rewrites42.3%

              \[\leadsto \frac{2}{\left(\left(e^{\log t \cdot 3 - \log \ell \cdot 2} \cdot \sin k\right) \cdot \tan k\right) \cdot \left(\left(1 + \color{blue}{k \cdot \frac{k}{t \cdot t}}\right) + 1\right)} \]
          3. Recombined 2 regimes into one program.
          4. Final simplification64.3%

            \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq 9 \cdot 10^{-6}:\\ \;\;\;\;\frac{2}{\left(\frac{k}{\ell} \cdot \frac{k}{\ell}\right) \cdot \frac{t \cdot {\sin k}^{2}}{\cos k}}\\ \mathbf{else}:\\ \;\;\;\;\frac{2}{\left(\left(e^{\log t \cdot 3 - \log \ell \cdot 2} \cdot \sin k\right) \cdot \tan k\right) \cdot \left(\left(1 + k \cdot \frac{k}{t \cdot t}\right) + 1\right)}\\ \end{array} \]
          5. Add Preprocessing

          Alternative 18: 72.2% accurate, 0.8× speedup?

          \[\begin{array}{l} l_m = \left|\ell\right| \\ t\_m = \left|t\right| \\ t\_s = \mathsf{copysign}\left(1, t\right) \\ t\_s \cdot \begin{array}{l} \mathbf{if}\;k \leq 3800:\\ \;\;\;\;\frac{2}{\left(\left(e^{\log t\_m \cdot 3 - \log l\_m \cdot 2} \cdot \sin k\right) \cdot \tan k\right) \cdot 2}\\ \mathbf{else}:\\ \;\;\;\;\frac{2}{\left(\frac{k}{l\_m} \cdot \frac{k}{l\_m}\right) \cdot \frac{t\_m \cdot {\sin k}^{2}}{\cos k}}\\ \end{array} \end{array} \]
          l_m = (fabs.f64 l)
          t\_m = (fabs.f64 t)
          t\_s = (copysign.f64 #s(literal 1 binary64) t)
          (FPCore (t_s t_m l_m k)
           :precision binary64
           (*
            t_s
            (if (<= k 3800.0)
              (/
               2.0
               (*
                (* (* (exp (- (* (log t_m) 3.0) (* (log l_m) 2.0))) (sin k)) (tan k))
                2.0))
              (/
               2.0
               (* (* (/ k l_m) (/ k l_m)) (/ (* t_m (pow (sin k) 2.0)) (cos k)))))))
          l_m = fabs(l);
          t\_m = fabs(t);
          t\_s = copysign(1.0, t);
          double code(double t_s, double t_m, double l_m, double k) {
          	double tmp;
          	if (k <= 3800.0) {
          		tmp = 2.0 / (((exp(((log(t_m) * 3.0) - (log(l_m) * 2.0))) * sin(k)) * tan(k)) * 2.0);
          	} else {
          		tmp = 2.0 / (((k / l_m) * (k / l_m)) * ((t_m * pow(sin(k), 2.0)) / cos(k)));
          	}
          	return t_s * tmp;
          }
          
          l_m =     private
          t\_m =     private
          t\_s =     private
          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_s, t_m, l_m, k)
          use fmin_fmax_functions
              real(8), intent (in) :: t_s
              real(8), intent (in) :: t_m
              real(8), intent (in) :: l_m
              real(8), intent (in) :: k
              real(8) :: tmp
              if (k <= 3800.0d0) then
                  tmp = 2.0d0 / (((exp(((log(t_m) * 3.0d0) - (log(l_m) * 2.0d0))) * sin(k)) * tan(k)) * 2.0d0)
              else
                  tmp = 2.0d0 / (((k / l_m) * (k / l_m)) * ((t_m * (sin(k) ** 2.0d0)) / cos(k)))
              end if
              code = t_s * tmp
          end function
          
          l_m = Math.abs(l);
          t\_m = Math.abs(t);
          t\_s = Math.copySign(1.0, t);
          public static double code(double t_s, double t_m, double l_m, double k) {
          	double tmp;
          	if (k <= 3800.0) {
          		tmp = 2.0 / (((Math.exp(((Math.log(t_m) * 3.0) - (Math.log(l_m) * 2.0))) * Math.sin(k)) * Math.tan(k)) * 2.0);
          	} else {
          		tmp = 2.0 / (((k / l_m) * (k / l_m)) * ((t_m * Math.pow(Math.sin(k), 2.0)) / Math.cos(k)));
          	}
          	return t_s * tmp;
          }
          
          l_m = math.fabs(l)
          t\_m = math.fabs(t)
          t\_s = math.copysign(1.0, t)
          def code(t_s, t_m, l_m, k):
          	tmp = 0
          	if k <= 3800.0:
          		tmp = 2.0 / (((math.exp(((math.log(t_m) * 3.0) - (math.log(l_m) * 2.0))) * math.sin(k)) * math.tan(k)) * 2.0)
          	else:
          		tmp = 2.0 / (((k / l_m) * (k / l_m)) * ((t_m * math.pow(math.sin(k), 2.0)) / math.cos(k)))
          	return t_s * tmp
          
          l_m = abs(l)
          t\_m = abs(t)
          t\_s = copysign(1.0, t)
          function code(t_s, t_m, l_m, k)
          	tmp = 0.0
          	if (k <= 3800.0)
          		tmp = Float64(2.0 / Float64(Float64(Float64(exp(Float64(Float64(log(t_m) * 3.0) - Float64(log(l_m) * 2.0))) * sin(k)) * tan(k)) * 2.0));
          	else
          		tmp = Float64(2.0 / Float64(Float64(Float64(k / l_m) * Float64(k / l_m)) * Float64(Float64(t_m * (sin(k) ^ 2.0)) / cos(k))));
          	end
          	return Float64(t_s * tmp)
          end
          
          l_m = abs(l);
          t\_m = abs(t);
          t\_s = sign(t) * abs(1.0);
          function tmp_2 = code(t_s, t_m, l_m, k)
          	tmp = 0.0;
          	if (k <= 3800.0)
          		tmp = 2.0 / (((exp(((log(t_m) * 3.0) - (log(l_m) * 2.0))) * sin(k)) * tan(k)) * 2.0);
          	else
          		tmp = 2.0 / (((k / l_m) * (k / l_m)) * ((t_m * (sin(k) ^ 2.0)) / cos(k)));
          	end
          	tmp_2 = t_s * tmp;
          end
          
          l_m = N[Abs[l], $MachinePrecision]
          t\_m = N[Abs[t], $MachinePrecision]
          t\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[t]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
          code[t$95$s_, t$95$m_, l$95$m_, k_] := N[(t$95$s * If[LessEqual[k, 3800.0], N[(2.0 / N[(N[(N[(N[Exp[N[(N[(N[Log[t$95$m], $MachinePrecision] * 3.0), $MachinePrecision] - N[(N[Log[l$95$m], $MachinePrecision] * 2.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[Sin[k], $MachinePrecision]), $MachinePrecision] * N[Tan[k], $MachinePrecision]), $MachinePrecision] * 2.0), $MachinePrecision]), $MachinePrecision], N[(2.0 / N[(N[(N[(k / l$95$m), $MachinePrecision] * N[(k / l$95$m), $MachinePrecision]), $MachinePrecision] * N[(N[(t$95$m * N[Power[N[Sin[k], $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision] / N[Cos[k], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]), $MachinePrecision]
          
          \begin{array}{l}
          l_m = \left|\ell\right|
          \\
          t\_m = \left|t\right|
          \\
          t\_s = \mathsf{copysign}\left(1, t\right)
          
          \\
          t\_s \cdot \begin{array}{l}
          \mathbf{if}\;k \leq 3800:\\
          \;\;\;\;\frac{2}{\left(\left(e^{\log t\_m \cdot 3 - \log l\_m \cdot 2} \cdot \sin k\right) \cdot \tan k\right) \cdot 2}\\
          
          \mathbf{else}:\\
          \;\;\;\;\frac{2}{\left(\frac{k}{l\_m} \cdot \frac{k}{l\_m}\right) \cdot \frac{t\_m \cdot {\sin k}^{2}}{\cos k}}\\
          
          
          \end{array}
          \end{array}
          
          Derivation
          1. Split input into 2 regimes
          2. if k < 3800

            1. Initial program 56.3%

              \[\frac{2}{\left(\left(\frac{{t}^{3}}{\ell \cdot \ell} \cdot \sin k\right) \cdot \tan k\right) \cdot \left(\left(1 + {\left(\frac{k}{t}\right)}^{2}\right) + 1\right)} \]
            2. Add Preprocessing
            3. Step-by-step derivation
              1. lift-*.f64N/A

                \[\leadsto \frac{2}{\left(\left(\frac{{t}^{3}}{\color{blue}{\ell \cdot \ell}} \cdot \sin k\right) \cdot \tan k\right) \cdot \left(\left(1 + {\left(\frac{k}{t}\right)}^{2}\right) + 1\right)} \]
              2. lift-/.f64N/A

                \[\leadsto \frac{2}{\left(\left(\color{blue}{\frac{{t}^{3}}{\ell \cdot \ell}} \cdot \sin k\right) \cdot \tan k\right) \cdot \left(\left(1 + {\left(\frac{k}{t}\right)}^{2}\right) + 1\right)} \]
              3. lift-pow.f64N/A

                \[\leadsto \frac{2}{\left(\left(\frac{\color{blue}{{t}^{3}}}{\ell \cdot \ell} \cdot \sin k\right) \cdot \tan k\right) \cdot \left(\left(1 + {\left(\frac{k}{t}\right)}^{2}\right) + 1\right)} \]
              4. pow-to-expN/A

                \[\leadsto \frac{2}{\left(\left(\frac{\color{blue}{e^{\log t \cdot 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)} \]
              5. pow2N/A

                \[\leadsto \frac{2}{\left(\left(\frac{e^{\log t \cdot 3}}{\color{blue}{{\ell}^{2}}} \cdot \sin k\right) \cdot \tan k\right) \cdot \left(\left(1 + {\left(\frac{k}{t}\right)}^{2}\right) + 1\right)} \]
              6. pow-to-expN/A

                \[\leadsto \frac{2}{\left(\left(\frac{e^{\log t \cdot 3}}{\color{blue}{e^{\log \ell \cdot 2}}} \cdot \sin k\right) \cdot \tan k\right) \cdot \left(\left(1 + {\left(\frac{k}{t}\right)}^{2}\right) + 1\right)} \]
              7. div-expN/A

                \[\leadsto \frac{2}{\left(\left(\color{blue}{e^{\log t \cdot 3 - \log \ell \cdot 2}} \cdot \sin k\right) \cdot \tan k\right) \cdot \left(\left(1 + {\left(\frac{k}{t}\right)}^{2}\right) + 1\right)} \]
              8. lower-exp.f64N/A

                \[\leadsto \frac{2}{\left(\left(\color{blue}{e^{\log t \cdot 3 - \log \ell \cdot 2}} \cdot \sin k\right) \cdot \tan k\right) \cdot \left(\left(1 + {\left(\frac{k}{t}\right)}^{2}\right) + 1\right)} \]
              9. lower--.f64N/A

                \[\leadsto \frac{2}{\left(\left(e^{\color{blue}{\log t \cdot 3 - \log \ell \cdot 2}} \cdot \sin k\right) \cdot \tan k\right) \cdot \left(\left(1 + {\left(\frac{k}{t}\right)}^{2}\right) + 1\right)} \]
              10. lower-*.f64N/A

                \[\leadsto \frac{2}{\left(\left(e^{\color{blue}{\log t \cdot 3} - \log \ell \cdot 2} \cdot \sin k\right) \cdot \tan k\right) \cdot \left(\left(1 + {\left(\frac{k}{t}\right)}^{2}\right) + 1\right)} \]
              11. lower-log.f64N/A

                \[\leadsto \frac{2}{\left(\left(e^{\color{blue}{\log t} \cdot 3 - \log \ell \cdot 2} \cdot \sin k\right) \cdot \tan k\right) \cdot \left(\left(1 + {\left(\frac{k}{t}\right)}^{2}\right) + 1\right)} \]
              12. lower-*.f64N/A

                \[\leadsto \frac{2}{\left(\left(e^{\log t \cdot 3 - \color{blue}{\log \ell \cdot 2}} \cdot \sin k\right) \cdot \tan k\right) \cdot \left(\left(1 + {\left(\frac{k}{t}\right)}^{2}\right) + 1\right)} \]
              13. lower-log.f6419.0

                \[\leadsto \frac{2}{\left(\left(e^{\log t \cdot 3 - \color{blue}{\log \ell} \cdot 2} \cdot \sin k\right) \cdot \tan k\right) \cdot \left(\left(1 + {\left(\frac{k}{t}\right)}^{2}\right) + 1\right)} \]
            4. Applied rewrites19.0%

              \[\leadsto \frac{2}{\left(\left(\color{blue}{e^{\log t \cdot 3 - \log \ell \cdot 2}} \cdot \sin k\right) \cdot \tan k\right) \cdot \left(\left(1 + {\left(\frac{k}{t}\right)}^{2}\right) + 1\right)} \]
            5. Step-by-step derivation
              1. lift-/.f64N/A

                \[\leadsto \frac{2}{\left(\left(e^{\log t \cdot 3 - \log \ell \cdot 2} \cdot \sin k\right) \cdot \tan k\right) \cdot \left(\left(1 + {\color{blue}{\left(\frac{k}{t}\right)}}^{2}\right) + 1\right)} \]
              2. lift-pow.f64N/A

                \[\leadsto \frac{2}{\left(\left(e^{\log t \cdot 3 - \log \ell \cdot 2} \cdot \sin k\right) \cdot \tan k\right) \cdot \left(\left(1 + \color{blue}{{\left(\frac{k}{t}\right)}^{2}}\right) + 1\right)} \]
              3. unpow2N/A

                \[\leadsto \frac{2}{\left(\left(e^{\log t \cdot 3 - \log \ell \cdot 2} \cdot \sin k\right) \cdot \tan k\right) \cdot \left(\left(1 + \color{blue}{\frac{k}{t} \cdot \frac{k}{t}}\right) + 1\right)} \]
              4. times-fracN/A

                \[\leadsto \frac{2}{\left(\left(e^{\log t \cdot 3 - \log \ell \cdot 2} \cdot \sin k\right) \cdot \tan k\right) \cdot \left(\left(1 + \color{blue}{\frac{k \cdot k}{t \cdot t}}\right) + 1\right)} \]
              5. pow2N/A

                \[\leadsto \frac{2}{\left(\left(e^{\log t \cdot 3 - \log \ell \cdot 2} \cdot \sin k\right) \cdot \tan k\right) \cdot \left(\left(1 + \frac{k \cdot k}{\color{blue}{{t}^{2}}}\right) + 1\right)} \]
              6. associate-/l*N/A

                \[\leadsto \frac{2}{\left(\left(e^{\log t \cdot 3 - \log \ell \cdot 2} \cdot \sin k\right) \cdot \tan k\right) \cdot \left(\left(1 + \color{blue}{k \cdot \frac{k}{{t}^{2}}}\right) + 1\right)} \]
              7. lower-*.f64N/A

                \[\leadsto \frac{2}{\left(\left(e^{\log t \cdot 3 - \log \ell \cdot 2} \cdot \sin k\right) \cdot \tan k\right) \cdot \left(\left(1 + \color{blue}{k \cdot \frac{k}{{t}^{2}}}\right) + 1\right)} \]
              8. lower-/.f64N/A

                \[\leadsto \frac{2}{\left(\left(e^{\log t \cdot 3 - \log \ell \cdot 2} \cdot \sin k\right) \cdot \tan k\right) \cdot \left(\left(1 + k \cdot \color{blue}{\frac{k}{{t}^{2}}}\right) + 1\right)} \]
              9. pow2N/A

                \[\leadsto \frac{2}{\left(\left(e^{\log t \cdot 3 - \log \ell \cdot 2} \cdot \sin k\right) \cdot \tan k\right) \cdot \left(\left(1 + k \cdot \frac{k}{\color{blue}{t \cdot t}}\right) + 1\right)} \]
              10. lift-*.f6416.5

                \[\leadsto \frac{2}{\left(\left(e^{\log t \cdot 3 - \log \ell \cdot 2} \cdot \sin k\right) \cdot \tan k\right) \cdot \left(\left(1 + k \cdot \frac{k}{\color{blue}{t \cdot t}}\right) + 1\right)} \]
            6. Applied rewrites16.5%

              \[\leadsto \frac{2}{\left(\left(e^{\log t \cdot 3 - \log \ell \cdot 2} \cdot \sin k\right) \cdot \tan k\right) \cdot \left(\left(1 + \color{blue}{k \cdot \frac{k}{t \cdot t}}\right) + 1\right)} \]
            7. Taylor expanded in t around inf

              \[\leadsto \frac{2}{\left(\left(e^{\log t \cdot 3 - \log \ell \cdot 2} \cdot \sin k\right) \cdot \tan k\right) \cdot \color{blue}{2}} \]
            8. Step-by-step derivation
              1. Applied rewrites18.5%

                \[\leadsto \frac{2}{\left(\left(e^{\log t \cdot 3 - \log \ell \cdot 2} \cdot \sin k\right) \cdot \tan k\right) \cdot \color{blue}{2}} \]

              if 3800 < k

              1. Initial program 44.4%

                \[\frac{2}{\left(\left(\frac{{t}^{3}}{\ell \cdot \ell} \cdot \sin k\right) \cdot \tan k\right) \cdot \left(\left(1 + {\left(\frac{k}{t}\right)}^{2}\right) + 1\right)} \]
              2. Add Preprocessing
              3. Taylor expanded in k around 0

                \[\leadsto \frac{2}{\color{blue}{{k}^{2} \cdot \left(2 \cdot \frac{{t}^{3}}{{\ell}^{2}} + \frac{{k}^{2} \cdot \left({t}^{3} \cdot \left(\frac{1}{3} + \frac{1}{{t}^{2}}\right)\right)}{{\ell}^{2}}\right)}} \]
              4. Step-by-step derivation
                1. *-commutativeN/A

                  \[\leadsto \frac{2}{\left(2 \cdot \frac{{t}^{3}}{{\ell}^{2}} + \frac{{k}^{2} \cdot \left({t}^{3} \cdot \left(\frac{1}{3} + \frac{1}{{t}^{2}}\right)\right)}{{\ell}^{2}}\right) \cdot \color{blue}{{k}^{2}}} \]
                2. lower-*.f64N/A

                  \[\leadsto \frac{2}{\left(2 \cdot \frac{{t}^{3}}{{\ell}^{2}} + \frac{{k}^{2} \cdot \left({t}^{3} \cdot \left(\frac{1}{3} + \frac{1}{{t}^{2}}\right)\right)}{{\ell}^{2}}\right) \cdot \color{blue}{{k}^{2}}} \]
              5. Applied rewrites56.3%

                \[\leadsto \frac{2}{\color{blue}{\frac{\left(0.3333333333333333 \cdot {t}^{3} + t\right) \cdot \left(k \cdot k\right) + 2 \cdot {t}^{3}}{\ell \cdot \ell} \cdot \left(k \cdot k\right)}} \]
              6. Taylor expanded in t around 0

                \[\leadsto \frac{2}{\frac{{k}^{2} \cdot t}{{\ell}^{2}} \cdot \left(\color{blue}{k} \cdot k\right)} \]
              7. Step-by-step derivation
                1. associate-/l*N/A

                  \[\leadsto \frac{2}{\left({k}^{2} \cdot \frac{t}{{\ell}^{2}}\right) \cdot \left(k \cdot k\right)} \]
                2. lower-*.f64N/A

                  \[\leadsto \frac{2}{\left({k}^{2} \cdot \frac{t}{{\ell}^{2}}\right) \cdot \left(k \cdot k\right)} \]
                3. pow2N/A

                  \[\leadsto \frac{2}{\left(\left(k \cdot k\right) \cdot \frac{t}{{\ell}^{2}}\right) \cdot \left(k \cdot k\right)} \]
                4. lift-*.f64N/A

                  \[\leadsto \frac{2}{\left(\left(k \cdot k\right) \cdot \frac{t}{{\ell}^{2}}\right) \cdot \left(k \cdot k\right)} \]
                5. lower-/.f64N/A

                  \[\leadsto \frac{2}{\left(\left(k \cdot k\right) \cdot \frac{t}{{\ell}^{2}}\right) \cdot \left(k \cdot k\right)} \]
                6. pow2N/A

                  \[\leadsto \frac{2}{\left(\left(k \cdot k\right) \cdot \frac{t}{\ell \cdot \ell}\right) \cdot \left(k \cdot k\right)} \]
                7. lift-*.f6456.5

                  \[\leadsto \frac{2}{\left(\left(k \cdot k\right) \cdot \frac{t}{\ell \cdot \ell}\right) \cdot \left(k \cdot k\right)} \]
              8. Applied rewrites56.5%

                \[\leadsto \frac{2}{\left(\left(k \cdot k\right) \cdot \frac{t}{\ell \cdot \ell}\right) \cdot \left(\color{blue}{k} \cdot k\right)} \]
              9. 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}}} \]
              10. Step-by-step derivation
                1. times-fracN/A

                  \[\leadsto \frac{2}{\frac{{k}^{2}}{{\ell}^{2}} \cdot \color{blue}{\frac{t \cdot {\sin k}^{2}}{\cos k}}} \]
                2. lower-*.f64N/A

                  \[\leadsto \frac{2}{\frac{{k}^{2}}{{\ell}^{2}} \cdot \color{blue}{\frac{t \cdot {\sin k}^{2}}{\cos k}}} \]
                3. pow2N/A

                  \[\leadsto \frac{2}{\frac{k \cdot k}{{\ell}^{2}} \cdot \frac{\color{blue}{t} \cdot {\sin k}^{2}}{\cos k}} \]
                4. pow2N/A

                  \[\leadsto \frac{2}{\frac{k \cdot k}{\ell \cdot \ell} \cdot \frac{t \cdot \color{blue}{{\sin k}^{2}}}{\cos k}} \]
                5. times-fracN/A

                  \[\leadsto \frac{2}{\left(\frac{k}{\ell} \cdot \frac{k}{\ell}\right) \cdot \frac{\color{blue}{t \cdot {\sin k}^{2}}}{\cos k}} \]
                6. lower-*.f64N/A

                  \[\leadsto \frac{2}{\left(\frac{k}{\ell} \cdot \frac{k}{\ell}\right) \cdot \frac{\color{blue}{t \cdot {\sin k}^{2}}}{\cos k}} \]
                7. lower-/.f64N/A

                  \[\leadsto \frac{2}{\left(\frac{k}{\ell} \cdot \frac{k}{\ell}\right) \cdot \frac{\color{blue}{t} \cdot {\sin k}^{2}}{\cos k}} \]
                8. lower-/.f64N/A

                  \[\leadsto \frac{2}{\left(\frac{k}{\ell} \cdot \frac{k}{\ell}\right) \cdot \frac{t \cdot \color{blue}{{\sin k}^{2}}}{\cos k}} \]
                9. lower-/.f64N/A

                  \[\leadsto \frac{2}{\left(\frac{k}{\ell} \cdot \frac{k}{\ell}\right) \cdot \frac{t \cdot {\sin k}^{2}}{\color{blue}{\cos k}}} \]
                10. lower-*.f64N/A

                  \[\leadsto \frac{2}{\left(\frac{k}{\ell} \cdot \frac{k}{\ell}\right) \cdot \frac{t \cdot {\sin k}^{2}}{\cos \color{blue}{k}}} \]
                11. lower-pow.f64N/A

                  \[\leadsto \frac{2}{\left(\frac{k}{\ell} \cdot \frac{k}{\ell}\right) \cdot \frac{t \cdot {\sin k}^{2}}{\cos k}} \]
                12. lift-sin.f64N/A

                  \[\leadsto \frac{2}{\left(\frac{k}{\ell} \cdot \frac{k}{\ell}\right) \cdot \frac{t \cdot {\sin k}^{2}}{\cos k}} \]
                13. lower-cos.f6481.5

                  \[\leadsto \frac{2}{\left(\frac{k}{\ell} \cdot \frac{k}{\ell}\right) \cdot \frac{t \cdot {\sin k}^{2}}{\cos k}} \]
              11. Applied rewrites81.5%

                \[\leadsto \frac{2}{\color{blue}{\left(\frac{k}{\ell} \cdot \frac{k}{\ell}\right) \cdot \frac{t \cdot {\sin k}^{2}}{\cos k}}} \]
            9. Recombined 2 regimes into one program.
            10. Final simplification31.3%

              \[\leadsto \begin{array}{l} \mathbf{if}\;k \leq 3800:\\ \;\;\;\;\frac{2}{\left(\left(e^{\log t \cdot 3 - \log \ell \cdot 2} \cdot \sin k\right) \cdot \tan k\right) \cdot 2}\\ \mathbf{else}:\\ \;\;\;\;\frac{2}{\left(\frac{k}{\ell} \cdot \frac{k}{\ell}\right) \cdot \frac{t \cdot {\sin k}^{2}}{\cos k}}\\ \end{array} \]
            11. Add Preprocessing

            Alternative 19: 63.5% accurate, 0.9× speedup?

            \[\begin{array}{l} l_m = \left|\ell\right| \\ t\_m = \left|t\right| \\ t\_s = \mathsf{copysign}\left(1, t\right) \\ t\_s \cdot \begin{array}{l} \mathbf{if}\;\frac{2}{\left(\left(\frac{{t\_m}^{3}}{l\_m \cdot l\_m} \cdot \sin k\right) \cdot \tan k\right) \cdot \left(\left(1 + {\left(\frac{k}{t\_m}\right)}^{2}\right) + 1\right)} \leq 2 \cdot 10^{+275}:\\ \;\;\;\;\frac{2}{\left(\frac{\left(t\_m \cdot t\_m\right) \cdot \left(2 + 0.3333333333333333 \cdot \left(k \cdot k\right)\right) + k \cdot k}{l\_m \cdot l\_m} \cdot t\_m\right) \cdot \left(k \cdot k\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{2}{\left(\left(\frac{k}{l\_m} \cdot \frac{k}{l\_m}\right) \cdot t\_m\right) \cdot \left(k \cdot k\right)}\\ \end{array} \end{array} \]
            l_m = (fabs.f64 l)
            t\_m = (fabs.f64 t)
            t\_s = (copysign.f64 #s(literal 1 binary64) t)
            (FPCore (t_s t_m l_m k)
             :precision binary64
             (*
              t_s
              (if (<=
                   (/
                    2.0
                    (*
                     (* (* (/ (pow t_m 3.0) (* l_m l_m)) (sin k)) (tan k))
                     (+ (+ 1.0 (pow (/ k t_m) 2.0)) 1.0)))
                   2e+275)
                (/
                 2.0
                 (*
                  (*
                   (/
                    (+ (* (* t_m t_m) (+ 2.0 (* 0.3333333333333333 (* k k)))) (* k k))
                    (* l_m l_m))
                   t_m)
                  (* k k)))
                (/ 2.0 (* (* (* (/ k l_m) (/ k l_m)) t_m) (* k k))))))
            l_m = fabs(l);
            t\_m = fabs(t);
            t\_s = copysign(1.0, t);
            double code(double t_s, double t_m, double l_m, double k) {
            	double tmp;
            	if ((2.0 / ((((pow(t_m, 3.0) / (l_m * l_m)) * sin(k)) * tan(k)) * ((1.0 + pow((k / t_m), 2.0)) + 1.0))) <= 2e+275) {
            		tmp = 2.0 / ((((((t_m * t_m) * (2.0 + (0.3333333333333333 * (k * k)))) + (k * k)) / (l_m * l_m)) * t_m) * (k * k));
            	} else {
            		tmp = 2.0 / ((((k / l_m) * (k / l_m)) * t_m) * (k * k));
            	}
            	return t_s * tmp;
            }
            
            l_m =     private
            t\_m =     private
            t\_s =     private
            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_s, t_m, l_m, k)
            use fmin_fmax_functions
                real(8), intent (in) :: t_s
                real(8), intent (in) :: t_m
                real(8), intent (in) :: l_m
                real(8), intent (in) :: k
                real(8) :: tmp
                if ((2.0d0 / (((((t_m ** 3.0d0) / (l_m * l_m)) * sin(k)) * tan(k)) * ((1.0d0 + ((k / t_m) ** 2.0d0)) + 1.0d0))) <= 2d+275) then
                    tmp = 2.0d0 / ((((((t_m * t_m) * (2.0d0 + (0.3333333333333333d0 * (k * k)))) + (k * k)) / (l_m * l_m)) * t_m) * (k * k))
                else
                    tmp = 2.0d0 / ((((k / l_m) * (k / l_m)) * t_m) * (k * k))
                end if
                code = t_s * tmp
            end function
            
            l_m = Math.abs(l);
            t\_m = Math.abs(t);
            t\_s = Math.copySign(1.0, t);
            public static double code(double t_s, double t_m, double l_m, double k) {
            	double tmp;
            	if ((2.0 / ((((Math.pow(t_m, 3.0) / (l_m * l_m)) * Math.sin(k)) * Math.tan(k)) * ((1.0 + Math.pow((k / t_m), 2.0)) + 1.0))) <= 2e+275) {
            		tmp = 2.0 / ((((((t_m * t_m) * (2.0 + (0.3333333333333333 * (k * k)))) + (k * k)) / (l_m * l_m)) * t_m) * (k * k));
            	} else {
            		tmp = 2.0 / ((((k / l_m) * (k / l_m)) * t_m) * (k * k));
            	}
            	return t_s * tmp;
            }
            
            l_m = math.fabs(l)
            t\_m = math.fabs(t)
            t\_s = math.copysign(1.0, t)
            def code(t_s, t_m, l_m, k):
            	tmp = 0
            	if (2.0 / ((((math.pow(t_m, 3.0) / (l_m * l_m)) * math.sin(k)) * math.tan(k)) * ((1.0 + math.pow((k / t_m), 2.0)) + 1.0))) <= 2e+275:
            		tmp = 2.0 / ((((((t_m * t_m) * (2.0 + (0.3333333333333333 * (k * k)))) + (k * k)) / (l_m * l_m)) * t_m) * (k * k))
            	else:
            		tmp = 2.0 / ((((k / l_m) * (k / l_m)) * t_m) * (k * k))
            	return t_s * tmp
            
            l_m = abs(l)
            t\_m = abs(t)
            t\_s = copysign(1.0, t)
            function code(t_s, t_m, l_m, k)
            	tmp = 0.0
            	if (Float64(2.0 / Float64(Float64(Float64(Float64((t_m ^ 3.0) / Float64(l_m * l_m)) * sin(k)) * tan(k)) * Float64(Float64(1.0 + (Float64(k / t_m) ^ 2.0)) + 1.0))) <= 2e+275)
            		tmp = Float64(2.0 / Float64(Float64(Float64(Float64(Float64(Float64(t_m * t_m) * Float64(2.0 + Float64(0.3333333333333333 * Float64(k * k)))) + Float64(k * k)) / Float64(l_m * l_m)) * t_m) * Float64(k * k)));
            	else
            		tmp = Float64(2.0 / Float64(Float64(Float64(Float64(k / l_m) * Float64(k / l_m)) * t_m) * Float64(k * k)));
            	end
            	return Float64(t_s * tmp)
            end
            
            l_m = abs(l);
            t\_m = abs(t);
            t\_s = sign(t) * abs(1.0);
            function tmp_2 = code(t_s, t_m, l_m, k)
            	tmp = 0.0;
            	if ((2.0 / (((((t_m ^ 3.0) / (l_m * l_m)) * sin(k)) * tan(k)) * ((1.0 + ((k / t_m) ^ 2.0)) + 1.0))) <= 2e+275)
            		tmp = 2.0 / ((((((t_m * t_m) * (2.0 + (0.3333333333333333 * (k * k)))) + (k * k)) / (l_m * l_m)) * t_m) * (k * k));
            	else
            		tmp = 2.0 / ((((k / l_m) * (k / l_m)) * t_m) * (k * k));
            	end
            	tmp_2 = t_s * tmp;
            end
            
            l_m = N[Abs[l], $MachinePrecision]
            t\_m = N[Abs[t], $MachinePrecision]
            t\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[t]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
            code[t$95$s_, t$95$m_, l$95$m_, k_] := N[(t$95$s * If[LessEqual[N[(2.0 / N[(N[(N[(N[(N[Power[t$95$m, 3.0], $MachinePrecision] / N[(l$95$m * l$95$m), $MachinePrecision]), $MachinePrecision] * N[Sin[k], $MachinePrecision]), $MachinePrecision] * N[Tan[k], $MachinePrecision]), $MachinePrecision] * N[(N[(1.0 + N[Power[N[(k / t$95$m), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 2e+275], N[(2.0 / N[(N[(N[(N[(N[(N[(t$95$m * t$95$m), $MachinePrecision] * N[(2.0 + N[(0.3333333333333333 * N[(k * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(k * k), $MachinePrecision]), $MachinePrecision] / N[(l$95$m * l$95$m), $MachinePrecision]), $MachinePrecision] * t$95$m), $MachinePrecision] * N[(k * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(2.0 / N[(N[(N[(N[(k / l$95$m), $MachinePrecision] * N[(k / l$95$m), $MachinePrecision]), $MachinePrecision] * t$95$m), $MachinePrecision] * N[(k * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]), $MachinePrecision]
            
            \begin{array}{l}
            l_m = \left|\ell\right|
            \\
            t\_m = \left|t\right|
            \\
            t\_s = \mathsf{copysign}\left(1, t\right)
            
            \\
            t\_s \cdot \begin{array}{l}
            \mathbf{if}\;\frac{2}{\left(\left(\frac{{t\_m}^{3}}{l\_m \cdot l\_m} \cdot \sin k\right) \cdot \tan k\right) \cdot \left(\left(1 + {\left(\frac{k}{t\_m}\right)}^{2}\right) + 1\right)} \leq 2 \cdot 10^{+275}:\\
            \;\;\;\;\frac{2}{\left(\frac{\left(t\_m \cdot t\_m\right) \cdot \left(2 + 0.3333333333333333 \cdot \left(k \cdot k\right)\right) + k \cdot k}{l\_m \cdot l\_m} \cdot t\_m\right) \cdot \left(k \cdot k\right)}\\
            
            \mathbf{else}:\\
            \;\;\;\;\frac{2}{\left(\left(\frac{k}{l\_m} \cdot \frac{k}{l\_m}\right) \cdot t\_m\right) \cdot \left(k \cdot k\right)}\\
            
            
            \end{array}
            \end{array}
            
            Derivation
            1. Split input into 2 regimes
            2. if (/.f64 #s(literal 2 binary64) (*.f64 (*.f64 (*.f64 (/.f64 (pow.f64 t #s(literal 3 binary64)) (*.f64 l l)) (sin.f64 k)) (tan.f64 k)) (+.f64 (+.f64 #s(literal 1 binary64) (pow.f64 (/.f64 k t) #s(literal 2 binary64))) #s(literal 1 binary64)))) < 1.99999999999999992e275

              1. Initial program 80.1%

                \[\frac{2}{\left(\left(\frac{{t}^{3}}{\ell \cdot \ell} \cdot \sin k\right) \cdot \tan k\right) \cdot \left(\left(1 + {\left(\frac{k}{t}\right)}^{2}\right) + 1\right)} \]
              2. Add Preprocessing
              3. Taylor expanded in k around 0

                \[\leadsto \frac{2}{\color{blue}{{k}^{2} \cdot \left(2 \cdot \frac{{t}^{3}}{{\ell}^{2}} + \frac{{k}^{2} \cdot \left({t}^{3} \cdot \left(\frac{1}{3} + \frac{1}{{t}^{2}}\right)\right)}{{\ell}^{2}}\right)}} \]
              4. Step-by-step derivation
                1. *-commutativeN/A

                  \[\leadsto \frac{2}{\left(2 \cdot \frac{{t}^{3}}{{\ell}^{2}} + \frac{{k}^{2} \cdot \left({t}^{3} \cdot \left(\frac{1}{3} + \frac{1}{{t}^{2}}\right)\right)}{{\ell}^{2}}\right) \cdot \color{blue}{{k}^{2}}} \]
                2. lower-*.f64N/A

                  \[\leadsto \frac{2}{\left(2 \cdot \frac{{t}^{3}}{{\ell}^{2}} + \frac{{k}^{2} \cdot \left({t}^{3} \cdot \left(\frac{1}{3} + \frac{1}{{t}^{2}}\right)\right)}{{\ell}^{2}}\right) \cdot \color{blue}{{k}^{2}}} \]
              5. Applied rewrites65.9%

                \[\leadsto \frac{2}{\color{blue}{\frac{\left(0.3333333333333333 \cdot {t}^{3} + t\right) \cdot \left(k \cdot k\right) + 2 \cdot {t}^{3}}{\ell \cdot \ell} \cdot \left(k \cdot k\right)}} \]
              6. Taylor expanded in t around 0

                \[\leadsto \frac{2}{\left(t \cdot \left({t}^{2} \cdot \left(\frac{1}{3} \cdot \frac{{k}^{2}}{{\ell}^{2}} + 2 \cdot \frac{1}{{\ell}^{2}}\right) + \frac{{k}^{2}}{{\ell}^{2}}\right)\right) \cdot \left(\color{blue}{k} \cdot k\right)} \]
              7. Step-by-step derivation
                1. *-commutativeN/A

                  \[\leadsto \frac{2}{\left(\left({t}^{2} \cdot \left(\frac{1}{3} \cdot \frac{{k}^{2}}{{\ell}^{2}} + 2 \cdot \frac{1}{{\ell}^{2}}\right) + \frac{{k}^{2}}{{\ell}^{2}}\right) \cdot t\right) \cdot \left(k \cdot k\right)} \]
                2. lower-*.f64N/A

                  \[\leadsto \frac{2}{\left(\left({t}^{2} \cdot \left(\frac{1}{3} \cdot \frac{{k}^{2}}{{\ell}^{2}} + 2 \cdot \frac{1}{{\ell}^{2}}\right) + \frac{{k}^{2}}{{\ell}^{2}}\right) \cdot t\right) \cdot \left(k \cdot k\right)} \]
              8. Applied rewrites67.5%

                \[\leadsto \frac{2}{\left(\left(\left(\frac{\left(k \cdot k\right) \cdot 0.3333333333333333}{\ell \cdot \ell} - -2 \cdot {\ell}^{-2}\right) \cdot \left(t \cdot t\right) + \frac{k \cdot k}{\ell \cdot \ell}\right) \cdot t\right) \cdot \left(\color{blue}{k} \cdot k\right)} \]
              9. Taylor expanded in l around 0

                \[\leadsto \frac{2}{\left(\frac{{t}^{2} \cdot \left(2 + \frac{1}{3} \cdot {k}^{2}\right) + {k}^{2}}{{\ell}^{2}} \cdot t\right) \cdot \left(k \cdot k\right)} \]
              10. Step-by-step derivation
                1. lower-/.f64N/A

                  \[\leadsto \frac{2}{\left(\frac{{t}^{2} \cdot \left(2 + \frac{1}{3} \cdot {k}^{2}\right) + {k}^{2}}{{\ell}^{2}} \cdot t\right) \cdot \left(k \cdot k\right)} \]
                2. lower-+.f64N/A

                  \[\leadsto \frac{2}{\left(\frac{{t}^{2} \cdot \left(2 + \frac{1}{3} \cdot {k}^{2}\right) + {k}^{2}}{{\ell}^{2}} \cdot t\right) \cdot \left(k \cdot k\right)} \]
                3. lower-*.f64N/A

                  \[\leadsto \frac{2}{\left(\frac{{t}^{2} \cdot \left(2 + \frac{1}{3} \cdot {k}^{2}\right) + {k}^{2}}{{\ell}^{2}} \cdot t\right) \cdot \left(k \cdot k\right)} \]
                4. pow2N/A

                  \[\leadsto \frac{2}{\left(\frac{\left(t \cdot t\right) \cdot \left(2 + \frac{1}{3} \cdot {k}^{2}\right) + {k}^{2}}{{\ell}^{2}} \cdot t\right) \cdot \left(k \cdot k\right)} \]
                5. lift-*.f64N/A

                  \[\leadsto \frac{2}{\left(\frac{\left(t \cdot t\right) \cdot \left(2 + \frac{1}{3} \cdot {k}^{2}\right) + {k}^{2}}{{\ell}^{2}} \cdot t\right) \cdot \left(k \cdot k\right)} \]
                6. lower-+.f64N/A

                  \[\leadsto \frac{2}{\left(\frac{\left(t \cdot t\right) \cdot \left(2 + \frac{1}{3} \cdot {k}^{2}\right) + {k}^{2}}{{\ell}^{2}} \cdot t\right) \cdot \left(k \cdot k\right)} \]
                7. lower-*.f64N/A

                  \[\leadsto \frac{2}{\left(\frac{\left(t \cdot t\right) \cdot \left(2 + \frac{1}{3} \cdot {k}^{2}\right) + {k}^{2}}{{\ell}^{2}} \cdot t\right) \cdot \left(k \cdot k\right)} \]
                8. pow2N/A

                  \[\leadsto \frac{2}{\left(\frac{\left(t \cdot t\right) \cdot \left(2 + \frac{1}{3} \cdot \left(k \cdot k\right)\right) + {k}^{2}}{{\ell}^{2}} \cdot t\right) \cdot \left(k \cdot k\right)} \]
                9. lift-*.f64N/A

                  \[\leadsto \frac{2}{\left(\frac{\left(t \cdot t\right) \cdot \left(2 + \frac{1}{3} \cdot \left(k \cdot k\right)\right) + {k}^{2}}{{\ell}^{2}} \cdot t\right) \cdot \left(k \cdot k\right)} \]
                10. pow2N/A

                  \[\leadsto \frac{2}{\left(\frac{\left(t \cdot t\right) \cdot \left(2 + \frac{1}{3} \cdot \left(k \cdot k\right)\right) + k \cdot k}{{\ell}^{2}} \cdot t\right) \cdot \left(k \cdot k\right)} \]
                11. lift-*.f64N/A

                  \[\leadsto \frac{2}{\left(\frac{\left(t \cdot t\right) \cdot \left(2 + \frac{1}{3} \cdot \left(k \cdot k\right)\right) + k \cdot k}{{\ell}^{2}} \cdot t\right) \cdot \left(k \cdot k\right)} \]
                12. pow2N/A

                  \[\leadsto \frac{2}{\left(\frac{\left(t \cdot t\right) \cdot \left(2 + \frac{1}{3} \cdot \left(k \cdot k\right)\right) + k \cdot k}{\ell \cdot \ell} \cdot t\right) \cdot \left(k \cdot k\right)} \]
                13. lift-*.f6467.8

                  \[\leadsto \frac{2}{\left(\frac{\left(t \cdot t\right) \cdot \left(2 + 0.3333333333333333 \cdot \left(k \cdot k\right)\right) + k \cdot k}{\ell \cdot \ell} \cdot t\right) \cdot \left(k \cdot k\right)} \]
              11. Applied rewrites67.8%

                \[\leadsto \frac{2}{\left(\frac{\left(t \cdot t\right) \cdot \left(2 + 0.3333333333333333 \cdot \left(k \cdot k\right)\right) + k \cdot k}{\ell \cdot \ell} \cdot t\right) \cdot \left(k \cdot k\right)} \]

              if 1.99999999999999992e275 < (/.f64 #s(literal 2 binary64) (*.f64 (*.f64 (*.f64 (/.f64 (pow.f64 t #s(literal 3 binary64)) (*.f64 l l)) (sin.f64 k)) (tan.f64 k)) (+.f64 (+.f64 #s(literal 1 binary64) (pow.f64 (/.f64 k t) #s(literal 2 binary64))) #s(literal 1 binary64))))

              1. Initial program 18.5%

                \[\frac{2}{\left(\left(\frac{{t}^{3}}{\ell \cdot \ell} \cdot \sin k\right) \cdot \tan k\right) \cdot \left(\left(1 + {\left(\frac{k}{t}\right)}^{2}\right) + 1\right)} \]
              2. Add Preprocessing
              3. Taylor expanded in k around 0

                \[\leadsto \frac{2}{\color{blue}{{k}^{2} \cdot \left(2 \cdot \frac{{t}^{3}}{{\ell}^{2}} + \frac{{k}^{2} \cdot \left({t}^{3} \cdot \left(\frac{1}{3} + \frac{1}{{t}^{2}}\right)\right)}{{\ell}^{2}}\right)}} \]
              4. Step-by-step derivation
                1. *-commutativeN/A

                  \[\leadsto \frac{2}{\left(2 \cdot \frac{{t}^{3}}{{\ell}^{2}} + \frac{{k}^{2} \cdot \left({t}^{3} \cdot \left(\frac{1}{3} + \frac{1}{{t}^{2}}\right)\right)}{{\ell}^{2}}\right) \cdot \color{blue}{{k}^{2}}} \]
                2. lower-*.f64N/A

                  \[\leadsto \frac{2}{\left(2 \cdot \frac{{t}^{3}}{{\ell}^{2}} + \frac{{k}^{2} \cdot \left({t}^{3} \cdot \left(\frac{1}{3} + \frac{1}{{t}^{2}}\right)\right)}{{\ell}^{2}}\right) \cdot \color{blue}{{k}^{2}}} \]
              5. Applied rewrites40.9%

                \[\leadsto \frac{2}{\color{blue}{\frac{\left(0.3333333333333333 \cdot {t}^{3} + t\right) \cdot \left(k \cdot k\right) + 2 \cdot {t}^{3}}{\ell \cdot \ell} \cdot \left(k \cdot k\right)}} \]
              6. Taylor expanded in t around 0

                \[\leadsto \frac{2}{\left(t \cdot \left({t}^{2} \cdot \left(\frac{1}{3} \cdot \frac{{k}^{2}}{{\ell}^{2}} + 2 \cdot \frac{1}{{\ell}^{2}}\right) + \frac{{k}^{2}}{{\ell}^{2}}\right)\right) \cdot \left(\color{blue}{k} \cdot k\right)} \]
              7. Step-by-step derivation
                1. *-commutativeN/A

                  \[\leadsto \frac{2}{\left(\left({t}^{2} \cdot \left(\frac{1}{3} \cdot \frac{{k}^{2}}{{\ell}^{2}} + 2 \cdot \frac{1}{{\ell}^{2}}\right) + \frac{{k}^{2}}{{\ell}^{2}}\right) \cdot t\right) \cdot \left(k \cdot k\right)} \]
                2. lower-*.f64N/A

                  \[\leadsto \frac{2}{\left(\left({t}^{2} \cdot \left(\frac{1}{3} \cdot \frac{{k}^{2}}{{\ell}^{2}} + 2 \cdot \frac{1}{{\ell}^{2}}\right) + \frac{{k}^{2}}{{\ell}^{2}}\right) \cdot t\right) \cdot \left(k \cdot k\right)} \]
              8. Applied rewrites36.3%

                \[\leadsto \frac{2}{\left(\left(\left(\frac{\left(k \cdot k\right) \cdot 0.3333333333333333}{\ell \cdot \ell} - -2 \cdot {\ell}^{-2}\right) \cdot \left(t \cdot t\right) + \frac{k \cdot k}{\ell \cdot \ell}\right) \cdot t\right) \cdot \left(\color{blue}{k} \cdot k\right)} \]
              9. Taylor expanded in t around 0

                \[\leadsto \frac{2}{\left(\frac{{k}^{2}}{{\ell}^{2}} \cdot t\right) \cdot \left(k \cdot k\right)} \]
              10. Step-by-step derivation
                1. pow2N/A

                  \[\leadsto \frac{2}{\left(\frac{k \cdot k}{{\ell}^{2}} \cdot t\right) \cdot \left(k \cdot k\right)} \]
                2. pow2N/A

                  \[\leadsto \frac{2}{\left(\frac{k \cdot k}{\ell \cdot \ell} \cdot t\right) \cdot \left(k \cdot k\right)} \]
                3. times-fracN/A

                  \[\leadsto \frac{2}{\left(\left(\frac{k}{\ell} \cdot \frac{k}{\ell}\right) \cdot t\right) \cdot \left(k \cdot k\right)} \]
                4. lower-*.f64N/A

                  \[\leadsto \frac{2}{\left(\left(\frac{k}{\ell} \cdot \frac{k}{\ell}\right) \cdot t\right) \cdot \left(k \cdot k\right)} \]
                5. lower-/.f64N/A

                  \[\leadsto \frac{2}{\left(\left(\frac{k}{\ell} \cdot \frac{k}{\ell}\right) \cdot t\right) \cdot \left(k \cdot k\right)} \]
                6. lower-/.f6455.6

                  \[\leadsto \frac{2}{\left(\left(\frac{k}{\ell} \cdot \frac{k}{\ell}\right) \cdot t\right) \cdot \left(k \cdot k\right)} \]
              11. Applied rewrites55.6%

                \[\leadsto \frac{2}{\left(\left(\frac{k}{\ell} \cdot \frac{k}{\ell}\right) \cdot t\right) \cdot \left(k \cdot k\right)} \]
            3. Recombined 2 regimes into one program.
            4. Final simplification62.6%

              \[\leadsto \begin{array}{l} \mathbf{if}\;\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)} \leq 2 \cdot 10^{+275}:\\ \;\;\;\;\frac{2}{\left(\frac{\left(t \cdot t\right) \cdot \left(2 + 0.3333333333333333 \cdot \left(k \cdot k\right)\right) + k \cdot k}{\ell \cdot \ell} \cdot t\right) \cdot \left(k \cdot k\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{2}{\left(\left(\frac{k}{\ell} \cdot \frac{k}{\ell}\right) \cdot t\right) \cdot \left(k \cdot k\right)}\\ \end{array} \]
            5. Add Preprocessing

            Alternative 20: 62.7% accurate, 0.9× speedup?

            \[\begin{array}{l} l_m = \left|\ell\right| \\ t\_m = \left|t\right| \\ t\_s = \mathsf{copysign}\left(1, t\right) \\ t\_s \cdot \begin{array}{l} \mathbf{if}\;\frac{2}{\left(\left(\frac{{t\_m}^{3}}{l\_m \cdot l\_m} \cdot \sin k\right) \cdot \tan k\right) \cdot \left(\left(1 + {\left(\frac{k}{t\_m}\right)}^{2}\right) + 1\right)} \leq 2 \cdot 10^{+275}:\\ \;\;\;\;\frac{2}{\left(\left(2 \cdot \frac{t\_m \cdot t\_m}{l\_m \cdot l\_m}\right) \cdot t\_m\right) \cdot \left(k \cdot k\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{2}{\left(\left(\frac{k}{l\_m} \cdot \frac{k}{l\_m}\right) \cdot t\_m\right) \cdot \left(k \cdot k\right)}\\ \end{array} \end{array} \]
            l_m = (fabs.f64 l)
            t\_m = (fabs.f64 t)
            t\_s = (copysign.f64 #s(literal 1 binary64) t)
            (FPCore (t_s t_m l_m k)
             :precision binary64
             (*
              t_s
              (if (<=
                   (/
                    2.0
                    (*
                     (* (* (/ (pow t_m 3.0) (* l_m l_m)) (sin k)) (tan k))
                     (+ (+ 1.0 (pow (/ k t_m) 2.0)) 1.0)))
                   2e+275)
                (/ 2.0 (* (* (* 2.0 (/ (* t_m t_m) (* l_m l_m))) t_m) (* k k)))
                (/ 2.0 (* (* (* (/ k l_m) (/ k l_m)) t_m) (* k k))))))
            l_m = fabs(l);
            t\_m = fabs(t);
            t\_s = copysign(1.0, t);
            double code(double t_s, double t_m, double l_m, double k) {
            	double tmp;
            	if ((2.0 / ((((pow(t_m, 3.0) / (l_m * l_m)) * sin(k)) * tan(k)) * ((1.0 + pow((k / t_m), 2.0)) + 1.0))) <= 2e+275) {
            		tmp = 2.0 / (((2.0 * ((t_m * t_m) / (l_m * l_m))) * t_m) * (k * k));
            	} else {
            		tmp = 2.0 / ((((k / l_m) * (k / l_m)) * t_m) * (k * k));
            	}
            	return t_s * tmp;
            }
            
            l_m =     private
            t\_m =     private
            t\_s =     private
            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_s, t_m, l_m, k)
            use fmin_fmax_functions
                real(8), intent (in) :: t_s
                real(8), intent (in) :: t_m
                real(8), intent (in) :: l_m
                real(8), intent (in) :: k
                real(8) :: tmp
                if ((2.0d0 / (((((t_m ** 3.0d0) / (l_m * l_m)) * sin(k)) * tan(k)) * ((1.0d0 + ((k / t_m) ** 2.0d0)) + 1.0d0))) <= 2d+275) then
                    tmp = 2.0d0 / (((2.0d0 * ((t_m * t_m) / (l_m * l_m))) * t_m) * (k * k))
                else
                    tmp = 2.0d0 / ((((k / l_m) * (k / l_m)) * t_m) * (k * k))
                end if
                code = t_s * tmp
            end function
            
            l_m = Math.abs(l);
            t\_m = Math.abs(t);
            t\_s = Math.copySign(1.0, t);
            public static double code(double t_s, double t_m, double l_m, double k) {
            	double tmp;
            	if ((2.0 / ((((Math.pow(t_m, 3.0) / (l_m * l_m)) * Math.sin(k)) * Math.tan(k)) * ((1.0 + Math.pow((k / t_m), 2.0)) + 1.0))) <= 2e+275) {
            		tmp = 2.0 / (((2.0 * ((t_m * t_m) / (l_m * l_m))) * t_m) * (k * k));
            	} else {
            		tmp = 2.0 / ((((k / l_m) * (k / l_m)) * t_m) * (k * k));
            	}
            	return t_s * tmp;
            }
            
            l_m = math.fabs(l)
            t\_m = math.fabs(t)
            t\_s = math.copysign(1.0, t)
            def code(t_s, t_m, l_m, k):
            	tmp = 0
            	if (2.0 / ((((math.pow(t_m, 3.0) / (l_m * l_m)) * math.sin(k)) * math.tan(k)) * ((1.0 + math.pow((k / t_m), 2.0)) + 1.0))) <= 2e+275:
            		tmp = 2.0 / (((2.0 * ((t_m * t_m) / (l_m * l_m))) * t_m) * (k * k))
            	else:
            		tmp = 2.0 / ((((k / l_m) * (k / l_m)) * t_m) * (k * k))
            	return t_s * tmp
            
            l_m = abs(l)
            t\_m = abs(t)
            t\_s = copysign(1.0, t)
            function code(t_s, t_m, l_m, k)
            	tmp = 0.0
            	if (Float64(2.0 / Float64(Float64(Float64(Float64((t_m ^ 3.0) / Float64(l_m * l_m)) * sin(k)) * tan(k)) * Float64(Float64(1.0 + (Float64(k / t_m) ^ 2.0)) + 1.0))) <= 2e+275)
            		tmp = Float64(2.0 / Float64(Float64(Float64(2.0 * Float64(Float64(t_m * t_m) / Float64(l_m * l_m))) * t_m) * Float64(k * k)));
            	else
            		tmp = Float64(2.0 / Float64(Float64(Float64(Float64(k / l_m) * Float64(k / l_m)) * t_m) * Float64(k * k)));
            	end
            	return Float64(t_s * tmp)
            end
            
            l_m = abs(l);
            t\_m = abs(t);
            t\_s = sign(t) * abs(1.0);
            function tmp_2 = code(t_s, t_m, l_m, k)
            	tmp = 0.0;
            	if ((2.0 / (((((t_m ^ 3.0) / (l_m * l_m)) * sin(k)) * tan(k)) * ((1.0 + ((k / t_m) ^ 2.0)) + 1.0))) <= 2e+275)
            		tmp = 2.0 / (((2.0 * ((t_m * t_m) / (l_m * l_m))) * t_m) * (k * k));
            	else
            		tmp = 2.0 / ((((k / l_m) * (k / l_m)) * t_m) * (k * k));
            	end
            	tmp_2 = t_s * tmp;
            end
            
            l_m = N[Abs[l], $MachinePrecision]
            t\_m = N[Abs[t], $MachinePrecision]
            t\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[t]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
            code[t$95$s_, t$95$m_, l$95$m_, k_] := N[(t$95$s * If[LessEqual[N[(2.0 / N[(N[(N[(N[(N[Power[t$95$m, 3.0], $MachinePrecision] / N[(l$95$m * l$95$m), $MachinePrecision]), $MachinePrecision] * N[Sin[k], $MachinePrecision]), $MachinePrecision] * N[Tan[k], $MachinePrecision]), $MachinePrecision] * N[(N[(1.0 + N[Power[N[(k / t$95$m), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 2e+275], N[(2.0 / N[(N[(N[(2.0 * N[(N[(t$95$m * t$95$m), $MachinePrecision] / N[(l$95$m * l$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * t$95$m), $MachinePrecision] * N[(k * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(2.0 / N[(N[(N[(N[(k / l$95$m), $MachinePrecision] * N[(k / l$95$m), $MachinePrecision]), $MachinePrecision] * t$95$m), $MachinePrecision] * N[(k * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]), $MachinePrecision]
            
            \begin{array}{l}
            l_m = \left|\ell\right|
            \\
            t\_m = \left|t\right|
            \\
            t\_s = \mathsf{copysign}\left(1, t\right)
            
            \\
            t\_s \cdot \begin{array}{l}
            \mathbf{if}\;\frac{2}{\left(\left(\frac{{t\_m}^{3}}{l\_m \cdot l\_m} \cdot \sin k\right) \cdot \tan k\right) \cdot \left(\left(1 + {\left(\frac{k}{t\_m}\right)}^{2}\right) + 1\right)} \leq 2 \cdot 10^{+275}:\\
            \;\;\;\;\frac{2}{\left(\left(2 \cdot \frac{t\_m \cdot t\_m}{l\_m \cdot l\_m}\right) \cdot t\_m\right) \cdot \left(k \cdot k\right)}\\
            
            \mathbf{else}:\\
            \;\;\;\;\frac{2}{\left(\left(\frac{k}{l\_m} \cdot \frac{k}{l\_m}\right) \cdot t\_m\right) \cdot \left(k \cdot k\right)}\\
            
            
            \end{array}
            \end{array}
            
            Derivation
            1. Split input into 2 regimes
            2. if (/.f64 #s(literal 2 binary64) (*.f64 (*.f64 (*.f64 (/.f64 (pow.f64 t #s(literal 3 binary64)) (*.f64 l l)) (sin.f64 k)) (tan.f64 k)) (+.f64 (+.f64 #s(literal 1 binary64) (pow.f64 (/.f64 k t) #s(literal 2 binary64))) #s(literal 1 binary64)))) < 1.99999999999999992e275

              1. Initial program 80.1%

                \[\frac{2}{\left(\left(\frac{{t}^{3}}{\ell \cdot \ell} \cdot \sin k\right) \cdot \tan k\right) \cdot \left(\left(1 + {\left(\frac{k}{t}\right)}^{2}\right) + 1\right)} \]
              2. Add Preprocessing
              3. Taylor expanded in k around 0

                \[\leadsto \frac{2}{\color{blue}{{k}^{2} \cdot \left(2 \cdot \frac{{t}^{3}}{{\ell}^{2}} + \frac{{k}^{2} \cdot \left({t}^{3} \cdot \left(\frac{1}{3} + \frac{1}{{t}^{2}}\right)\right)}{{\ell}^{2}}\right)}} \]
              4. Step-by-step derivation
                1. *-commutativeN/A

                  \[\leadsto \frac{2}{\left(2 \cdot \frac{{t}^{3}}{{\ell}^{2}} + \frac{{k}^{2} \cdot \left({t}^{3} \cdot \left(\frac{1}{3} + \frac{1}{{t}^{2}}\right)\right)}{{\ell}^{2}}\right) \cdot \color{blue}{{k}^{2}}} \]
                2. lower-*.f64N/A

                  \[\leadsto \frac{2}{\left(2 \cdot \frac{{t}^{3}}{{\ell}^{2}} + \frac{{k}^{2} \cdot \left({t}^{3} \cdot \left(\frac{1}{3} + \frac{1}{{t}^{2}}\right)\right)}{{\ell}^{2}}\right) \cdot \color{blue}{{k}^{2}}} \]
              5. Applied rewrites65.9%

                \[\leadsto \frac{2}{\color{blue}{\frac{\left(0.3333333333333333 \cdot {t}^{3} + t\right) \cdot \left(k \cdot k\right) + 2 \cdot {t}^{3}}{\ell \cdot \ell} \cdot \left(k \cdot k\right)}} \]
              6. Taylor expanded in t around 0

                \[\leadsto \frac{2}{\left(t \cdot \left({t}^{2} \cdot \left(\frac{1}{3} \cdot \frac{{k}^{2}}{{\ell}^{2}} + 2 \cdot \frac{1}{{\ell}^{2}}\right) + \frac{{k}^{2}}{{\ell}^{2}}\right)\right) \cdot \left(\color{blue}{k} \cdot k\right)} \]
              7. Step-by-step derivation
                1. *-commutativeN/A

                  \[\leadsto \frac{2}{\left(\left({t}^{2} \cdot \left(\frac{1}{3} \cdot \frac{{k}^{2}}{{\ell}^{2}} + 2 \cdot \frac{1}{{\ell}^{2}}\right) + \frac{{k}^{2}}{{\ell}^{2}}\right) \cdot t\right) \cdot \left(k \cdot k\right)} \]
                2. lower-*.f64N/A

                  \[\leadsto \frac{2}{\left(\left({t}^{2} \cdot \left(\frac{1}{3} \cdot \frac{{k}^{2}}{{\ell}^{2}} + 2 \cdot \frac{1}{{\ell}^{2}}\right) + \frac{{k}^{2}}{{\ell}^{2}}\right) \cdot t\right) \cdot \left(k \cdot k\right)} \]
              8. Applied rewrites67.5%

                \[\leadsto \frac{2}{\left(\left(\left(\frac{\left(k \cdot k\right) \cdot 0.3333333333333333}{\ell \cdot \ell} - -2 \cdot {\ell}^{-2}\right) \cdot \left(t \cdot t\right) + \frac{k \cdot k}{\ell \cdot \ell}\right) \cdot t\right) \cdot \left(\color{blue}{k} \cdot k\right)} \]
              9. Taylor expanded in k around 0

                \[\leadsto \frac{2}{\left(\left(2 \cdot \frac{{t}^{2}}{{\ell}^{2}}\right) \cdot t\right) \cdot \left(k \cdot k\right)} \]
              10. Step-by-step derivation
                1. lower-*.f64N/A

                  \[\leadsto \frac{2}{\left(\left(2 \cdot \frac{{t}^{2}}{{\ell}^{2}}\right) \cdot t\right) \cdot \left(k \cdot k\right)} \]
                2. lower-/.f64N/A

                  \[\leadsto \frac{2}{\left(\left(2 \cdot \frac{{t}^{2}}{{\ell}^{2}}\right) \cdot t\right) \cdot \left(k \cdot k\right)} \]
                3. pow2N/A

                  \[\leadsto \frac{2}{\left(\left(2 \cdot \frac{t \cdot t}{{\ell}^{2}}\right) \cdot t\right) \cdot \left(k \cdot k\right)} \]
                4. lift-*.f64N/A

                  \[\leadsto \frac{2}{\left(\left(2 \cdot \frac{t \cdot t}{{\ell}^{2}}\right) \cdot t\right) \cdot \left(k \cdot k\right)} \]
                5. pow2N/A

                  \[\leadsto \frac{2}{\left(\left(2 \cdot \frac{t \cdot t}{\ell \cdot \ell}\right) \cdot t\right) \cdot \left(k \cdot k\right)} \]
                6. lift-*.f6465.5

                  \[\leadsto \frac{2}{\left(\left(2 \cdot \frac{t \cdot t}{\ell \cdot \ell}\right) \cdot t\right) \cdot \left(k \cdot k\right)} \]
              11. Applied rewrites65.5%

                \[\leadsto \frac{2}{\left(\left(2 \cdot \frac{t \cdot t}{\ell \cdot \ell}\right) \cdot t\right) \cdot \left(k \cdot k\right)} \]

              if 1.99999999999999992e275 < (/.f64 #s(literal 2 binary64) (*.f64 (*.f64 (*.f64 (/.f64 (pow.f64 t #s(literal 3 binary64)) (*.f64 l l)) (sin.f64 k)) (tan.f64 k)) (+.f64 (+.f64 #s(literal 1 binary64) (pow.f64 (/.f64 k t) #s(literal 2 binary64))) #s(literal 1 binary64))))

              1. Initial program 18.5%

                \[\frac{2}{\left(\left(\frac{{t}^{3}}{\ell \cdot \ell} \cdot \sin k\right) \cdot \tan k\right) \cdot \left(\left(1 + {\left(\frac{k}{t}\right)}^{2}\right) + 1\right)} \]
              2. Add Preprocessing
              3. Taylor expanded in k around 0

                \[\leadsto \frac{2}{\color{blue}{{k}^{2} \cdot \left(2 \cdot \frac{{t}^{3}}{{\ell}^{2}} + \frac{{k}^{2} \cdot \left({t}^{3} \cdot \left(\frac{1}{3} + \frac{1}{{t}^{2}}\right)\right)}{{\ell}^{2}}\right)}} \]
              4. Step-by-step derivation
                1. *-commutativeN/A

                  \[\leadsto \frac{2}{\left(2 \cdot \frac{{t}^{3}}{{\ell}^{2}} + \frac{{k}^{2} \cdot \left({t}^{3} \cdot \left(\frac{1}{3} + \frac{1}{{t}^{2}}\right)\right)}{{\ell}^{2}}\right) \cdot \color{blue}{{k}^{2}}} \]
                2. lower-*.f64N/A

                  \[\leadsto \frac{2}{\left(2 \cdot \frac{{t}^{3}}{{\ell}^{2}} + \frac{{k}^{2} \cdot \left({t}^{3} \cdot \left(\frac{1}{3} + \frac{1}{{t}^{2}}\right)\right)}{{\ell}^{2}}\right) \cdot \color{blue}{{k}^{2}}} \]
              5. Applied rewrites40.9%

                \[\leadsto \frac{2}{\color{blue}{\frac{\left(0.3333333333333333 \cdot {t}^{3} + t\right) \cdot \left(k \cdot k\right) + 2 \cdot {t}^{3}}{\ell \cdot \ell} \cdot \left(k \cdot k\right)}} \]
              6. Taylor expanded in t around 0

                \[\leadsto \frac{2}{\left(t \cdot \left({t}^{2} \cdot \left(\frac{1}{3} \cdot \frac{{k}^{2}}{{\ell}^{2}} + 2 \cdot \frac{1}{{\ell}^{2}}\right) + \frac{{k}^{2}}{{\ell}^{2}}\right)\right) \cdot \left(\color{blue}{k} \cdot k\right)} \]
              7. Step-by-step derivation
                1. *-commutativeN/A

                  \[\leadsto \frac{2}{\left(\left({t}^{2} \cdot \left(\frac{1}{3} \cdot \frac{{k}^{2}}{{\ell}^{2}} + 2 \cdot \frac{1}{{\ell}^{2}}\right) + \frac{{k}^{2}}{{\ell}^{2}}\right) \cdot t\right) \cdot \left(k \cdot k\right)} \]
                2. lower-*.f64N/A

                  \[\leadsto \frac{2}{\left(\left({t}^{2} \cdot \left(\frac{1}{3} \cdot \frac{{k}^{2}}{{\ell}^{2}} + 2 \cdot \frac{1}{{\ell}^{2}}\right) + \frac{{k}^{2}}{{\ell}^{2}}\right) \cdot t\right) \cdot \left(k \cdot k\right)} \]
              8. Applied rewrites36.3%

                \[\leadsto \frac{2}{\left(\left(\left(\frac{\left(k \cdot k\right) \cdot 0.3333333333333333}{\ell \cdot \ell} - -2 \cdot {\ell}^{-2}\right) \cdot \left(t \cdot t\right) + \frac{k \cdot k}{\ell \cdot \ell}\right) \cdot t\right) \cdot \left(\color{blue}{k} \cdot k\right)} \]
              9. Taylor expanded in t around 0

                \[\leadsto \frac{2}{\left(\frac{{k}^{2}}{{\ell}^{2}} \cdot t\right) \cdot \left(k \cdot k\right)} \]
              10. Step-by-step derivation
                1. pow2N/A

                  \[\leadsto \frac{2}{\left(\frac{k \cdot k}{{\ell}^{2}} \cdot t\right) \cdot \left(k \cdot k\right)} \]
                2. pow2N/A

                  \[\leadsto \frac{2}{\left(\frac{k \cdot k}{\ell \cdot \ell} \cdot t\right) \cdot \left(k \cdot k\right)} \]
                3. times-fracN/A

                  \[\leadsto \frac{2}{\left(\left(\frac{k}{\ell} \cdot \frac{k}{\ell}\right) \cdot t\right) \cdot \left(k \cdot k\right)} \]
                4. lower-*.f64N/A

                  \[\leadsto \frac{2}{\left(\left(\frac{k}{\ell} \cdot \frac{k}{\ell}\right) \cdot t\right) \cdot \left(k \cdot k\right)} \]
                5. lower-/.f64N/A

                  \[\leadsto \frac{2}{\left(\left(\frac{k}{\ell} \cdot \frac{k}{\ell}\right) \cdot t\right) \cdot \left(k \cdot k\right)} \]
                6. lower-/.f6455.6

                  \[\leadsto \frac{2}{\left(\left(\frac{k}{\ell} \cdot \frac{k}{\ell}\right) \cdot t\right) \cdot \left(k \cdot k\right)} \]
              11. Applied rewrites55.6%

                \[\leadsto \frac{2}{\left(\left(\frac{k}{\ell} \cdot \frac{k}{\ell}\right) \cdot t\right) \cdot \left(k \cdot k\right)} \]
            3. Recombined 2 regimes into one program.
            4. Final simplification61.3%

              \[\leadsto \begin{array}{l} \mathbf{if}\;\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)} \leq 2 \cdot 10^{+275}:\\ \;\;\;\;\frac{2}{\left(\left(2 \cdot \frac{t \cdot t}{\ell \cdot \ell}\right) \cdot t\right) \cdot \left(k \cdot k\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{2}{\left(\left(\frac{k}{\ell} \cdot \frac{k}{\ell}\right) \cdot t\right) \cdot \left(k \cdot k\right)}\\ \end{array} \]
            5. Add Preprocessing

            Alternative 21: 59.2% accurate, 0.9× speedup?

            \[\begin{array}{l} l_m = \left|\ell\right| \\ t\_m = \left|t\right| \\ t\_s = \mathsf{copysign}\left(1, t\right) \\ t\_s \cdot \begin{array}{l} \mathbf{if}\;\frac{2}{\left(\left(\frac{{t\_m}^{3}}{l\_m \cdot l\_m} \cdot \sin k\right) \cdot \tan k\right) \cdot \left(\left(1 + {\left(\frac{k}{t\_m}\right)}^{2}\right) + 1\right)} \leq 2 \cdot 10^{+275}:\\ \;\;\;\;\frac{2}{\left(\left(2 \cdot \frac{t\_m \cdot t\_m}{l\_m \cdot l\_m}\right) \cdot t\_m\right) \cdot \left(k \cdot k\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{2}{\left(\left(k \cdot k\right) \cdot \frac{t\_m}{l\_m \cdot l\_m}\right) \cdot \left(k \cdot k\right)}\\ \end{array} \end{array} \]
            l_m = (fabs.f64 l)
            t\_m = (fabs.f64 t)
            t\_s = (copysign.f64 #s(literal 1 binary64) t)
            (FPCore (t_s t_m l_m k)
             :precision binary64
             (*
              t_s
              (if (<=
                   (/
                    2.0
                    (*
                     (* (* (/ (pow t_m 3.0) (* l_m l_m)) (sin k)) (tan k))
                     (+ (+ 1.0 (pow (/ k t_m) 2.0)) 1.0)))
                   2e+275)
                (/ 2.0 (* (* (* 2.0 (/ (* t_m t_m) (* l_m l_m))) t_m) (* k k)))
                (/ 2.0 (* (* (* k k) (/ t_m (* l_m l_m))) (* k k))))))
            l_m = fabs(l);
            t\_m = fabs(t);
            t\_s = copysign(1.0, t);
            double code(double t_s, double t_m, double l_m, double k) {
            	double tmp;
            	if ((2.0 / ((((pow(t_m, 3.0) / (l_m * l_m)) * sin(k)) * tan(k)) * ((1.0 + pow((k / t_m), 2.0)) + 1.0))) <= 2e+275) {
            		tmp = 2.0 / (((2.0 * ((t_m * t_m) / (l_m * l_m))) * t_m) * (k * k));
            	} else {
            		tmp = 2.0 / (((k * k) * (t_m / (l_m * l_m))) * (k * k));
            	}
            	return t_s * tmp;
            }
            
            l_m =     private
            t\_m =     private
            t\_s =     private
            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_s, t_m, l_m, k)
            use fmin_fmax_functions
                real(8), intent (in) :: t_s
                real(8), intent (in) :: t_m
                real(8), intent (in) :: l_m
                real(8), intent (in) :: k
                real(8) :: tmp
                if ((2.0d0 / (((((t_m ** 3.0d0) / (l_m * l_m)) * sin(k)) * tan(k)) * ((1.0d0 + ((k / t_m) ** 2.0d0)) + 1.0d0))) <= 2d+275) then
                    tmp = 2.0d0 / (((2.0d0 * ((t_m * t_m) / (l_m * l_m))) * t_m) * (k * k))
                else
                    tmp = 2.0d0 / (((k * k) * (t_m / (l_m * l_m))) * (k * k))
                end if
                code = t_s * tmp
            end function
            
            l_m = Math.abs(l);
            t\_m = Math.abs(t);
            t\_s = Math.copySign(1.0, t);
            public static double code(double t_s, double t_m, double l_m, double k) {
            	double tmp;
            	if ((2.0 / ((((Math.pow(t_m, 3.0) / (l_m * l_m)) * Math.sin(k)) * Math.tan(k)) * ((1.0 + Math.pow((k / t_m), 2.0)) + 1.0))) <= 2e+275) {
            		tmp = 2.0 / (((2.0 * ((t_m * t_m) / (l_m * l_m))) * t_m) * (k * k));
            	} else {
            		tmp = 2.0 / (((k * k) * (t_m / (l_m * l_m))) * (k * k));
            	}
            	return t_s * tmp;
            }
            
            l_m = math.fabs(l)
            t\_m = math.fabs(t)
            t\_s = math.copysign(1.0, t)
            def code(t_s, t_m, l_m, k):
            	tmp = 0
            	if (2.0 / ((((math.pow(t_m, 3.0) / (l_m * l_m)) * math.sin(k)) * math.tan(k)) * ((1.0 + math.pow((k / t_m), 2.0)) + 1.0))) <= 2e+275:
            		tmp = 2.0 / (((2.0 * ((t_m * t_m) / (l_m * l_m))) * t_m) * (k * k))
            	else:
            		tmp = 2.0 / (((k * k) * (t_m / (l_m * l_m))) * (k * k))
            	return t_s * tmp
            
            l_m = abs(l)
            t\_m = abs(t)
            t\_s = copysign(1.0, t)
            function code(t_s, t_m, l_m, k)
            	tmp = 0.0
            	if (Float64(2.0 / Float64(Float64(Float64(Float64((t_m ^ 3.0) / Float64(l_m * l_m)) * sin(k)) * tan(k)) * Float64(Float64(1.0 + (Float64(k / t_m) ^ 2.0)) + 1.0))) <= 2e+275)
            		tmp = Float64(2.0 / Float64(Float64(Float64(2.0 * Float64(Float64(t_m * t_m) / Float64(l_m * l_m))) * t_m) * Float64(k * k)));
            	else
            		tmp = Float64(2.0 / Float64(Float64(Float64(k * k) * Float64(t_m / Float64(l_m * l_m))) * Float64(k * k)));
            	end
            	return Float64(t_s * tmp)
            end
            
            l_m = abs(l);
            t\_m = abs(t);
            t\_s = sign(t) * abs(1.0);
            function tmp_2 = code(t_s, t_m, l_m, k)
            	tmp = 0.0;
            	if ((2.0 / (((((t_m ^ 3.0) / (l_m * l_m)) * sin(k)) * tan(k)) * ((1.0 + ((k / t_m) ^ 2.0)) + 1.0))) <= 2e+275)
            		tmp = 2.0 / (((2.0 * ((t_m * t_m) / (l_m * l_m))) * t_m) * (k * k));
            	else
            		tmp = 2.0 / (((k * k) * (t_m / (l_m * l_m))) * (k * k));
            	end
            	tmp_2 = t_s * tmp;
            end
            
            l_m = N[Abs[l], $MachinePrecision]
            t\_m = N[Abs[t], $MachinePrecision]
            t\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[t]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
            code[t$95$s_, t$95$m_, l$95$m_, k_] := N[(t$95$s * If[LessEqual[N[(2.0 / N[(N[(N[(N[(N[Power[t$95$m, 3.0], $MachinePrecision] / N[(l$95$m * l$95$m), $MachinePrecision]), $MachinePrecision] * N[Sin[k], $MachinePrecision]), $MachinePrecision] * N[Tan[k], $MachinePrecision]), $MachinePrecision] * N[(N[(1.0 + N[Power[N[(k / t$95$m), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 2e+275], N[(2.0 / N[(N[(N[(2.0 * N[(N[(t$95$m * t$95$m), $MachinePrecision] / N[(l$95$m * l$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * t$95$m), $MachinePrecision] * N[(k * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(2.0 / N[(N[(N[(k * k), $MachinePrecision] * N[(t$95$m / N[(l$95$m * l$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(k * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]), $MachinePrecision]
            
            \begin{array}{l}
            l_m = \left|\ell\right|
            \\
            t\_m = \left|t\right|
            \\
            t\_s = \mathsf{copysign}\left(1, t\right)
            
            \\
            t\_s \cdot \begin{array}{l}
            \mathbf{if}\;\frac{2}{\left(\left(\frac{{t\_m}^{3}}{l\_m \cdot l\_m} \cdot \sin k\right) \cdot \tan k\right) \cdot \left(\left(1 + {\left(\frac{k}{t\_m}\right)}^{2}\right) + 1\right)} \leq 2 \cdot 10^{+275}:\\
            \;\;\;\;\frac{2}{\left(\left(2 \cdot \frac{t\_m \cdot t\_m}{l\_m \cdot l\_m}\right) \cdot t\_m\right) \cdot \left(k \cdot k\right)}\\
            
            \mathbf{else}:\\
            \;\;\;\;\frac{2}{\left(\left(k \cdot k\right) \cdot \frac{t\_m}{l\_m \cdot l\_m}\right) \cdot \left(k \cdot k\right)}\\
            
            
            \end{array}
            \end{array}
            
            Derivation
            1. Split input into 2 regimes
            2. if (/.f64 #s(literal 2 binary64) (*.f64 (*.f64 (*.f64 (/.f64 (pow.f64 t #s(literal 3 binary64)) (*.f64 l l)) (sin.f64 k)) (tan.f64 k)) (+.f64 (+.f64 #s(literal 1 binary64) (pow.f64 (/.f64 k t) #s(literal 2 binary64))) #s(literal 1 binary64)))) < 1.99999999999999992e275

              1. Initial program 80.1%

                \[\frac{2}{\left(\left(\frac{{t}^{3}}{\ell \cdot \ell} \cdot \sin k\right) \cdot \tan k\right) \cdot \left(\left(1 + {\left(\frac{k}{t}\right)}^{2}\right) + 1\right)} \]
              2. Add Preprocessing
              3. Taylor expanded in k around 0

                \[\leadsto \frac{2}{\color{blue}{{k}^{2} \cdot \left(2 \cdot \frac{{t}^{3}}{{\ell}^{2}} + \frac{{k}^{2} \cdot \left({t}^{3} \cdot \left(\frac{1}{3} + \frac{1}{{t}^{2}}\right)\right)}{{\ell}^{2}}\right)}} \]
              4. Step-by-step derivation
                1. *-commutativeN/A

                  \[\leadsto \frac{2}{\left(2 \cdot \frac{{t}^{3}}{{\ell}^{2}} + \frac{{k}^{2} \cdot \left({t}^{3} \cdot \left(\frac{1}{3} + \frac{1}{{t}^{2}}\right)\right)}{{\ell}^{2}}\right) \cdot \color{blue}{{k}^{2}}} \]
                2. lower-*.f64N/A

                  \[\leadsto \frac{2}{\left(2 \cdot \frac{{t}^{3}}{{\ell}^{2}} + \frac{{k}^{2} \cdot \left({t}^{3} \cdot \left(\frac{1}{3} + \frac{1}{{t}^{2}}\right)\right)}{{\ell}^{2}}\right) \cdot \color{blue}{{k}^{2}}} \]
              5. Applied rewrites65.9%

                \[\leadsto \frac{2}{\color{blue}{\frac{\left(0.3333333333333333 \cdot {t}^{3} + t\right) \cdot \left(k \cdot k\right) + 2 \cdot {t}^{3}}{\ell \cdot \ell} \cdot \left(k \cdot k\right)}} \]
              6. Taylor expanded in t around 0

                \[\leadsto \frac{2}{\left(t \cdot \left({t}^{2} \cdot \left(\frac{1}{3} \cdot \frac{{k}^{2}}{{\ell}^{2}} + 2 \cdot \frac{1}{{\ell}^{2}}\right) + \frac{{k}^{2}}{{\ell}^{2}}\right)\right) \cdot \left(\color{blue}{k} \cdot k\right)} \]
              7. Step-by-step derivation
                1. *-commutativeN/A

                  \[\leadsto \frac{2}{\left(\left({t}^{2} \cdot \left(\frac{1}{3} \cdot \frac{{k}^{2}}{{\ell}^{2}} + 2 \cdot \frac{1}{{\ell}^{2}}\right) + \frac{{k}^{2}}{{\ell}^{2}}\right) \cdot t\right) \cdot \left(k \cdot k\right)} \]
                2. lower-*.f64N/A

                  \[\leadsto \frac{2}{\left(\left({t}^{2} \cdot \left(\frac{1}{3} \cdot \frac{{k}^{2}}{{\ell}^{2}} + 2 \cdot \frac{1}{{\ell}^{2}}\right) + \frac{{k}^{2}}{{\ell}^{2}}\right) \cdot t\right) \cdot \left(k \cdot k\right)} \]
              8. Applied rewrites67.5%

                \[\leadsto \frac{2}{\left(\left(\left(\frac{\left(k \cdot k\right) \cdot 0.3333333333333333}{\ell \cdot \ell} - -2 \cdot {\ell}^{-2}\right) \cdot \left(t \cdot t\right) + \frac{k \cdot k}{\ell \cdot \ell}\right) \cdot t\right) \cdot \left(\color{blue}{k} \cdot k\right)} \]
              9. Taylor expanded in k around 0

                \[\leadsto \frac{2}{\left(\left(2 \cdot \frac{{t}^{2}}{{\ell}^{2}}\right) \cdot t\right) \cdot \left(k \cdot k\right)} \]
              10. Step-by-step derivation
                1. lower-*.f64N/A

                  \[\leadsto \frac{2}{\left(\left(2 \cdot \frac{{t}^{2}}{{\ell}^{2}}\right) \cdot t\right) \cdot \left(k \cdot k\right)} \]
                2. lower-/.f64N/A

                  \[\leadsto \frac{2}{\left(\left(2 \cdot \frac{{t}^{2}}{{\ell}^{2}}\right) \cdot t\right) \cdot \left(k \cdot k\right)} \]
                3. pow2N/A

                  \[\leadsto \frac{2}{\left(\left(2 \cdot \frac{t \cdot t}{{\ell}^{2}}\right) \cdot t\right) \cdot \left(k \cdot k\right)} \]
                4. lift-*.f64N/A

                  \[\leadsto \frac{2}{\left(\left(2 \cdot \frac{t \cdot t}{{\ell}^{2}}\right) \cdot t\right) \cdot \left(k \cdot k\right)} \]
                5. pow2N/A

                  \[\leadsto \frac{2}{\left(\left(2 \cdot \frac{t \cdot t}{\ell \cdot \ell}\right) \cdot t\right) \cdot \left(k \cdot k\right)} \]
                6. lift-*.f6465.5

                  \[\leadsto \frac{2}{\left(\left(2 \cdot \frac{t \cdot t}{\ell \cdot \ell}\right) \cdot t\right) \cdot \left(k \cdot k\right)} \]
              11. Applied rewrites65.5%

                \[\leadsto \frac{2}{\left(\left(2 \cdot \frac{t \cdot t}{\ell \cdot \ell}\right) \cdot t\right) \cdot \left(k \cdot k\right)} \]

              if 1.99999999999999992e275 < (/.f64 #s(literal 2 binary64) (*.f64 (*.f64 (*.f64 (/.f64 (pow.f64 t #s(literal 3 binary64)) (*.f64 l l)) (sin.f64 k)) (tan.f64 k)) (+.f64 (+.f64 #s(literal 1 binary64) (pow.f64 (/.f64 k t) #s(literal 2 binary64))) #s(literal 1 binary64))))

              1. Initial program 18.5%

                \[\frac{2}{\left(\left(\frac{{t}^{3}}{\ell \cdot \ell} \cdot \sin k\right) \cdot \tan k\right) \cdot \left(\left(1 + {\left(\frac{k}{t}\right)}^{2}\right) + 1\right)} \]
              2. Add Preprocessing
              3. Taylor expanded in k around 0

                \[\leadsto \frac{2}{\color{blue}{{k}^{2} \cdot \left(2 \cdot \frac{{t}^{3}}{{\ell}^{2}} + \frac{{k}^{2} \cdot \left({t}^{3} \cdot \left(\frac{1}{3} + \frac{1}{{t}^{2}}\right)\right)}{{\ell}^{2}}\right)}} \]
              4. Step-by-step derivation
                1. *-commutativeN/A

                  \[\leadsto \frac{2}{\left(2 \cdot \frac{{t}^{3}}{{\ell}^{2}} + \frac{{k}^{2} \cdot \left({t}^{3} \cdot \left(\frac{1}{3} + \frac{1}{{t}^{2}}\right)\right)}{{\ell}^{2}}\right) \cdot \color{blue}{{k}^{2}}} \]
                2. lower-*.f64N/A

                  \[\leadsto \frac{2}{\left(2 \cdot \frac{{t}^{3}}{{\ell}^{2}} + \frac{{k}^{2} \cdot \left({t}^{3} \cdot \left(\frac{1}{3} + \frac{1}{{t}^{2}}\right)\right)}{{\ell}^{2}}\right) \cdot \color{blue}{{k}^{2}}} \]
              5. Applied rewrites40.9%

                \[\leadsto \frac{2}{\color{blue}{\frac{\left(0.3333333333333333 \cdot {t}^{3} + t\right) \cdot \left(k \cdot k\right) + 2 \cdot {t}^{3}}{\ell \cdot \ell} \cdot \left(k \cdot k\right)}} \]
              6. Taylor expanded in t around 0

                \[\leadsto \frac{2}{\frac{{k}^{2} \cdot t}{{\ell}^{2}} \cdot \left(\color{blue}{k} \cdot k\right)} \]
              7. Step-by-step derivation
                1. associate-/l*N/A

                  \[\leadsto \frac{2}{\left({k}^{2} \cdot \frac{t}{{\ell}^{2}}\right) \cdot \left(k \cdot k\right)} \]
                2. lower-*.f64N/A

                  \[\leadsto \frac{2}{\left({k}^{2} \cdot \frac{t}{{\ell}^{2}}\right) \cdot \left(k \cdot k\right)} \]
                3. pow2N/A

                  \[\leadsto \frac{2}{\left(\left(k \cdot k\right) \cdot \frac{t}{{\ell}^{2}}\right) \cdot \left(k \cdot k\right)} \]
                4. lift-*.f64N/A

                  \[\leadsto \frac{2}{\left(\left(k \cdot k\right) \cdot \frac{t}{{\ell}^{2}}\right) \cdot \left(k \cdot k\right)} \]
                5. lower-/.f64N/A

                  \[\leadsto \frac{2}{\left(\left(k \cdot k\right) \cdot \frac{t}{{\ell}^{2}}\right) \cdot \left(k \cdot k\right)} \]
                6. pow2N/A

                  \[\leadsto \frac{2}{\left(\left(k \cdot k\right) \cdot \frac{t}{\ell \cdot \ell}\right) \cdot \left(k \cdot k\right)} \]
                7. lift-*.f6445.0

                  \[\leadsto \frac{2}{\left(\left(k \cdot k\right) \cdot \frac{t}{\ell \cdot \ell}\right) \cdot \left(k \cdot k\right)} \]
              8. Applied rewrites45.0%

                \[\leadsto \frac{2}{\left(\left(k \cdot k\right) \cdot \frac{t}{\ell \cdot \ell}\right) \cdot \left(\color{blue}{k} \cdot k\right)} \]
            3. Recombined 2 regimes into one program.
            4. Final simplification56.7%

              \[\leadsto \begin{array}{l} \mathbf{if}\;\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)} \leq 2 \cdot 10^{+275}:\\ \;\;\;\;\frac{2}{\left(\left(2 \cdot \frac{t \cdot t}{\ell \cdot \ell}\right) \cdot t\right) \cdot \left(k \cdot k\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{2}{\left(\left(k \cdot k\right) \cdot \frac{t}{\ell \cdot \ell}\right) \cdot \left(k \cdot k\right)}\\ \end{array} \]
            5. Add Preprocessing

            Alternative 22: 59.0% accurate, 0.9× speedup?

            \[\begin{array}{l} l_m = \left|\ell\right| \\ t\_m = \left|t\right| \\ t\_s = \mathsf{copysign}\left(1, t\right) \\ t\_s \cdot \begin{array}{l} \mathbf{if}\;\frac{2}{\left(\left(\frac{{t\_m}^{3}}{l\_m \cdot l\_m} \cdot \sin k\right) \cdot \tan k\right) \cdot \left(\left(1 + {\left(\frac{k}{t\_m}\right)}^{2}\right) + 1\right)} \leq 2 \cdot 10^{+275}:\\ \;\;\;\;\frac{l\_m \cdot l\_m}{\left(k \cdot k\right) \cdot \left(\left(t\_m \cdot t\_m\right) \cdot t\_m\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{2}{\left(\left(k \cdot k\right) \cdot \frac{t\_m}{l\_m \cdot l\_m}\right) \cdot \left(k \cdot k\right)}\\ \end{array} \end{array} \]
            l_m = (fabs.f64 l)
            t\_m = (fabs.f64 t)
            t\_s = (copysign.f64 #s(literal 1 binary64) t)
            (FPCore (t_s t_m l_m k)
             :precision binary64
             (*
              t_s
              (if (<=
                   (/
                    2.0
                    (*
                     (* (* (/ (pow t_m 3.0) (* l_m l_m)) (sin k)) (tan k))
                     (+ (+ 1.0 (pow (/ k t_m) 2.0)) 1.0)))
                   2e+275)
                (/ (* l_m l_m) (* (* k k) (* (* t_m t_m) t_m)))
                (/ 2.0 (* (* (* k k) (/ t_m (* l_m l_m))) (* k k))))))
            l_m = fabs(l);
            t\_m = fabs(t);
            t\_s = copysign(1.0, t);
            double code(double t_s, double t_m, double l_m, double k) {
            	double tmp;
            	if ((2.0 / ((((pow(t_m, 3.0) / (l_m * l_m)) * sin(k)) * tan(k)) * ((1.0 + pow((k / t_m), 2.0)) + 1.0))) <= 2e+275) {
            		tmp = (l_m * l_m) / ((k * k) * ((t_m * t_m) * t_m));
            	} else {
            		tmp = 2.0 / (((k * k) * (t_m / (l_m * l_m))) * (k * k));
            	}
            	return t_s * tmp;
            }
            
            l_m =     private
            t\_m =     private
            t\_s =     private
            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_s, t_m, l_m, k)
            use fmin_fmax_functions
                real(8), intent (in) :: t_s
                real(8), intent (in) :: t_m
                real(8), intent (in) :: l_m
                real(8), intent (in) :: k
                real(8) :: tmp
                if ((2.0d0 / (((((t_m ** 3.0d0) / (l_m * l_m)) * sin(k)) * tan(k)) * ((1.0d0 + ((k / t_m) ** 2.0d0)) + 1.0d0))) <= 2d+275) then
                    tmp = (l_m * l_m) / ((k * k) * ((t_m * t_m) * t_m))
                else
                    tmp = 2.0d0 / (((k * k) * (t_m / (l_m * l_m))) * (k * k))
                end if
                code = t_s * tmp
            end function
            
            l_m = Math.abs(l);
            t\_m = Math.abs(t);
            t\_s = Math.copySign(1.0, t);
            public static double code(double t_s, double t_m, double l_m, double k) {
            	double tmp;
            	if ((2.0 / ((((Math.pow(t_m, 3.0) / (l_m * l_m)) * Math.sin(k)) * Math.tan(k)) * ((1.0 + Math.pow((k / t_m), 2.0)) + 1.0))) <= 2e+275) {
            		tmp = (l_m * l_m) / ((k * k) * ((t_m * t_m) * t_m));
            	} else {
            		tmp = 2.0 / (((k * k) * (t_m / (l_m * l_m))) * (k * k));
            	}
            	return t_s * tmp;
            }
            
            l_m = math.fabs(l)
            t\_m = math.fabs(t)
            t\_s = math.copysign(1.0, t)
            def code(t_s, t_m, l_m, k):
            	tmp = 0
            	if (2.0 / ((((math.pow(t_m, 3.0) / (l_m * l_m)) * math.sin(k)) * math.tan(k)) * ((1.0 + math.pow((k / t_m), 2.0)) + 1.0))) <= 2e+275:
            		tmp = (l_m * l_m) / ((k * k) * ((t_m * t_m) * t_m))
            	else:
            		tmp = 2.0 / (((k * k) * (t_m / (l_m * l_m))) * (k * k))
            	return t_s * tmp
            
            l_m = abs(l)
            t\_m = abs(t)
            t\_s = copysign(1.0, t)
            function code(t_s, t_m, l_m, k)
            	tmp = 0.0
            	if (Float64(2.0 / Float64(Float64(Float64(Float64((t_m ^ 3.0) / Float64(l_m * l_m)) * sin(k)) * tan(k)) * Float64(Float64(1.0 + (Float64(k / t_m) ^ 2.0)) + 1.0))) <= 2e+275)
            		tmp = Float64(Float64(l_m * l_m) / Float64(Float64(k * k) * Float64(Float64(t_m * t_m) * t_m)));
            	else
            		tmp = Float64(2.0 / Float64(Float64(Float64(k * k) * Float64(t_m / Float64(l_m * l_m))) * Float64(k * k)));
            	end
            	return Float64(t_s * tmp)
            end
            
            l_m = abs(l);
            t\_m = abs(t);
            t\_s = sign(t) * abs(1.0);
            function tmp_2 = code(t_s, t_m, l_m, k)
            	tmp = 0.0;
            	if ((2.0 / (((((t_m ^ 3.0) / (l_m * l_m)) * sin(k)) * tan(k)) * ((1.0 + ((k / t_m) ^ 2.0)) + 1.0))) <= 2e+275)
            		tmp = (l_m * l_m) / ((k * k) * ((t_m * t_m) * t_m));
            	else
            		tmp = 2.0 / (((k * k) * (t_m / (l_m * l_m))) * (k * k));
            	end
            	tmp_2 = t_s * tmp;
            end
            
            l_m = N[Abs[l], $MachinePrecision]
            t\_m = N[Abs[t], $MachinePrecision]
            t\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[t]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
            code[t$95$s_, t$95$m_, l$95$m_, k_] := N[(t$95$s * If[LessEqual[N[(2.0 / N[(N[(N[(N[(N[Power[t$95$m, 3.0], $MachinePrecision] / N[(l$95$m * l$95$m), $MachinePrecision]), $MachinePrecision] * N[Sin[k], $MachinePrecision]), $MachinePrecision] * N[Tan[k], $MachinePrecision]), $MachinePrecision] * N[(N[(1.0 + N[Power[N[(k / t$95$m), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 2e+275], N[(N[(l$95$m * l$95$m), $MachinePrecision] / N[(N[(k * k), $MachinePrecision] * N[(N[(t$95$m * t$95$m), $MachinePrecision] * t$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(2.0 / N[(N[(N[(k * k), $MachinePrecision] * N[(t$95$m / N[(l$95$m * l$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(k * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]), $MachinePrecision]
            
            \begin{array}{l}
            l_m = \left|\ell\right|
            \\
            t\_m = \left|t\right|
            \\
            t\_s = \mathsf{copysign}\left(1, t\right)
            
            \\
            t\_s \cdot \begin{array}{l}
            \mathbf{if}\;\frac{2}{\left(\left(\frac{{t\_m}^{3}}{l\_m \cdot l\_m} \cdot \sin k\right) \cdot \tan k\right) \cdot \left(\left(1 + {\left(\frac{k}{t\_m}\right)}^{2}\right) + 1\right)} \leq 2 \cdot 10^{+275}:\\
            \;\;\;\;\frac{l\_m \cdot l\_m}{\left(k \cdot k\right) \cdot \left(\left(t\_m \cdot t\_m\right) \cdot t\_m\right)}\\
            
            \mathbf{else}:\\
            \;\;\;\;\frac{2}{\left(\left(k \cdot k\right) \cdot \frac{t\_m}{l\_m \cdot l\_m}\right) \cdot \left(k \cdot k\right)}\\
            
            
            \end{array}
            \end{array}
            
            Derivation
            1. Split input into 2 regimes
            2. if (/.f64 #s(literal 2 binary64) (*.f64 (*.f64 (*.f64 (/.f64 (pow.f64 t #s(literal 3 binary64)) (*.f64 l l)) (sin.f64 k)) (tan.f64 k)) (+.f64 (+.f64 #s(literal 1 binary64) (pow.f64 (/.f64 k t) #s(literal 2 binary64))) #s(literal 1 binary64)))) < 1.99999999999999992e275

              1. Initial program 80.1%

                \[\frac{2}{\left(\left(\frac{{t}^{3}}{\ell \cdot \ell} \cdot \sin k\right) \cdot \tan k\right) \cdot \left(\left(1 + {\left(\frac{k}{t}\right)}^{2}\right) + 1\right)} \]
              2. Add Preprocessing
              3. Taylor expanded in k around 0

                \[\leadsto \color{blue}{\frac{{\ell}^{2}}{{k}^{2} \cdot {t}^{3}}} \]
              4. Step-by-step derivation
                1. lower-/.f64N/A

                  \[\leadsto \frac{{\ell}^{2}}{\color{blue}{{k}^{2} \cdot {t}^{3}}} \]
                2. pow2N/A

                  \[\leadsto \frac{\ell \cdot \ell}{\color{blue}{{k}^{2}} \cdot {t}^{3}} \]
                3. lift-*.f64N/A

                  \[\leadsto \frac{\ell \cdot \ell}{\color{blue}{{k}^{2}} \cdot {t}^{3}} \]
                4. lower-*.f64N/A

                  \[\leadsto \frac{\ell \cdot \ell}{{k}^{2} \cdot \color{blue}{{t}^{3}}} \]
                5. unpow2N/A

                  \[\leadsto \frac{\ell \cdot \ell}{\left(k \cdot k\right) \cdot {\color{blue}{t}}^{3}} \]
                6. lower-*.f64N/A

                  \[\leadsto \frac{\ell \cdot \ell}{\left(k \cdot k\right) \cdot {\color{blue}{t}}^{3}} \]
                7. lift-pow.f6464.6

                  \[\leadsto \frac{\ell \cdot \ell}{\left(k \cdot k\right) \cdot {t}^{\color{blue}{3}}} \]
              5. Applied rewrites64.6%

                \[\leadsto \color{blue}{\frac{\ell \cdot \ell}{\left(k \cdot k\right) \cdot {t}^{3}}} \]
              6. Step-by-step derivation
                1. lift-pow.f64N/A

                  \[\leadsto \frac{\ell \cdot \ell}{\left(k \cdot k\right) \cdot {t}^{\color{blue}{3}}} \]
                2. unpow3N/A

                  \[\leadsto \frac{\ell \cdot \ell}{\left(k \cdot k\right) \cdot \left(\left(t \cdot t\right) \cdot \color{blue}{t}\right)} \]
                3. pow2N/A

                  \[\leadsto \frac{\ell \cdot \ell}{\left(k \cdot k\right) \cdot \left({t}^{2} \cdot t\right)} \]
                4. lower-*.f64N/A

                  \[\leadsto \frac{\ell \cdot \ell}{\left(k \cdot k\right) \cdot \left({t}^{2} \cdot \color{blue}{t}\right)} \]
                5. pow2N/A

                  \[\leadsto \frac{\ell \cdot \ell}{\left(k \cdot k\right) \cdot \left(\left(t \cdot t\right) \cdot t\right)} \]
                6. lift-*.f6464.5

                  \[\leadsto \frac{\ell \cdot \ell}{\left(k \cdot k\right) \cdot \left(\left(t \cdot t\right) \cdot t\right)} \]
              7. Applied rewrites64.5%

                \[\leadsto \frac{\ell \cdot \ell}{\left(k \cdot k\right) \cdot \left(\left(t \cdot t\right) \cdot \color{blue}{t}\right)} \]

              if 1.99999999999999992e275 < (/.f64 #s(literal 2 binary64) (*.f64 (*.f64 (*.f64 (/.f64 (pow.f64 t #s(literal 3 binary64)) (*.f64 l l)) (sin.f64 k)) (tan.f64 k)) (+.f64 (+.f64 #s(literal 1 binary64) (pow.f64 (/.f64 k t) #s(literal 2 binary64))) #s(literal 1 binary64))))

              1. Initial program 18.5%

                \[\frac{2}{\left(\left(\frac{{t}^{3}}{\ell \cdot \ell} \cdot \sin k\right) \cdot \tan k\right) \cdot \left(\left(1 + {\left(\frac{k}{t}\right)}^{2}\right) + 1\right)} \]
              2. Add Preprocessing
              3. Taylor expanded in k around 0

                \[\leadsto \frac{2}{\color{blue}{{k}^{2} \cdot \left(2 \cdot \frac{{t}^{3}}{{\ell}^{2}} + \frac{{k}^{2} \cdot \left({t}^{3} \cdot \left(\frac{1}{3} + \frac{1}{{t}^{2}}\right)\right)}{{\ell}^{2}}\right)}} \]
              4. Step-by-step derivation
                1. *-commutativeN/A

                  \[\leadsto \frac{2}{\left(2 \cdot \frac{{t}^{3}}{{\ell}^{2}} + \frac{{k}^{2} \cdot \left({t}^{3} \cdot \left(\frac{1}{3} + \frac{1}{{t}^{2}}\right)\right)}{{\ell}^{2}}\right) \cdot \color{blue}{{k}^{2}}} \]
                2. lower-*.f64N/A

                  \[\leadsto \frac{2}{\left(2 \cdot \frac{{t}^{3}}{{\ell}^{2}} + \frac{{k}^{2} \cdot \left({t}^{3} \cdot \left(\frac{1}{3} + \frac{1}{{t}^{2}}\right)\right)}{{\ell}^{2}}\right) \cdot \color{blue}{{k}^{2}}} \]
              5. Applied rewrites40.9%

                \[\leadsto \frac{2}{\color{blue}{\frac{\left(0.3333333333333333 \cdot {t}^{3} + t\right) \cdot \left(k \cdot k\right) + 2 \cdot {t}^{3}}{\ell \cdot \ell} \cdot \left(k \cdot k\right)}} \]
              6. Taylor expanded in t around 0

                \[\leadsto \frac{2}{\frac{{k}^{2} \cdot t}{{\ell}^{2}} \cdot \left(\color{blue}{k} \cdot k\right)} \]
              7. Step-by-step derivation
                1. associate-/l*N/A

                  \[\leadsto \frac{2}{\left({k}^{2} \cdot \frac{t}{{\ell}^{2}}\right) \cdot \left(k \cdot k\right)} \]
                2. lower-*.f64N/A

                  \[\leadsto \frac{2}{\left({k}^{2} \cdot \frac{t}{{\ell}^{2}}\right) \cdot \left(k \cdot k\right)} \]
                3. pow2N/A

                  \[\leadsto \frac{2}{\left(\left(k \cdot k\right) \cdot \frac{t}{{\ell}^{2}}\right) \cdot \left(k \cdot k\right)} \]
                4. lift-*.f64N/A

                  \[\leadsto \frac{2}{\left(\left(k \cdot k\right) \cdot \frac{t}{{\ell}^{2}}\right) \cdot \left(k \cdot k\right)} \]
                5. lower-/.f64N/A

                  \[\leadsto \frac{2}{\left(\left(k \cdot k\right) \cdot \frac{t}{{\ell}^{2}}\right) \cdot \left(k \cdot k\right)} \]
                6. pow2N/A

                  \[\leadsto \frac{2}{\left(\left(k \cdot k\right) \cdot \frac{t}{\ell \cdot \ell}\right) \cdot \left(k \cdot k\right)} \]
                7. lift-*.f6445.0

                  \[\leadsto \frac{2}{\left(\left(k \cdot k\right) \cdot \frac{t}{\ell \cdot \ell}\right) \cdot \left(k \cdot k\right)} \]
              8. Applied rewrites45.0%

                \[\leadsto \frac{2}{\left(\left(k \cdot k\right) \cdot \frac{t}{\ell \cdot \ell}\right) \cdot \left(\color{blue}{k} \cdot k\right)} \]
            3. Recombined 2 regimes into one program.
            4. Final simplification56.2%

              \[\leadsto \begin{array}{l} \mathbf{if}\;\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)} \leq 2 \cdot 10^{+275}:\\ \;\;\;\;\frac{\ell \cdot \ell}{\left(k \cdot k\right) \cdot \left(\left(t \cdot t\right) \cdot t\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{2}{\left(\left(k \cdot k\right) \cdot \frac{t}{\ell \cdot \ell}\right) \cdot \left(k \cdot k\right)}\\ \end{array} \]
            5. Add Preprocessing

            Alternative 23: 72.6% accurate, 1.0× speedup?

            \[\begin{array}{l} l_m = \left|\ell\right| \\ t\_m = \left|t\right| \\ t\_s = \mathsf{copysign}\left(1, t\right) \\ t\_s \cdot \begin{array}{l} \mathbf{if}\;k \leq 7.8 \cdot 10^{-7}:\\ \;\;\;\;\frac{2}{\left(\left(e^{\log t\_m \cdot 3 - \log l\_m \cdot 2} \cdot \sin k\right) \cdot k\right) \cdot \left(\left(1 + \frac{k}{t\_m} \cdot \frac{k}{t\_m}\right) + 1\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{2}{\left(\frac{k}{l\_m} \cdot \frac{k}{l\_m}\right) \cdot \frac{t\_m \cdot {\sin k}^{2}}{\cos k}}\\ \end{array} \end{array} \]
            l_m = (fabs.f64 l)
            t\_m = (fabs.f64 t)
            t\_s = (copysign.f64 #s(literal 1 binary64) t)
            (FPCore (t_s t_m l_m k)
             :precision binary64
             (*
              t_s
              (if (<= k 7.8e-7)
                (/
                 2.0
                 (*
                  (* (* (exp (- (* (log t_m) 3.0) (* (log l_m) 2.0))) (sin k)) k)
                  (+ (+ 1.0 (* (/ k t_m) (/ k t_m))) 1.0)))
                (/
                 2.0
                 (* (* (/ k l_m) (/ k l_m)) (/ (* t_m (pow (sin k) 2.0)) (cos k)))))))
            l_m = fabs(l);
            t\_m = fabs(t);
            t\_s = copysign(1.0, t);
            double code(double t_s, double t_m, double l_m, double k) {
            	double tmp;
            	if (k <= 7.8e-7) {
            		tmp = 2.0 / (((exp(((log(t_m) * 3.0) - (log(l_m) * 2.0))) * sin(k)) * k) * ((1.0 + ((k / t_m) * (k / t_m))) + 1.0));
            	} else {
            		tmp = 2.0 / (((k / l_m) * (k / l_m)) * ((t_m * pow(sin(k), 2.0)) / cos(k)));
            	}
            	return t_s * tmp;
            }
            
            l_m =     private
            t\_m =     private
            t\_s =     private
            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_s, t_m, l_m, k)
            use fmin_fmax_functions
                real(8), intent (in) :: t_s
                real(8), intent (in) :: t_m
                real(8), intent (in) :: l_m
                real(8), intent (in) :: k
                real(8) :: tmp
                if (k <= 7.8d-7) then
                    tmp = 2.0d0 / (((exp(((log(t_m) * 3.0d0) - (log(l_m) * 2.0d0))) * sin(k)) * k) * ((1.0d0 + ((k / t_m) * (k / t_m))) + 1.0d0))
                else
                    tmp = 2.0d0 / (((k / l_m) * (k / l_m)) * ((t_m * (sin(k) ** 2.0d0)) / cos(k)))
                end if
                code = t_s * tmp
            end function
            
            l_m = Math.abs(l);
            t\_m = Math.abs(t);
            t\_s = Math.copySign(1.0, t);
            public static double code(double t_s, double t_m, double l_m, double k) {
            	double tmp;
            	if (k <= 7.8e-7) {
            		tmp = 2.0 / (((Math.exp(((Math.log(t_m) * 3.0) - (Math.log(l_m) * 2.0))) * Math.sin(k)) * k) * ((1.0 + ((k / t_m) * (k / t_m))) + 1.0));
            	} else {
            		tmp = 2.0 / (((k / l_m) * (k / l_m)) * ((t_m * Math.pow(Math.sin(k), 2.0)) / Math.cos(k)));
            	}
            	return t_s * tmp;
            }
            
            l_m = math.fabs(l)
            t\_m = math.fabs(t)
            t\_s = math.copysign(1.0, t)
            def code(t_s, t_m, l_m, k):
            	tmp = 0
            	if k <= 7.8e-7:
            		tmp = 2.0 / (((math.exp(((math.log(t_m) * 3.0) - (math.log(l_m) * 2.0))) * math.sin(k)) * k) * ((1.0 + ((k / t_m) * (k / t_m))) + 1.0))
            	else:
            		tmp = 2.0 / (((k / l_m) * (k / l_m)) * ((t_m * math.pow(math.sin(k), 2.0)) / math.cos(k)))
            	return t_s * tmp
            
            l_m = abs(l)
            t\_m = abs(t)
            t\_s = copysign(1.0, t)
            function code(t_s, t_m, l_m, k)
            	tmp = 0.0
            	if (k <= 7.8e-7)
            		tmp = Float64(2.0 / Float64(Float64(Float64(exp(Float64(Float64(log(t_m) * 3.0) - Float64(log(l_m) * 2.0))) * sin(k)) * k) * Float64(Float64(1.0 + Float64(Float64(k / t_m) * Float64(k / t_m))) + 1.0)));
            	else
            		tmp = Float64(2.0 / Float64(Float64(Float64(k / l_m) * Float64(k / l_m)) * Float64(Float64(t_m * (sin(k) ^ 2.0)) / cos(k))));
            	end
            	return Float64(t_s * tmp)
            end
            
            l_m = abs(l);
            t\_m = abs(t);
            t\_s = sign(t) * abs(1.0);
            function tmp_2 = code(t_s, t_m, l_m, k)
            	tmp = 0.0;
            	if (k <= 7.8e-7)
            		tmp = 2.0 / (((exp(((log(t_m) * 3.0) - (log(l_m) * 2.0))) * sin(k)) * k) * ((1.0 + ((k / t_m) * (k / t_m))) + 1.0));
            	else
            		tmp = 2.0 / (((k / l_m) * (k / l_m)) * ((t_m * (sin(k) ^ 2.0)) / cos(k)));
            	end
            	tmp_2 = t_s * tmp;
            end
            
            l_m = N[Abs[l], $MachinePrecision]
            t\_m = N[Abs[t], $MachinePrecision]
            t\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[t]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
            code[t$95$s_, t$95$m_, l$95$m_, k_] := N[(t$95$s * If[LessEqual[k, 7.8e-7], N[(2.0 / N[(N[(N[(N[Exp[N[(N[(N[Log[t$95$m], $MachinePrecision] * 3.0), $MachinePrecision] - N[(N[Log[l$95$m], $MachinePrecision] * 2.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[Sin[k], $MachinePrecision]), $MachinePrecision] * k), $MachinePrecision] * N[(N[(1.0 + N[(N[(k / t$95$m), $MachinePrecision] * N[(k / t$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(2.0 / N[(N[(N[(k / l$95$m), $MachinePrecision] * N[(k / l$95$m), $MachinePrecision]), $MachinePrecision] * N[(N[(t$95$m * N[Power[N[Sin[k], $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision] / N[Cos[k], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]), $MachinePrecision]
            
            \begin{array}{l}
            l_m = \left|\ell\right|
            \\
            t\_m = \left|t\right|
            \\
            t\_s = \mathsf{copysign}\left(1, t\right)
            
            \\
            t\_s \cdot \begin{array}{l}
            \mathbf{if}\;k \leq 7.8 \cdot 10^{-7}:\\
            \;\;\;\;\frac{2}{\left(\left(e^{\log t\_m \cdot 3 - \log l\_m \cdot 2} \cdot \sin k\right) \cdot k\right) \cdot \left(\left(1 + \frac{k}{t\_m} \cdot \frac{k}{t\_m}\right) + 1\right)}\\
            
            \mathbf{else}:\\
            \;\;\;\;\frac{2}{\left(\frac{k}{l\_m} \cdot \frac{k}{l\_m}\right) \cdot \frac{t\_m \cdot {\sin k}^{2}}{\cos k}}\\
            
            
            \end{array}
            \end{array}
            
            Derivation
            1. Split input into 2 regimes
            2. if k < 7.80000000000000049e-7

              1. Initial program 56.9%

                \[\frac{2}{\left(\left(\frac{{t}^{3}}{\ell \cdot \ell} \cdot \sin k\right) \cdot \tan k\right) \cdot \left(\left(1 + {\left(\frac{k}{t}\right)}^{2}\right) + 1\right)} \]
              2. Add Preprocessing
              3. Step-by-step derivation
                1. lift-*.f64N/A

                  \[\leadsto \frac{2}{\left(\left(\frac{{t}^{3}}{\color{blue}{\ell \cdot \ell}} \cdot \sin k\right) \cdot \tan k\right) \cdot \left(\left(1 + {\left(\frac{k}{t}\right)}^{2}\right) + 1\right)} \]
                2. lift-/.f64N/A

                  \[\leadsto \frac{2}{\left(\left(\color{blue}{\frac{{t}^{3}}{\ell \cdot \ell}} \cdot \sin k\right) \cdot \tan k\right) \cdot \left(\left(1 + {\left(\frac{k}{t}\right)}^{2}\right) + 1\right)} \]
                3. lift-pow.f64N/A

                  \[\leadsto \frac{2}{\left(\left(\frac{\color{blue}{{t}^{3}}}{\ell \cdot \ell} \cdot \sin k\right) \cdot \tan k\right) \cdot \left(\left(1 + {\left(\frac{k}{t}\right)}^{2}\right) + 1\right)} \]
                4. pow-to-expN/A

                  \[\leadsto \frac{2}{\left(\left(\frac{\color{blue}{e^{\log t \cdot 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)} \]
                5. pow2N/A

                  \[\leadsto \frac{2}{\left(\left(\frac{e^{\log t \cdot 3}}{\color{blue}{{\ell}^{2}}} \cdot \sin k\right) \cdot \tan k\right) \cdot \left(\left(1 + {\left(\frac{k}{t}\right)}^{2}\right) + 1\right)} \]
                6. pow-to-expN/A

                  \[\leadsto \frac{2}{\left(\left(\frac{e^{\log t \cdot 3}}{\color{blue}{e^{\log \ell \cdot 2}}} \cdot \sin k\right) \cdot \tan k\right) \cdot \left(\left(1 + {\left(\frac{k}{t}\right)}^{2}\right) + 1\right)} \]
                7. div-expN/A

                  \[\leadsto \frac{2}{\left(\left(\color{blue}{e^{\log t \cdot 3 - \log \ell \cdot 2}} \cdot \sin k\right) \cdot \tan k\right) \cdot \left(\left(1 + {\left(\frac{k}{t}\right)}^{2}\right) + 1\right)} \]
                8. lower-exp.f64N/A

                  \[\leadsto \frac{2}{\left(\left(\color{blue}{e^{\log t \cdot 3 - \log \ell \cdot 2}} \cdot \sin k\right) \cdot \tan k\right) \cdot \left(\left(1 + {\left(\frac{k}{t}\right)}^{2}\right) + 1\right)} \]
                9. lower--.f64N/A

                  \[\leadsto \frac{2}{\left(\left(e^{\color{blue}{\log t \cdot 3 - \log \ell \cdot 2}} \cdot \sin k\right) \cdot \tan k\right) \cdot \left(\left(1 + {\left(\frac{k}{t}\right)}^{2}\right) + 1\right)} \]
                10. lower-*.f64N/A

                  \[\leadsto \frac{2}{\left(\left(e^{\color{blue}{\log t \cdot 3} - \log \ell \cdot 2} \cdot \sin k\right) \cdot \tan k\right) \cdot \left(\left(1 + {\left(\frac{k}{t}\right)}^{2}\right) + 1\right)} \]
                11. lower-log.f64N/A

                  \[\leadsto \frac{2}{\left(\left(e^{\color{blue}{\log t} \cdot 3 - \log \ell \cdot 2} \cdot \sin k\right) \cdot \tan k\right) \cdot \left(\left(1 + {\left(\frac{k}{t}\right)}^{2}\right) + 1\right)} \]
                12. lower-*.f64N/A

                  \[\leadsto \frac{2}{\left(\left(e^{\log t \cdot 3 - \color{blue}{\log \ell \cdot 2}} \cdot \sin k\right) \cdot \tan k\right) \cdot \left(\left(1 + {\left(\frac{k}{t}\right)}^{2}\right) + 1\right)} \]
                13. lower-log.f6419.1

                  \[\leadsto \frac{2}{\left(\left(e^{\log t \cdot 3 - \color{blue}{\log \ell} \cdot 2} \cdot \sin k\right) \cdot \tan k\right) \cdot \left(\left(1 + {\left(\frac{k}{t}\right)}^{2}\right) + 1\right)} \]
              4. Applied rewrites19.1%

                \[\leadsto \frac{2}{\left(\left(\color{blue}{e^{\log t \cdot 3 - \log \ell \cdot 2}} \cdot \sin k\right) \cdot \tan k\right) \cdot \left(\left(1 + {\left(\frac{k}{t}\right)}^{2}\right) + 1\right)} \]
              5. Step-by-step derivation
                1. lift-/.f64N/A

                  \[\leadsto \frac{2}{\left(\left(e^{\log t \cdot 3 - \log \ell \cdot 2} \cdot \sin k\right) \cdot \tan k\right) \cdot \left(\left(1 + {\color{blue}{\left(\frac{k}{t}\right)}}^{2}\right) + 1\right)} \]
                2. lift-pow.f64N/A

                  \[\leadsto \frac{2}{\left(\left(e^{\log t \cdot 3 - \log \ell \cdot 2} \cdot \sin k\right) \cdot \tan k\right) \cdot \left(\left(1 + \color{blue}{{\left(\frac{k}{t}\right)}^{2}}\right) + 1\right)} \]
                3. unpow2N/A

                  \[\leadsto \frac{2}{\left(\left(e^{\log t \cdot 3 - \log \ell \cdot 2} \cdot \sin k\right) \cdot \tan k\right) \cdot \left(\left(1 + \color{blue}{\frac{k}{t} \cdot \frac{k}{t}}\right) + 1\right)} \]
                4. lower-*.f64N/A

                  \[\leadsto \frac{2}{\left(\left(e^{\log t \cdot 3 - \log \ell \cdot 2} \cdot \sin k\right) \cdot \tan k\right) \cdot \left(\left(1 + \color{blue}{\frac{k}{t} \cdot \frac{k}{t}}\right) + 1\right)} \]
                5. lift-/.f64N/A

                  \[\leadsto \frac{2}{\left(\left(e^{\log t \cdot 3 - \log \ell \cdot 2} \cdot \sin k\right) \cdot \tan k\right) \cdot \left(\left(1 + \color{blue}{\frac{k}{t}} \cdot \frac{k}{t}\right) + 1\right)} \]
                6. lift-/.f6419.1

                  \[\leadsto \frac{2}{\left(\left(e^{\log t \cdot 3 - \log \ell \cdot 2} \cdot \sin k\right) \cdot \tan k\right) \cdot \left(\left(1 + \frac{k}{t} \cdot \color{blue}{\frac{k}{t}}\right) + 1\right)} \]
              6. Applied rewrites19.1%

                \[\leadsto \frac{2}{\left(\left(e^{\log t \cdot 3 - \log \ell \cdot 2} \cdot \sin k\right) \cdot \tan k\right) \cdot \left(\left(1 + \color{blue}{\frac{k}{t} \cdot \frac{k}{t}}\right) + 1\right)} \]
              7. Taylor expanded in k around 0

                \[\leadsto \frac{2}{\left(\left(e^{\log t \cdot 3 - \log \ell \cdot 2} \cdot \sin k\right) \cdot \color{blue}{k}\right) \cdot \left(\left(1 + \frac{k}{t} \cdot \frac{k}{t}\right) + 1\right)} \]
              8. Step-by-step derivation
                1. Applied rewrites18.2%

                  \[\leadsto \frac{2}{\left(\left(e^{\log t \cdot 3 - \log \ell \cdot 2} \cdot \sin k\right) \cdot \color{blue}{k}\right) \cdot \left(\left(1 + \frac{k}{t} \cdot \frac{k}{t}\right) + 1\right)} \]

                if 7.80000000000000049e-7 < k

                1. Initial program 42.8%

                  \[\frac{2}{\left(\left(\frac{{t}^{3}}{\ell \cdot \ell} \cdot \sin k\right) \cdot \tan k\right) \cdot \left(\left(1 + {\left(\frac{k}{t}\right)}^{2}\right) + 1\right)} \]
                2. Add Preprocessing
                3. Taylor expanded in k around 0

                  \[\leadsto \frac{2}{\color{blue}{{k}^{2} \cdot \left(2 \cdot \frac{{t}^{3}}{{\ell}^{2}} + \frac{{k}^{2} \cdot \left({t}^{3} \cdot \left(\frac{1}{3} + \frac{1}{{t}^{2}}\right)\right)}{{\ell}^{2}}\right)}} \]
                4. Step-by-step derivation
                  1. *-commutativeN/A

                    \[\leadsto \frac{2}{\left(2 \cdot \frac{{t}^{3}}{{\ell}^{2}} + \frac{{k}^{2} \cdot \left({t}^{3} \cdot \left(\frac{1}{3} + \frac{1}{{t}^{2}}\right)\right)}{{\ell}^{2}}\right) \cdot \color{blue}{{k}^{2}}} \]
                  2. lower-*.f64N/A

                    \[\leadsto \frac{2}{\left(2 \cdot \frac{{t}^{3}}{{\ell}^{2}} + \frac{{k}^{2} \cdot \left({t}^{3} \cdot \left(\frac{1}{3} + \frac{1}{{t}^{2}}\right)\right)}{{\ell}^{2}}\right) \cdot \color{blue}{{k}^{2}}} \]
                5. Applied rewrites54.2%

                  \[\leadsto \frac{2}{\color{blue}{\frac{\left(0.3333333333333333 \cdot {t}^{3} + t\right) \cdot \left(k \cdot k\right) + 2 \cdot {t}^{3}}{\ell \cdot \ell} \cdot \left(k \cdot k\right)}} \]
                6. Taylor expanded in t around 0

                  \[\leadsto \frac{2}{\frac{{k}^{2} \cdot t}{{\ell}^{2}} \cdot \left(\color{blue}{k} \cdot k\right)} \]
                7. Step-by-step derivation
                  1. associate-/l*N/A

                    \[\leadsto \frac{2}{\left({k}^{2} \cdot \frac{t}{{\ell}^{2}}\right) \cdot \left(k \cdot k\right)} \]
                  2. lower-*.f64N/A

                    \[\leadsto \frac{2}{\left({k}^{2} \cdot \frac{t}{{\ell}^{2}}\right) \cdot \left(k \cdot k\right)} \]
                  3. pow2N/A

                    \[\leadsto \frac{2}{\left(\left(k \cdot k\right) \cdot \frac{t}{{\ell}^{2}}\right) \cdot \left(k \cdot k\right)} \]
                  4. lift-*.f64N/A

                    \[\leadsto \frac{2}{\left(\left(k \cdot k\right) \cdot \frac{t}{{\ell}^{2}}\right) \cdot \left(k \cdot k\right)} \]
                  5. lower-/.f64N/A

                    \[\leadsto \frac{2}{\left(\left(k \cdot k\right) \cdot \frac{t}{{\ell}^{2}}\right) \cdot \left(k \cdot k\right)} \]
                  6. pow2N/A

                    \[\leadsto \frac{2}{\left(\left(k \cdot k\right) \cdot \frac{t}{\ell \cdot \ell}\right) \cdot \left(k \cdot k\right)} \]
                  7. lift-*.f6454.4

                    \[\leadsto \frac{2}{\left(\left(k \cdot k\right) \cdot \frac{t}{\ell \cdot \ell}\right) \cdot \left(k \cdot k\right)} \]
                8. Applied rewrites54.4%

                  \[\leadsto \frac{2}{\left(\left(k \cdot k\right) \cdot \frac{t}{\ell \cdot \ell}\right) \cdot \left(\color{blue}{k} \cdot k\right)} \]
                9. 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}}} \]
                10. Step-by-step derivation
                  1. times-fracN/A

                    \[\leadsto \frac{2}{\frac{{k}^{2}}{{\ell}^{2}} \cdot \color{blue}{\frac{t \cdot {\sin k}^{2}}{\cos k}}} \]
                  2. lower-*.f64N/A

                    \[\leadsto \frac{2}{\frac{{k}^{2}}{{\ell}^{2}} \cdot \color{blue}{\frac{t \cdot {\sin k}^{2}}{\cos k}}} \]
                  3. pow2N/A

                    \[\leadsto \frac{2}{\frac{k \cdot k}{{\ell}^{2}} \cdot \frac{\color{blue}{t} \cdot {\sin k}^{2}}{\cos k}} \]
                  4. pow2N/A

                    \[\leadsto \frac{2}{\frac{k \cdot k}{\ell \cdot \ell} \cdot \frac{t \cdot \color{blue}{{\sin k}^{2}}}{\cos k}} \]
                  5. times-fracN/A

                    \[\leadsto \frac{2}{\left(\frac{k}{\ell} \cdot \frac{k}{\ell}\right) \cdot \frac{\color{blue}{t \cdot {\sin k}^{2}}}{\cos k}} \]
                  6. lower-*.f64N/A

                    \[\leadsto \frac{2}{\left(\frac{k}{\ell} \cdot \frac{k}{\ell}\right) \cdot \frac{\color{blue}{t \cdot {\sin k}^{2}}}{\cos k}} \]
                  7. lower-/.f64N/A

                    \[\leadsto \frac{2}{\left(\frac{k}{\ell} \cdot \frac{k}{\ell}\right) \cdot \frac{\color{blue}{t} \cdot {\sin k}^{2}}{\cos k}} \]
                  8. lower-/.f64N/A

                    \[\leadsto \frac{2}{\left(\frac{k}{\ell} \cdot \frac{k}{\ell}\right) \cdot \frac{t \cdot \color{blue}{{\sin k}^{2}}}{\cos k}} \]
                  9. lower-/.f64N/A

                    \[\leadsto \frac{2}{\left(\frac{k}{\ell} \cdot \frac{k}{\ell}\right) \cdot \frac{t \cdot {\sin k}^{2}}{\color{blue}{\cos k}}} \]
                  10. lower-*.f64N/A

                    \[\leadsto \frac{2}{\left(\frac{k}{\ell} \cdot \frac{k}{\ell}\right) \cdot \frac{t \cdot {\sin k}^{2}}{\cos \color{blue}{k}}} \]
                  11. lower-pow.f64N/A

                    \[\leadsto \frac{2}{\left(\frac{k}{\ell} \cdot \frac{k}{\ell}\right) \cdot \frac{t \cdot {\sin k}^{2}}{\cos k}} \]
                  12. lift-sin.f64N/A

                    \[\leadsto \frac{2}{\left(\frac{k}{\ell} \cdot \frac{k}{\ell}\right) \cdot \frac{t \cdot {\sin k}^{2}}{\cos k}} \]
                  13. lower-cos.f6478.6

                    \[\leadsto \frac{2}{\left(\frac{k}{\ell} \cdot \frac{k}{\ell}\right) \cdot \frac{t \cdot {\sin k}^{2}}{\cos k}} \]
                11. Applied rewrites78.6%

                  \[\leadsto \frac{2}{\color{blue}{\left(\frac{k}{\ell} \cdot \frac{k}{\ell}\right) \cdot \frac{t \cdot {\sin k}^{2}}{\cos k}}} \]
              9. Recombined 2 regimes into one program.
              10. Final simplification30.9%

                \[\leadsto \begin{array}{l} \mathbf{if}\;k \leq 7.8 \cdot 10^{-7}:\\ \;\;\;\;\frac{2}{\left(\left(e^{\log t \cdot 3 - \log \ell \cdot 2} \cdot \sin k\right) \cdot k\right) \cdot \left(\left(1 + \frac{k}{t} \cdot \frac{k}{t}\right) + 1\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{2}{\left(\frac{k}{\ell} \cdot \frac{k}{\ell}\right) \cdot \frac{t \cdot {\sin k}^{2}}{\cos k}}\\ \end{array} \]
              11. Add Preprocessing

              Alternative 24: 72.6% accurate, 1.0× speedup?

              \[\begin{array}{l} l_m = \left|\ell\right| \\ t\_m = \left|t\right| \\ t\_s = \mathsf{copysign}\left(1, t\right) \\ t\_s \cdot \begin{array}{l} \mathbf{if}\;k \leq 7.8 \cdot 10^{-7}:\\ \;\;\;\;\frac{2}{\left(\left(e^{\log t\_m \cdot 3 - \log l\_m \cdot 2} \cdot k\right) \cdot \tan k\right) \cdot \left(\left(1 + \frac{k}{t\_m} \cdot \frac{k}{t\_m}\right) + 1\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{2}{\left(\frac{k}{l\_m} \cdot \frac{k}{l\_m}\right) \cdot \frac{t\_m \cdot {\sin k}^{2}}{\cos k}}\\ \end{array} \end{array} \]
              l_m = (fabs.f64 l)
              t\_m = (fabs.f64 t)
              t\_s = (copysign.f64 #s(literal 1 binary64) t)
              (FPCore (t_s t_m l_m k)
               :precision binary64
               (*
                t_s
                (if (<= k 7.8e-7)
                  (/
                   2.0
                   (*
                    (* (* (exp (- (* (log t_m) 3.0) (* (log l_m) 2.0))) k) (tan k))
                    (+ (+ 1.0 (* (/ k t_m) (/ k t_m))) 1.0)))
                  (/
                   2.0
                   (* (* (/ k l_m) (/ k l_m)) (/ (* t_m (pow (sin k) 2.0)) (cos k)))))))
              l_m = fabs(l);
              t\_m = fabs(t);
              t\_s = copysign(1.0, t);
              double code(double t_s, double t_m, double l_m, double k) {
              	double tmp;
              	if (k <= 7.8e-7) {
              		tmp = 2.0 / (((exp(((log(t_m) * 3.0) - (log(l_m) * 2.0))) * k) * tan(k)) * ((1.0 + ((k / t_m) * (k / t_m))) + 1.0));
              	} else {
              		tmp = 2.0 / (((k / l_m) * (k / l_m)) * ((t_m * pow(sin(k), 2.0)) / cos(k)));
              	}
              	return t_s * tmp;
              }
              
              l_m =     private
              t\_m =     private
              t\_s =     private
              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_s, t_m, l_m, k)
              use fmin_fmax_functions
                  real(8), intent (in) :: t_s
                  real(8), intent (in) :: t_m
                  real(8), intent (in) :: l_m
                  real(8), intent (in) :: k
                  real(8) :: tmp
                  if (k <= 7.8d-7) then
                      tmp = 2.0d0 / (((exp(((log(t_m) * 3.0d0) - (log(l_m) * 2.0d0))) * k) * tan(k)) * ((1.0d0 + ((k / t_m) * (k / t_m))) + 1.0d0))
                  else
                      tmp = 2.0d0 / (((k / l_m) * (k / l_m)) * ((t_m * (sin(k) ** 2.0d0)) / cos(k)))
                  end if
                  code = t_s * tmp
              end function
              
              l_m = Math.abs(l);
              t\_m = Math.abs(t);
              t\_s = Math.copySign(1.0, t);
              public static double code(double t_s, double t_m, double l_m, double k) {
              	double tmp;
              	if (k <= 7.8e-7) {
              		tmp = 2.0 / (((Math.exp(((Math.log(t_m) * 3.0) - (Math.log(l_m) * 2.0))) * k) * Math.tan(k)) * ((1.0 + ((k / t_m) * (k / t_m))) + 1.0));
              	} else {
              		tmp = 2.0 / (((k / l_m) * (k / l_m)) * ((t_m * Math.pow(Math.sin(k), 2.0)) / Math.cos(k)));
              	}
              	return t_s * tmp;
              }
              
              l_m = math.fabs(l)
              t\_m = math.fabs(t)
              t\_s = math.copysign(1.0, t)
              def code(t_s, t_m, l_m, k):
              	tmp = 0
              	if k <= 7.8e-7:
              		tmp = 2.0 / (((math.exp(((math.log(t_m) * 3.0) - (math.log(l_m) * 2.0))) * k) * math.tan(k)) * ((1.0 + ((k / t_m) * (k / t_m))) + 1.0))
              	else:
              		tmp = 2.0 / (((k / l_m) * (k / l_m)) * ((t_m * math.pow(math.sin(k), 2.0)) / math.cos(k)))
              	return t_s * tmp
              
              l_m = abs(l)
              t\_m = abs(t)
              t\_s = copysign(1.0, t)
              function code(t_s, t_m, l_m, k)
              	tmp = 0.0
              	if (k <= 7.8e-7)
              		tmp = Float64(2.0 / Float64(Float64(Float64(exp(Float64(Float64(log(t_m) * 3.0) - Float64(log(l_m) * 2.0))) * k) * tan(k)) * Float64(Float64(1.0 + Float64(Float64(k / t_m) * Float64(k / t_m))) + 1.0)));
              	else
              		tmp = Float64(2.0 / Float64(Float64(Float64(k / l_m) * Float64(k / l_m)) * Float64(Float64(t_m * (sin(k) ^ 2.0)) / cos(k))));
              	end
              	return Float64(t_s * tmp)
              end
              
              l_m = abs(l);
              t\_m = abs(t);
              t\_s = sign(t) * abs(1.0);
              function tmp_2 = code(t_s, t_m, l_m, k)
              	tmp = 0.0;
              	if (k <= 7.8e-7)
              		tmp = 2.0 / (((exp(((log(t_m) * 3.0) - (log(l_m) * 2.0))) * k) * tan(k)) * ((1.0 + ((k / t_m) * (k / t_m))) + 1.0));
              	else
              		tmp = 2.0 / (((k / l_m) * (k / l_m)) * ((t_m * (sin(k) ^ 2.0)) / cos(k)));
              	end
              	tmp_2 = t_s * tmp;
              end
              
              l_m = N[Abs[l], $MachinePrecision]
              t\_m = N[Abs[t], $MachinePrecision]
              t\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[t]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
              code[t$95$s_, t$95$m_, l$95$m_, k_] := N[(t$95$s * If[LessEqual[k, 7.8e-7], N[(2.0 / N[(N[(N[(N[Exp[N[(N[(N[Log[t$95$m], $MachinePrecision] * 3.0), $MachinePrecision] - N[(N[Log[l$95$m], $MachinePrecision] * 2.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * k), $MachinePrecision] * N[Tan[k], $MachinePrecision]), $MachinePrecision] * N[(N[(1.0 + N[(N[(k / t$95$m), $MachinePrecision] * N[(k / t$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(2.0 / N[(N[(N[(k / l$95$m), $MachinePrecision] * N[(k / l$95$m), $MachinePrecision]), $MachinePrecision] * N[(N[(t$95$m * N[Power[N[Sin[k], $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision] / N[Cos[k], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]), $MachinePrecision]
              
              \begin{array}{l}
              l_m = \left|\ell\right|
              \\
              t\_m = \left|t\right|
              \\
              t\_s = \mathsf{copysign}\left(1, t\right)
              
              \\
              t\_s \cdot \begin{array}{l}
              \mathbf{if}\;k \leq 7.8 \cdot 10^{-7}:\\
              \;\;\;\;\frac{2}{\left(\left(e^{\log t\_m \cdot 3 - \log l\_m \cdot 2} \cdot k\right) \cdot \tan k\right) \cdot \left(\left(1 + \frac{k}{t\_m} \cdot \frac{k}{t\_m}\right) + 1\right)}\\
              
              \mathbf{else}:\\
              \;\;\;\;\frac{2}{\left(\frac{k}{l\_m} \cdot \frac{k}{l\_m}\right) \cdot \frac{t\_m \cdot {\sin k}^{2}}{\cos k}}\\
              
              
              \end{array}
              \end{array}
              
              Derivation
              1. Split input into 2 regimes
              2. if k < 7.80000000000000049e-7

                1. Initial program 56.9%

                  \[\frac{2}{\left(\left(\frac{{t}^{3}}{\ell \cdot \ell} \cdot \sin k\right) \cdot \tan k\right) \cdot \left(\left(1 + {\left(\frac{k}{t}\right)}^{2}\right) + 1\right)} \]
                2. Add Preprocessing
                3. Step-by-step derivation
                  1. lift-*.f64N/A

                    \[\leadsto \frac{2}{\left(\left(\frac{{t}^{3}}{\color{blue}{\ell \cdot \ell}} \cdot \sin k\right) \cdot \tan k\right) \cdot \left(\left(1 + {\left(\frac{k}{t}\right)}^{2}\right) + 1\right)} \]
                  2. lift-/.f64N/A

                    \[\leadsto \frac{2}{\left(\left(\color{blue}{\frac{{t}^{3}}{\ell \cdot \ell}} \cdot \sin k\right) \cdot \tan k\right) \cdot \left(\left(1 + {\left(\frac{k}{t}\right)}^{2}\right) + 1\right)} \]
                  3. lift-pow.f64N/A

                    \[\leadsto \frac{2}{\left(\left(\frac{\color{blue}{{t}^{3}}}{\ell \cdot \ell} \cdot \sin k\right) \cdot \tan k\right) \cdot \left(\left(1 + {\left(\frac{k}{t}\right)}^{2}\right) + 1\right)} \]
                  4. pow-to-expN/A

                    \[\leadsto \frac{2}{\left(\left(\frac{\color{blue}{e^{\log t \cdot 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)} \]
                  5. pow2N/A

                    \[\leadsto \frac{2}{\left(\left(\frac{e^{\log t \cdot 3}}{\color{blue}{{\ell}^{2}}} \cdot \sin k\right) \cdot \tan k\right) \cdot \left(\left(1 + {\left(\frac{k}{t}\right)}^{2}\right) + 1\right)} \]
                  6. pow-to-expN/A

                    \[\leadsto \frac{2}{\left(\left(\frac{e^{\log t \cdot 3}}{\color{blue}{e^{\log \ell \cdot 2}}} \cdot \sin k\right) \cdot \tan k\right) \cdot \left(\left(1 + {\left(\frac{k}{t}\right)}^{2}\right) + 1\right)} \]
                  7. div-expN/A

                    \[\leadsto \frac{2}{\left(\left(\color{blue}{e^{\log t \cdot 3 - \log \ell \cdot 2}} \cdot \sin k\right) \cdot \tan k\right) \cdot \left(\left(1 + {\left(\frac{k}{t}\right)}^{2}\right) + 1\right)} \]
                  8. lower-exp.f64N/A

                    \[\leadsto \frac{2}{\left(\left(\color{blue}{e^{\log t \cdot 3 - \log \ell \cdot 2}} \cdot \sin k\right) \cdot \tan k\right) \cdot \left(\left(1 + {\left(\frac{k}{t}\right)}^{2}\right) + 1\right)} \]
                  9. lower--.f64N/A

                    \[\leadsto \frac{2}{\left(\left(e^{\color{blue}{\log t \cdot 3 - \log \ell \cdot 2}} \cdot \sin k\right) \cdot \tan k\right) \cdot \left(\left(1 + {\left(\frac{k}{t}\right)}^{2}\right) + 1\right)} \]
                  10. lower-*.f64N/A

                    \[\leadsto \frac{2}{\left(\left(e^{\color{blue}{\log t \cdot 3} - \log \ell \cdot 2} \cdot \sin k\right) \cdot \tan k\right) \cdot \left(\left(1 + {\left(\frac{k}{t}\right)}^{2}\right) + 1\right)} \]
                  11. lower-log.f64N/A

                    \[\leadsto \frac{2}{\left(\left(e^{\color{blue}{\log t} \cdot 3 - \log \ell \cdot 2} \cdot \sin k\right) \cdot \tan k\right) \cdot \left(\left(1 + {\left(\frac{k}{t}\right)}^{2}\right) + 1\right)} \]
                  12. lower-*.f64N/A

                    \[\leadsto \frac{2}{\left(\left(e^{\log t \cdot 3 - \color{blue}{\log \ell \cdot 2}} \cdot \sin k\right) \cdot \tan k\right) \cdot \left(\left(1 + {\left(\frac{k}{t}\right)}^{2}\right) + 1\right)} \]
                  13. lower-log.f6419.1

                    \[\leadsto \frac{2}{\left(\left(e^{\log t \cdot 3 - \color{blue}{\log \ell} \cdot 2} \cdot \sin k\right) \cdot \tan k\right) \cdot \left(\left(1 + {\left(\frac{k}{t}\right)}^{2}\right) + 1\right)} \]
                4. Applied rewrites19.1%

                  \[\leadsto \frac{2}{\left(\left(\color{blue}{e^{\log t \cdot 3 - \log \ell \cdot 2}} \cdot \sin k\right) \cdot \tan k\right) \cdot \left(\left(1 + {\left(\frac{k}{t}\right)}^{2}\right) + 1\right)} \]
                5. Step-by-step derivation
                  1. lift-/.f64N/A

                    \[\leadsto \frac{2}{\left(\left(e^{\log t \cdot 3 - \log \ell \cdot 2} \cdot \sin k\right) \cdot \tan k\right) \cdot \left(\left(1 + {\color{blue}{\left(\frac{k}{t}\right)}}^{2}\right) + 1\right)} \]
                  2. lift-pow.f64N/A

                    \[\leadsto \frac{2}{\left(\left(e^{\log t \cdot 3 - \log \ell \cdot 2} \cdot \sin k\right) \cdot \tan k\right) \cdot \left(\left(1 + \color{blue}{{\left(\frac{k}{t}\right)}^{2}}\right) + 1\right)} \]
                  3. unpow2N/A

                    \[\leadsto \frac{2}{\left(\left(e^{\log t \cdot 3 - \log \ell \cdot 2} \cdot \sin k\right) \cdot \tan k\right) \cdot \left(\left(1 + \color{blue}{\frac{k}{t} \cdot \frac{k}{t}}\right) + 1\right)} \]
                  4. lower-*.f64N/A

                    \[\leadsto \frac{2}{\left(\left(e^{\log t \cdot 3 - \log \ell \cdot 2} \cdot \sin k\right) \cdot \tan k\right) \cdot \left(\left(1 + \color{blue}{\frac{k}{t} \cdot \frac{k}{t}}\right) + 1\right)} \]
                  5. lift-/.f64N/A

                    \[\leadsto \frac{2}{\left(\left(e^{\log t \cdot 3 - \log \ell \cdot 2} \cdot \sin k\right) \cdot \tan k\right) \cdot \left(\left(1 + \color{blue}{\frac{k}{t}} \cdot \frac{k}{t}\right) + 1\right)} \]
                  6. lift-/.f6419.1

                    \[\leadsto \frac{2}{\left(\left(e^{\log t \cdot 3 - \log \ell \cdot 2} \cdot \sin k\right) \cdot \tan k\right) \cdot \left(\left(1 + \frac{k}{t} \cdot \color{blue}{\frac{k}{t}}\right) + 1\right)} \]
                6. Applied rewrites19.1%

                  \[\leadsto \frac{2}{\left(\left(e^{\log t \cdot 3 - \log \ell \cdot 2} \cdot \sin k\right) \cdot \tan k\right) \cdot \left(\left(1 + \color{blue}{\frac{k}{t} \cdot \frac{k}{t}}\right) + 1\right)} \]
                7. Taylor expanded in k around 0

                  \[\leadsto \frac{2}{\left(\left(e^{\log t \cdot 3 - \log \ell \cdot 2} \cdot \color{blue}{k}\right) \cdot \tan k\right) \cdot \left(\left(1 + \frac{k}{t} \cdot \frac{k}{t}\right) + 1\right)} \]
                8. Step-by-step derivation
                  1. Applied rewrites18.7%

                    \[\leadsto \frac{2}{\left(\left(e^{\log t \cdot 3 - \log \ell \cdot 2} \cdot \color{blue}{k}\right) \cdot \tan k\right) \cdot \left(\left(1 + \frac{k}{t} \cdot \frac{k}{t}\right) + 1\right)} \]

                  if 7.80000000000000049e-7 < k

                  1. Initial program 42.8%

                    \[\frac{2}{\left(\left(\frac{{t}^{3}}{\ell \cdot \ell} \cdot \sin k\right) \cdot \tan k\right) \cdot \left(\left(1 + {\left(\frac{k}{t}\right)}^{2}\right) + 1\right)} \]
                  2. Add Preprocessing
                  3. Taylor expanded in k around 0

                    \[\leadsto \frac{2}{\color{blue}{{k}^{2} \cdot \left(2 \cdot \frac{{t}^{3}}{{\ell}^{2}} + \frac{{k}^{2} \cdot \left({t}^{3} \cdot \left(\frac{1}{3} + \frac{1}{{t}^{2}}\right)\right)}{{\ell}^{2}}\right)}} \]
                  4. Step-by-step derivation
                    1. *-commutativeN/A

                      \[\leadsto \frac{2}{\left(2 \cdot \frac{{t}^{3}}{{\ell}^{2}} + \frac{{k}^{2} \cdot \left({t}^{3} \cdot \left(\frac{1}{3} + \frac{1}{{t}^{2}}\right)\right)}{{\ell}^{2}}\right) \cdot \color{blue}{{k}^{2}}} \]
                    2. lower-*.f64N/A

                      \[\leadsto \frac{2}{\left(2 \cdot \frac{{t}^{3}}{{\ell}^{2}} + \frac{{k}^{2} \cdot \left({t}^{3} \cdot \left(\frac{1}{3} + \frac{1}{{t}^{2}}\right)\right)}{{\ell}^{2}}\right) \cdot \color{blue}{{k}^{2}}} \]
                  5. Applied rewrites54.2%

                    \[\leadsto \frac{2}{\color{blue}{\frac{\left(0.3333333333333333 \cdot {t}^{3} + t\right) \cdot \left(k \cdot k\right) + 2 \cdot {t}^{3}}{\ell \cdot \ell} \cdot \left(k \cdot k\right)}} \]
                  6. Taylor expanded in t around 0

                    \[\leadsto \frac{2}{\frac{{k}^{2} \cdot t}{{\ell}^{2}} \cdot \left(\color{blue}{k} \cdot k\right)} \]
                  7. Step-by-step derivation
                    1. associate-/l*N/A

                      \[\leadsto \frac{2}{\left({k}^{2} \cdot \frac{t}{{\ell}^{2}}\right) \cdot \left(k \cdot k\right)} \]
                    2. lower-*.f64N/A

                      \[\leadsto \frac{2}{\left({k}^{2} \cdot \frac{t}{{\ell}^{2}}\right) \cdot \left(k \cdot k\right)} \]
                    3. pow2N/A

                      \[\leadsto \frac{2}{\left(\left(k \cdot k\right) \cdot \frac{t}{{\ell}^{2}}\right) \cdot \left(k \cdot k\right)} \]
                    4. lift-*.f64N/A

                      \[\leadsto \frac{2}{\left(\left(k \cdot k\right) \cdot \frac{t}{{\ell}^{2}}\right) \cdot \left(k \cdot k\right)} \]
                    5. lower-/.f64N/A

                      \[\leadsto \frac{2}{\left(\left(k \cdot k\right) \cdot \frac{t}{{\ell}^{2}}\right) \cdot \left(k \cdot k\right)} \]
                    6. pow2N/A

                      \[\leadsto \frac{2}{\left(\left(k \cdot k\right) \cdot \frac{t}{\ell \cdot \ell}\right) \cdot \left(k \cdot k\right)} \]
                    7. lift-*.f6454.4

                      \[\leadsto \frac{2}{\left(\left(k \cdot k\right) \cdot \frac{t}{\ell \cdot \ell}\right) \cdot \left(k \cdot k\right)} \]
                  8. Applied rewrites54.4%

                    \[\leadsto \frac{2}{\left(\left(k \cdot k\right) \cdot \frac{t}{\ell \cdot \ell}\right) \cdot \left(\color{blue}{k} \cdot k\right)} \]
                  9. 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}}} \]
                  10. Step-by-step derivation
                    1. times-fracN/A

                      \[\leadsto \frac{2}{\frac{{k}^{2}}{{\ell}^{2}} \cdot \color{blue}{\frac{t \cdot {\sin k}^{2}}{\cos k}}} \]
                    2. lower-*.f64N/A

                      \[\leadsto \frac{2}{\frac{{k}^{2}}{{\ell}^{2}} \cdot \color{blue}{\frac{t \cdot {\sin k}^{2}}{\cos k}}} \]
                    3. pow2N/A

                      \[\leadsto \frac{2}{\frac{k \cdot k}{{\ell}^{2}} \cdot \frac{\color{blue}{t} \cdot {\sin k}^{2}}{\cos k}} \]
                    4. pow2N/A

                      \[\leadsto \frac{2}{\frac{k \cdot k}{\ell \cdot \ell} \cdot \frac{t \cdot \color{blue}{{\sin k}^{2}}}{\cos k}} \]
                    5. times-fracN/A

                      \[\leadsto \frac{2}{\left(\frac{k}{\ell} \cdot \frac{k}{\ell}\right) \cdot \frac{\color{blue}{t \cdot {\sin k}^{2}}}{\cos k}} \]
                    6. lower-*.f64N/A

                      \[\leadsto \frac{2}{\left(\frac{k}{\ell} \cdot \frac{k}{\ell}\right) \cdot \frac{\color{blue}{t \cdot {\sin k}^{2}}}{\cos k}} \]
                    7. lower-/.f64N/A

                      \[\leadsto \frac{2}{\left(\frac{k}{\ell} \cdot \frac{k}{\ell}\right) \cdot \frac{\color{blue}{t} \cdot {\sin k}^{2}}{\cos k}} \]
                    8. lower-/.f64N/A

                      \[\leadsto \frac{2}{\left(\frac{k}{\ell} \cdot \frac{k}{\ell}\right) \cdot \frac{t \cdot \color{blue}{{\sin k}^{2}}}{\cos k}} \]
                    9. lower-/.f64N/A

                      \[\leadsto \frac{2}{\left(\frac{k}{\ell} \cdot \frac{k}{\ell}\right) \cdot \frac{t \cdot {\sin k}^{2}}{\color{blue}{\cos k}}} \]
                    10. lower-*.f64N/A

                      \[\leadsto \frac{2}{\left(\frac{k}{\ell} \cdot \frac{k}{\ell}\right) \cdot \frac{t \cdot {\sin k}^{2}}{\cos \color{blue}{k}}} \]
                    11. lower-pow.f64N/A

                      \[\leadsto \frac{2}{\left(\frac{k}{\ell} \cdot \frac{k}{\ell}\right) \cdot \frac{t \cdot {\sin k}^{2}}{\cos k}} \]
                    12. lift-sin.f64N/A

                      \[\leadsto \frac{2}{\left(\frac{k}{\ell} \cdot \frac{k}{\ell}\right) \cdot \frac{t \cdot {\sin k}^{2}}{\cos k}} \]
                    13. lower-cos.f6478.6

                      \[\leadsto \frac{2}{\left(\frac{k}{\ell} \cdot \frac{k}{\ell}\right) \cdot \frac{t \cdot {\sin k}^{2}}{\cos k}} \]
                  11. Applied rewrites78.6%

                    \[\leadsto \frac{2}{\color{blue}{\left(\frac{k}{\ell} \cdot \frac{k}{\ell}\right) \cdot \frac{t \cdot {\sin k}^{2}}{\cos k}}} \]
                9. Recombined 2 regimes into one program.
                10. Final simplification31.3%

                  \[\leadsto \begin{array}{l} \mathbf{if}\;k \leq 7.8 \cdot 10^{-7}:\\ \;\;\;\;\frac{2}{\left(\left(e^{\log t \cdot 3 - \log \ell \cdot 2} \cdot k\right) \cdot \tan k\right) \cdot \left(\left(1 + \frac{k}{t} \cdot \frac{k}{t}\right) + 1\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{2}{\left(\frac{k}{\ell} \cdot \frac{k}{\ell}\right) \cdot \frac{t \cdot {\sin k}^{2}}{\cos k}}\\ \end{array} \]
                11. Add Preprocessing

                Alternative 25: 67.8% accurate, 1.2× speedup?

                \[\begin{array}{l} l_m = \left|\ell\right| \\ t\_m = \left|t\right| \\ t\_s = \mathsf{copysign}\left(1, t\right) \\ t\_s \cdot \begin{array}{l} \mathbf{if}\;k \leq 2.1 \cdot 10^{-158}:\\ \;\;\;\;\frac{2}{\left(\left(\frac{\frac{{t\_m}^{3}}{l\_m}}{l\_m} \cdot k\right) \cdot \tan k\right) \cdot \left(\left(1 + \frac{k}{t\_m} \cdot \frac{k}{t\_m}\right) + 1\right)}\\ \mathbf{elif}\;k \leq 2.2 \cdot 10^{-6}:\\ \;\;\;\;\frac{2}{2 \cdot \left(\left(k \cdot k\right) \cdot e^{3 \cdot \log t\_m - 2 \cdot \log l\_m}\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{2}{\left(\frac{k}{l\_m} \cdot \frac{k}{l\_m}\right) \cdot \frac{t\_m \cdot {\sin k}^{2}}{\cos k}}\\ \end{array} \end{array} \]
                l_m = (fabs.f64 l)
                t\_m = (fabs.f64 t)
                t\_s = (copysign.f64 #s(literal 1 binary64) t)
                (FPCore (t_s t_m l_m k)
                 :precision binary64
                 (*
                  t_s
                  (if (<= k 2.1e-158)
                    (/
                     2.0
                     (*
                      (* (* (/ (/ (pow t_m 3.0) l_m) l_m) k) (tan k))
                      (+ (+ 1.0 (* (/ k t_m) (/ k t_m))) 1.0)))
                    (if (<= k 2.2e-6)
                      (/ 2.0 (* 2.0 (* (* k k) (exp (- (* 3.0 (log t_m)) (* 2.0 (log l_m)))))))
                      (/
                       2.0
                       (* (* (/ k l_m) (/ k l_m)) (/ (* t_m (pow (sin k) 2.0)) (cos k))))))))
                l_m = fabs(l);
                t\_m = fabs(t);
                t\_s = copysign(1.0, t);
                double code(double t_s, double t_m, double l_m, double k) {
                	double tmp;
                	if (k <= 2.1e-158) {
                		tmp = 2.0 / (((((pow(t_m, 3.0) / l_m) / l_m) * k) * tan(k)) * ((1.0 + ((k / t_m) * (k / t_m))) + 1.0));
                	} else if (k <= 2.2e-6) {
                		tmp = 2.0 / (2.0 * ((k * k) * exp(((3.0 * log(t_m)) - (2.0 * log(l_m))))));
                	} else {
                		tmp = 2.0 / (((k / l_m) * (k / l_m)) * ((t_m * pow(sin(k), 2.0)) / cos(k)));
                	}
                	return t_s * tmp;
                }
                
                l_m =     private
                t\_m =     private
                t\_s =     private
                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_s, t_m, l_m, k)
                use fmin_fmax_functions
                    real(8), intent (in) :: t_s
                    real(8), intent (in) :: t_m
                    real(8), intent (in) :: l_m
                    real(8), intent (in) :: k
                    real(8) :: tmp
                    if (k <= 2.1d-158) then
                        tmp = 2.0d0 / ((((((t_m ** 3.0d0) / l_m) / l_m) * k) * tan(k)) * ((1.0d0 + ((k / t_m) * (k / t_m))) + 1.0d0))
                    else if (k <= 2.2d-6) then
                        tmp = 2.0d0 / (2.0d0 * ((k * k) * exp(((3.0d0 * log(t_m)) - (2.0d0 * log(l_m))))))
                    else
                        tmp = 2.0d0 / (((k / l_m) * (k / l_m)) * ((t_m * (sin(k) ** 2.0d0)) / cos(k)))
                    end if
                    code = t_s * tmp
                end function
                
                l_m = Math.abs(l);
                t\_m = Math.abs(t);
                t\_s = Math.copySign(1.0, t);
                public static double code(double t_s, double t_m, double l_m, double k) {
                	double tmp;
                	if (k <= 2.1e-158) {
                		tmp = 2.0 / (((((Math.pow(t_m, 3.0) / l_m) / l_m) * k) * Math.tan(k)) * ((1.0 + ((k / t_m) * (k / t_m))) + 1.0));
                	} else if (k <= 2.2e-6) {
                		tmp = 2.0 / (2.0 * ((k * k) * Math.exp(((3.0 * Math.log(t_m)) - (2.0 * Math.log(l_m))))));
                	} else {
                		tmp = 2.0 / (((k / l_m) * (k / l_m)) * ((t_m * Math.pow(Math.sin(k), 2.0)) / Math.cos(k)));
                	}
                	return t_s * tmp;
                }
                
                l_m = math.fabs(l)
                t\_m = math.fabs(t)
                t\_s = math.copysign(1.0, t)
                def code(t_s, t_m, l_m, k):
                	tmp = 0
                	if k <= 2.1e-158:
                		tmp = 2.0 / (((((math.pow(t_m, 3.0) / l_m) / l_m) * k) * math.tan(k)) * ((1.0 + ((k / t_m) * (k / t_m))) + 1.0))
                	elif k <= 2.2e-6:
                		tmp = 2.0 / (2.0 * ((k * k) * math.exp(((3.0 * math.log(t_m)) - (2.0 * math.log(l_m))))))
                	else:
                		tmp = 2.0 / (((k / l_m) * (k / l_m)) * ((t_m * math.pow(math.sin(k), 2.0)) / math.cos(k)))
                	return t_s * tmp
                
                l_m = abs(l)
                t\_m = abs(t)
                t\_s = copysign(1.0, t)
                function code(t_s, t_m, l_m, k)
                	tmp = 0.0
                	if (k <= 2.1e-158)
                		tmp = Float64(2.0 / Float64(Float64(Float64(Float64(Float64((t_m ^ 3.0) / l_m) / l_m) * k) * tan(k)) * Float64(Float64(1.0 + Float64(Float64(k / t_m) * Float64(k / t_m))) + 1.0)));
                	elseif (k <= 2.2e-6)
                		tmp = Float64(2.0 / Float64(2.0 * Float64(Float64(k * k) * exp(Float64(Float64(3.0 * log(t_m)) - Float64(2.0 * log(l_m)))))));
                	else
                		tmp = Float64(2.0 / Float64(Float64(Float64(k / l_m) * Float64(k / l_m)) * Float64(Float64(t_m * (sin(k) ^ 2.0)) / cos(k))));
                	end
                	return Float64(t_s * tmp)
                end
                
                l_m = abs(l);
                t\_m = abs(t);
                t\_s = sign(t) * abs(1.0);
                function tmp_2 = code(t_s, t_m, l_m, k)
                	tmp = 0.0;
                	if (k <= 2.1e-158)
                		tmp = 2.0 / ((((((t_m ^ 3.0) / l_m) / l_m) * k) * tan(k)) * ((1.0 + ((k / t_m) * (k / t_m))) + 1.0));
                	elseif (k <= 2.2e-6)
                		tmp = 2.0 / (2.0 * ((k * k) * exp(((3.0 * log(t_m)) - (2.0 * log(l_m))))));
                	else
                		tmp = 2.0 / (((k / l_m) * (k / l_m)) * ((t_m * (sin(k) ^ 2.0)) / cos(k)));
                	end
                	tmp_2 = t_s * tmp;
                end
                
                l_m = N[Abs[l], $MachinePrecision]
                t\_m = N[Abs[t], $MachinePrecision]
                t\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[t]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
                code[t$95$s_, t$95$m_, l$95$m_, k_] := N[(t$95$s * If[LessEqual[k, 2.1e-158], N[(2.0 / N[(N[(N[(N[(N[(N[Power[t$95$m, 3.0], $MachinePrecision] / l$95$m), $MachinePrecision] / l$95$m), $MachinePrecision] * k), $MachinePrecision] * N[Tan[k], $MachinePrecision]), $MachinePrecision] * N[(N[(1.0 + N[(N[(k / t$95$m), $MachinePrecision] * N[(k / t$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[k, 2.2e-6], N[(2.0 / N[(2.0 * N[(N[(k * k), $MachinePrecision] * N[Exp[N[(N[(3.0 * N[Log[t$95$m], $MachinePrecision]), $MachinePrecision] - N[(2.0 * N[Log[l$95$m], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(2.0 / N[(N[(N[(k / l$95$m), $MachinePrecision] * N[(k / l$95$m), $MachinePrecision]), $MachinePrecision] * N[(N[(t$95$m * N[Power[N[Sin[k], $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision] / N[Cos[k], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]), $MachinePrecision]
                
                \begin{array}{l}
                l_m = \left|\ell\right|
                \\
                t\_m = \left|t\right|
                \\
                t\_s = \mathsf{copysign}\left(1, t\right)
                
                \\
                t\_s \cdot \begin{array}{l}
                \mathbf{if}\;k \leq 2.1 \cdot 10^{-158}:\\
                \;\;\;\;\frac{2}{\left(\left(\frac{\frac{{t\_m}^{3}}{l\_m}}{l\_m} \cdot k\right) \cdot \tan k\right) \cdot \left(\left(1 + \frac{k}{t\_m} \cdot \frac{k}{t\_m}\right) + 1\right)}\\
                
                \mathbf{elif}\;k \leq 2.2 \cdot 10^{-6}:\\
                \;\;\;\;\frac{2}{2 \cdot \left(\left(k \cdot k\right) \cdot e^{3 \cdot \log t\_m - 2 \cdot \log l\_m}\right)}\\
                
                \mathbf{else}:\\
                \;\;\;\;\frac{2}{\left(\frac{k}{l\_m} \cdot \frac{k}{l\_m}\right) \cdot \frac{t\_m \cdot {\sin k}^{2}}{\cos k}}\\
                
                
                \end{array}
                \end{array}
                
                Derivation
                1. Split input into 3 regimes
                2. if k < 2.09999999999999991e-158

                  1. Initial program 56.6%

                    \[\frac{2}{\left(\left(\frac{{t}^{3}}{\ell \cdot \ell} \cdot \sin k\right) \cdot \tan k\right) \cdot \left(\left(1 + {\left(\frac{k}{t}\right)}^{2}\right) + 1\right)} \]
                  2. Add Preprocessing
                  3. Step-by-step derivation
                    1. lift-*.f64N/A

                      \[\leadsto \frac{2}{\left(\left(\frac{{t}^{3}}{\color{blue}{\ell \cdot \ell}} \cdot \sin k\right) \cdot \tan k\right) \cdot \left(\left(1 + {\left(\frac{k}{t}\right)}^{2}\right) + 1\right)} \]
                    2. lift-/.f64N/A

                      \[\leadsto \frac{2}{\left(\left(\color{blue}{\frac{{t}^{3}}{\ell \cdot \ell}} \cdot \sin k\right) \cdot \tan k\right) \cdot \left(\left(1 + {\left(\frac{k}{t}\right)}^{2}\right) + 1\right)} \]
                    3. lift-pow.f64N/A

                      \[\leadsto \frac{2}{\left(\left(\frac{\color{blue}{{t}^{3}}}{\ell \cdot \ell} \cdot \sin k\right) \cdot \tan k\right) \cdot \left(\left(1 + {\left(\frac{k}{t}\right)}^{2}\right) + 1\right)} \]
                    4. pow-to-expN/A

                      \[\leadsto \frac{2}{\left(\left(\frac{\color{blue}{e^{\log t \cdot 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)} \]
                    5. pow2N/A

                      \[\leadsto \frac{2}{\left(\left(\frac{e^{\log t \cdot 3}}{\color{blue}{{\ell}^{2}}} \cdot \sin k\right) \cdot \tan k\right) \cdot \left(\left(1 + {\left(\frac{k}{t}\right)}^{2}\right) + 1\right)} \]
                    6. pow-to-expN/A

                      \[\leadsto \frac{2}{\left(\left(\frac{e^{\log t \cdot 3}}{\color{blue}{e^{\log \ell \cdot 2}}} \cdot \sin k\right) \cdot \tan k\right) \cdot \left(\left(1 + {\left(\frac{k}{t}\right)}^{2}\right) + 1\right)} \]
                    7. div-expN/A

                      \[\leadsto \frac{2}{\left(\left(\color{blue}{e^{\log t \cdot 3 - \log \ell \cdot 2}} \cdot \sin k\right) \cdot \tan k\right) \cdot \left(\left(1 + {\left(\frac{k}{t}\right)}^{2}\right) + 1\right)} \]
                    8. lower-exp.f64N/A

                      \[\leadsto \frac{2}{\left(\left(\color{blue}{e^{\log t \cdot 3 - \log \ell \cdot 2}} \cdot \sin k\right) \cdot \tan k\right) \cdot \left(\left(1 + {\left(\frac{k}{t}\right)}^{2}\right) + 1\right)} \]
                    9. lower--.f64N/A

                      \[\leadsto \frac{2}{\left(\left(e^{\color{blue}{\log t \cdot 3 - \log \ell \cdot 2}} \cdot \sin k\right) \cdot \tan k\right) \cdot \left(\left(1 + {\left(\frac{k}{t}\right)}^{2}\right) + 1\right)} \]
                    10. lower-*.f64N/A

                      \[\leadsto \frac{2}{\left(\left(e^{\color{blue}{\log t \cdot 3} - \log \ell \cdot 2} \cdot \sin k\right) \cdot \tan k\right) \cdot \left(\left(1 + {\left(\frac{k}{t}\right)}^{2}\right) + 1\right)} \]
                    11. lower-log.f64N/A

                      \[\leadsto \frac{2}{\left(\left(e^{\color{blue}{\log t} \cdot 3 - \log \ell \cdot 2} \cdot \sin k\right) \cdot \tan k\right) \cdot \left(\left(1 + {\left(\frac{k}{t}\right)}^{2}\right) + 1\right)} \]
                    12. lower-*.f64N/A

                      \[\leadsto \frac{2}{\left(\left(e^{\log t \cdot 3 - \color{blue}{\log \ell \cdot 2}} \cdot \sin k\right) \cdot \tan k\right) \cdot \left(\left(1 + {\left(\frac{k}{t}\right)}^{2}\right) + 1\right)} \]
                    13. lower-log.f6419.2

                      \[\leadsto \frac{2}{\left(\left(e^{\log t \cdot 3 - \color{blue}{\log \ell} \cdot 2} \cdot \sin k\right) \cdot \tan k\right) \cdot \left(\left(1 + {\left(\frac{k}{t}\right)}^{2}\right) + 1\right)} \]
                  4. Applied rewrites19.2%

                    \[\leadsto \frac{2}{\left(\left(\color{blue}{e^{\log t \cdot 3 - \log \ell \cdot 2}} \cdot \sin k\right) \cdot \tan k\right) \cdot \left(\left(1 + {\left(\frac{k}{t}\right)}^{2}\right) + 1\right)} \]
                  5. Step-by-step derivation
                    1. lift-/.f64N/A

                      \[\leadsto \frac{2}{\left(\left(e^{\log t \cdot 3 - \log \ell \cdot 2} \cdot \sin k\right) \cdot \tan k\right) \cdot \left(\left(1 + {\color{blue}{\left(\frac{k}{t}\right)}}^{2}\right) + 1\right)} \]
                    2. lift-pow.f64N/A

                      \[\leadsto \frac{2}{\left(\left(e^{\log t \cdot 3 - \log \ell \cdot 2} \cdot \sin k\right) \cdot \tan k\right) \cdot \left(\left(1 + \color{blue}{{\left(\frac{k}{t}\right)}^{2}}\right) + 1\right)} \]
                    3. unpow2N/A

                      \[\leadsto \frac{2}{\left(\left(e^{\log t \cdot 3 - \log \ell \cdot 2} \cdot \sin k\right) \cdot \tan k\right) \cdot \left(\left(1 + \color{blue}{\frac{k}{t} \cdot \frac{k}{t}}\right) + 1\right)} \]
                    4. lower-*.f64N/A

                      \[\leadsto \frac{2}{\left(\left(e^{\log t \cdot 3 - \log \ell \cdot 2} \cdot \sin k\right) \cdot \tan k\right) \cdot \left(\left(1 + \color{blue}{\frac{k}{t} \cdot \frac{k}{t}}\right) + 1\right)} \]
                    5. lift-/.f64N/A

                      \[\leadsto \frac{2}{\left(\left(e^{\log t \cdot 3 - \log \ell \cdot 2} \cdot \sin k\right) \cdot \tan k\right) \cdot \left(\left(1 + \color{blue}{\frac{k}{t}} \cdot \frac{k}{t}\right) + 1\right)} \]
                    6. lift-/.f6419.2

                      \[\leadsto \frac{2}{\left(\left(e^{\log t \cdot 3 - \log \ell \cdot 2} \cdot \sin k\right) \cdot \tan k\right) \cdot \left(\left(1 + \frac{k}{t} \cdot \color{blue}{\frac{k}{t}}\right) + 1\right)} \]
                  6. Applied rewrites19.2%

                    \[\leadsto \frac{2}{\left(\left(e^{\log t \cdot 3 - \log \ell \cdot 2} \cdot \sin k\right) \cdot \tan k\right) \cdot \left(\left(1 + \color{blue}{\frac{k}{t} \cdot \frac{k}{t}}\right) + 1\right)} \]
                  7. Taylor expanded in k around 0

                    \[\leadsto \frac{2}{\left(\color{blue}{\left(k \cdot e^{3 \cdot \log t - 2 \cdot \log \ell}\right)} \cdot \tan k\right) \cdot \left(\left(1 + \frac{k}{t} \cdot \frac{k}{t}\right) + 1\right)} \]
                  8. Step-by-step derivation
                    1. *-commutativeN/A

                      \[\leadsto \frac{2}{\left(\left(e^{3 \cdot \log t - 2 \cdot \log \ell} \cdot \color{blue}{k}\right) \cdot \tan k\right) \cdot \left(\left(1 + \frac{k}{t} \cdot \frac{k}{t}\right) + 1\right)} \]
                    2. lower-*.f64N/A

                      \[\leadsto \frac{2}{\left(\left(e^{3 \cdot \log t - 2 \cdot \log \ell} \cdot \color{blue}{k}\right) \cdot \tan k\right) \cdot \left(\left(1 + \frac{k}{t} \cdot \frac{k}{t}\right) + 1\right)} \]
                    3. exp-diffN/A

                      \[\leadsto \frac{2}{\left(\left(\frac{e^{3 \cdot \log t}}{e^{2 \cdot \log \ell}} \cdot k\right) \cdot \tan k\right) \cdot \left(\left(1 + \frac{k}{t} \cdot \frac{k}{t}\right) + 1\right)} \]
                    4. *-commutativeN/A

                      \[\leadsto \frac{2}{\left(\left(\frac{e^{\log t \cdot 3}}{e^{2 \cdot \log \ell}} \cdot k\right) \cdot \tan k\right) \cdot \left(\left(1 + \frac{k}{t} \cdot \frac{k}{t}\right) + 1\right)} \]
                    5. pow-to-expN/A

                      \[\leadsto \frac{2}{\left(\left(\frac{{t}^{3}}{e^{2 \cdot \log \ell}} \cdot k\right) \cdot \tan k\right) \cdot \left(\left(1 + \frac{k}{t} \cdot \frac{k}{t}\right) + 1\right)} \]
                    6. *-commutativeN/A

                      \[\leadsto \frac{2}{\left(\left(\frac{{t}^{3}}{e^{\log \ell \cdot 2}} \cdot k\right) \cdot \tan k\right) \cdot \left(\left(1 + \frac{k}{t} \cdot \frac{k}{t}\right) + 1\right)} \]
                    7. pow-to-expN/A

                      \[\leadsto \frac{2}{\left(\left(\frac{{t}^{3}}{{\ell}^{2}} \cdot k\right) \cdot \tan k\right) \cdot \left(\left(1 + \frac{k}{t} \cdot \frac{k}{t}\right) + 1\right)} \]
                    8. pow2N/A

                      \[\leadsto \frac{2}{\left(\left(\frac{{t}^{3}}{\ell \cdot \ell} \cdot k\right) \cdot \tan k\right) \cdot \left(\left(1 + \frac{k}{t} \cdot \frac{k}{t}\right) + 1\right)} \]
                    9. associate-/r*N/A

                      \[\leadsto \frac{2}{\left(\left(\frac{\frac{{t}^{3}}{\ell}}{\ell} \cdot k\right) \cdot \tan k\right) \cdot \left(\left(1 + \frac{k}{t} \cdot \frac{k}{t}\right) + 1\right)} \]
                    10. lift-pow.f64N/A

                      \[\leadsto \frac{2}{\left(\left(\frac{\frac{{t}^{3}}{\ell}}{\ell} \cdot k\right) \cdot \tan k\right) \cdot \left(\left(1 + \frac{k}{t} \cdot \frac{k}{t}\right) + 1\right)} \]
                    11. lift-/.f64N/A

                      \[\leadsto \frac{2}{\left(\left(\frac{\frac{{t}^{3}}{\ell}}{\ell} \cdot k\right) \cdot \tan k\right) \cdot \left(\left(1 + \frac{k}{t} \cdot \frac{k}{t}\right) + 1\right)} \]
                    12. lift-/.f6458.4

                      \[\leadsto \frac{2}{\left(\left(\frac{\frac{{t}^{3}}{\ell}}{\ell} \cdot k\right) \cdot \tan k\right) \cdot \left(\left(1 + \frac{k}{t} \cdot \frac{k}{t}\right) + 1\right)} \]
                  9. Applied rewrites58.4%

                    \[\leadsto \frac{2}{\left(\color{blue}{\left(\frac{\frac{{t}^{3}}{\ell}}{\ell} \cdot k\right)} \cdot \tan k\right) \cdot \left(\left(1 + \frac{k}{t} \cdot \frac{k}{t}\right) + 1\right)} \]

                  if 2.09999999999999991e-158 < k < 2.2000000000000001e-6

                  1. Initial program 58.8%

                    \[\frac{2}{\left(\left(\frac{{t}^{3}}{\ell \cdot \ell} \cdot \sin k\right) \cdot \tan k\right) \cdot \left(\left(1 + {\left(\frac{k}{t}\right)}^{2}\right) + 1\right)} \]
                  2. Add Preprocessing
                  3. Step-by-step derivation
                    1. lift-*.f64N/A

                      \[\leadsto \frac{2}{\left(\left(\frac{{t}^{3}}{\color{blue}{\ell \cdot \ell}} \cdot \sin k\right) \cdot \tan k\right) \cdot \left(\left(1 + {\left(\frac{k}{t}\right)}^{2}\right) + 1\right)} \]
                    2. lift-/.f64N/A

                      \[\leadsto \frac{2}{\left(\left(\color{blue}{\frac{{t}^{3}}{\ell \cdot \ell}} \cdot \sin k\right) \cdot \tan k\right) \cdot \left(\left(1 + {\left(\frac{k}{t}\right)}^{2}\right) + 1\right)} \]
                    3. lift-pow.f64N/A

                      \[\leadsto \frac{2}{\left(\left(\frac{\color{blue}{{t}^{3}}}{\ell \cdot \ell} \cdot \sin k\right) \cdot \tan k\right) \cdot \left(\left(1 + {\left(\frac{k}{t}\right)}^{2}\right) + 1\right)} \]
                    4. pow-to-expN/A

                      \[\leadsto \frac{2}{\left(\left(\frac{\color{blue}{e^{\log t \cdot 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)} \]
                    5. pow2N/A

                      \[\leadsto \frac{2}{\left(\left(\frac{e^{\log t \cdot 3}}{\color{blue}{{\ell}^{2}}} \cdot \sin k\right) \cdot \tan k\right) \cdot \left(\left(1 + {\left(\frac{k}{t}\right)}^{2}\right) + 1\right)} \]
                    6. pow-to-expN/A

                      \[\leadsto \frac{2}{\left(\left(\frac{e^{\log t \cdot 3}}{\color{blue}{e^{\log \ell \cdot 2}}} \cdot \sin k\right) \cdot \tan k\right) \cdot \left(\left(1 + {\left(\frac{k}{t}\right)}^{2}\right) + 1\right)} \]
                    7. div-expN/A

                      \[\leadsto \frac{2}{\left(\left(\color{blue}{e^{\log t \cdot 3 - \log \ell \cdot 2}} \cdot \sin k\right) \cdot \tan k\right) \cdot \left(\left(1 + {\left(\frac{k}{t}\right)}^{2}\right) + 1\right)} \]
                    8. lower-exp.f64N/A

                      \[\leadsto \frac{2}{\left(\left(\color{blue}{e^{\log t \cdot 3 - \log \ell \cdot 2}} \cdot \sin k\right) \cdot \tan k\right) \cdot \left(\left(1 + {\left(\frac{k}{t}\right)}^{2}\right) + 1\right)} \]
                    9. lower--.f64N/A

                      \[\leadsto \frac{2}{\left(\left(e^{\color{blue}{\log t \cdot 3 - \log \ell \cdot 2}} \cdot \sin k\right) \cdot \tan k\right) \cdot \left(\left(1 + {\left(\frac{k}{t}\right)}^{2}\right) + 1\right)} \]
                    10. lower-*.f64N/A

                      \[\leadsto \frac{2}{\left(\left(e^{\color{blue}{\log t \cdot 3} - \log \ell \cdot 2} \cdot \sin k\right) \cdot \tan k\right) \cdot \left(\left(1 + {\left(\frac{k}{t}\right)}^{2}\right) + 1\right)} \]
                    11. lower-log.f64N/A

                      \[\leadsto \frac{2}{\left(\left(e^{\color{blue}{\log t} \cdot 3 - \log \ell \cdot 2} \cdot \sin k\right) \cdot \tan k\right) \cdot \left(\left(1 + {\left(\frac{k}{t}\right)}^{2}\right) + 1\right)} \]
                    12. lower-*.f64N/A

                      \[\leadsto \frac{2}{\left(\left(e^{\log t \cdot 3 - \color{blue}{\log \ell \cdot 2}} \cdot \sin k\right) \cdot \tan k\right) \cdot \left(\left(1 + {\left(\frac{k}{t}\right)}^{2}\right) + 1\right)} \]
                    13. lower-log.f6418.5

                      \[\leadsto \frac{2}{\left(\left(e^{\log t \cdot 3 - \color{blue}{\log \ell} \cdot 2} \cdot \sin k\right) \cdot \tan k\right) \cdot \left(\left(1 + {\left(\frac{k}{t}\right)}^{2}\right) + 1\right)} \]
                  4. Applied rewrites18.5%

                    \[\leadsto \frac{2}{\left(\left(\color{blue}{e^{\log t \cdot 3 - \log \ell \cdot 2}} \cdot \sin k\right) \cdot \tan k\right) \cdot \left(\left(1 + {\left(\frac{k}{t}\right)}^{2}\right) + 1\right)} \]
                  5. Step-by-step derivation
                    1. lift-/.f64N/A

                      \[\leadsto \frac{2}{\left(\left(e^{\log t \cdot 3 - \log \ell \cdot 2} \cdot \sin k\right) \cdot \tan k\right) \cdot \left(\left(1 + {\color{blue}{\left(\frac{k}{t}\right)}}^{2}\right) + 1\right)} \]
                    2. lift-pow.f64N/A

                      \[\leadsto \frac{2}{\left(\left(e^{\log t \cdot 3 - \log \ell \cdot 2} \cdot \sin k\right) \cdot \tan k\right) \cdot \left(\left(1 + \color{blue}{{\left(\frac{k}{t}\right)}^{2}}\right) + 1\right)} \]
                    3. unpow2N/A

                      \[\leadsto \frac{2}{\left(\left(e^{\log t \cdot 3 - \log \ell \cdot 2} \cdot \sin k\right) \cdot \tan k\right) \cdot \left(\left(1 + \color{blue}{\frac{k}{t} \cdot \frac{k}{t}}\right) + 1\right)} \]
                    4. times-fracN/A

                      \[\leadsto \frac{2}{\left(\left(e^{\log t \cdot 3 - \log \ell \cdot 2} \cdot \sin k\right) \cdot \tan k\right) \cdot \left(\left(1 + \color{blue}{\frac{k \cdot k}{t \cdot t}}\right) + 1\right)} \]
                    5. pow2N/A

                      \[\leadsto \frac{2}{\left(\left(e^{\log t \cdot 3 - \log \ell \cdot 2} \cdot \sin k\right) \cdot \tan k\right) \cdot \left(\left(1 + \frac{k \cdot k}{\color{blue}{{t}^{2}}}\right) + 1\right)} \]
                    6. associate-/l*N/A

                      \[\leadsto \frac{2}{\left(\left(e^{\log t \cdot 3 - \log \ell \cdot 2} \cdot \sin k\right) \cdot \tan k\right) \cdot \left(\left(1 + \color{blue}{k \cdot \frac{k}{{t}^{2}}}\right) + 1\right)} \]
                    7. lower-*.f64N/A

                      \[\leadsto \frac{2}{\left(\left(e^{\log t \cdot 3 - \log \ell \cdot 2} \cdot \sin k\right) \cdot \tan k\right) \cdot \left(\left(1 + \color{blue}{k \cdot \frac{k}{{t}^{2}}}\right) + 1\right)} \]
                    8. lower-/.f64N/A

                      \[\leadsto \frac{2}{\left(\left(e^{\log t \cdot 3 - \log \ell \cdot 2} \cdot \sin k\right) \cdot \tan k\right) \cdot \left(\left(1 + k \cdot \color{blue}{\frac{k}{{t}^{2}}}\right) + 1\right)} \]
                    9. pow2N/A

                      \[\leadsto \frac{2}{\left(\left(e^{\log t \cdot 3 - \log \ell \cdot 2} \cdot \sin k\right) \cdot \tan k\right) \cdot \left(\left(1 + k \cdot \frac{k}{\color{blue}{t \cdot t}}\right) + 1\right)} \]
                    10. lift-*.f6418.5

                      \[\leadsto \frac{2}{\left(\left(e^{\log t \cdot 3 - \log \ell \cdot 2} \cdot \sin k\right) \cdot \tan k\right) \cdot \left(\left(1 + k \cdot \frac{k}{\color{blue}{t \cdot t}}\right) + 1\right)} \]
                  6. Applied rewrites18.5%

                    \[\leadsto \frac{2}{\left(\left(e^{\log t \cdot 3 - \log \ell \cdot 2} \cdot \sin k\right) \cdot \tan k\right) \cdot \left(\left(1 + \color{blue}{k \cdot \frac{k}{t \cdot t}}\right) + 1\right)} \]
                  7. Taylor expanded in k around 0

                    \[\leadsto \frac{2}{\color{blue}{2 \cdot \left({k}^{2} \cdot e^{3 \cdot \log t - 2 \cdot \log \ell}\right)}} \]
                  8. Step-by-step derivation
                    1. lower-*.f64N/A

                      \[\leadsto \frac{2}{2 \cdot \color{blue}{\left({k}^{2} \cdot e^{3 \cdot \log t - 2 \cdot \log \ell}\right)}} \]
                    2. lower-*.f64N/A

                      \[\leadsto \frac{2}{2 \cdot \left({k}^{2} \cdot \color{blue}{e^{3 \cdot \log t - 2 \cdot \log \ell}}\right)} \]
                    3. pow2N/A

                      \[\leadsto \frac{2}{2 \cdot \left(\left(k \cdot k\right) \cdot e^{\color{blue}{3 \cdot \log t - 2 \cdot \log \ell}}\right)} \]
                    4. lift-*.f64N/A

                      \[\leadsto \frac{2}{2 \cdot \left(\left(k \cdot k\right) \cdot e^{\color{blue}{3 \cdot \log t - 2 \cdot \log \ell}}\right)} \]
                    5. lower-exp.f64N/A

                      \[\leadsto \frac{2}{2 \cdot \left(\left(k \cdot k\right) \cdot e^{3 \cdot \log t - 2 \cdot \log \ell}\right)} \]
                    6. lower--.f64N/A

                      \[\leadsto \frac{2}{2 \cdot \left(\left(k \cdot k\right) \cdot e^{3 \cdot \log t - 2 \cdot \log \ell}\right)} \]
                    7. lower-*.f64N/A

                      \[\leadsto \frac{2}{2 \cdot \left(\left(k \cdot k\right) \cdot e^{3 \cdot \log t - 2 \cdot \log \ell}\right)} \]
                    8. lift-log.f64N/A

                      \[\leadsto \frac{2}{2 \cdot \left(\left(k \cdot k\right) \cdot e^{3 \cdot \log t - 2 \cdot \log \ell}\right)} \]
                    9. lower-*.f64N/A

                      \[\leadsto \frac{2}{2 \cdot \left(\left(k \cdot k\right) \cdot e^{3 \cdot \log t - 2 \cdot \log \ell}\right)} \]
                    10. lift-log.f6418.5

                      \[\leadsto \frac{2}{2 \cdot \left(\left(k \cdot k\right) \cdot e^{3 \cdot \log t - 2 \cdot \log \ell}\right)} \]
                  9. Applied rewrites18.5%

                    \[\leadsto \frac{2}{\color{blue}{2 \cdot \left(\left(k \cdot k\right) \cdot e^{3 \cdot \log t - 2 \cdot \log \ell}\right)}} \]

                  if 2.2000000000000001e-6 < k

                  1. Initial program 42.8%

                    \[\frac{2}{\left(\left(\frac{{t}^{3}}{\ell \cdot \ell} \cdot \sin k\right) \cdot \tan k\right) \cdot \left(\left(1 + {\left(\frac{k}{t}\right)}^{2}\right) + 1\right)} \]
                  2. Add Preprocessing
                  3. Taylor expanded in k around 0

                    \[\leadsto \frac{2}{\color{blue}{{k}^{2} \cdot \left(2 \cdot \frac{{t}^{3}}{{\ell}^{2}} + \frac{{k}^{2} \cdot \left({t}^{3} \cdot \left(\frac{1}{3} + \frac{1}{{t}^{2}}\right)\right)}{{\ell}^{2}}\right)}} \]
                  4. Step-by-step derivation
                    1. *-commutativeN/A

                      \[\leadsto \frac{2}{\left(2 \cdot \frac{{t}^{3}}{{\ell}^{2}} + \frac{{k}^{2} \cdot \left({t}^{3} \cdot \left(\frac{1}{3} + \frac{1}{{t}^{2}}\right)\right)}{{\ell}^{2}}\right) \cdot \color{blue}{{k}^{2}}} \]
                    2. lower-*.f64N/A

                      \[\leadsto \frac{2}{\left(2 \cdot \frac{{t}^{3}}{{\ell}^{2}} + \frac{{k}^{2} \cdot \left({t}^{3} \cdot \left(\frac{1}{3} + \frac{1}{{t}^{2}}\right)\right)}{{\ell}^{2}}\right) \cdot \color{blue}{{k}^{2}}} \]
                  5. Applied rewrites54.2%

                    \[\leadsto \frac{2}{\color{blue}{\frac{\left(0.3333333333333333 \cdot {t}^{3} + t\right) \cdot \left(k \cdot k\right) + 2 \cdot {t}^{3}}{\ell \cdot \ell} \cdot \left(k \cdot k\right)}} \]
                  6. Taylor expanded in t around 0

                    \[\leadsto \frac{2}{\frac{{k}^{2} \cdot t}{{\ell}^{2}} \cdot \left(\color{blue}{k} \cdot k\right)} \]
                  7. Step-by-step derivation
                    1. associate-/l*N/A

                      \[\leadsto \frac{2}{\left({k}^{2} \cdot \frac{t}{{\ell}^{2}}\right) \cdot \left(k \cdot k\right)} \]
                    2. lower-*.f64N/A

                      \[\leadsto \frac{2}{\left({k}^{2} \cdot \frac{t}{{\ell}^{2}}\right) \cdot \left(k \cdot k\right)} \]
                    3. pow2N/A

                      \[\leadsto \frac{2}{\left(\left(k \cdot k\right) \cdot \frac{t}{{\ell}^{2}}\right) \cdot \left(k \cdot k\right)} \]
                    4. lift-*.f64N/A

                      \[\leadsto \frac{2}{\left(\left(k \cdot k\right) \cdot \frac{t}{{\ell}^{2}}\right) \cdot \left(k \cdot k\right)} \]
                    5. lower-/.f64N/A

                      \[\leadsto \frac{2}{\left(\left(k \cdot k\right) \cdot \frac{t}{{\ell}^{2}}\right) \cdot \left(k \cdot k\right)} \]
                    6. pow2N/A

                      \[\leadsto \frac{2}{\left(\left(k \cdot k\right) \cdot \frac{t}{\ell \cdot \ell}\right) \cdot \left(k \cdot k\right)} \]
                    7. lift-*.f6454.4

                      \[\leadsto \frac{2}{\left(\left(k \cdot k\right) \cdot \frac{t}{\ell \cdot \ell}\right) \cdot \left(k \cdot k\right)} \]
                  8. Applied rewrites54.4%

                    \[\leadsto \frac{2}{\left(\left(k \cdot k\right) \cdot \frac{t}{\ell \cdot \ell}\right) \cdot \left(\color{blue}{k} \cdot k\right)} \]
                  9. 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}}} \]
                  10. Step-by-step derivation
                    1. times-fracN/A

                      \[\leadsto \frac{2}{\frac{{k}^{2}}{{\ell}^{2}} \cdot \color{blue}{\frac{t \cdot {\sin k}^{2}}{\cos k}}} \]
                    2. lower-*.f64N/A

                      \[\leadsto \frac{2}{\frac{{k}^{2}}{{\ell}^{2}} \cdot \color{blue}{\frac{t \cdot {\sin k}^{2}}{\cos k}}} \]
                    3. pow2N/A

                      \[\leadsto \frac{2}{\frac{k \cdot k}{{\ell}^{2}} \cdot \frac{\color{blue}{t} \cdot {\sin k}^{2}}{\cos k}} \]
                    4. pow2N/A

                      \[\leadsto \frac{2}{\frac{k \cdot k}{\ell \cdot \ell} \cdot \frac{t \cdot \color{blue}{{\sin k}^{2}}}{\cos k}} \]
                    5. times-fracN/A

                      \[\leadsto \frac{2}{\left(\frac{k}{\ell} \cdot \frac{k}{\ell}\right) \cdot \frac{\color{blue}{t \cdot {\sin k}^{2}}}{\cos k}} \]
                    6. lower-*.f64N/A

                      \[\leadsto \frac{2}{\left(\frac{k}{\ell} \cdot \frac{k}{\ell}\right) \cdot \frac{\color{blue}{t \cdot {\sin k}^{2}}}{\cos k}} \]
                    7. lower-/.f64N/A

                      \[\leadsto \frac{2}{\left(\frac{k}{\ell} \cdot \frac{k}{\ell}\right) \cdot \frac{\color{blue}{t} \cdot {\sin k}^{2}}{\cos k}} \]
                    8. lower-/.f64N/A

                      \[\leadsto \frac{2}{\left(\frac{k}{\ell} \cdot \frac{k}{\ell}\right) \cdot \frac{t \cdot \color{blue}{{\sin k}^{2}}}{\cos k}} \]
                    9. lower-/.f64N/A

                      \[\leadsto \frac{2}{\left(\frac{k}{\ell} \cdot \frac{k}{\ell}\right) \cdot \frac{t \cdot {\sin k}^{2}}{\color{blue}{\cos k}}} \]
                    10. lower-*.f64N/A

                      \[\leadsto \frac{2}{\left(\frac{k}{\ell} \cdot \frac{k}{\ell}\right) \cdot \frac{t \cdot {\sin k}^{2}}{\cos \color{blue}{k}}} \]
                    11. lower-pow.f64N/A

                      \[\leadsto \frac{2}{\left(\frac{k}{\ell} \cdot \frac{k}{\ell}\right) \cdot \frac{t \cdot {\sin k}^{2}}{\cos k}} \]
                    12. lift-sin.f64N/A

                      \[\leadsto \frac{2}{\left(\frac{k}{\ell} \cdot \frac{k}{\ell}\right) \cdot \frac{t \cdot {\sin k}^{2}}{\cos k}} \]
                    13. lower-cos.f6478.6

                      \[\leadsto \frac{2}{\left(\frac{k}{\ell} \cdot \frac{k}{\ell}\right) \cdot \frac{t \cdot {\sin k}^{2}}{\cos k}} \]
                  11. Applied rewrites78.6%

                    \[\leadsto \frac{2}{\color{blue}{\left(\frac{k}{\ell} \cdot \frac{k}{\ell}\right) \cdot \frac{t \cdot {\sin k}^{2}}{\cos k}}} \]
                3. Recombined 3 regimes into one program.
                4. Final simplification58.4%

                  \[\leadsto \begin{array}{l} \mathbf{if}\;k \leq 2.1 \cdot 10^{-158}:\\ \;\;\;\;\frac{2}{\left(\left(\frac{\frac{{t}^{3}}{\ell}}{\ell} \cdot k\right) \cdot \tan k\right) \cdot \left(\left(1 + \frac{k}{t} \cdot \frac{k}{t}\right) + 1\right)}\\ \mathbf{elif}\;k \leq 2.2 \cdot 10^{-6}:\\ \;\;\;\;\frac{2}{2 \cdot \left(\left(k \cdot k\right) \cdot e^{3 \cdot \log t - 2 \cdot \log \ell}\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{2}{\left(\frac{k}{\ell} \cdot \frac{k}{\ell}\right) \cdot \frac{t \cdot {\sin k}^{2}}{\cos k}}\\ \end{array} \]
                5. Add Preprocessing

                Alternative 26: 63.7% accurate, 1.3× speedup?

                \[\begin{array}{l} l_m = \left|\ell\right| \\ t\_m = \left|t\right| \\ t\_s = \mathsf{copysign}\left(1, t\right) \\ t\_s \cdot \begin{array}{l} \mathbf{if}\;k \leq 2.1 \cdot 10^{-158}:\\ \;\;\;\;\frac{2}{\left(\left(\frac{\frac{{t\_m}^{3}}{l\_m}}{l\_m} \cdot k\right) \cdot \tan k\right) \cdot \left(\left(1 + \frac{k}{t\_m} \cdot \frac{k}{t\_m}\right) + 1\right)}\\ \mathbf{elif}\;k \leq 2.2 \cdot 10^{-6}:\\ \;\;\;\;\frac{2}{2 \cdot \left(\left(k \cdot k\right) \cdot e^{3 \cdot \log t\_m - 2 \cdot \log l\_m}\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{\frac{\left(l\_m \cdot l\_m\right) \cdot \cos k}{{\sin k}^{2} \cdot t\_m} \cdot 2}{k \cdot k}\\ \end{array} \end{array} \]
                l_m = (fabs.f64 l)
                t\_m = (fabs.f64 t)
                t\_s = (copysign.f64 #s(literal 1 binary64) t)
                (FPCore (t_s t_m l_m k)
                 :precision binary64
                 (*
                  t_s
                  (if (<= k 2.1e-158)
                    (/
                     2.0
                     (*
                      (* (* (/ (/ (pow t_m 3.0) l_m) l_m) k) (tan k))
                      (+ (+ 1.0 (* (/ k t_m) (/ k t_m))) 1.0)))
                    (if (<= k 2.2e-6)
                      (/ 2.0 (* 2.0 (* (* k k) (exp (- (* 3.0 (log t_m)) (* 2.0 (log l_m)))))))
                      (/
                       (* (/ (* (* l_m l_m) (cos k)) (* (pow (sin k) 2.0) t_m)) 2.0)
                       (* k k))))))
                l_m = fabs(l);
                t\_m = fabs(t);
                t\_s = copysign(1.0, t);
                double code(double t_s, double t_m, double l_m, double k) {
                	double tmp;
                	if (k <= 2.1e-158) {
                		tmp = 2.0 / (((((pow(t_m, 3.0) / l_m) / l_m) * k) * tan(k)) * ((1.0 + ((k / t_m) * (k / t_m))) + 1.0));
                	} else if (k <= 2.2e-6) {
                		tmp = 2.0 / (2.0 * ((k * k) * exp(((3.0 * log(t_m)) - (2.0 * log(l_m))))));
                	} else {
                		tmp = ((((l_m * l_m) * cos(k)) / (pow(sin(k), 2.0) * t_m)) * 2.0) / (k * k);
                	}
                	return t_s * tmp;
                }
                
                l_m =     private
                t\_m =     private
                t\_s =     private
                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_s, t_m, l_m, k)
                use fmin_fmax_functions
                    real(8), intent (in) :: t_s
                    real(8), intent (in) :: t_m
                    real(8), intent (in) :: l_m
                    real(8), intent (in) :: k
                    real(8) :: tmp
                    if (k <= 2.1d-158) then
                        tmp = 2.0d0 / ((((((t_m ** 3.0d0) / l_m) / l_m) * k) * tan(k)) * ((1.0d0 + ((k / t_m) * (k / t_m))) + 1.0d0))
                    else if (k <= 2.2d-6) then
                        tmp = 2.0d0 / (2.0d0 * ((k * k) * exp(((3.0d0 * log(t_m)) - (2.0d0 * log(l_m))))))
                    else
                        tmp = ((((l_m * l_m) * cos(k)) / ((sin(k) ** 2.0d0) * t_m)) * 2.0d0) / (k * k)
                    end if
                    code = t_s * tmp
                end function
                
                l_m = Math.abs(l);
                t\_m = Math.abs(t);
                t\_s = Math.copySign(1.0, t);
                public static double code(double t_s, double t_m, double l_m, double k) {
                	double tmp;
                	if (k <= 2.1e-158) {
                		tmp = 2.0 / (((((Math.pow(t_m, 3.0) / l_m) / l_m) * k) * Math.tan(k)) * ((1.0 + ((k / t_m) * (k / t_m))) + 1.0));
                	} else if (k <= 2.2e-6) {
                		tmp = 2.0 / (2.0 * ((k * k) * Math.exp(((3.0 * Math.log(t_m)) - (2.0 * Math.log(l_m))))));
                	} else {
                		tmp = ((((l_m * l_m) * Math.cos(k)) / (Math.pow(Math.sin(k), 2.0) * t_m)) * 2.0) / (k * k);
                	}
                	return t_s * tmp;
                }
                
                l_m = math.fabs(l)
                t\_m = math.fabs(t)
                t\_s = math.copysign(1.0, t)
                def code(t_s, t_m, l_m, k):
                	tmp = 0
                	if k <= 2.1e-158:
                		tmp = 2.0 / (((((math.pow(t_m, 3.0) / l_m) / l_m) * k) * math.tan(k)) * ((1.0 + ((k / t_m) * (k / t_m))) + 1.0))
                	elif k <= 2.2e-6:
                		tmp = 2.0 / (2.0 * ((k * k) * math.exp(((3.0 * math.log(t_m)) - (2.0 * math.log(l_m))))))
                	else:
                		tmp = ((((l_m * l_m) * math.cos(k)) / (math.pow(math.sin(k), 2.0) * t_m)) * 2.0) / (k * k)
                	return t_s * tmp
                
                l_m = abs(l)
                t\_m = abs(t)
                t\_s = copysign(1.0, t)
                function code(t_s, t_m, l_m, k)
                	tmp = 0.0
                	if (k <= 2.1e-158)
                		tmp = Float64(2.0 / Float64(Float64(Float64(Float64(Float64((t_m ^ 3.0) / l_m) / l_m) * k) * tan(k)) * Float64(Float64(1.0 + Float64(Float64(k / t_m) * Float64(k / t_m))) + 1.0)));
                	elseif (k <= 2.2e-6)
                		tmp = Float64(2.0 / Float64(2.0 * Float64(Float64(k * k) * exp(Float64(Float64(3.0 * log(t_m)) - Float64(2.0 * log(l_m)))))));
                	else
                		tmp = Float64(Float64(Float64(Float64(Float64(l_m * l_m) * cos(k)) / Float64((sin(k) ^ 2.0) * t_m)) * 2.0) / Float64(k * k));
                	end
                	return Float64(t_s * tmp)
                end
                
                l_m = abs(l);
                t\_m = abs(t);
                t\_s = sign(t) * abs(1.0);
                function tmp_2 = code(t_s, t_m, l_m, k)
                	tmp = 0.0;
                	if (k <= 2.1e-158)
                		tmp = 2.0 / ((((((t_m ^ 3.0) / l_m) / l_m) * k) * tan(k)) * ((1.0 + ((k / t_m) * (k / t_m))) + 1.0));
                	elseif (k <= 2.2e-6)
                		tmp = 2.0 / (2.0 * ((k * k) * exp(((3.0 * log(t_m)) - (2.0 * log(l_m))))));
                	else
                		tmp = ((((l_m * l_m) * cos(k)) / ((sin(k) ^ 2.0) * t_m)) * 2.0) / (k * k);
                	end
                	tmp_2 = t_s * tmp;
                end
                
                l_m = N[Abs[l], $MachinePrecision]
                t\_m = N[Abs[t], $MachinePrecision]
                t\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[t]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
                code[t$95$s_, t$95$m_, l$95$m_, k_] := N[(t$95$s * If[LessEqual[k, 2.1e-158], N[(2.0 / N[(N[(N[(N[(N[(N[Power[t$95$m, 3.0], $MachinePrecision] / l$95$m), $MachinePrecision] / l$95$m), $MachinePrecision] * k), $MachinePrecision] * N[Tan[k], $MachinePrecision]), $MachinePrecision] * N[(N[(1.0 + N[(N[(k / t$95$m), $MachinePrecision] * N[(k / t$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[k, 2.2e-6], N[(2.0 / N[(2.0 * N[(N[(k * k), $MachinePrecision] * N[Exp[N[(N[(3.0 * N[Log[t$95$m], $MachinePrecision]), $MachinePrecision] - N[(2.0 * N[Log[l$95$m], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(N[(N[(l$95$m * l$95$m), $MachinePrecision] * N[Cos[k], $MachinePrecision]), $MachinePrecision] / N[(N[Power[N[Sin[k], $MachinePrecision], 2.0], $MachinePrecision] * t$95$m), $MachinePrecision]), $MachinePrecision] * 2.0), $MachinePrecision] / N[(k * k), $MachinePrecision]), $MachinePrecision]]]), $MachinePrecision]
                
                \begin{array}{l}
                l_m = \left|\ell\right|
                \\
                t\_m = \left|t\right|
                \\
                t\_s = \mathsf{copysign}\left(1, t\right)
                
                \\
                t\_s \cdot \begin{array}{l}
                \mathbf{if}\;k \leq 2.1 \cdot 10^{-158}:\\
                \;\;\;\;\frac{2}{\left(\left(\frac{\frac{{t\_m}^{3}}{l\_m}}{l\_m} \cdot k\right) \cdot \tan k\right) \cdot \left(\left(1 + \frac{k}{t\_m} \cdot \frac{k}{t\_m}\right) + 1\right)}\\
                
                \mathbf{elif}\;k \leq 2.2 \cdot 10^{-6}:\\
                \;\;\;\;\frac{2}{2 \cdot \left(\left(k \cdot k\right) \cdot e^{3 \cdot \log t\_m - 2 \cdot \log l\_m}\right)}\\
                
                \mathbf{else}:\\
                \;\;\;\;\frac{\frac{\left(l\_m \cdot l\_m\right) \cdot \cos k}{{\sin k}^{2} \cdot t\_m} \cdot 2}{k \cdot k}\\
                
                
                \end{array}
                \end{array}
                
                Derivation
                1. Split input into 3 regimes
                2. if k < 2.09999999999999991e-158

                  1. Initial program 56.6%

                    \[\frac{2}{\left(\left(\frac{{t}^{3}}{\ell \cdot \ell} \cdot \sin k\right) \cdot \tan k\right) \cdot \left(\left(1 + {\left(\frac{k}{t}\right)}^{2}\right) + 1\right)} \]
                  2. Add Preprocessing
                  3. Step-by-step derivation
                    1. lift-*.f64N/A

                      \[\leadsto \frac{2}{\left(\left(\frac{{t}^{3}}{\color{blue}{\ell \cdot \ell}} \cdot \sin k\right) \cdot \tan k\right) \cdot \left(\left(1 + {\left(\frac{k}{t}\right)}^{2}\right) + 1\right)} \]
                    2. lift-/.f64N/A

                      \[\leadsto \frac{2}{\left(\left(\color{blue}{\frac{{t}^{3}}{\ell \cdot \ell}} \cdot \sin k\right) \cdot \tan k\right) \cdot \left(\left(1 + {\left(\frac{k}{t}\right)}^{2}\right) + 1\right)} \]
                    3. lift-pow.f64N/A

                      \[\leadsto \frac{2}{\left(\left(\frac{\color{blue}{{t}^{3}}}{\ell \cdot \ell} \cdot \sin k\right) \cdot \tan k\right) \cdot \left(\left(1 + {\left(\frac{k}{t}\right)}^{2}\right) + 1\right)} \]
                    4. pow-to-expN/A

                      \[\leadsto \frac{2}{\left(\left(\frac{\color{blue}{e^{\log t \cdot 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)} \]
                    5. pow2N/A

                      \[\leadsto \frac{2}{\left(\left(\frac{e^{\log t \cdot 3}}{\color{blue}{{\ell}^{2}}} \cdot \sin k\right) \cdot \tan k\right) \cdot \left(\left(1 + {\left(\frac{k}{t}\right)}^{2}\right) + 1\right)} \]
                    6. pow-to-expN/A

                      \[\leadsto \frac{2}{\left(\left(\frac{e^{\log t \cdot 3}}{\color{blue}{e^{\log \ell \cdot 2}}} \cdot \sin k\right) \cdot \tan k\right) \cdot \left(\left(1 + {\left(\frac{k}{t}\right)}^{2}\right) + 1\right)} \]
                    7. div-expN/A

                      \[\leadsto \frac{2}{\left(\left(\color{blue}{e^{\log t \cdot 3 - \log \ell \cdot 2}} \cdot \sin k\right) \cdot \tan k\right) \cdot \left(\left(1 + {\left(\frac{k}{t}\right)}^{2}\right) + 1\right)} \]
                    8. lower-exp.f64N/A

                      \[\leadsto \frac{2}{\left(\left(\color{blue}{e^{\log t \cdot 3 - \log \ell \cdot 2}} \cdot \sin k\right) \cdot \tan k\right) \cdot \left(\left(1 + {\left(\frac{k}{t}\right)}^{2}\right) + 1\right)} \]
                    9. lower--.f64N/A

                      \[\leadsto \frac{2}{\left(\left(e^{\color{blue}{\log t \cdot 3 - \log \ell \cdot 2}} \cdot \sin k\right) \cdot \tan k\right) \cdot \left(\left(1 + {\left(\frac{k}{t}\right)}^{2}\right) + 1\right)} \]
                    10. lower-*.f64N/A

                      \[\leadsto \frac{2}{\left(\left(e^{\color{blue}{\log t \cdot 3} - \log \ell \cdot 2} \cdot \sin k\right) \cdot \tan k\right) \cdot \left(\left(1 + {\left(\frac{k}{t}\right)}^{2}\right) + 1\right)} \]
                    11. lower-log.f64N/A

                      \[\leadsto \frac{2}{\left(\left(e^{\color{blue}{\log t} \cdot 3 - \log \ell \cdot 2} \cdot \sin k\right) \cdot \tan k\right) \cdot \left(\left(1 + {\left(\frac{k}{t}\right)}^{2}\right) + 1\right)} \]
                    12. lower-*.f64N/A

                      \[\leadsto \frac{2}{\left(\left(e^{\log t \cdot 3 - \color{blue}{\log \ell \cdot 2}} \cdot \sin k\right) \cdot \tan k\right) \cdot \left(\left(1 + {\left(\frac{k}{t}\right)}^{2}\right) + 1\right)} \]
                    13. lower-log.f6419.2

                      \[\leadsto \frac{2}{\left(\left(e^{\log t \cdot 3 - \color{blue}{\log \ell} \cdot 2} \cdot \sin k\right) \cdot \tan k\right) \cdot \left(\left(1 + {\left(\frac{k}{t}\right)}^{2}\right) + 1\right)} \]
                  4. Applied rewrites19.2%

                    \[\leadsto \frac{2}{\left(\left(\color{blue}{e^{\log t \cdot 3 - \log \ell \cdot 2}} \cdot \sin k\right) \cdot \tan k\right) \cdot \left(\left(1 + {\left(\frac{k}{t}\right)}^{2}\right) + 1\right)} \]
                  5. Step-by-step derivation
                    1. lift-/.f64N/A

                      \[\leadsto \frac{2}{\left(\left(e^{\log t \cdot 3 - \log \ell \cdot 2} \cdot \sin k\right) \cdot \tan k\right) \cdot \left(\left(1 + {\color{blue}{\left(\frac{k}{t}\right)}}^{2}\right) + 1\right)} \]
                    2. lift-pow.f64N/A

                      \[\leadsto \frac{2}{\left(\left(e^{\log t \cdot 3 - \log \ell \cdot 2} \cdot \sin k\right) \cdot \tan k\right) \cdot \left(\left(1 + \color{blue}{{\left(\frac{k}{t}\right)}^{2}}\right) + 1\right)} \]
                    3. unpow2N/A

                      \[\leadsto \frac{2}{\left(\left(e^{\log t \cdot 3 - \log \ell \cdot 2} \cdot \sin k\right) \cdot \tan k\right) \cdot \left(\left(1 + \color{blue}{\frac{k}{t} \cdot \frac{k}{t}}\right) + 1\right)} \]
                    4. lower-*.f64N/A

                      \[\leadsto \frac{2}{\left(\left(e^{\log t \cdot 3 - \log \ell \cdot 2} \cdot \sin k\right) \cdot \tan k\right) \cdot \left(\left(1 + \color{blue}{\frac{k}{t} \cdot \frac{k}{t}}\right) + 1\right)} \]
                    5. lift-/.f64N/A

                      \[\leadsto \frac{2}{\left(\left(e^{\log t \cdot 3 - \log \ell \cdot 2} \cdot \sin k\right) \cdot \tan k\right) \cdot \left(\left(1 + \color{blue}{\frac{k}{t}} \cdot \frac{k}{t}\right) + 1\right)} \]
                    6. lift-/.f6419.2

                      \[\leadsto \frac{2}{\left(\left(e^{\log t \cdot 3 - \log \ell \cdot 2} \cdot \sin k\right) \cdot \tan k\right) \cdot \left(\left(1 + \frac{k}{t} \cdot \color{blue}{\frac{k}{t}}\right) + 1\right)} \]
                  6. Applied rewrites19.2%

                    \[\leadsto \frac{2}{\left(\left(e^{\log t \cdot 3 - \log \ell \cdot 2} \cdot \sin k\right) \cdot \tan k\right) \cdot \left(\left(1 + \color{blue}{\frac{k}{t} \cdot \frac{k}{t}}\right) + 1\right)} \]
                  7. Taylor expanded in k around 0

                    \[\leadsto \frac{2}{\left(\color{blue}{\left(k \cdot e^{3 \cdot \log t - 2 \cdot \log \ell}\right)} \cdot \tan k\right) \cdot \left(\left(1 + \frac{k}{t} \cdot \frac{k}{t}\right) + 1\right)} \]
                  8. Step-by-step derivation
                    1. *-commutativeN/A

                      \[\leadsto \frac{2}{\left(\left(e^{3 \cdot \log t - 2 \cdot \log \ell} \cdot \color{blue}{k}\right) \cdot \tan k\right) \cdot \left(\left(1 + \frac{k}{t} \cdot \frac{k}{t}\right) + 1\right)} \]
                    2. lower-*.f64N/A

                      \[\leadsto \frac{2}{\left(\left(e^{3 \cdot \log t - 2 \cdot \log \ell} \cdot \color{blue}{k}\right) \cdot \tan k\right) \cdot \left(\left(1 + \frac{k}{t} \cdot \frac{k}{t}\right) + 1\right)} \]
                    3. exp-diffN/A

                      \[\leadsto \frac{2}{\left(\left(\frac{e^{3 \cdot \log t}}{e^{2 \cdot \log \ell}} \cdot k\right) \cdot \tan k\right) \cdot \left(\left(1 + \frac{k}{t} \cdot \frac{k}{t}\right) + 1\right)} \]
                    4. *-commutativeN/A

                      \[\leadsto \frac{2}{\left(\left(\frac{e^{\log t \cdot 3}}{e^{2 \cdot \log \ell}} \cdot k\right) \cdot \tan k\right) \cdot \left(\left(1 + \frac{k}{t} \cdot \frac{k}{t}\right) + 1\right)} \]
                    5. pow-to-expN/A

                      \[\leadsto \frac{2}{\left(\left(\frac{{t}^{3}}{e^{2 \cdot \log \ell}} \cdot k\right) \cdot \tan k\right) \cdot \left(\left(1 + \frac{k}{t} \cdot \frac{k}{t}\right) + 1\right)} \]
                    6. *-commutativeN/A

                      \[\leadsto \frac{2}{\left(\left(\frac{{t}^{3}}{e^{\log \ell \cdot 2}} \cdot k\right) \cdot \tan k\right) \cdot \left(\left(1 + \frac{k}{t} \cdot \frac{k}{t}\right) + 1\right)} \]
                    7. pow-to-expN/A

                      \[\leadsto \frac{2}{\left(\left(\frac{{t}^{3}}{{\ell}^{2}} \cdot k\right) \cdot \tan k\right) \cdot \left(\left(1 + \frac{k}{t} \cdot \frac{k}{t}\right) + 1\right)} \]
                    8. pow2N/A

                      \[\leadsto \frac{2}{\left(\left(\frac{{t}^{3}}{\ell \cdot \ell} \cdot k\right) \cdot \tan k\right) \cdot \left(\left(1 + \frac{k}{t} \cdot \frac{k}{t}\right) + 1\right)} \]
                    9. associate-/r*N/A

                      \[\leadsto \frac{2}{\left(\left(\frac{\frac{{t}^{3}}{\ell}}{\ell} \cdot k\right) \cdot \tan k\right) \cdot \left(\left(1 + \frac{k}{t} \cdot \frac{k}{t}\right) + 1\right)} \]
                    10. lift-pow.f64N/A

                      \[\leadsto \frac{2}{\left(\left(\frac{\frac{{t}^{3}}{\ell}}{\ell} \cdot k\right) \cdot \tan k\right) \cdot \left(\left(1 + \frac{k}{t} \cdot \frac{k}{t}\right) + 1\right)} \]
                    11. lift-/.f64N/A

                      \[\leadsto \frac{2}{\left(\left(\frac{\frac{{t}^{3}}{\ell}}{\ell} \cdot k\right) \cdot \tan k\right) \cdot \left(\left(1 + \frac{k}{t} \cdot \frac{k}{t}\right) + 1\right)} \]
                    12. lift-/.f6458.4

                      \[\leadsto \frac{2}{\left(\left(\frac{\frac{{t}^{3}}{\ell}}{\ell} \cdot k\right) \cdot \tan k\right) \cdot \left(\left(1 + \frac{k}{t} \cdot \frac{k}{t}\right) + 1\right)} \]
                  9. Applied rewrites58.4%

                    \[\leadsto \frac{2}{\left(\color{blue}{\left(\frac{\frac{{t}^{3}}{\ell}}{\ell} \cdot k\right)} \cdot \tan k\right) \cdot \left(\left(1 + \frac{k}{t} \cdot \frac{k}{t}\right) + 1\right)} \]

                  if 2.09999999999999991e-158 < k < 2.2000000000000001e-6

                  1. Initial program 58.8%

                    \[\frac{2}{\left(\left(\frac{{t}^{3}}{\ell \cdot \ell} \cdot \sin k\right) \cdot \tan k\right) \cdot \left(\left(1 + {\left(\frac{k}{t}\right)}^{2}\right) + 1\right)} \]
                  2. Add Preprocessing
                  3. Step-by-step derivation
                    1. lift-*.f64N/A

                      \[\leadsto \frac{2}{\left(\left(\frac{{t}^{3}}{\color{blue}{\ell \cdot \ell}} \cdot \sin k\right) \cdot \tan k\right) \cdot \left(\left(1 + {\left(\frac{k}{t}\right)}^{2}\right) + 1\right)} \]
                    2. lift-/.f64N/A

                      \[\leadsto \frac{2}{\left(\left(\color{blue}{\frac{{t}^{3}}{\ell \cdot \ell}} \cdot \sin k\right) \cdot \tan k\right) \cdot \left(\left(1 + {\left(\frac{k}{t}\right)}^{2}\right) + 1\right)} \]
                    3. lift-pow.f64N/A

                      \[\leadsto \frac{2}{\left(\left(\frac{\color{blue}{{t}^{3}}}{\ell \cdot \ell} \cdot \sin k\right) \cdot \tan k\right) \cdot \left(\left(1 + {\left(\frac{k}{t}\right)}^{2}\right) + 1\right)} \]
                    4. pow-to-expN/A

                      \[\leadsto \frac{2}{\left(\left(\frac{\color{blue}{e^{\log t \cdot 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)} \]
                    5. pow2N/A

                      \[\leadsto \frac{2}{\left(\left(\frac{e^{\log t \cdot 3}}{\color{blue}{{\ell}^{2}}} \cdot \sin k\right) \cdot \tan k\right) \cdot \left(\left(1 + {\left(\frac{k}{t}\right)}^{2}\right) + 1\right)} \]
                    6. pow-to-expN/A

                      \[\leadsto \frac{2}{\left(\left(\frac{e^{\log t \cdot 3}}{\color{blue}{e^{\log \ell \cdot 2}}} \cdot \sin k\right) \cdot \tan k\right) \cdot \left(\left(1 + {\left(\frac{k}{t}\right)}^{2}\right) + 1\right)} \]
                    7. div-expN/A

                      \[\leadsto \frac{2}{\left(\left(\color{blue}{e^{\log t \cdot 3 - \log \ell \cdot 2}} \cdot \sin k\right) \cdot \tan k\right) \cdot \left(\left(1 + {\left(\frac{k}{t}\right)}^{2}\right) + 1\right)} \]
                    8. lower-exp.f64N/A

                      \[\leadsto \frac{2}{\left(\left(\color{blue}{e^{\log t \cdot 3 - \log \ell \cdot 2}} \cdot \sin k\right) \cdot \tan k\right) \cdot \left(\left(1 + {\left(\frac{k}{t}\right)}^{2}\right) + 1\right)} \]
                    9. lower--.f64N/A

                      \[\leadsto \frac{2}{\left(\left(e^{\color{blue}{\log t \cdot 3 - \log \ell \cdot 2}} \cdot \sin k\right) \cdot \tan k\right) \cdot \left(\left(1 + {\left(\frac{k}{t}\right)}^{2}\right) + 1\right)} \]
                    10. lower-*.f64N/A

                      \[\leadsto \frac{2}{\left(\left(e^{\color{blue}{\log t \cdot 3} - \log \ell \cdot 2} \cdot \sin k\right) \cdot \tan k\right) \cdot \left(\left(1 + {\left(\frac{k}{t}\right)}^{2}\right) + 1\right)} \]
                    11. lower-log.f64N/A

                      \[\leadsto \frac{2}{\left(\left(e^{\color{blue}{\log t} \cdot 3 - \log \ell \cdot 2} \cdot \sin k\right) \cdot \tan k\right) \cdot \left(\left(1 + {\left(\frac{k}{t}\right)}^{2}\right) + 1\right)} \]
                    12. lower-*.f64N/A

                      \[\leadsto \frac{2}{\left(\left(e^{\log t \cdot 3 - \color{blue}{\log \ell \cdot 2}} \cdot \sin k\right) \cdot \tan k\right) \cdot \left(\left(1 + {\left(\frac{k}{t}\right)}^{2}\right) + 1\right)} \]
                    13. lower-log.f6418.5

                      \[\leadsto \frac{2}{\left(\left(e^{\log t \cdot 3 - \color{blue}{\log \ell} \cdot 2} \cdot \sin k\right) \cdot \tan k\right) \cdot \left(\left(1 + {\left(\frac{k}{t}\right)}^{2}\right) + 1\right)} \]
                  4. Applied rewrites18.5%

                    \[\leadsto \frac{2}{\left(\left(\color{blue}{e^{\log t \cdot 3 - \log \ell \cdot 2}} \cdot \sin k\right) \cdot \tan k\right) \cdot \left(\left(1 + {\left(\frac{k}{t}\right)}^{2}\right) + 1\right)} \]
                  5. Step-by-step derivation
                    1. lift-/.f64N/A

                      \[\leadsto \frac{2}{\left(\left(e^{\log t \cdot 3 - \log \ell \cdot 2} \cdot \sin k\right) \cdot \tan k\right) \cdot \left(\left(1 + {\color{blue}{\left(\frac{k}{t}\right)}}^{2}\right) + 1\right)} \]
                    2. lift-pow.f64N/A

                      \[\leadsto \frac{2}{\left(\left(e^{\log t \cdot 3 - \log \ell \cdot 2} \cdot \sin k\right) \cdot \tan k\right) \cdot \left(\left(1 + \color{blue}{{\left(\frac{k}{t}\right)}^{2}}\right) + 1\right)} \]
                    3. unpow2N/A

                      \[\leadsto \frac{2}{\left(\left(e^{\log t \cdot 3 - \log \ell \cdot 2} \cdot \sin k\right) \cdot \tan k\right) \cdot \left(\left(1 + \color{blue}{\frac{k}{t} \cdot \frac{k}{t}}\right) + 1\right)} \]
                    4. times-fracN/A

                      \[\leadsto \frac{2}{\left(\left(e^{\log t \cdot 3 - \log \ell \cdot 2} \cdot \sin k\right) \cdot \tan k\right) \cdot \left(\left(1 + \color{blue}{\frac{k \cdot k}{t \cdot t}}\right) + 1\right)} \]
                    5. pow2N/A

                      \[\leadsto \frac{2}{\left(\left(e^{\log t \cdot 3 - \log \ell \cdot 2} \cdot \sin k\right) \cdot \tan k\right) \cdot \left(\left(1 + \frac{k \cdot k}{\color{blue}{{t}^{2}}}\right) + 1\right)} \]
                    6. associate-/l*N/A

                      \[\leadsto \frac{2}{\left(\left(e^{\log t \cdot 3 - \log \ell \cdot 2} \cdot \sin k\right) \cdot \tan k\right) \cdot \left(\left(1 + \color{blue}{k \cdot \frac{k}{{t}^{2}}}\right) + 1\right)} \]
                    7. lower-*.f64N/A

                      \[\leadsto \frac{2}{\left(\left(e^{\log t \cdot 3 - \log \ell \cdot 2} \cdot \sin k\right) \cdot \tan k\right) \cdot \left(\left(1 + \color{blue}{k \cdot \frac{k}{{t}^{2}}}\right) + 1\right)} \]
                    8. lower-/.f64N/A

                      \[\leadsto \frac{2}{\left(\left(e^{\log t \cdot 3 - \log \ell \cdot 2} \cdot \sin k\right) \cdot \tan k\right) \cdot \left(\left(1 + k \cdot \color{blue}{\frac{k}{{t}^{2}}}\right) + 1\right)} \]
                    9. pow2N/A

                      \[\leadsto \frac{2}{\left(\left(e^{\log t \cdot 3 - \log \ell \cdot 2} \cdot \sin k\right) \cdot \tan k\right) \cdot \left(\left(1 + k \cdot \frac{k}{\color{blue}{t \cdot t}}\right) + 1\right)} \]
                    10. lift-*.f6418.5

                      \[\leadsto \frac{2}{\left(\left(e^{\log t \cdot 3 - \log \ell \cdot 2} \cdot \sin k\right) \cdot \tan k\right) \cdot \left(\left(1 + k \cdot \frac{k}{\color{blue}{t \cdot t}}\right) + 1\right)} \]
                  6. Applied rewrites18.5%

                    \[\leadsto \frac{2}{\left(\left(e^{\log t \cdot 3 - \log \ell \cdot 2} \cdot \sin k\right) \cdot \tan k\right) \cdot \left(\left(1 + \color{blue}{k \cdot \frac{k}{t \cdot t}}\right) + 1\right)} \]
                  7. Taylor expanded in k around 0

                    \[\leadsto \frac{2}{\color{blue}{2 \cdot \left({k}^{2} \cdot e^{3 \cdot \log t - 2 \cdot \log \ell}\right)}} \]
                  8. Step-by-step derivation
                    1. lower-*.f64N/A

                      \[\leadsto \frac{2}{2 \cdot \color{blue}{\left({k}^{2} \cdot e^{3 \cdot \log t - 2 \cdot \log \ell}\right)}} \]
                    2. lower-*.f64N/A

                      \[\leadsto \frac{2}{2 \cdot \left({k}^{2} \cdot \color{blue}{e^{3 \cdot \log t - 2 \cdot \log \ell}}\right)} \]
                    3. pow2N/A

                      \[\leadsto \frac{2}{2 \cdot \left(\left(k \cdot k\right) \cdot e^{\color{blue}{3 \cdot \log t - 2 \cdot \log \ell}}\right)} \]
                    4. lift-*.f64N/A

                      \[\leadsto \frac{2}{2 \cdot \left(\left(k \cdot k\right) \cdot e^{\color{blue}{3 \cdot \log t - 2 \cdot \log \ell}}\right)} \]
                    5. lower-exp.f64N/A

                      \[\leadsto \frac{2}{2 \cdot \left(\left(k \cdot k\right) \cdot e^{3 \cdot \log t - 2 \cdot \log \ell}\right)} \]
                    6. lower--.f64N/A

                      \[\leadsto \frac{2}{2 \cdot \left(\left(k \cdot k\right) \cdot e^{3 \cdot \log t - 2 \cdot \log \ell}\right)} \]
                    7. lower-*.f64N/A

                      \[\leadsto \frac{2}{2 \cdot \left(\left(k \cdot k\right) \cdot e^{3 \cdot \log t - 2 \cdot \log \ell}\right)} \]
                    8. lift-log.f64N/A

                      \[\leadsto \frac{2}{2 \cdot \left(\left(k \cdot k\right) \cdot e^{3 \cdot \log t - 2 \cdot \log \ell}\right)} \]
                    9. lower-*.f64N/A

                      \[\leadsto \frac{2}{2 \cdot \left(\left(k \cdot k\right) \cdot e^{3 \cdot \log t - 2 \cdot \log \ell}\right)} \]
                    10. lift-log.f6418.5

                      \[\leadsto \frac{2}{2 \cdot \left(\left(k \cdot k\right) \cdot e^{3 \cdot \log t - 2 \cdot \log \ell}\right)} \]
                  9. Applied rewrites18.5%

                    \[\leadsto \frac{2}{\color{blue}{2 \cdot \left(\left(k \cdot k\right) \cdot e^{3 \cdot \log t - 2 \cdot \log \ell}\right)}} \]

                  if 2.2000000000000001e-6 < k

                  1. Initial program 42.8%

                    \[\frac{2}{\left(\left(\frac{{t}^{3}}{\ell \cdot \ell} \cdot \sin k\right) \cdot \tan k\right) \cdot \left(\left(1 + {\left(\frac{k}{t}\right)}^{2}\right) + 1\right)} \]
                  2. Add Preprocessing
                  3. Taylor expanded in k around 0

                    \[\leadsto \color{blue}{\frac{{\ell}^{2}}{{k}^{2} \cdot {t}^{3}}} \]
                  4. Step-by-step derivation
                    1. lower-/.f64N/A

                      \[\leadsto \frac{{\ell}^{2}}{\color{blue}{{k}^{2} \cdot {t}^{3}}} \]
                    2. pow2N/A

                      \[\leadsto \frac{\ell \cdot \ell}{\color{blue}{{k}^{2}} \cdot {t}^{3}} \]
                    3. lift-*.f64N/A

                      \[\leadsto \frac{\ell \cdot \ell}{\color{blue}{{k}^{2}} \cdot {t}^{3}} \]
                    4. lower-*.f64N/A

                      \[\leadsto \frac{\ell \cdot \ell}{{k}^{2} \cdot \color{blue}{{t}^{3}}} \]
                    5. unpow2N/A

                      \[\leadsto \frac{\ell \cdot \ell}{\left(k \cdot k\right) \cdot {\color{blue}{t}}^{3}} \]
                    6. lower-*.f64N/A

                      \[\leadsto \frac{\ell \cdot \ell}{\left(k \cdot k\right) \cdot {\color{blue}{t}}^{3}} \]
                    7. lift-pow.f6441.2

                      \[\leadsto \frac{\ell \cdot \ell}{\left(k \cdot k\right) \cdot {t}^{\color{blue}{3}}} \]
                  5. Applied rewrites41.2%

                    \[\leadsto \color{blue}{\frac{\ell \cdot \ell}{\left(k \cdot k\right) \cdot {t}^{3}}} \]
                  6. Taylor expanded in k around inf

                    \[\leadsto \color{blue}{\frac{-4 \cdot \frac{{\ell}^{2} \cdot \left(t \cdot \cos k\right)}{{k}^{2} \cdot {\sin k}^{2}} + 2 \cdot \frac{{\ell}^{2} \cdot \cos k}{t \cdot {\sin k}^{2}}}{{k}^{2}}} \]
                  7. Applied rewrites53.9%

                    \[\leadsto \color{blue}{\frac{\left(\left(\ell \cdot \ell\right) \cdot \frac{\cos k \cdot t}{{\left(\sin k \cdot k\right)}^{2}}\right) \cdot -4 - -2 \cdot \frac{\left(\ell \cdot \ell\right) \cdot \cos k}{{\sin k}^{2} \cdot t}}{k \cdot k}} \]
                  8. Taylor expanded in t around 0

                    \[\leadsto \frac{2 \cdot \frac{{\ell}^{2} \cdot \cos k}{t \cdot {\sin k}^{2}}}{\color{blue}{k} \cdot k} \]
                  9. Step-by-step derivation
                    1. *-commutativeN/A

                      \[\leadsto \frac{\frac{{\ell}^{2} \cdot \cos k}{t \cdot {\sin k}^{2}} \cdot 2}{k \cdot k} \]
                    2. *-commutativeN/A

                      \[\leadsto \frac{\frac{{\ell}^{2} \cdot \cos k}{{\sin k}^{2} \cdot t} \cdot 2}{k \cdot k} \]
                    3. pow2N/A

                      \[\leadsto \frac{\frac{\left(\ell \cdot \ell\right) \cdot \cos k}{{\sin k}^{2} \cdot t} \cdot 2}{k \cdot k} \]
                    4. lower-*.f64N/A

                      \[\leadsto \frac{\frac{\left(\ell \cdot \ell\right) \cdot \cos k}{{\sin k}^{2} \cdot t} \cdot 2}{k \cdot k} \]
                    5. lift-cos.f64N/A

                      \[\leadsto \frac{\frac{\left(\ell \cdot \ell\right) \cdot \cos k}{{\sin k}^{2} \cdot t} \cdot 2}{k \cdot k} \]
                    6. lift-*.f64N/A

                      \[\leadsto \frac{\frac{\left(\ell \cdot \ell\right) \cdot \cos k}{{\sin k}^{2} \cdot t} \cdot 2}{k \cdot k} \]
                    7. lift-*.f64N/A

                      \[\leadsto \frac{\frac{\left(\ell \cdot \ell\right) \cdot \cos k}{{\sin k}^{2} \cdot t} \cdot 2}{k \cdot k} \]
                    8. lift-sin.f64N/A

                      \[\leadsto \frac{\frac{\left(\ell \cdot \ell\right) \cdot \cos k}{{\sin k}^{2} \cdot t} \cdot 2}{k \cdot k} \]
                    9. lift-pow.f64N/A

                      \[\leadsto \frac{\frac{\left(\ell \cdot \ell\right) \cdot \cos k}{{\sin k}^{2} \cdot t} \cdot 2}{k \cdot k} \]
                    10. lift-*.f64N/A

                      \[\leadsto \frac{\frac{\left(\ell \cdot \ell\right) \cdot \cos k}{{\sin k}^{2} \cdot t} \cdot 2}{k \cdot k} \]
                    11. lift-/.f6463.6

                      \[\leadsto \frac{\frac{\left(\ell \cdot \ell\right) \cdot \cos k}{{\sin k}^{2} \cdot t} \cdot 2}{k \cdot k} \]
                  10. Applied rewrites63.6%

                    \[\leadsto \frac{\frac{\left(\ell \cdot \ell\right) \cdot \cos k}{{\sin k}^{2} \cdot t} \cdot 2}{\color{blue}{k} \cdot k} \]
                3. Recombined 3 regimes into one program.
                4. Add Preprocessing

                Alternative 27: 63.7% accurate, 1.3× speedup?

                \[\begin{array}{l} l_m = \left|\ell\right| \\ t\_m = \left|t\right| \\ t\_s = \mathsf{copysign}\left(1, t\right) \\ t\_s \cdot \begin{array}{l} \mathbf{if}\;k \leq 2.1 \cdot 10^{-158}:\\ \;\;\;\;\frac{2}{\left(\left(\frac{\frac{{t\_m}^{3}}{l\_m}}{l\_m} \cdot k\right) \cdot \tan k\right) \cdot \left(\left(1 + \frac{k}{t\_m} \cdot \frac{k}{t\_m}\right) + 1\right)}\\ \mathbf{elif}\;k \leq 2.2 \cdot 10^{-6}:\\ \;\;\;\;\frac{2}{2 \cdot \left(\left(k \cdot k\right) \cdot e^{3 \cdot \log t\_m - 2 \cdot \log l\_m}\right)}\\ \mathbf{else}:\\ \;\;\;\;\left(\frac{l\_m \cdot l\_m}{k \cdot k} \cdot \frac{\cos k}{{\sin k}^{2} \cdot t\_m}\right) \cdot 2\\ \end{array} \end{array} \]
                l_m = (fabs.f64 l)
                t\_m = (fabs.f64 t)
                t\_s = (copysign.f64 #s(literal 1 binary64) t)
                (FPCore (t_s t_m l_m k)
                 :precision binary64
                 (*
                  t_s
                  (if (<= k 2.1e-158)
                    (/
                     2.0
                     (*
                      (* (* (/ (/ (pow t_m 3.0) l_m) l_m) k) (tan k))
                      (+ (+ 1.0 (* (/ k t_m) (/ k t_m))) 1.0)))
                    (if (<= k 2.2e-6)
                      (/ 2.0 (* 2.0 (* (* k k) (exp (- (* 3.0 (log t_m)) (* 2.0 (log l_m)))))))
                      (*
                       (* (/ (* l_m l_m) (* k k)) (/ (cos k) (* (pow (sin k) 2.0) t_m)))
                       2.0)))))
                l_m = fabs(l);
                t\_m = fabs(t);
                t\_s = copysign(1.0, t);
                double code(double t_s, double t_m, double l_m, double k) {
                	double tmp;
                	if (k <= 2.1e-158) {
                		tmp = 2.0 / (((((pow(t_m, 3.0) / l_m) / l_m) * k) * tan(k)) * ((1.0 + ((k / t_m) * (k / t_m))) + 1.0));
                	} else if (k <= 2.2e-6) {
                		tmp = 2.0 / (2.0 * ((k * k) * exp(((3.0 * log(t_m)) - (2.0 * log(l_m))))));
                	} else {
                		tmp = (((l_m * l_m) / (k * k)) * (cos(k) / (pow(sin(k), 2.0) * t_m))) * 2.0;
                	}
                	return t_s * tmp;
                }
                
                l_m =     private
                t\_m =     private
                t\_s =     private
                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_s, t_m, l_m, k)
                use fmin_fmax_functions
                    real(8), intent (in) :: t_s
                    real(8), intent (in) :: t_m
                    real(8), intent (in) :: l_m
                    real(8), intent (in) :: k
                    real(8) :: tmp
                    if (k <= 2.1d-158) then
                        tmp = 2.0d0 / ((((((t_m ** 3.0d0) / l_m) / l_m) * k) * tan(k)) * ((1.0d0 + ((k / t_m) * (k / t_m))) + 1.0d0))
                    else if (k <= 2.2d-6) then
                        tmp = 2.0d0 / (2.0d0 * ((k * k) * exp(((3.0d0 * log(t_m)) - (2.0d0 * log(l_m))))))
                    else
                        tmp = (((l_m * l_m) / (k * k)) * (cos(k) / ((sin(k) ** 2.0d0) * t_m))) * 2.0d0
                    end if
                    code = t_s * tmp
                end function
                
                l_m = Math.abs(l);
                t\_m = Math.abs(t);
                t\_s = Math.copySign(1.0, t);
                public static double code(double t_s, double t_m, double l_m, double k) {
                	double tmp;
                	if (k <= 2.1e-158) {
                		tmp = 2.0 / (((((Math.pow(t_m, 3.0) / l_m) / l_m) * k) * Math.tan(k)) * ((1.0 + ((k / t_m) * (k / t_m))) + 1.0));
                	} else if (k <= 2.2e-6) {
                		tmp = 2.0 / (2.0 * ((k * k) * Math.exp(((3.0 * Math.log(t_m)) - (2.0 * Math.log(l_m))))));
                	} else {
                		tmp = (((l_m * l_m) / (k * k)) * (Math.cos(k) / (Math.pow(Math.sin(k), 2.0) * t_m))) * 2.0;
                	}
                	return t_s * tmp;
                }
                
                l_m = math.fabs(l)
                t\_m = math.fabs(t)
                t\_s = math.copysign(1.0, t)
                def code(t_s, t_m, l_m, k):
                	tmp = 0
                	if k <= 2.1e-158:
                		tmp = 2.0 / (((((math.pow(t_m, 3.0) / l_m) / l_m) * k) * math.tan(k)) * ((1.0 + ((k / t_m) * (k / t_m))) + 1.0))
                	elif k <= 2.2e-6:
                		tmp = 2.0 / (2.0 * ((k * k) * math.exp(((3.0 * math.log(t_m)) - (2.0 * math.log(l_m))))))
                	else:
                		tmp = (((l_m * l_m) / (k * k)) * (math.cos(k) / (math.pow(math.sin(k), 2.0) * t_m))) * 2.0
                	return t_s * tmp
                
                l_m = abs(l)
                t\_m = abs(t)
                t\_s = copysign(1.0, t)
                function code(t_s, t_m, l_m, k)
                	tmp = 0.0
                	if (k <= 2.1e-158)
                		tmp = Float64(2.0 / Float64(Float64(Float64(Float64(Float64((t_m ^ 3.0) / l_m) / l_m) * k) * tan(k)) * Float64(Float64(1.0 + Float64(Float64(k / t_m) * Float64(k / t_m))) + 1.0)));
                	elseif (k <= 2.2e-6)
                		tmp = Float64(2.0 / Float64(2.0 * Float64(Float64(k * k) * exp(Float64(Float64(3.0 * log(t_m)) - Float64(2.0 * log(l_m)))))));
                	else
                		tmp = Float64(Float64(Float64(Float64(l_m * l_m) / Float64(k * k)) * Float64(cos(k) / Float64((sin(k) ^ 2.0) * t_m))) * 2.0);
                	end
                	return Float64(t_s * tmp)
                end
                
                l_m = abs(l);
                t\_m = abs(t);
                t\_s = sign(t) * abs(1.0);
                function tmp_2 = code(t_s, t_m, l_m, k)
                	tmp = 0.0;
                	if (k <= 2.1e-158)
                		tmp = 2.0 / ((((((t_m ^ 3.0) / l_m) / l_m) * k) * tan(k)) * ((1.0 + ((k / t_m) * (k / t_m))) + 1.0));
                	elseif (k <= 2.2e-6)
                		tmp = 2.0 / (2.0 * ((k * k) * exp(((3.0 * log(t_m)) - (2.0 * log(l_m))))));
                	else
                		tmp = (((l_m * l_m) / (k * k)) * (cos(k) / ((sin(k) ^ 2.0) * t_m))) * 2.0;
                	end
                	tmp_2 = t_s * tmp;
                end
                
                l_m = N[Abs[l], $MachinePrecision]
                t\_m = N[Abs[t], $MachinePrecision]
                t\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[t]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
                code[t$95$s_, t$95$m_, l$95$m_, k_] := N[(t$95$s * If[LessEqual[k, 2.1e-158], N[(2.0 / N[(N[(N[(N[(N[(N[Power[t$95$m, 3.0], $MachinePrecision] / l$95$m), $MachinePrecision] / l$95$m), $MachinePrecision] * k), $MachinePrecision] * N[Tan[k], $MachinePrecision]), $MachinePrecision] * N[(N[(1.0 + N[(N[(k / t$95$m), $MachinePrecision] * N[(k / t$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[k, 2.2e-6], N[(2.0 / N[(2.0 * N[(N[(k * k), $MachinePrecision] * N[Exp[N[(N[(3.0 * N[Log[t$95$m], $MachinePrecision]), $MachinePrecision] - N[(2.0 * N[Log[l$95$m], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(N[(l$95$m * l$95$m), $MachinePrecision] / N[(k * k), $MachinePrecision]), $MachinePrecision] * N[(N[Cos[k], $MachinePrecision] / N[(N[Power[N[Sin[k], $MachinePrecision], 2.0], $MachinePrecision] * t$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * 2.0), $MachinePrecision]]]), $MachinePrecision]
                
                \begin{array}{l}
                l_m = \left|\ell\right|
                \\
                t\_m = \left|t\right|
                \\
                t\_s = \mathsf{copysign}\left(1, t\right)
                
                \\
                t\_s \cdot \begin{array}{l}
                \mathbf{if}\;k \leq 2.1 \cdot 10^{-158}:\\
                \;\;\;\;\frac{2}{\left(\left(\frac{\frac{{t\_m}^{3}}{l\_m}}{l\_m} \cdot k\right) \cdot \tan k\right) \cdot \left(\left(1 + \frac{k}{t\_m} \cdot \frac{k}{t\_m}\right) + 1\right)}\\
                
                \mathbf{elif}\;k \leq 2.2 \cdot 10^{-6}:\\
                \;\;\;\;\frac{2}{2 \cdot \left(\left(k \cdot k\right) \cdot e^{3 \cdot \log t\_m - 2 \cdot \log l\_m}\right)}\\
                
                \mathbf{else}:\\
                \;\;\;\;\left(\frac{l\_m \cdot l\_m}{k \cdot k} \cdot \frac{\cos k}{{\sin k}^{2} \cdot t\_m}\right) \cdot 2\\
                
                
                \end{array}
                \end{array}
                
                Derivation
                1. Split input into 3 regimes
                2. if k < 2.09999999999999991e-158

                  1. Initial program 56.6%

                    \[\frac{2}{\left(\left(\frac{{t}^{3}}{\ell \cdot \ell} \cdot \sin k\right) \cdot \tan k\right) \cdot \left(\left(1 + {\left(\frac{k}{t}\right)}^{2}\right) + 1\right)} \]
                  2. Add Preprocessing
                  3. Step-by-step derivation
                    1. lift-*.f64N/A

                      \[\leadsto \frac{2}{\left(\left(\frac{{t}^{3}}{\color{blue}{\ell \cdot \ell}} \cdot \sin k\right) \cdot \tan k\right) \cdot \left(\left(1 + {\left(\frac{k}{t}\right)}^{2}\right) + 1\right)} \]
                    2. lift-/.f64N/A

                      \[\leadsto \frac{2}{\left(\left(\color{blue}{\frac{{t}^{3}}{\ell \cdot \ell}} \cdot \sin k\right) \cdot \tan k\right) \cdot \left(\left(1 + {\left(\frac{k}{t}\right)}^{2}\right) + 1\right)} \]
                    3. lift-pow.f64N/A

                      \[\leadsto \frac{2}{\left(\left(\frac{\color{blue}{{t}^{3}}}{\ell \cdot \ell} \cdot \sin k\right) \cdot \tan k\right) \cdot \left(\left(1 + {\left(\frac{k}{t}\right)}^{2}\right) + 1\right)} \]
                    4. pow-to-expN/A

                      \[\leadsto \frac{2}{\left(\left(\frac{\color{blue}{e^{\log t \cdot 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)} \]
                    5. pow2N/A

                      \[\leadsto \frac{2}{\left(\left(\frac{e^{\log t \cdot 3}}{\color{blue}{{\ell}^{2}}} \cdot \sin k\right) \cdot \tan k\right) \cdot \left(\left(1 + {\left(\frac{k}{t}\right)}^{2}\right) + 1\right)} \]
                    6. pow-to-expN/A

                      \[\leadsto \frac{2}{\left(\left(\frac{e^{\log t \cdot 3}}{\color{blue}{e^{\log \ell \cdot 2}}} \cdot \sin k\right) \cdot \tan k\right) \cdot \left(\left(1 + {\left(\frac{k}{t}\right)}^{2}\right) + 1\right)} \]
                    7. div-expN/A

                      \[\leadsto \frac{2}{\left(\left(\color{blue}{e^{\log t \cdot 3 - \log \ell \cdot 2}} \cdot \sin k\right) \cdot \tan k\right) \cdot \left(\left(1 + {\left(\frac{k}{t}\right)}^{2}\right) + 1\right)} \]
                    8. lower-exp.f64N/A

                      \[\leadsto \frac{2}{\left(\left(\color{blue}{e^{\log t \cdot 3 - \log \ell \cdot 2}} \cdot \sin k\right) \cdot \tan k\right) \cdot \left(\left(1 + {\left(\frac{k}{t}\right)}^{2}\right) + 1\right)} \]
                    9. lower--.f64N/A

                      \[\leadsto \frac{2}{\left(\left(e^{\color{blue}{\log t \cdot 3 - \log \ell \cdot 2}} \cdot \sin k\right) \cdot \tan k\right) \cdot \left(\left(1 + {\left(\frac{k}{t}\right)}^{2}\right) + 1\right)} \]
                    10. lower-*.f64N/A

                      \[\leadsto \frac{2}{\left(\left(e^{\color{blue}{\log t \cdot 3} - \log \ell \cdot 2} \cdot \sin k\right) \cdot \tan k\right) \cdot \left(\left(1 + {\left(\frac{k}{t}\right)}^{2}\right) + 1\right)} \]
                    11. lower-log.f64N/A

                      \[\leadsto \frac{2}{\left(\left(e^{\color{blue}{\log t} \cdot 3 - \log \ell \cdot 2} \cdot \sin k\right) \cdot \tan k\right) \cdot \left(\left(1 + {\left(\frac{k}{t}\right)}^{2}\right) + 1\right)} \]
                    12. lower-*.f64N/A

                      \[\leadsto \frac{2}{\left(\left(e^{\log t \cdot 3 - \color{blue}{\log \ell \cdot 2}} \cdot \sin k\right) \cdot \tan k\right) \cdot \left(\left(1 + {\left(\frac{k}{t}\right)}^{2}\right) + 1\right)} \]
                    13. lower-log.f6419.2

                      \[\leadsto \frac{2}{\left(\left(e^{\log t \cdot 3 - \color{blue}{\log \ell} \cdot 2} \cdot \sin k\right) \cdot \tan k\right) \cdot \left(\left(1 + {\left(\frac{k}{t}\right)}^{2}\right) + 1\right)} \]
                  4. Applied rewrites19.2%

                    \[\leadsto \frac{2}{\left(\left(\color{blue}{e^{\log t \cdot 3 - \log \ell \cdot 2}} \cdot \sin k\right) \cdot \tan k\right) \cdot \left(\left(1 + {\left(\frac{k}{t}\right)}^{2}\right) + 1\right)} \]
                  5. Step-by-step derivation
                    1. lift-/.f64N/A

                      \[\leadsto \frac{2}{\left(\left(e^{\log t \cdot 3 - \log \ell \cdot 2} \cdot \sin k\right) \cdot \tan k\right) \cdot \left(\left(1 + {\color{blue}{\left(\frac{k}{t}\right)}}^{2}\right) + 1\right)} \]
                    2. lift-pow.f64N/A

                      \[\leadsto \frac{2}{\left(\left(e^{\log t \cdot 3 - \log \ell \cdot 2} \cdot \sin k\right) \cdot \tan k\right) \cdot \left(\left(1 + \color{blue}{{\left(\frac{k}{t}\right)}^{2}}\right) + 1\right)} \]
                    3. unpow2N/A

                      \[\leadsto \frac{2}{\left(\left(e^{\log t \cdot 3 - \log \ell \cdot 2} \cdot \sin k\right) \cdot \tan k\right) \cdot \left(\left(1 + \color{blue}{\frac{k}{t} \cdot \frac{k}{t}}\right) + 1\right)} \]
                    4. lower-*.f64N/A

                      \[\leadsto \frac{2}{\left(\left(e^{\log t \cdot 3 - \log \ell \cdot 2} \cdot \sin k\right) \cdot \tan k\right) \cdot \left(\left(1 + \color{blue}{\frac{k}{t} \cdot \frac{k}{t}}\right) + 1\right)} \]
                    5. lift-/.f64N/A

                      \[\leadsto \frac{2}{\left(\left(e^{\log t \cdot 3 - \log \ell \cdot 2} \cdot \sin k\right) \cdot \tan k\right) \cdot \left(\left(1 + \color{blue}{\frac{k}{t}} \cdot \frac{k}{t}\right) + 1\right)} \]
                    6. lift-/.f6419.2

                      \[\leadsto \frac{2}{\left(\left(e^{\log t \cdot 3 - \log \ell \cdot 2} \cdot \sin k\right) \cdot \tan k\right) \cdot \left(\left(1 + \frac{k}{t} \cdot \color{blue}{\frac{k}{t}}\right) + 1\right)} \]
                  6. Applied rewrites19.2%

                    \[\leadsto \frac{2}{\left(\left(e^{\log t \cdot 3 - \log \ell \cdot 2} \cdot \sin k\right) \cdot \tan k\right) \cdot \left(\left(1 + \color{blue}{\frac{k}{t} \cdot \frac{k}{t}}\right) + 1\right)} \]
                  7. Taylor expanded in k around 0

                    \[\leadsto \frac{2}{\left(\color{blue}{\left(k \cdot e^{3 \cdot \log t - 2 \cdot \log \ell}\right)} \cdot \tan k\right) \cdot \left(\left(1 + \frac{k}{t} \cdot \frac{k}{t}\right) + 1\right)} \]
                  8. Step-by-step derivation
                    1. *-commutativeN/A

                      \[\leadsto \frac{2}{\left(\left(e^{3 \cdot \log t - 2 \cdot \log \ell} \cdot \color{blue}{k}\right) \cdot \tan k\right) \cdot \left(\left(1 + \frac{k}{t} \cdot \frac{k}{t}\right) + 1\right)} \]
                    2. lower-*.f64N/A

                      \[\leadsto \frac{2}{\left(\left(e^{3 \cdot \log t - 2 \cdot \log \ell} \cdot \color{blue}{k}\right) \cdot \tan k\right) \cdot \left(\left(1 + \frac{k}{t} \cdot \frac{k}{t}\right) + 1\right)} \]
                    3. exp-diffN/A

                      \[\leadsto \frac{2}{\left(\left(\frac{e^{3 \cdot \log t}}{e^{2 \cdot \log \ell}} \cdot k\right) \cdot \tan k\right) \cdot \left(\left(1 + \frac{k}{t} \cdot \frac{k}{t}\right) + 1\right)} \]
                    4. *-commutativeN/A

                      \[\leadsto \frac{2}{\left(\left(\frac{e^{\log t \cdot 3}}{e^{2 \cdot \log \ell}} \cdot k\right) \cdot \tan k\right) \cdot \left(\left(1 + \frac{k}{t} \cdot \frac{k}{t}\right) + 1\right)} \]
                    5. pow-to-expN/A

                      \[\leadsto \frac{2}{\left(\left(\frac{{t}^{3}}{e^{2 \cdot \log \ell}} \cdot k\right) \cdot \tan k\right) \cdot \left(\left(1 + \frac{k}{t} \cdot \frac{k}{t}\right) + 1\right)} \]
                    6. *-commutativeN/A

                      \[\leadsto \frac{2}{\left(\left(\frac{{t}^{3}}{e^{\log \ell \cdot 2}} \cdot k\right) \cdot \tan k\right) \cdot \left(\left(1 + \frac{k}{t} \cdot \frac{k}{t}\right) + 1\right)} \]
                    7. pow-to-expN/A

                      \[\leadsto \frac{2}{\left(\left(\frac{{t}^{3}}{{\ell}^{2}} \cdot k\right) \cdot \tan k\right) \cdot \left(\left(1 + \frac{k}{t} \cdot \frac{k}{t}\right) + 1\right)} \]
                    8. pow2N/A

                      \[\leadsto \frac{2}{\left(\left(\frac{{t}^{3}}{\ell \cdot \ell} \cdot k\right) \cdot \tan k\right) \cdot \left(\left(1 + \frac{k}{t} \cdot \frac{k}{t}\right) + 1\right)} \]
                    9. associate-/r*N/A

                      \[\leadsto \frac{2}{\left(\left(\frac{\frac{{t}^{3}}{\ell}}{\ell} \cdot k\right) \cdot \tan k\right) \cdot \left(\left(1 + \frac{k}{t} \cdot \frac{k}{t}\right) + 1\right)} \]
                    10. lift-pow.f64N/A

                      \[\leadsto \frac{2}{\left(\left(\frac{\frac{{t}^{3}}{\ell}}{\ell} \cdot k\right) \cdot \tan k\right) \cdot \left(\left(1 + \frac{k}{t} \cdot \frac{k}{t}\right) + 1\right)} \]
                    11. lift-/.f64N/A

                      \[\leadsto \frac{2}{\left(\left(\frac{\frac{{t}^{3}}{\ell}}{\ell} \cdot k\right) \cdot \tan k\right) \cdot \left(\left(1 + \frac{k}{t} \cdot \frac{k}{t}\right) + 1\right)} \]
                    12. lift-/.f6458.4

                      \[\leadsto \frac{2}{\left(\left(\frac{\frac{{t}^{3}}{\ell}}{\ell} \cdot k\right) \cdot \tan k\right) \cdot \left(\left(1 + \frac{k}{t} \cdot \frac{k}{t}\right) + 1\right)} \]
                  9. Applied rewrites58.4%

                    \[\leadsto \frac{2}{\left(\color{blue}{\left(\frac{\frac{{t}^{3}}{\ell}}{\ell} \cdot k\right)} \cdot \tan k\right) \cdot \left(\left(1 + \frac{k}{t} \cdot \frac{k}{t}\right) + 1\right)} \]

                  if 2.09999999999999991e-158 < k < 2.2000000000000001e-6

                  1. Initial program 58.8%

                    \[\frac{2}{\left(\left(\frac{{t}^{3}}{\ell \cdot \ell} \cdot \sin k\right) \cdot \tan k\right) \cdot \left(\left(1 + {\left(\frac{k}{t}\right)}^{2}\right) + 1\right)} \]
                  2. Add Preprocessing
                  3. Step-by-step derivation
                    1. lift-*.f64N/A

                      \[\leadsto \frac{2}{\left(\left(\frac{{t}^{3}}{\color{blue}{\ell \cdot \ell}} \cdot \sin k\right) \cdot \tan k\right) \cdot \left(\left(1 + {\left(\frac{k}{t}\right)}^{2}\right) + 1\right)} \]
                    2. lift-/.f64N/A

                      \[\leadsto \frac{2}{\left(\left(\color{blue}{\frac{{t}^{3}}{\ell \cdot \ell}} \cdot \sin k\right) \cdot \tan k\right) \cdot \left(\left(1 + {\left(\frac{k}{t}\right)}^{2}\right) + 1\right)} \]
                    3. lift-pow.f64N/A

                      \[\leadsto \frac{2}{\left(\left(\frac{\color{blue}{{t}^{3}}}{\ell \cdot \ell} \cdot \sin k\right) \cdot \tan k\right) \cdot \left(\left(1 + {\left(\frac{k}{t}\right)}^{2}\right) + 1\right)} \]
                    4. pow-to-expN/A

                      \[\leadsto \frac{2}{\left(\left(\frac{\color{blue}{e^{\log t \cdot 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)} \]
                    5. pow2N/A

                      \[\leadsto \frac{2}{\left(\left(\frac{e^{\log t \cdot 3}}{\color{blue}{{\ell}^{2}}} \cdot \sin k\right) \cdot \tan k\right) \cdot \left(\left(1 + {\left(\frac{k}{t}\right)}^{2}\right) + 1\right)} \]
                    6. pow-to-expN/A

                      \[\leadsto \frac{2}{\left(\left(\frac{e^{\log t \cdot 3}}{\color{blue}{e^{\log \ell \cdot 2}}} \cdot \sin k\right) \cdot \tan k\right) \cdot \left(\left(1 + {\left(\frac{k}{t}\right)}^{2}\right) + 1\right)} \]
                    7. div-expN/A

                      \[\leadsto \frac{2}{\left(\left(\color{blue}{e^{\log t \cdot 3 - \log \ell \cdot 2}} \cdot \sin k\right) \cdot \tan k\right) \cdot \left(\left(1 + {\left(\frac{k}{t}\right)}^{2}\right) + 1\right)} \]
                    8. lower-exp.f64N/A

                      \[\leadsto \frac{2}{\left(\left(\color{blue}{e^{\log t \cdot 3 - \log \ell \cdot 2}} \cdot \sin k\right) \cdot \tan k\right) \cdot \left(\left(1 + {\left(\frac{k}{t}\right)}^{2}\right) + 1\right)} \]
                    9. lower--.f64N/A

                      \[\leadsto \frac{2}{\left(\left(e^{\color{blue}{\log t \cdot 3 - \log \ell \cdot 2}} \cdot \sin k\right) \cdot \tan k\right) \cdot \left(\left(1 + {\left(\frac{k}{t}\right)}^{2}\right) + 1\right)} \]
                    10. lower-*.f64N/A

                      \[\leadsto \frac{2}{\left(\left(e^{\color{blue}{\log t \cdot 3} - \log \ell \cdot 2} \cdot \sin k\right) \cdot \tan k\right) \cdot \left(\left(1 + {\left(\frac{k}{t}\right)}^{2}\right) + 1\right)} \]
                    11. lower-log.f64N/A

                      \[\leadsto \frac{2}{\left(\left(e^{\color{blue}{\log t} \cdot 3 - \log \ell \cdot 2} \cdot \sin k\right) \cdot \tan k\right) \cdot \left(\left(1 + {\left(\frac{k}{t}\right)}^{2}\right) + 1\right)} \]
                    12. lower-*.f64N/A

                      \[\leadsto \frac{2}{\left(\left(e^{\log t \cdot 3 - \color{blue}{\log \ell \cdot 2}} \cdot \sin k\right) \cdot \tan k\right) \cdot \left(\left(1 + {\left(\frac{k}{t}\right)}^{2}\right) + 1\right)} \]
                    13. lower-log.f6418.5

                      \[\leadsto \frac{2}{\left(\left(e^{\log t \cdot 3 - \color{blue}{\log \ell} \cdot 2} \cdot \sin k\right) \cdot \tan k\right) \cdot \left(\left(1 + {\left(\frac{k}{t}\right)}^{2}\right) + 1\right)} \]
                  4. Applied rewrites18.5%

                    \[\leadsto \frac{2}{\left(\left(\color{blue}{e^{\log t \cdot 3 - \log \ell \cdot 2}} \cdot \sin k\right) \cdot \tan k\right) \cdot \left(\left(1 + {\left(\frac{k}{t}\right)}^{2}\right) + 1\right)} \]
                  5. Step-by-step derivation
                    1. lift-/.f64N/A

                      \[\leadsto \frac{2}{\left(\left(e^{\log t \cdot 3 - \log \ell \cdot 2} \cdot \sin k\right) \cdot \tan k\right) \cdot \left(\left(1 + {\color{blue}{\left(\frac{k}{t}\right)}}^{2}\right) + 1\right)} \]
                    2. lift-pow.f64N/A

                      \[\leadsto \frac{2}{\left(\left(e^{\log t \cdot 3 - \log \ell \cdot 2} \cdot \sin k\right) \cdot \tan k\right) \cdot \left(\left(1 + \color{blue}{{\left(\frac{k}{t}\right)}^{2}}\right) + 1\right)} \]
                    3. unpow2N/A

                      \[\leadsto \frac{2}{\left(\left(e^{\log t \cdot 3 - \log \ell \cdot 2} \cdot \sin k\right) \cdot \tan k\right) \cdot \left(\left(1 + \color{blue}{\frac{k}{t} \cdot \frac{k}{t}}\right) + 1\right)} \]
                    4. times-fracN/A

                      \[\leadsto \frac{2}{\left(\left(e^{\log t \cdot 3 - \log \ell \cdot 2} \cdot \sin k\right) \cdot \tan k\right) \cdot \left(\left(1 + \color{blue}{\frac{k \cdot k}{t \cdot t}}\right) + 1\right)} \]
                    5. pow2N/A

                      \[\leadsto \frac{2}{\left(\left(e^{\log t \cdot 3 - \log \ell \cdot 2} \cdot \sin k\right) \cdot \tan k\right) \cdot \left(\left(1 + \frac{k \cdot k}{\color{blue}{{t}^{2}}}\right) + 1\right)} \]
                    6. associate-/l*N/A

                      \[\leadsto \frac{2}{\left(\left(e^{\log t \cdot 3 - \log \ell \cdot 2} \cdot \sin k\right) \cdot \tan k\right) \cdot \left(\left(1 + \color{blue}{k \cdot \frac{k}{{t}^{2}}}\right) + 1\right)} \]
                    7. lower-*.f64N/A

                      \[\leadsto \frac{2}{\left(\left(e^{\log t \cdot 3 - \log \ell \cdot 2} \cdot \sin k\right) \cdot \tan k\right) \cdot \left(\left(1 + \color{blue}{k \cdot \frac{k}{{t}^{2}}}\right) + 1\right)} \]
                    8. lower-/.f64N/A

                      \[\leadsto \frac{2}{\left(\left(e^{\log t \cdot 3 - \log \ell \cdot 2} \cdot \sin k\right) \cdot \tan k\right) \cdot \left(\left(1 + k \cdot \color{blue}{\frac{k}{{t}^{2}}}\right) + 1\right)} \]
                    9. pow2N/A

                      \[\leadsto \frac{2}{\left(\left(e^{\log t \cdot 3 - \log \ell \cdot 2} \cdot \sin k\right) \cdot \tan k\right) \cdot \left(\left(1 + k \cdot \frac{k}{\color{blue}{t \cdot t}}\right) + 1\right)} \]
                    10. lift-*.f6418.5

                      \[\leadsto \frac{2}{\left(\left(e^{\log t \cdot 3 - \log \ell \cdot 2} \cdot \sin k\right) \cdot \tan k\right) \cdot \left(\left(1 + k \cdot \frac{k}{\color{blue}{t \cdot t}}\right) + 1\right)} \]
                  6. Applied rewrites18.5%

                    \[\leadsto \frac{2}{\left(\left(e^{\log t \cdot 3 - \log \ell \cdot 2} \cdot \sin k\right) \cdot \tan k\right) \cdot \left(\left(1 + \color{blue}{k \cdot \frac{k}{t \cdot t}}\right) + 1\right)} \]
                  7. Taylor expanded in k around 0

                    \[\leadsto \frac{2}{\color{blue}{2 \cdot \left({k}^{2} \cdot e^{3 \cdot \log t - 2 \cdot \log \ell}\right)}} \]
                  8. Step-by-step derivation
                    1. lower-*.f64N/A

                      \[\leadsto \frac{2}{2 \cdot \color{blue}{\left({k}^{2} \cdot e^{3 \cdot \log t - 2 \cdot \log \ell}\right)}} \]
                    2. lower-*.f64N/A

                      \[\leadsto \frac{2}{2 \cdot \left({k}^{2} \cdot \color{blue}{e^{3 \cdot \log t - 2 \cdot \log \ell}}\right)} \]
                    3. pow2N/A

                      \[\leadsto \frac{2}{2 \cdot \left(\left(k \cdot k\right) \cdot e^{\color{blue}{3 \cdot \log t - 2 \cdot \log \ell}}\right)} \]
                    4. lift-*.f64N/A

                      \[\leadsto \frac{2}{2 \cdot \left(\left(k \cdot k\right) \cdot e^{\color{blue}{3 \cdot \log t - 2 \cdot \log \ell}}\right)} \]
                    5. lower-exp.f64N/A

                      \[\leadsto \frac{2}{2 \cdot \left(\left(k \cdot k\right) \cdot e^{3 \cdot \log t - 2 \cdot \log \ell}\right)} \]
                    6. lower--.f64N/A

                      \[\leadsto \frac{2}{2 \cdot \left(\left(k \cdot k\right) \cdot e^{3 \cdot \log t - 2 \cdot \log \ell}\right)} \]
                    7. lower-*.f64N/A

                      \[\leadsto \frac{2}{2 \cdot \left(\left(k \cdot k\right) \cdot e^{3 \cdot \log t - 2 \cdot \log \ell}\right)} \]
                    8. lift-log.f64N/A

                      \[\leadsto \frac{2}{2 \cdot \left(\left(k \cdot k\right) \cdot e^{3 \cdot \log t - 2 \cdot \log \ell}\right)} \]
                    9. lower-*.f64N/A

                      \[\leadsto \frac{2}{2 \cdot \left(\left(k \cdot k\right) \cdot e^{3 \cdot \log t - 2 \cdot \log \ell}\right)} \]
                    10. lift-log.f6418.5

                      \[\leadsto \frac{2}{2 \cdot \left(\left(k \cdot k\right) \cdot e^{3 \cdot \log t - 2 \cdot \log \ell}\right)} \]
                  9. Applied rewrites18.5%

                    \[\leadsto \frac{2}{\color{blue}{2 \cdot \left(\left(k \cdot k\right) \cdot e^{3 \cdot \log t - 2 \cdot \log \ell}\right)}} \]

                  if 2.2000000000000001e-6 < k

                  1. Initial program 42.8%

                    \[\frac{2}{\left(\left(\frac{{t}^{3}}{\ell \cdot \ell} \cdot \sin k\right) \cdot \tan k\right) \cdot \left(\left(1 + {\left(\frac{k}{t}\right)}^{2}\right) + 1\right)} \]
                  2. Add Preprocessing
                  3. Taylor expanded in t around 0

                    \[\leadsto \color{blue}{2 \cdot \frac{{\ell}^{2} \cdot \cos k}{{k}^{2} \cdot \left(t \cdot {\sin k}^{2}\right)}} \]
                  4. Step-by-step derivation
                    1. *-commutativeN/A

                      \[\leadsto \frac{{\ell}^{2} \cdot \cos k}{{k}^{2} \cdot \left(t \cdot {\sin k}^{2}\right)} \cdot \color{blue}{2} \]
                    2. lower-*.f64N/A

                      \[\leadsto \frac{{\ell}^{2} \cdot \cos k}{{k}^{2} \cdot \left(t \cdot {\sin k}^{2}\right)} \cdot \color{blue}{2} \]
                  5. Applied rewrites61.9%

                    \[\leadsto \color{blue}{\left(\frac{\ell \cdot \ell}{k \cdot k} \cdot \frac{\cos k}{{\sin k}^{2} \cdot t}\right) \cdot 2} \]
                3. Recombined 3 regimes into one program.
                4. Final simplification54.9%

                  \[\leadsto \begin{array}{l} \mathbf{if}\;k \leq 2.1 \cdot 10^{-158}:\\ \;\;\;\;\frac{2}{\left(\left(\frac{\frac{{t}^{3}}{\ell}}{\ell} \cdot k\right) \cdot \tan k\right) \cdot \left(\left(1 + \frac{k}{t} \cdot \frac{k}{t}\right) + 1\right)}\\ \mathbf{elif}\;k \leq 2.2 \cdot 10^{-6}:\\ \;\;\;\;\frac{2}{2 \cdot \left(\left(k \cdot k\right) \cdot e^{3 \cdot \log t - 2 \cdot \log \ell}\right)}\\ \mathbf{else}:\\ \;\;\;\;\left(\frac{\ell \cdot \ell}{k \cdot k} \cdot \frac{\cos k}{{\sin k}^{2} \cdot t}\right) \cdot 2\\ \end{array} \]
                5. Add Preprocessing

                Alternative 28: 71.2% accurate, 1.6× speedup?

                \[\begin{array}{l} l_m = \left|\ell\right| \\ t\_m = \left|t\right| \\ t\_s = \mathsf{copysign}\left(1, t\right) \\ t\_s \cdot \begin{array}{l} \mathbf{if}\;t\_m \leq 7.5 \cdot 10^{-85}:\\ \;\;\;\;\frac{2}{\left(\left(\frac{k}{l\_m} \cdot \frac{k}{l\_m}\right) \cdot t\_m\right) \cdot \left(k \cdot k\right)}\\ \mathbf{elif}\;t\_m \leq 7.6 \cdot 10^{+54}:\\ \;\;\;\;\frac{2}{\left(\left(\frac{\left(t\_m \cdot t\_m\right) \cdot t\_m}{l\_m \cdot l\_m} \cdot \sin k\right) \cdot \tan k\right) \cdot \left(\left(1 + \frac{k \cdot k}{t\_m \cdot t\_m}\right) + 1\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{2}{\frac{{\left(k \cdot t\_m\right)}^{2} \cdot \left(\left(k \cdot k\right) \cdot 0.3333333333333333 + 2\right) + {k}^{4}}{l\_m \cdot l\_m} \cdot t\_m}\\ \end{array} \end{array} \]
                l_m = (fabs.f64 l)
                t\_m = (fabs.f64 t)
                t\_s = (copysign.f64 #s(literal 1 binary64) t)
                (FPCore (t_s t_m l_m k)
                 :precision binary64
                 (*
                  t_s
                  (if (<= t_m 7.5e-85)
                    (/ 2.0 (* (* (* (/ k l_m) (/ k l_m)) t_m) (* k k)))
                    (if (<= t_m 7.6e+54)
                      (/
                       2.0
                       (*
                        (* (* (/ (* (* t_m t_m) t_m) (* l_m l_m)) (sin k)) (tan k))
                        (+ (+ 1.0 (/ (* k k) (* t_m t_m))) 1.0)))
                      (/
                       2.0
                       (*
                        (/
                         (+
                          (* (pow (* k t_m) 2.0) (+ (* (* k k) 0.3333333333333333) 2.0))
                          (pow k 4.0))
                         (* l_m l_m))
                        t_m))))))
                l_m = fabs(l);
                t\_m = fabs(t);
                t\_s = copysign(1.0, t);
                double code(double t_s, double t_m, double l_m, double k) {
                	double tmp;
                	if (t_m <= 7.5e-85) {
                		tmp = 2.0 / ((((k / l_m) * (k / l_m)) * t_m) * (k * k));
                	} else if (t_m <= 7.6e+54) {
                		tmp = 2.0 / ((((((t_m * t_m) * t_m) / (l_m * l_m)) * sin(k)) * tan(k)) * ((1.0 + ((k * k) / (t_m * t_m))) + 1.0));
                	} else {
                		tmp = 2.0 / ((((pow((k * t_m), 2.0) * (((k * k) * 0.3333333333333333) + 2.0)) + pow(k, 4.0)) / (l_m * l_m)) * t_m);
                	}
                	return t_s * tmp;
                }
                
                l_m =     private
                t\_m =     private
                t\_s =     private
                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_s, t_m, l_m, k)
                use fmin_fmax_functions
                    real(8), intent (in) :: t_s
                    real(8), intent (in) :: t_m
                    real(8), intent (in) :: l_m
                    real(8), intent (in) :: k
                    real(8) :: tmp
                    if (t_m <= 7.5d-85) then
                        tmp = 2.0d0 / ((((k / l_m) * (k / l_m)) * t_m) * (k * k))
                    else if (t_m <= 7.6d+54) then
                        tmp = 2.0d0 / ((((((t_m * t_m) * t_m) / (l_m * l_m)) * sin(k)) * tan(k)) * ((1.0d0 + ((k * k) / (t_m * t_m))) + 1.0d0))
                    else
                        tmp = 2.0d0 / ((((((k * t_m) ** 2.0d0) * (((k * k) * 0.3333333333333333d0) + 2.0d0)) + (k ** 4.0d0)) / (l_m * l_m)) * t_m)
                    end if
                    code = t_s * tmp
                end function
                
                l_m = Math.abs(l);
                t\_m = Math.abs(t);
                t\_s = Math.copySign(1.0, t);
                public static double code(double t_s, double t_m, double l_m, double k) {
                	double tmp;
                	if (t_m <= 7.5e-85) {
                		tmp = 2.0 / ((((k / l_m) * (k / l_m)) * t_m) * (k * k));
                	} else if (t_m <= 7.6e+54) {
                		tmp = 2.0 / ((((((t_m * t_m) * t_m) / (l_m * l_m)) * Math.sin(k)) * Math.tan(k)) * ((1.0 + ((k * k) / (t_m * t_m))) + 1.0));
                	} else {
                		tmp = 2.0 / ((((Math.pow((k * t_m), 2.0) * (((k * k) * 0.3333333333333333) + 2.0)) + Math.pow(k, 4.0)) / (l_m * l_m)) * t_m);
                	}
                	return t_s * tmp;
                }
                
                l_m = math.fabs(l)
                t\_m = math.fabs(t)
                t\_s = math.copysign(1.0, t)
                def code(t_s, t_m, l_m, k):
                	tmp = 0
                	if t_m <= 7.5e-85:
                		tmp = 2.0 / ((((k / l_m) * (k / l_m)) * t_m) * (k * k))
                	elif t_m <= 7.6e+54:
                		tmp = 2.0 / ((((((t_m * t_m) * t_m) / (l_m * l_m)) * math.sin(k)) * math.tan(k)) * ((1.0 + ((k * k) / (t_m * t_m))) + 1.0))
                	else:
                		tmp = 2.0 / ((((math.pow((k * t_m), 2.0) * (((k * k) * 0.3333333333333333) + 2.0)) + math.pow(k, 4.0)) / (l_m * l_m)) * t_m)
                	return t_s * tmp
                
                l_m = abs(l)
                t\_m = abs(t)
                t\_s = copysign(1.0, t)
                function code(t_s, t_m, l_m, k)
                	tmp = 0.0
                	if (t_m <= 7.5e-85)
                		tmp = Float64(2.0 / Float64(Float64(Float64(Float64(k / l_m) * Float64(k / l_m)) * t_m) * Float64(k * k)));
                	elseif (t_m <= 7.6e+54)
                		tmp = Float64(2.0 / Float64(Float64(Float64(Float64(Float64(Float64(t_m * t_m) * t_m) / Float64(l_m * l_m)) * sin(k)) * tan(k)) * Float64(Float64(1.0 + Float64(Float64(k * k) / Float64(t_m * t_m))) + 1.0)));
                	else
                		tmp = Float64(2.0 / Float64(Float64(Float64(Float64((Float64(k * t_m) ^ 2.0) * Float64(Float64(Float64(k * k) * 0.3333333333333333) + 2.0)) + (k ^ 4.0)) / Float64(l_m * l_m)) * t_m));
                	end
                	return Float64(t_s * tmp)
                end
                
                l_m = abs(l);
                t\_m = abs(t);
                t\_s = sign(t) * abs(1.0);
                function tmp_2 = code(t_s, t_m, l_m, k)
                	tmp = 0.0;
                	if (t_m <= 7.5e-85)
                		tmp = 2.0 / ((((k / l_m) * (k / l_m)) * t_m) * (k * k));
                	elseif (t_m <= 7.6e+54)
                		tmp = 2.0 / ((((((t_m * t_m) * t_m) / (l_m * l_m)) * sin(k)) * tan(k)) * ((1.0 + ((k * k) / (t_m * t_m))) + 1.0));
                	else
                		tmp = 2.0 / ((((((k * t_m) ^ 2.0) * (((k * k) * 0.3333333333333333) + 2.0)) + (k ^ 4.0)) / (l_m * l_m)) * t_m);
                	end
                	tmp_2 = t_s * tmp;
                end
                
                l_m = N[Abs[l], $MachinePrecision]
                t\_m = N[Abs[t], $MachinePrecision]
                t\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[t]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
                code[t$95$s_, t$95$m_, l$95$m_, k_] := N[(t$95$s * If[LessEqual[t$95$m, 7.5e-85], N[(2.0 / N[(N[(N[(N[(k / l$95$m), $MachinePrecision] * N[(k / l$95$m), $MachinePrecision]), $MachinePrecision] * t$95$m), $MachinePrecision] * N[(k * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$m, 7.6e+54], N[(2.0 / N[(N[(N[(N[(N[(N[(t$95$m * t$95$m), $MachinePrecision] * t$95$m), $MachinePrecision] / N[(l$95$m * l$95$m), $MachinePrecision]), $MachinePrecision] * N[Sin[k], $MachinePrecision]), $MachinePrecision] * N[Tan[k], $MachinePrecision]), $MachinePrecision] * N[(N[(1.0 + N[(N[(k * k), $MachinePrecision] / N[(t$95$m * t$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(2.0 / N[(N[(N[(N[(N[Power[N[(k * t$95$m), $MachinePrecision], 2.0], $MachinePrecision] * N[(N[(N[(k * k), $MachinePrecision] * 0.3333333333333333), $MachinePrecision] + 2.0), $MachinePrecision]), $MachinePrecision] + N[Power[k, 4.0], $MachinePrecision]), $MachinePrecision] / N[(l$95$m * l$95$m), $MachinePrecision]), $MachinePrecision] * t$95$m), $MachinePrecision]), $MachinePrecision]]]), $MachinePrecision]
                
                \begin{array}{l}
                l_m = \left|\ell\right|
                \\
                t\_m = \left|t\right|
                \\
                t\_s = \mathsf{copysign}\left(1, t\right)
                
                \\
                t\_s \cdot \begin{array}{l}
                \mathbf{if}\;t\_m \leq 7.5 \cdot 10^{-85}:\\
                \;\;\;\;\frac{2}{\left(\left(\frac{k}{l\_m} \cdot \frac{k}{l\_m}\right) \cdot t\_m\right) \cdot \left(k \cdot k\right)}\\
                
                \mathbf{elif}\;t\_m \leq 7.6 \cdot 10^{+54}:\\
                \;\;\;\;\frac{2}{\left(\left(\frac{\left(t\_m \cdot t\_m\right) \cdot t\_m}{l\_m \cdot l\_m} \cdot \sin k\right) \cdot \tan k\right) \cdot \left(\left(1 + \frac{k \cdot k}{t\_m \cdot t\_m}\right) + 1\right)}\\
                
                \mathbf{else}:\\
                \;\;\;\;\frac{2}{\frac{{\left(k \cdot t\_m\right)}^{2} \cdot \left(\left(k \cdot k\right) \cdot 0.3333333333333333 + 2\right) + {k}^{4}}{l\_m \cdot l\_m} \cdot t\_m}\\
                
                
                \end{array}
                \end{array}
                
                Derivation
                1. Split input into 3 regimes
                2. if t < 7.5000000000000003e-85

                  1. Initial program 46.2%

                    \[\frac{2}{\left(\left(\frac{{t}^{3}}{\ell \cdot \ell} \cdot \sin k\right) \cdot \tan k\right) \cdot \left(\left(1 + {\left(\frac{k}{t}\right)}^{2}\right) + 1\right)} \]
                  2. Add Preprocessing
                  3. Taylor expanded in k around 0

                    \[\leadsto \frac{2}{\color{blue}{{k}^{2} \cdot \left(2 \cdot \frac{{t}^{3}}{{\ell}^{2}} + \frac{{k}^{2} \cdot \left({t}^{3} \cdot \left(\frac{1}{3} + \frac{1}{{t}^{2}}\right)\right)}{{\ell}^{2}}\right)}} \]
                  4. Step-by-step derivation
                    1. *-commutativeN/A

                      \[\leadsto \frac{2}{\left(2 \cdot \frac{{t}^{3}}{{\ell}^{2}} + \frac{{k}^{2} \cdot \left({t}^{3} \cdot \left(\frac{1}{3} + \frac{1}{{t}^{2}}\right)\right)}{{\ell}^{2}}\right) \cdot \color{blue}{{k}^{2}}} \]
                    2. lower-*.f64N/A

                      \[\leadsto \frac{2}{\left(2 \cdot \frac{{t}^{3}}{{\ell}^{2}} + \frac{{k}^{2} \cdot \left({t}^{3} \cdot \left(\frac{1}{3} + \frac{1}{{t}^{2}}\right)\right)}{{\ell}^{2}}\right) \cdot \color{blue}{{k}^{2}}} \]
                  5. Applied rewrites55.3%

                    \[\leadsto \frac{2}{\color{blue}{\frac{\left(0.3333333333333333 \cdot {t}^{3} + t\right) \cdot \left(k \cdot k\right) + 2 \cdot {t}^{3}}{\ell \cdot \ell} \cdot \left(k \cdot k\right)}} \]
                  6. Taylor expanded in t around 0

                    \[\leadsto \frac{2}{\left(t \cdot \left({t}^{2} \cdot \left(\frac{1}{3} \cdot \frac{{k}^{2}}{{\ell}^{2}} + 2 \cdot \frac{1}{{\ell}^{2}}\right) + \frac{{k}^{2}}{{\ell}^{2}}\right)\right) \cdot \left(\color{blue}{k} \cdot k\right)} \]
                  7. Step-by-step derivation
                    1. *-commutativeN/A

                      \[\leadsto \frac{2}{\left(\left({t}^{2} \cdot \left(\frac{1}{3} \cdot \frac{{k}^{2}}{{\ell}^{2}} + 2 \cdot \frac{1}{{\ell}^{2}}\right) + \frac{{k}^{2}}{{\ell}^{2}}\right) \cdot t\right) \cdot \left(k \cdot k\right)} \]
                    2. lower-*.f64N/A

                      \[\leadsto \frac{2}{\left(\left({t}^{2} \cdot \left(\frac{1}{3} \cdot \frac{{k}^{2}}{{\ell}^{2}} + 2 \cdot \frac{1}{{\ell}^{2}}\right) + \frac{{k}^{2}}{{\ell}^{2}}\right) \cdot t\right) \cdot \left(k \cdot k\right)} \]
                  8. Applied rewrites51.8%

                    \[\leadsto \frac{2}{\left(\left(\left(\frac{\left(k \cdot k\right) \cdot 0.3333333333333333}{\ell \cdot \ell} - -2 \cdot {\ell}^{-2}\right) \cdot \left(t \cdot t\right) + \frac{k \cdot k}{\ell \cdot \ell}\right) \cdot t\right) \cdot \left(\color{blue}{k} \cdot k\right)} \]
                  9. Taylor expanded in t around 0

                    \[\leadsto \frac{2}{\left(\frac{{k}^{2}}{{\ell}^{2}} \cdot t\right) \cdot \left(k \cdot k\right)} \]
                  10. Step-by-step derivation
                    1. pow2N/A

                      \[\leadsto \frac{2}{\left(\frac{k \cdot k}{{\ell}^{2}} \cdot t\right) \cdot \left(k \cdot k\right)} \]
                    2. pow2N/A

                      \[\leadsto \frac{2}{\left(\frac{k \cdot k}{\ell \cdot \ell} \cdot t\right) \cdot \left(k \cdot k\right)} \]
                    3. times-fracN/A

                      \[\leadsto \frac{2}{\left(\left(\frac{k}{\ell} \cdot \frac{k}{\ell}\right) \cdot t\right) \cdot \left(k \cdot k\right)} \]
                    4. lower-*.f64N/A

                      \[\leadsto \frac{2}{\left(\left(\frac{k}{\ell} \cdot \frac{k}{\ell}\right) \cdot t\right) \cdot \left(k \cdot k\right)} \]
                    5. lower-/.f64N/A

                      \[\leadsto \frac{2}{\left(\left(\frac{k}{\ell} \cdot \frac{k}{\ell}\right) \cdot t\right) \cdot \left(k \cdot k\right)} \]
                    6. lower-/.f6459.6

                      \[\leadsto \frac{2}{\left(\left(\frac{k}{\ell} \cdot \frac{k}{\ell}\right) \cdot t\right) \cdot \left(k \cdot k\right)} \]
                  11. Applied rewrites59.6%

                    \[\leadsto \frac{2}{\left(\left(\frac{k}{\ell} \cdot \frac{k}{\ell}\right) \cdot t\right) \cdot \left(k \cdot k\right)} \]

                  if 7.5000000000000003e-85 < t < 7.6000000000000005e54

                  1. Initial program 75.7%

                    \[\frac{2}{\left(\left(\frac{{t}^{3}}{\ell \cdot \ell} \cdot \sin k\right) \cdot \tan k\right) \cdot \left(\left(1 + {\left(\frac{k}{t}\right)}^{2}\right) + 1\right)} \]
                  2. Add Preprocessing
                  3. Step-by-step derivation
                    1. lift-/.f64N/A

                      \[\leadsto \frac{2}{\left(\left(\frac{{t}^{3}}{\ell \cdot \ell} \cdot \sin k\right) \cdot \tan k\right) \cdot \left(\left(1 + {\color{blue}{\left(\frac{k}{t}\right)}}^{2}\right) + 1\right)} \]
                    2. lift-pow.f64N/A

                      \[\leadsto \frac{2}{\left(\left(\frac{{t}^{3}}{\ell \cdot \ell} \cdot \sin k\right) \cdot \tan k\right) \cdot \left(\left(1 + \color{blue}{{\left(\frac{k}{t}\right)}^{2}}\right) + 1\right)} \]
                    3. unpow2N/A

                      \[\leadsto \frac{2}{\left(\left(\frac{{t}^{3}}{\ell \cdot \ell} \cdot \sin k\right) \cdot \tan k\right) \cdot \left(\left(1 + \color{blue}{\frac{k}{t} \cdot \frac{k}{t}}\right) + 1\right)} \]
                    4. frac-timesN/A

                      \[\leadsto \frac{2}{\left(\left(\frac{{t}^{3}}{\ell \cdot \ell} \cdot \sin k\right) \cdot \tan k\right) \cdot \left(\left(1 + \color{blue}{\frac{k \cdot k}{t \cdot t}}\right) + 1\right)} \]
                    5. unpow2N/A

                      \[\leadsto \frac{2}{\left(\left(\frac{{t}^{3}}{\ell \cdot \ell} \cdot \sin k\right) \cdot \tan k\right) \cdot \left(\left(1 + \frac{\color{blue}{{k}^{2}}}{t \cdot t}\right) + 1\right)} \]
                    6. unpow2N/A

                      \[\leadsto \frac{2}{\left(\left(\frac{{t}^{3}}{\ell \cdot \ell} \cdot \sin k\right) \cdot \tan k\right) \cdot \left(\left(1 + \frac{{k}^{2}}{\color{blue}{{t}^{2}}}\right) + 1\right)} \]
                    7. lower-/.f64N/A

                      \[\leadsto \frac{2}{\left(\left(\frac{{t}^{3}}{\ell \cdot \ell} \cdot \sin k\right) \cdot \tan k\right) \cdot \left(\left(1 + \color{blue}{\frac{{k}^{2}}{{t}^{2}}}\right) + 1\right)} \]
                    8. unpow2N/A

                      \[\leadsto \frac{2}{\left(\left(\frac{{t}^{3}}{\ell \cdot \ell} \cdot \sin k\right) \cdot \tan k\right) \cdot \left(\left(1 + \frac{\color{blue}{k \cdot k}}{{t}^{2}}\right) + 1\right)} \]
                    9. lower-*.f64N/A

                      \[\leadsto \frac{2}{\left(\left(\frac{{t}^{3}}{\ell \cdot \ell} \cdot \sin k\right) \cdot \tan k\right) \cdot \left(\left(1 + \frac{\color{blue}{k \cdot k}}{{t}^{2}}\right) + 1\right)} \]
                    10. unpow2N/A

                      \[\leadsto \frac{2}{\left(\left(\frac{{t}^{3}}{\ell \cdot \ell} \cdot \sin k\right) \cdot \tan k\right) \cdot \left(\left(1 + \frac{k \cdot k}{\color{blue}{t \cdot t}}\right) + 1\right)} \]
                    11. lower-*.f6475.8

                      \[\leadsto \frac{2}{\left(\left(\frac{{t}^{3}}{\ell \cdot \ell} \cdot \sin k\right) \cdot \tan k\right) \cdot \left(\left(1 + \frac{k \cdot k}{\color{blue}{t \cdot t}}\right) + 1\right)} \]
                  4. Applied rewrites75.8%

                    \[\leadsto \frac{2}{\left(\left(\frac{{t}^{3}}{\ell \cdot \ell} \cdot \sin k\right) \cdot \tan k\right) \cdot \left(\left(1 + \color{blue}{\frac{k \cdot k}{t \cdot t}}\right) + 1\right)} \]
                  5. Step-by-step derivation
                    1. lift-pow.f64N/A

                      \[\leadsto \frac{2}{\left(\left(\frac{\color{blue}{{t}^{3}}}{\ell \cdot \ell} \cdot \sin k\right) \cdot \tan k\right) \cdot \left(\left(1 + \frac{k \cdot k}{t \cdot t}\right) + 1\right)} \]
                    2. unpow3N/A

                      \[\leadsto \frac{2}{\left(\left(\frac{\color{blue}{\left(t \cdot t\right) \cdot t}}{\ell \cdot \ell} \cdot \sin k\right) \cdot \tan k\right) \cdot \left(\left(1 + \frac{k \cdot k}{t \cdot t}\right) + 1\right)} \]
                    3. pow2N/A

                      \[\leadsto \frac{2}{\left(\left(\frac{\color{blue}{{t}^{2}} \cdot t}{\ell \cdot \ell} \cdot \sin k\right) \cdot \tan k\right) \cdot \left(\left(1 + \frac{k \cdot k}{t \cdot t}\right) + 1\right)} \]
                    4. lower-*.f64N/A

                      \[\leadsto \frac{2}{\left(\left(\frac{\color{blue}{{t}^{2} \cdot t}}{\ell \cdot \ell} \cdot \sin k\right) \cdot \tan k\right) \cdot \left(\left(1 + \frac{k \cdot k}{t \cdot t}\right) + 1\right)} \]
                    5. pow2N/A

                      \[\leadsto \frac{2}{\left(\left(\frac{\color{blue}{\left(t \cdot t\right)} \cdot t}{\ell \cdot \ell} \cdot \sin k\right) \cdot \tan k\right) \cdot \left(\left(1 + \frac{k \cdot k}{t \cdot t}\right) + 1\right)} \]
                    6. lift-*.f6475.7

                      \[\leadsto \frac{2}{\left(\left(\frac{\color{blue}{\left(t \cdot t\right)} \cdot t}{\ell \cdot \ell} \cdot \sin k\right) \cdot \tan k\right) \cdot \left(\left(1 + \frac{k \cdot k}{t \cdot t}\right) + 1\right)} \]
                  6. Applied rewrites75.7%

                    \[\leadsto \frac{2}{\left(\left(\frac{\color{blue}{\left(t \cdot t\right) \cdot t}}{\ell \cdot \ell} \cdot \sin k\right) \cdot \tan k\right) \cdot \left(\left(1 + \frac{k \cdot k}{t \cdot t}\right) + 1\right)} \]

                  if 7.6000000000000005e54 < t

                  1. Initial program 62.2%

                    \[\frac{2}{\left(\left(\frac{{t}^{3}}{\ell \cdot \ell} \cdot \sin k\right) \cdot \tan k\right) \cdot \left(\left(1 + {\left(\frac{k}{t}\right)}^{2}\right) + 1\right)} \]
                  2. Add Preprocessing
                  3. Taylor expanded in k around 0

                    \[\leadsto \frac{2}{\color{blue}{{k}^{2} \cdot \left(2 \cdot \frac{{t}^{3}}{{\ell}^{2}} + \frac{{k}^{2} \cdot \left({t}^{3} \cdot \left(\frac{1}{3} + \frac{1}{{t}^{2}}\right)\right)}{{\ell}^{2}}\right)}} \]
                  4. Step-by-step derivation
                    1. *-commutativeN/A

                      \[\leadsto \frac{2}{\left(2 \cdot \frac{{t}^{3}}{{\ell}^{2}} + \frac{{k}^{2} \cdot \left({t}^{3} \cdot \left(\frac{1}{3} + \frac{1}{{t}^{2}}\right)\right)}{{\ell}^{2}}\right) \cdot \color{blue}{{k}^{2}}} \]
                    2. lower-*.f64N/A

                      \[\leadsto \frac{2}{\left(2 \cdot \frac{{t}^{3}}{{\ell}^{2}} + \frac{{k}^{2} \cdot \left({t}^{3} \cdot \left(\frac{1}{3} + \frac{1}{{t}^{2}}\right)\right)}{{\ell}^{2}}\right) \cdot \color{blue}{{k}^{2}}} \]
                  5. Applied rewrites53.8%

                    \[\leadsto \frac{2}{\color{blue}{\frac{\left(0.3333333333333333 \cdot {t}^{3} + t\right) \cdot \left(k \cdot k\right) + 2 \cdot {t}^{3}}{\ell \cdot \ell} \cdot \left(k \cdot k\right)}} \]
                  6. Taylor expanded in t around 0

                    \[\leadsto \frac{2}{t \cdot \color{blue}{\left(\frac{{k}^{2} \cdot \left({t}^{2} \cdot \left(2 + \frac{1}{3} \cdot {k}^{2}\right)\right)}{{\ell}^{2}} + \frac{{k}^{4}}{{\ell}^{2}}\right)}} \]
                  7. Step-by-step derivation
                    1. *-commutativeN/A

                      \[\leadsto \frac{2}{\left(\frac{{k}^{2} \cdot \left({t}^{2} \cdot \left(2 + \frac{1}{3} \cdot {k}^{2}\right)\right)}{{\ell}^{2}} + \frac{{k}^{4}}{{\ell}^{2}}\right) \cdot t} \]
                    2. lower-*.f64N/A

                      \[\leadsto \frac{2}{\left(\frac{{k}^{2} \cdot \left({t}^{2} \cdot \left(2 + \frac{1}{3} \cdot {k}^{2}\right)\right)}{{\ell}^{2}} + \frac{{k}^{4}}{{\ell}^{2}}\right) \cdot t} \]
                  8. Applied rewrites73.3%

                    \[\leadsto \frac{2}{\frac{{\left(k \cdot t\right)}^{2} \cdot \left(\left(k \cdot k\right) \cdot 0.3333333333333333 + 2\right) + {k}^{4}}{\ell \cdot \ell} \cdot \color{blue}{t}} \]
                3. Recombined 3 regimes into one program.
                4. Final simplification64.8%

                  \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq 7.5 \cdot 10^{-85}:\\ \;\;\;\;\frac{2}{\left(\left(\frac{k}{\ell} \cdot \frac{k}{\ell}\right) \cdot t\right) \cdot \left(k \cdot k\right)}\\ \mathbf{elif}\;t \leq 7.6 \cdot 10^{+54}:\\ \;\;\;\;\frac{2}{\left(\left(\frac{\left(t \cdot t\right) \cdot t}{\ell \cdot \ell} \cdot \sin k\right) \cdot \tan k\right) \cdot \left(\left(1 + \frac{k \cdot k}{t \cdot t}\right) + 1\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{2}{\frac{{\left(k \cdot t\right)}^{2} \cdot \left(\left(k \cdot k\right) \cdot 0.3333333333333333 + 2\right) + {k}^{4}}{\ell \cdot \ell} \cdot t}\\ \end{array} \]
                5. Add Preprocessing

                Alternative 29: 50.9% accurate, 12.5× speedup?

                \[\begin{array}{l} l_m = \left|\ell\right| \\ t\_m = \left|t\right| \\ t\_s = \mathsf{copysign}\left(1, t\right) \\ t\_s \cdot \frac{l\_m \cdot l\_m}{\left(k \cdot k\right) \cdot \left(\left(t\_m \cdot t\_m\right) \cdot t\_m\right)} \end{array} \]
                l_m = (fabs.f64 l)
                t\_m = (fabs.f64 t)
                t\_s = (copysign.f64 #s(literal 1 binary64) t)
                (FPCore (t_s t_m l_m k)
                 :precision binary64
                 (* t_s (/ (* l_m l_m) (* (* k k) (* (* t_m t_m) t_m)))))
                l_m = fabs(l);
                t\_m = fabs(t);
                t\_s = copysign(1.0, t);
                double code(double t_s, double t_m, double l_m, double k) {
                	return t_s * ((l_m * l_m) / ((k * k) * ((t_m * t_m) * t_m)));
                }
                
                l_m =     private
                t\_m =     private
                t\_s =     private
                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_s, t_m, l_m, k)
                use fmin_fmax_functions
                    real(8), intent (in) :: t_s
                    real(8), intent (in) :: t_m
                    real(8), intent (in) :: l_m
                    real(8), intent (in) :: k
                    code = t_s * ((l_m * l_m) / ((k * k) * ((t_m * t_m) * t_m)))
                end function
                
                l_m = Math.abs(l);
                t\_m = Math.abs(t);
                t\_s = Math.copySign(1.0, t);
                public static double code(double t_s, double t_m, double l_m, double k) {
                	return t_s * ((l_m * l_m) / ((k * k) * ((t_m * t_m) * t_m)));
                }
                
                l_m = math.fabs(l)
                t\_m = math.fabs(t)
                t\_s = math.copysign(1.0, t)
                def code(t_s, t_m, l_m, k):
                	return t_s * ((l_m * l_m) / ((k * k) * ((t_m * t_m) * t_m)))
                
                l_m = abs(l)
                t\_m = abs(t)
                t\_s = copysign(1.0, t)
                function code(t_s, t_m, l_m, k)
                	return Float64(t_s * Float64(Float64(l_m * l_m) / Float64(Float64(k * k) * Float64(Float64(t_m * t_m) * t_m))))
                end
                
                l_m = abs(l);
                t\_m = abs(t);
                t\_s = sign(t) * abs(1.0);
                function tmp = code(t_s, t_m, l_m, k)
                	tmp = t_s * ((l_m * l_m) / ((k * k) * ((t_m * t_m) * t_m)));
                end
                
                l_m = N[Abs[l], $MachinePrecision]
                t\_m = N[Abs[t], $MachinePrecision]
                t\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[t]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
                code[t$95$s_, t$95$m_, l$95$m_, k_] := N[(t$95$s * N[(N[(l$95$m * l$95$m), $MachinePrecision] / N[(N[(k * k), $MachinePrecision] * N[(N[(t$95$m * t$95$m), $MachinePrecision] * t$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
                
                \begin{array}{l}
                l_m = \left|\ell\right|
                \\
                t\_m = \left|t\right|
                \\
                t\_s = \mathsf{copysign}\left(1, t\right)
                
                \\
                t\_s \cdot \frac{l\_m \cdot l\_m}{\left(k \cdot k\right) \cdot \left(\left(t\_m \cdot t\_m\right) \cdot t\_m\right)}
                \end{array}
                
                Derivation
                1. Initial program 53.9%

                  \[\frac{2}{\left(\left(\frac{{t}^{3}}{\ell \cdot \ell} \cdot \sin k\right) \cdot \tan k\right) \cdot \left(\left(1 + {\left(\frac{k}{t}\right)}^{2}\right) + 1\right)} \]
                2. Add Preprocessing
                3. Taylor expanded in k around 0

                  \[\leadsto \color{blue}{\frac{{\ell}^{2}}{{k}^{2} \cdot {t}^{3}}} \]
                4. Step-by-step derivation
                  1. lower-/.f64N/A

                    \[\leadsto \frac{{\ell}^{2}}{\color{blue}{{k}^{2} \cdot {t}^{3}}} \]
                  2. pow2N/A

                    \[\leadsto \frac{\ell \cdot \ell}{\color{blue}{{k}^{2}} \cdot {t}^{3}} \]
                  3. lift-*.f64N/A

                    \[\leadsto \frac{\ell \cdot \ell}{\color{blue}{{k}^{2}} \cdot {t}^{3}} \]
                  4. lower-*.f64N/A

                    \[\leadsto \frac{\ell \cdot \ell}{{k}^{2} \cdot \color{blue}{{t}^{3}}} \]
                  5. unpow2N/A

                    \[\leadsto \frac{\ell \cdot \ell}{\left(k \cdot k\right) \cdot {\color{blue}{t}}^{3}} \]
                  6. lower-*.f64N/A

                    \[\leadsto \frac{\ell \cdot \ell}{\left(k \cdot k\right) \cdot {\color{blue}{t}}^{3}} \]
                  7. lift-pow.f6447.7

                    \[\leadsto \frac{\ell \cdot \ell}{\left(k \cdot k\right) \cdot {t}^{\color{blue}{3}}} \]
                5. Applied rewrites47.7%

                  \[\leadsto \color{blue}{\frac{\ell \cdot \ell}{\left(k \cdot k\right) \cdot {t}^{3}}} \]
                6. Step-by-step derivation
                  1. lift-pow.f64N/A

                    \[\leadsto \frac{\ell \cdot \ell}{\left(k \cdot k\right) \cdot {t}^{\color{blue}{3}}} \]
                  2. unpow3N/A

                    \[\leadsto \frac{\ell \cdot \ell}{\left(k \cdot k\right) \cdot \left(\left(t \cdot t\right) \cdot \color{blue}{t}\right)} \]
                  3. pow2N/A

                    \[\leadsto \frac{\ell \cdot \ell}{\left(k \cdot k\right) \cdot \left({t}^{2} \cdot t\right)} \]
                  4. lower-*.f64N/A

                    \[\leadsto \frac{\ell \cdot \ell}{\left(k \cdot k\right) \cdot \left({t}^{2} \cdot \color{blue}{t}\right)} \]
                  5. pow2N/A

                    \[\leadsto \frac{\ell \cdot \ell}{\left(k \cdot k\right) \cdot \left(\left(t \cdot t\right) \cdot t\right)} \]
                  6. lift-*.f6447.7

                    \[\leadsto \frac{\ell \cdot \ell}{\left(k \cdot k\right) \cdot \left(\left(t \cdot t\right) \cdot t\right)} \]
                7. Applied rewrites47.7%

                  \[\leadsto \frac{\ell \cdot \ell}{\left(k \cdot k\right) \cdot \left(\left(t \cdot t\right) \cdot \color{blue}{t}\right)} \]
                8. Final simplification47.7%

                  \[\leadsto \frac{\ell \cdot \ell}{\left(k \cdot k\right) \cdot \left(\left(t \cdot t\right) \cdot t\right)} \]
                9. Add Preprocessing

                Reproduce

                ?
                herbie shell --seed 2025058 
                (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))))