Toniolo and Linder, Equation (10+)

Percentage Accurate: 55.3% → 84.3%
Time: 13.5s
Alternatives: 17
Speedup: 1.7×

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

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

Initial Program: 55.3% 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.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}\;l\_m \leq 2.5 \cdot 10^{+176}:\\ \;\;\;\;\frac{2}{\frac{\frac{\frac{\mathsf{fma}\left({\left(\sin k \cdot t\_m\right)}^{2}, 2, {\left(\sin k \cdot k\right)}^{2}\right)}{l\_m} \cdot t\_m}{l\_m}}{\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 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 (<= l_m 2.5e+176)
    (/
     2.0
     (/
      (/
       (*
        (/ (fma (pow (* (sin k) t_m) 2.0) 2.0 (pow (* (sin k) k) 2.0)) l_m)
        t_m)
       l_m)
      (cos k)))
    (/
     2.0
     (*
      (* (* (exp (- (* (log t_m) 3.0) (* (log l_m) 2.0))) (sin k)) (tan k))
      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 (l_m <= 2.5e+176) {
		tmp = 2.0 / ((((fma(pow((sin(k) * t_m), 2.0), 2.0, pow((sin(k) * k), 2.0)) / l_m) * t_m) / l_m) / cos(k));
	} else {
		tmp = 2.0 / (((exp(((log(t_m) * 3.0) - (log(l_m) * 2.0))) * sin(k)) * tan(k)) * 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 (l_m <= 2.5e+176)
		tmp = Float64(2.0 / Float64(Float64(Float64(Float64(fma((Float64(sin(k) * t_m) ^ 2.0), 2.0, (Float64(sin(k) * k) ^ 2.0)) / l_m) * t_m) / l_m) / 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)) * 2.0));
	end
	return Float64(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[l$95$m, 2.5e+176], N[(2.0 / N[(N[(N[(N[(N[(N[Power[N[(N[Sin[k], $MachinePrecision] * t$95$m), $MachinePrecision], 2.0], $MachinePrecision] * 2.0 + N[Power[N[(N[Sin[k], $MachinePrecision] * k), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision] / l$95$m), $MachinePrecision] * t$95$m), $MachinePrecision] / l$95$m), $MachinePrecision] / N[Cos[k], $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] * 2.0), $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}\;l\_m \leq 2.5 \cdot 10^{+176}:\\
\;\;\;\;\frac{2}{\frac{\frac{\frac{\mathsf{fma}\left({\left(\sin k \cdot t\_m\right)}^{2}, 2, {\left(\sin k \cdot k\right)}^{2}\right)}{l\_m} \cdot t\_m}{l\_m}}{\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 2}\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if l < 2.5e176

    1. Initial program 58.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      if 2.5e176 < l

      1. Initial program 48.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 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 rewrites51.8%

          \[\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-*.f64N/A

            \[\leadsto \frac{2}{\left(\left(\frac{{t}^{3}}{\color{blue}{\ell \cdot \ell}} \cdot \sin k\right) \cdot \tan k\right) \cdot 2} \]
          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 2} \]
          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 2} \]
          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 2} \]
          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 2} \]
          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 2} \]
          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 2} \]
          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 2} \]
          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 2} \]
          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 2} \]
          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 2} \]
          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 2} \]
          13. lower-log.f6443.7

            \[\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 2} \]
        3. Applied rewrites43.7%

          \[\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 2} \]
      5. Recombined 2 regimes into one program.
      6. Final simplification83.7%

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

      Alternative 2: 68.8% 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 := \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 4 \cdot 10^{+120}:\\ \;\;\;\;\frac{2}{\left(k \cdot k\right) \cdot \left(t\_m \cdot \left(\frac{\sin k}{l\_m \cdot l\_m} \cdot \tan k\right)\right)}\\ \mathbf{elif}\;t\_2 \leq \infty:\\ \;\;\;\;\frac{l\_m \cdot l\_m}{{\left(k \cdot t\_m\right)}^{2} \cdot t\_m}\\ \mathbf{else}:\\ \;\;\;\;\frac{2}{\left(\frac{\frac{k \cdot k}{l\_m}}{l\_m} \cdot \left(k \cdot k\right)\right) \cdot t\_m}\\ \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)) (sin k)) (tan k))
                (+ (+ 1.0 (pow (/ k t_m) 2.0)) 1.0))))
         (*
          t_s
          (if (<= t_2 4e+120)
            (/ 2.0 (* (* k k) (* t_m (* (/ (sin k) (* l_m l_m)) (tan k)))))
            (if (<= t_2 INFINITY)
              (/ (* l_m l_m) (* (pow (* k t_m) 2.0) t_m))
              (/ 2.0 (* (* (/ (/ (* k k) l_m) l_m) (* k k)) 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 t_2 = (((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 <= 4e+120) {
      		tmp = 2.0 / ((k * k) * (t_m * ((sin(k) / (l_m * l_m)) * tan(k))));
      	} else if (t_2 <= ((double) INFINITY)) {
      		tmp = (l_m * l_m) / (pow((k * t_m), 2.0) * t_m);
      	} else {
      		tmp = 2.0 / (((((k * k) / l_m) / l_m) * (k * k)) * t_m);
      	}
      	return t_s * tmp;
      }
      
      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)) * Math.sin(k)) * Math.tan(k)) * ((1.0 + Math.pow((k / t_m), 2.0)) + 1.0);
      	double tmp;
      	if (t_2 <= 4e+120) {
      		tmp = 2.0 / ((k * k) * (t_m * ((Math.sin(k) / (l_m * l_m)) * Math.tan(k))));
      	} else if (t_2 <= Double.POSITIVE_INFINITY) {
      		tmp = (l_m * l_m) / (Math.pow((k * t_m), 2.0) * t_m);
      	} else {
      		tmp = 2.0 / (((((k * k) / l_m) / l_m) * (k * k)) * 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):
      	t_2 = (((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 <= 4e+120:
      		tmp = 2.0 / ((k * k) * (t_m * ((math.sin(k) / (l_m * l_m)) * math.tan(k))))
      	elif t_2 <= math.inf:
      		tmp = (l_m * l_m) / (math.pow((k * t_m), 2.0) * t_m)
      	else:
      		tmp = 2.0 / (((((k * k) / l_m) / l_m) * (k * k)) * 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)
      	t_2 = 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 <= 4e+120)
      		tmp = Float64(2.0 / Float64(Float64(k * k) * Float64(t_m * Float64(Float64(sin(k) / Float64(l_m * l_m)) * tan(k)))));
      	elseif (t_2 <= Inf)
      		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(Float64(k * k) / l_m) / l_m) * Float64(k * k)) * 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)
      	t_2 = ((((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 <= 4e+120)
      		tmp = 2.0 / ((k * k) * (t_m * ((sin(k) / (l_m * l_m)) * tan(k))));
      	elseif (t_2 <= Inf)
      		tmp = (l_m * l_m) / (((k * t_m) ^ 2.0) * t_m);
      	else
      		tmp = 2.0 / (((((k * k) / l_m) / l_m) * (k * k)) * 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_] := Block[{t$95$2 = 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]}, N[(t$95$s * If[LessEqual[t$95$2, 4e+120], N[(2.0 / N[(N[(k * k), $MachinePrecision] * N[(t$95$m * N[(N[(N[Sin[k], $MachinePrecision] / N[(l$95$m * l$95$m), $MachinePrecision]), $MachinePrecision] * N[Tan[k], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$2, Infinity], 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[(N[(k * k), $MachinePrecision] / l$95$m), $MachinePrecision] / l$95$m), $MachinePrecision] * N[(k * k), $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)
      
      \\
      \begin{array}{l}
      t_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 4 \cdot 10^{+120}:\\
      \;\;\;\;\frac{2}{\left(k \cdot k\right) \cdot \left(t\_m \cdot \left(\frac{\sin k}{l\_m \cdot l\_m} \cdot \tan k\right)\right)}\\
      
      \mathbf{elif}\;t\_2 \leq \infty:\\
      \;\;\;\;\frac{l\_m \cdot l\_m}{{\left(k \cdot t\_m\right)}^{2} \cdot t\_m}\\
      
      \mathbf{else}:\\
      \;\;\;\;\frac{2}{\left(\frac{\frac{k \cdot k}{l\_m}}{l\_m} \cdot \left(k \cdot k\right)\right) \cdot t\_m}\\
      
      
      \end{array}
      \end{array}
      \end{array}
      
      Derivation
      1. Split input into 3 regimes
      2. if (*.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))) < 3.9999999999999999e120

        1. Initial program 83.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-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)} \]
          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 + {\left(\frac{k}{t}\right)}^{2}\right) + 1\right)} \]
          3. unpow2N/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 + {\left(\frac{k}{t}\right)}^{2}\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 + {\left(\frac{k}{t}\right)}^{2}\right) + 1\right)} \]
          5. unpow2N/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 + {\left(\frac{k}{t}\right)}^{2}\right) + 1\right)} \]
          6. lower-*.f6483.9

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

            \[\leadsto \frac{2}{\left(k \cdot k\right) \cdot \left(t \cdot \left(\frac{\sin k}{{\ell}^{2}} \cdot \color{blue}{\frac{\sin \left(k + \mathsf{PI}\left(\right)\right)}{\cos \left(k + \mathsf{PI}\left(\right)\right)}}\right)\right)} \]
          8. tan-quotN/A

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

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

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

        if 3.9999999999999999e120 < (*.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))) < +inf.0

        1. Initial program 72.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.f6463.1

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

          \[\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. pow3N/A

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

            \[\leadsto \frac{\ell \cdot \ell}{\left(k \cdot k\right) \cdot \left(\left(t \cdot t\right) \cdot t\right)} \]
          4. lift-*.f6463.1

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

          \[\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 t\right)} \]
          5. lift-*.f64N/A

            \[\leadsto \frac{\ell \cdot \ell}{{k}^{2} \cdot \left(\left(t \cdot t\right) \cdot \color{blue}{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-*.f6483.2

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

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

        if +inf.0 < (*.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 0.0%

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

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

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

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

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

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

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

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

          \[\leadsto \frac{2}{\left(\mathsf{fma}\left(\mathsf{fma}\left(\frac{t \cdot t}{\ell \cdot \ell}, -0.6666666666666666, {\ell}^{-2}\right) - \left(-\frac{t \cdot t}{\ell \cdot \ell}\right), k \cdot k, \frac{\left(t \cdot t\right) \cdot 2}{\ell \cdot \ell}\right) \cdot \left(k \cdot k\right)\right) \cdot t} \]
        9. Taylor expanded in t around 0

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

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

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

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

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

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

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

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

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

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

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

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

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

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

            \[\leadsto \frac{2}{\left(\frac{\frac{k \cdot k}{\ell}}{\ell} \cdot \left(k \cdot k\right)\right) \cdot t} \]
          9. lift-*.f6453.1

            \[\leadsto \frac{2}{\left(\frac{\frac{k \cdot k}{\ell}}{\ell} \cdot \left(k \cdot k\right)\right) \cdot t} \]
        13. Applied rewrites53.1%

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

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

      Alternative 3: 67.8% 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^{+248}:\\ \;\;\;\;\frac{l\_m \cdot l\_m}{{\left(k \cdot t\_m\right)}^{2} \cdot t\_m}\\ \mathbf{else}:\\ \;\;\;\;\frac{2}{\left(\frac{\frac{k \cdot k}{l\_m}}{l\_m} \cdot \left(k \cdot k\right)\right) \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 (<=
             (/
              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+248)
          (/ (* l_m l_m) (* (pow (* k t_m) 2.0) t_m))
          (/ 2.0 (* (* (/ (/ (* k k) l_m) l_m) (* k k)) 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 ((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+248) {
      		tmp = (l_m * l_m) / (pow((k * t_m), 2.0) * t_m);
      	} else {
      		tmp = 2.0 / (((((k * k) / l_m) / l_m) * (k * k)) * 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 ((2.0d0 / (((((t_m ** 3.0d0) / (l_m * l_m)) * sin(k)) * tan(k)) * ((1.0d0 + ((k / t_m) ** 2.0d0)) + 1.0d0))) <= 2d+248) then
              tmp = (l_m * l_m) / (((k * t_m) ** 2.0d0) * t_m)
          else
              tmp = 2.0d0 / (((((k * k) / l_m) / l_m) * (k * k)) * 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 ((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+248) {
      		tmp = (l_m * l_m) / (Math.pow((k * t_m), 2.0) * t_m);
      	} else {
      		tmp = 2.0 / (((((k * k) / l_m) / l_m) * (k * k)) * 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 (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+248:
      		tmp = (l_m * l_m) / (math.pow((k * t_m), 2.0) * t_m)
      	else:
      		tmp = 2.0 / (((((k * k) / l_m) / l_m) * (k * k)) * 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 (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+248)
      		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(Float64(k * k) / l_m) / l_m) * Float64(k * k)) * 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 ((2.0 / (((((t_m ^ 3.0) / (l_m * l_m)) * sin(k)) * tan(k)) * ((1.0 + ((k / t_m) ^ 2.0)) + 1.0))) <= 2e+248)
      		tmp = (l_m * l_m) / (((k * t_m) ^ 2.0) * t_m);
      	else
      		tmp = 2.0 / (((((k * k) / l_m) / l_m) * (k * k)) * 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[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+248], 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[(N[(k * k), $MachinePrecision] / l$95$m), $MachinePrecision] / l$95$m), $MachinePrecision] * N[(k * k), $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}\;\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^{+248}:\\
      \;\;\;\;\frac{l\_m \cdot l\_m}{{\left(k \cdot t\_m\right)}^{2} \cdot t\_m}\\
      
      \mathbf{else}:\\
      \;\;\;\;\frac{2}{\left(\frac{\frac{k \cdot k}{l\_m}}{l\_m} \cdot \left(k \cdot k\right)\right) \cdot t\_m}\\
      
      
      \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)))) < 2.00000000000000009e248

        1. Initial program 78.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 \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.f6466.3

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

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

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

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

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

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

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

        if 2.00000000000000009e248 < (/.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 22.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 \frac{2}{\color{blue}{t \cdot \left(2 \cdot \frac{{t}^{2} \cdot {\sin k}^{2}}{{\ell}^{2} \cdot \cos k} + \frac{{k}^{2} \cdot {\sin k}^{2}}{{\ell}^{2} \cdot \cos k}\right)}} \]
        4. Step-by-step derivation
          1. *-commutativeN/A

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

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

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

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

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

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

          \[\leadsto \frac{2}{\left(\mathsf{fma}\left(\mathsf{fma}\left(\frac{t \cdot t}{\ell \cdot \ell}, -0.6666666666666666, {\ell}^{-2}\right) - \left(-\frac{t \cdot t}{\ell \cdot \ell}\right), k \cdot k, \frac{\left(t \cdot t\right) \cdot 2}{\ell \cdot \ell}\right) \cdot \left(k \cdot k\right)\right) \cdot t} \]
        9. Taylor expanded in t around 0

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

            \[\leadsto \frac{2}{\left(\frac{\frac{k \cdot k}{\ell}}{\ell} \cdot \left(k \cdot k\right)\right) \cdot t} \]
        13. Applied rewrites64.1%

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

        \[\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^{+248}:\\ \;\;\;\;\frac{\ell \cdot \ell}{{\left(k \cdot t\right)}^{2} \cdot t}\\ \mathbf{else}:\\ \;\;\;\;\frac{2}{\left(\frac{\frac{k \cdot k}{\ell}}{\ell} \cdot \left(k \cdot k\right)\right) \cdot t}\\ \end{array} \]
      5. Add Preprocessing

      Alternative 4: 65.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 10^{+262}:\\ \;\;\;\;\frac{l\_m \cdot l\_m}{k \cdot \left(k \cdot {t\_m}^{3}\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{2}{\left(\frac{\frac{k \cdot k}{l\_m}}{l\_m} \cdot \left(k \cdot k\right)\right) \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 (<=
             (/
              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)))
             1e+262)
          (/ (* l_m l_m) (* k (* k (pow t_m 3.0))))
          (/ 2.0 (* (* (/ (/ (* k k) l_m) l_m) (* k k)) 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 ((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))) <= 1e+262) {
      		tmp = (l_m * l_m) / (k * (k * pow(t_m, 3.0)));
      	} else {
      		tmp = 2.0 / (((((k * k) / l_m) / l_m) * (k * k)) * 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 ((2.0d0 / (((((t_m ** 3.0d0) / (l_m * l_m)) * sin(k)) * tan(k)) * ((1.0d0 + ((k / t_m) ** 2.0d0)) + 1.0d0))) <= 1d+262) then
              tmp = (l_m * l_m) / (k * (k * (t_m ** 3.0d0)))
          else
              tmp = 2.0d0 / (((((k * k) / l_m) / l_m) * (k * k)) * 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 ((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))) <= 1e+262) {
      		tmp = (l_m * l_m) / (k * (k * Math.pow(t_m, 3.0)));
      	} else {
      		tmp = 2.0 / (((((k * k) / l_m) / l_m) * (k * k)) * 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 (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))) <= 1e+262:
      		tmp = (l_m * l_m) / (k * (k * math.pow(t_m, 3.0)))
      	else:
      		tmp = 2.0 / (((((k * k) / l_m) / l_m) * (k * k)) * 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 (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))) <= 1e+262)
      		tmp = Float64(Float64(l_m * l_m) / Float64(k * Float64(k * (t_m ^ 3.0))));
      	else
      		tmp = Float64(2.0 / Float64(Float64(Float64(Float64(Float64(k * k) / l_m) / l_m) * Float64(k * k)) * 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 ((2.0 / (((((t_m ^ 3.0) / (l_m * l_m)) * sin(k)) * tan(k)) * ((1.0 + ((k / t_m) ^ 2.0)) + 1.0))) <= 1e+262)
      		tmp = (l_m * l_m) / (k * (k * (t_m ^ 3.0)));
      	else
      		tmp = 2.0 / (((((k * k) / l_m) / l_m) * (k * k)) * 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[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], 1e+262], N[(N[(l$95$m * l$95$m), $MachinePrecision] / N[(k * N[(k * N[Power[t$95$m, 3.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(2.0 / N[(N[(N[(N[(N[(k * k), $MachinePrecision] / l$95$m), $MachinePrecision] / l$95$m), $MachinePrecision] * N[(k * k), $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}\;\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 10^{+262}:\\
      \;\;\;\;\frac{l\_m \cdot l\_m}{k \cdot \left(k \cdot {t\_m}^{3}\right)}\\
      
      \mathbf{else}:\\
      \;\;\;\;\frac{2}{\left(\frac{\frac{k \cdot k}{l\_m}}{l\_m} \cdot \left(k \cdot k\right)\right) \cdot t\_m}\\
      
      
      \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)))) < 1e262

        1. Initial program 78.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 \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.f6466.3

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

          \[\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. lower-*.f64N/A

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

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

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

        if 1e262 < (/.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 22.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 \frac{2}{\color{blue}{t \cdot \left(2 \cdot \frac{{t}^{2} \cdot {\sin k}^{2}}{{\ell}^{2} \cdot \cos k} + \frac{{k}^{2} \cdot {\sin k}^{2}}{{\ell}^{2} \cdot \cos k}\right)}} \]
        4. Step-by-step derivation
          1. *-commutativeN/A

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

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

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

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

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

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

          \[\leadsto \frac{2}{\left(\mathsf{fma}\left(\mathsf{fma}\left(\frac{t \cdot t}{\ell \cdot \ell}, -0.6666666666666666, {\ell}^{-2}\right) - \left(-\frac{t \cdot t}{\ell \cdot \ell}\right), k \cdot k, \frac{\left(t \cdot t\right) \cdot 2}{\ell \cdot \ell}\right) \cdot \left(k \cdot k\right)\right) \cdot t} \]
        9. Taylor expanded in t around 0

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

            \[\leadsto \frac{2}{\left(\frac{\frac{k \cdot k}{\ell}}{\ell} \cdot \left(k \cdot k\right)\right) \cdot t} \]
        13. Applied rewrites64.1%

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

        \[\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 10^{+262}:\\ \;\;\;\;\frac{\ell \cdot \ell}{k \cdot \left(k \cdot {t}^{3}\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{2}{\left(\frac{\frac{k \cdot k}{\ell}}{\ell} \cdot \left(k \cdot k\right)\right) \cdot t}\\ \end{array} \]
      5. Add Preprocessing

      Alternative 5: 84.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}\;l\_m \leq 2.7 \cdot 10^{+176}:\\ \;\;\;\;\frac{2}{\frac{\frac{\mathsf{fma}\left({\left(\sin k \cdot t\_m\right)}^{2}, 2, {\left(\sin k \cdot k\right)}^{2}\right)}{l\_m} \cdot \frac{t\_m}{l\_m}}{\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 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 (<= l_m 2.7e+176)
          (/
           2.0
           (/
            (*
             (/ (fma (pow (* (sin k) t_m) 2.0) 2.0 (pow (* (sin k) k) 2.0)) l_m)
             (/ t_m l_m))
            (cos k)))
          (/
           2.0
           (*
            (* (* (exp (- (* (log t_m) 3.0) (* (log l_m) 2.0))) (sin k)) (tan k))
            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 (l_m <= 2.7e+176) {
      		tmp = 2.0 / (((fma(pow((sin(k) * t_m), 2.0), 2.0, pow((sin(k) * k), 2.0)) / l_m) * (t_m / l_m)) / cos(k));
      	} else {
      		tmp = 2.0 / (((exp(((log(t_m) * 3.0) - (log(l_m) * 2.0))) * sin(k)) * tan(k)) * 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 (l_m <= 2.7e+176)
      		tmp = Float64(2.0 / Float64(Float64(Float64(fma((Float64(sin(k) * t_m) ^ 2.0), 2.0, (Float64(sin(k) * k) ^ 2.0)) / l_m) * Float64(t_m / l_m)) / 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)) * 2.0));
      	end
      	return Float64(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[l$95$m, 2.7e+176], N[(2.0 / N[(N[(N[(N[(N[Power[N[(N[Sin[k], $MachinePrecision] * t$95$m), $MachinePrecision], 2.0], $MachinePrecision] * 2.0 + N[Power[N[(N[Sin[k], $MachinePrecision] * k), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision] / l$95$m), $MachinePrecision] * N[(t$95$m / l$95$m), $MachinePrecision]), $MachinePrecision] / N[Cos[k], $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] * 2.0), $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}\;l\_m \leq 2.7 \cdot 10^{+176}:\\
      \;\;\;\;\frac{2}{\frac{\frac{\mathsf{fma}\left({\left(\sin k \cdot t\_m\right)}^{2}, 2, {\left(\sin k \cdot k\right)}^{2}\right)}{l\_m} \cdot \frac{t\_m}{l\_m}}{\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 2}\\
      
      
      \end{array}
      \end{array}
      
      Derivation
      1. Split input into 2 regimes
      2. if l < 2.6999999999999998e176

        1. Initial program 58.6%

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

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

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

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

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

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

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

          if 2.6999999999999998e176 < l

          1. Initial program 48.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 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 rewrites51.8%

              \[\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-*.f64N/A

                \[\leadsto \frac{2}{\left(\left(\frac{{t}^{3}}{\color{blue}{\ell \cdot \ell}} \cdot \sin k\right) \cdot \tan k\right) \cdot 2} \]
              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 2} \]
              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 2} \]
              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 2} \]
              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 2} \]
              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 2} \]
              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 2} \]
              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 2} \]
              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 2} \]
              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 2} \]
              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 2} \]
              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 2} \]
              13. lower-log.f6443.7

                \[\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 2} \]
            3. Applied rewrites43.7%

              \[\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 2} \]
          5. Recombined 2 regimes into one program.
          6. Final simplification83.6%

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

          Alternative 6: 82.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 2.8 \cdot 10^{+23}:\\ \;\;\;\;\frac{2}{{\left(\frac{k}{l\_m}\right)}^{2} \cdot \frac{{\sin k}^{2} \cdot t\_m}{\cos k}}\\ \mathbf{elif}\;t\_m \leq 1.2 \cdot 10^{+160}:\\ \;\;\;\;\frac{2}{\frac{\mathsf{fma}\left(2, {\left(\sin k \cdot t\_m\right)}^{2}, {\left(\sin k \cdot k\right)}^{2}\right)}{\cos k \cdot \left(l\_m \cdot l\_m\right)} \cdot t\_m}\\ \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 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 (<= t_m 2.8e+23)
              (/ 2.0 (* (pow (/ k l_m) 2.0) (/ (* (pow (sin k) 2.0) t_m) (cos k))))
              (if (<= t_m 1.2e+160)
                (/
                 2.0
                 (*
                  (/
                   (fma 2.0 (pow (* (sin k) t_m) 2.0) (pow (* (sin k) k) 2.0))
                   (* (cos k) (* l_m l_m)))
                  t_m))
                (/
                 2.0
                 (*
                  (* (* (exp (- (* (log t_m) 3.0) (* (log l_m) 2.0))) (sin k)) (tan k))
                  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 (t_m <= 2.8e+23) {
          		tmp = 2.0 / (pow((k / l_m), 2.0) * ((pow(sin(k), 2.0) * t_m) / cos(k)));
          	} else if (t_m <= 1.2e+160) {
          		tmp = 2.0 / ((fma(2.0, pow((sin(k) * t_m), 2.0), pow((sin(k) * k), 2.0)) / (cos(k) * (l_m * l_m))) * t_m);
          	} else {
          		tmp = 2.0 / (((exp(((log(t_m) * 3.0) - (log(l_m) * 2.0))) * sin(k)) * tan(k)) * 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 (t_m <= 2.8e+23)
          		tmp = Float64(2.0 / Float64((Float64(k / l_m) ^ 2.0) * Float64(Float64((sin(k) ^ 2.0) * t_m) / cos(k))));
          	elseif (t_m <= 1.2e+160)
          		tmp = Float64(2.0 / Float64(Float64(fma(2.0, (Float64(sin(k) * t_m) ^ 2.0), (Float64(sin(k) * k) ^ 2.0)) / Float64(cos(k) * Float64(l_m * l_m))) * t_m));
          	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)) * 2.0));
          	end
          	return Float64(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, 2.8e+23], N[(2.0 / N[(N[Power[N[(k / l$95$m), $MachinePrecision], 2.0], $MachinePrecision] * N[(N[(N[Power[N[Sin[k], $MachinePrecision], 2.0], $MachinePrecision] * t$95$m), $MachinePrecision] / N[Cos[k], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$m, 1.2e+160], N[(2.0 / N[(N[(N[(2.0 * N[Power[N[(N[Sin[k], $MachinePrecision] * t$95$m), $MachinePrecision], 2.0], $MachinePrecision] + N[Power[N[(N[Sin[k], $MachinePrecision] * k), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision] / N[(N[Cos[k], $MachinePrecision] * N[(l$95$m * l$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * t$95$m), $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] * 2.0), $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 2.8 \cdot 10^{+23}:\\
          \;\;\;\;\frac{2}{{\left(\frac{k}{l\_m}\right)}^{2} \cdot \frac{{\sin k}^{2} \cdot t\_m}{\cos k}}\\
          
          \mathbf{elif}\;t\_m \leq 1.2 \cdot 10^{+160}:\\
          \;\;\;\;\frac{2}{\frac{\mathsf{fma}\left(2, {\left(\sin k \cdot t\_m\right)}^{2}, {\left(\sin k \cdot k\right)}^{2}\right)}{\cos k \cdot \left(l\_m \cdot l\_m\right)} \cdot t\_m}\\
          
          \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 2}\\
          
          
          \end{array}
          \end{array}
          
          Derivation
          1. Split input into 3 regimes
          2. if t < 2.8e23

            1. Initial program 56.6%

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

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

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

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

              \[\leadsto \frac{2}{\color{blue}{\frac{\mathsf{fma}\left(2, {\left(\sin k \cdot t\right)}^{2}, {\left(\sin k \cdot k\right)}^{2}\right)}{\cos k \cdot \left(\ell \cdot \ell\right)} \cdot t}} \]
            6. Applied rewrites76.3%

              \[\leadsto \frac{2}{\frac{\frac{\mathsf{fma}\left({\left(\sin k \cdot t\right)}^{2}, 2, {\left(\sin k \cdot k\right)}^{2}\right) \cdot t}{\ell \cdot \ell}}{\color{blue}{\cos k}}} \]
            7. Step-by-step derivation
              1. Applied rewrites86.8%

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

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

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

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

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

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

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

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

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

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

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

                  \[\leadsto \frac{2}{\frac{k \cdot k}{\ell \cdot \ell} \cdot \frac{t \cdot \color{blue}{{\sin k}^{2}}}{\cos k}} \]
                11. 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}} \]
                12. pow2N/A

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

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

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

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

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

              if 2.8e23 < t < 1.2000000000000001e160

              1. Initial program 60.6%

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

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

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

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

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

              if 1.2000000000000001e160 < t

              1. Initial program 58.3%

                \[\frac{2}{\left(\left(\frac{{t}^{3}}{\ell \cdot \ell} \cdot \sin k\right) \cdot \tan k\right) \cdot \left(\left(1 + {\left(\frac{k}{t}\right)}^{2}\right) + 1\right)} \]
              2. Add Preprocessing
              3. Taylor expanded in 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 rewrites58.3%

                  \[\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-*.f64N/A

                    \[\leadsto \frac{2}{\left(\left(\frac{{t}^{3}}{\color{blue}{\ell \cdot \ell}} \cdot \sin k\right) \cdot \tan k\right) \cdot 2} \]
                  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 2} \]
                  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 2} \]
                  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 2} \]
                  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 2} \]
                  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 2} \]
                  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 2} \]
                  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 2} \]
                  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 2} \]
                  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 2} \]
                  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 2} \]
                  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 2} \]
                  13. lower-log.f6450.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 2} \]
                3. Applied rewrites50.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 2} \]
              5. Recombined 3 regimes into one program.
              6. Final simplification75.1%

                \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq 2.8 \cdot 10^{+23}:\\ \;\;\;\;\frac{2}{{\left(\frac{k}{\ell}\right)}^{2} \cdot \frac{{\sin k}^{2} \cdot t}{\cos k}}\\ \mathbf{elif}\;t \leq 1.2 \cdot 10^{+160}:\\ \;\;\;\;\frac{2}{\frac{\mathsf{fma}\left(2, {\left(\sin k \cdot t\right)}^{2}, {\left(\sin k \cdot k\right)}^{2}\right)}{\cos k \cdot \left(\ell \cdot \ell\right)} \cdot t}\\ \mathbf{else}:\\ \;\;\;\;\frac{2}{\left(\left(e^{\log t \cdot 3 - \log \ell \cdot 2} \cdot \sin k\right) \cdot \tan k\right) \cdot 2}\\ \end{array} \]
              7. Add Preprocessing

              Alternative 7: 62.1% 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 10^{+262}:\\ \;\;\;\;\frac{2}{\left(\left(\frac{t\_m \cdot t\_m}{l\_m} \cdot \frac{2}{l\_m}\right) \cdot \left(k \cdot k\right)\right) \cdot t\_m}\\ \mathbf{else}:\\ \;\;\;\;\frac{2}{\left(\frac{\frac{k \cdot k}{l\_m}}{l\_m} \cdot \left(k \cdot k\right)\right) \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 (<=
                     (/
                      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)))
                     1e+262)
                  (/ 2.0 (* (* (* (/ (* t_m t_m) l_m) (/ 2.0 l_m)) (* k k)) t_m))
                  (/ 2.0 (* (* (/ (/ (* k k) l_m) l_m) (* k k)) 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 ((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))) <= 1e+262) {
              		tmp = 2.0 / (((((t_m * t_m) / l_m) * (2.0 / l_m)) * (k * k)) * t_m);
              	} else {
              		tmp = 2.0 / (((((k * k) / l_m) / l_m) * (k * k)) * 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 ((2.0d0 / (((((t_m ** 3.0d0) / (l_m * l_m)) * sin(k)) * tan(k)) * ((1.0d0 + ((k / t_m) ** 2.0d0)) + 1.0d0))) <= 1d+262) then
                      tmp = 2.0d0 / (((((t_m * t_m) / l_m) * (2.0d0 / l_m)) * (k * k)) * t_m)
                  else
                      tmp = 2.0d0 / (((((k * k) / l_m) / l_m) * (k * k)) * 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 ((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))) <= 1e+262) {
              		tmp = 2.0 / (((((t_m * t_m) / l_m) * (2.0 / l_m)) * (k * k)) * t_m);
              	} else {
              		tmp = 2.0 / (((((k * k) / l_m) / l_m) * (k * k)) * 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 (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))) <= 1e+262:
              		tmp = 2.0 / (((((t_m * t_m) / l_m) * (2.0 / l_m)) * (k * k)) * t_m)
              	else:
              		tmp = 2.0 / (((((k * k) / l_m) / l_m) * (k * k)) * 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 (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))) <= 1e+262)
              		tmp = Float64(2.0 / Float64(Float64(Float64(Float64(Float64(t_m * t_m) / l_m) * Float64(2.0 / l_m)) * Float64(k * k)) * t_m));
              	else
              		tmp = Float64(2.0 / Float64(Float64(Float64(Float64(Float64(k * k) / l_m) / l_m) * Float64(k * k)) * 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 ((2.0 / (((((t_m ^ 3.0) / (l_m * l_m)) * sin(k)) * tan(k)) * ((1.0 + ((k / t_m) ^ 2.0)) + 1.0))) <= 1e+262)
              		tmp = 2.0 / (((((t_m * t_m) / l_m) * (2.0 / l_m)) * (k * k)) * t_m);
              	else
              		tmp = 2.0 / (((((k * k) / l_m) / l_m) * (k * k)) * 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[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], 1e+262], N[(2.0 / N[(N[(N[(N[(N[(t$95$m * t$95$m), $MachinePrecision] / l$95$m), $MachinePrecision] * N[(2.0 / l$95$m), $MachinePrecision]), $MachinePrecision] * N[(k * k), $MachinePrecision]), $MachinePrecision] * t$95$m), $MachinePrecision]), $MachinePrecision], N[(2.0 / N[(N[(N[(N[(N[(k * k), $MachinePrecision] / l$95$m), $MachinePrecision] / l$95$m), $MachinePrecision] * N[(k * k), $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}\;\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 10^{+262}:\\
              \;\;\;\;\frac{2}{\left(\left(\frac{t\_m \cdot t\_m}{l\_m} \cdot \frac{2}{l\_m}\right) \cdot \left(k \cdot k\right)\right) \cdot t\_m}\\
              
              \mathbf{else}:\\
              \;\;\;\;\frac{2}{\left(\frac{\frac{k \cdot k}{l\_m}}{l\_m} \cdot \left(k \cdot k\right)\right) \cdot t\_m}\\
              
              
              \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)))) < 1e262

                1. Initial program 78.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 t around 0

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

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

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

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

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

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

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

                  \[\leadsto \frac{2}{\left(\mathsf{fma}\left(\mathsf{fma}\left(\frac{t \cdot t}{\ell \cdot \ell}, -0.6666666666666666, {\ell}^{-2}\right) - \left(-\frac{t \cdot t}{\ell \cdot \ell}\right), k \cdot k, \frac{\left(t \cdot t\right) \cdot 2}{\ell \cdot \ell}\right) \cdot \left(k \cdot k\right)\right) \cdot t} \]
                9. Taylor expanded in k around 0

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

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

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

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

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

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

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

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

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

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

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

                if 1e262 < (/.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 22.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 \frac{2}{\color{blue}{t \cdot \left(2 \cdot \frac{{t}^{2} \cdot {\sin k}^{2}}{{\ell}^{2} \cdot \cos k} + \frac{{k}^{2} \cdot {\sin k}^{2}}{{\ell}^{2} \cdot \cos k}\right)}} \]
                4. Step-by-step derivation
                  1. *-commutativeN/A

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

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

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

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

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

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

                  \[\leadsto \frac{2}{\left(\mathsf{fma}\left(\mathsf{fma}\left(\frac{t \cdot t}{\ell \cdot \ell}, -0.6666666666666666, {\ell}^{-2}\right) - \left(-\frac{t \cdot t}{\ell \cdot \ell}\right), k \cdot k, \frac{\left(t \cdot t\right) \cdot 2}{\ell \cdot \ell}\right) \cdot \left(k \cdot k\right)\right) \cdot t} \]
                9. Taylor expanded in t around 0

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                    \[\leadsto \frac{2}{\left(\frac{\frac{k \cdot k}{\ell}}{\ell} \cdot \left(k \cdot k\right)\right) \cdot t} \]
                13. Applied rewrites64.1%

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

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

              Alternative 8: 61.1% 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^{+248}:\\ \;\;\;\;\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(\frac{\frac{k \cdot k}{l\_m}}{l\_m} \cdot \left(k \cdot k\right)\right) \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 (<=
                     (/
                      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+248)
                  (/ (* l_m l_m) (* (* k k) (* (* t_m t_m) t_m)))
                  (/ 2.0 (* (* (/ (/ (* k k) l_m) l_m) (* k k)) 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 ((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+248) {
              		tmp = (l_m * l_m) / ((k * k) * ((t_m * t_m) * t_m));
              	} else {
              		tmp = 2.0 / (((((k * k) / l_m) / l_m) * (k * k)) * 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 ((2.0d0 / (((((t_m ** 3.0d0) / (l_m * l_m)) * sin(k)) * tan(k)) * ((1.0d0 + ((k / t_m) ** 2.0d0)) + 1.0d0))) <= 2d+248) then
                      tmp = (l_m * l_m) / ((k * k) * ((t_m * t_m) * t_m))
                  else
                      tmp = 2.0d0 / (((((k * k) / l_m) / l_m) * (k * k)) * 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 ((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+248) {
              		tmp = (l_m * l_m) / ((k * k) * ((t_m * t_m) * t_m));
              	} else {
              		tmp = 2.0 / (((((k * k) / l_m) / l_m) * (k * k)) * 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 (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+248:
              		tmp = (l_m * l_m) / ((k * k) * ((t_m * t_m) * t_m))
              	else:
              		tmp = 2.0 / (((((k * k) / l_m) / l_m) * (k * k)) * 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 (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+248)
              		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(Float64(Float64(k * k) / l_m) / l_m) * Float64(k * k)) * 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 ((2.0 / (((((t_m ^ 3.0) / (l_m * l_m)) * sin(k)) * tan(k)) * ((1.0 + ((k / t_m) ^ 2.0)) + 1.0))) <= 2e+248)
              		tmp = (l_m * l_m) / ((k * k) * ((t_m * t_m) * t_m));
              	else
              		tmp = 2.0 / (((((k * k) / l_m) / l_m) * (k * k)) * 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[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+248], 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[(N[(N[(k * k), $MachinePrecision] / l$95$m), $MachinePrecision] / l$95$m), $MachinePrecision] * N[(k * k), $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}\;\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^{+248}:\\
              \;\;\;\;\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(\frac{\frac{k \cdot k}{l\_m}}{l\_m} \cdot \left(k \cdot k\right)\right) \cdot t\_m}\\
              
              
              \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)))) < 2.00000000000000009e248

                1. Initial program 78.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 \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.f6466.3

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

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

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

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

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

                if 2.00000000000000009e248 < (/.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 22.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 \frac{2}{\color{blue}{t \cdot \left(2 \cdot \frac{{t}^{2} \cdot {\sin k}^{2}}{{\ell}^{2} \cdot \cos k} + \frac{{k}^{2} \cdot {\sin k}^{2}}{{\ell}^{2} \cdot \cos k}\right)}} \]
                4. Step-by-step derivation
                  1. *-commutativeN/A

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

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

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

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

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

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

                  \[\leadsto \frac{2}{\left(\mathsf{fma}\left(\mathsf{fma}\left(\frac{t \cdot t}{\ell \cdot \ell}, -0.6666666666666666, {\ell}^{-2}\right) - \left(-\frac{t \cdot t}{\ell \cdot \ell}\right), k \cdot k, \frac{\left(t \cdot t\right) \cdot 2}{\ell \cdot \ell}\right) \cdot \left(k \cdot k\right)\right) \cdot t} \]
                9. Taylor expanded in t around 0

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                    \[\leadsto \frac{2}{\left(\frac{\frac{k \cdot k}{\ell}}{\ell} \cdot \left(k \cdot k\right)\right) \cdot t} \]
                13. Applied rewrites64.1%

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

                \[\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^{+248}:\\ \;\;\;\;\frac{\ell \cdot \ell}{\left(k \cdot k\right) \cdot \left(\left(t \cdot t\right) \cdot t\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{2}{\left(\frac{\frac{k \cdot k}{\ell}}{\ell} \cdot \left(k \cdot k\right)\right) \cdot t}\\ \end{array} \]
              5. Add Preprocessing

              Alternative 9: 57.8% 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^{+248}:\\ \;\;\;\;\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(\frac{k \cdot k}{l\_m \cdot l\_m} \cdot \left(k \cdot k\right)\right) \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 (<=
                     (/
                      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+248)
                  (/ (* l_m l_m) (* (* k k) (* (* t_m t_m) t_m)))
                  (/ 2.0 (* (* (/ (* k k) (* l_m l_m)) (* k k)) 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 ((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+248) {
              		tmp = (l_m * l_m) / ((k * k) * ((t_m * t_m) * t_m));
              	} else {
              		tmp = 2.0 / ((((k * k) / (l_m * l_m)) * (k * k)) * 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 ((2.0d0 / (((((t_m ** 3.0d0) / (l_m * l_m)) * sin(k)) * tan(k)) * ((1.0d0 + ((k / t_m) ** 2.0d0)) + 1.0d0))) <= 2d+248) then
                      tmp = (l_m * l_m) / ((k * k) * ((t_m * t_m) * t_m))
                  else
                      tmp = 2.0d0 / ((((k * k) / (l_m * l_m)) * (k * k)) * 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 ((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+248) {
              		tmp = (l_m * l_m) / ((k * k) * ((t_m * t_m) * t_m));
              	} else {
              		tmp = 2.0 / ((((k * k) / (l_m * l_m)) * (k * k)) * 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 (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+248:
              		tmp = (l_m * l_m) / ((k * k) * ((t_m * t_m) * t_m))
              	else:
              		tmp = 2.0 / ((((k * k) / (l_m * l_m)) * (k * k)) * 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 (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+248)
              		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(Float64(k * k) / Float64(l_m * l_m)) * Float64(k * k)) * 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 ((2.0 / (((((t_m ^ 3.0) / (l_m * l_m)) * sin(k)) * tan(k)) * ((1.0 + ((k / t_m) ^ 2.0)) + 1.0))) <= 2e+248)
              		tmp = (l_m * l_m) / ((k * k) * ((t_m * t_m) * t_m));
              	else
              		tmp = 2.0 / ((((k * k) / (l_m * l_m)) * (k * k)) * 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[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+248], 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[(N[(k * k), $MachinePrecision] / N[(l$95$m * l$95$m), $MachinePrecision]), $MachinePrecision] * N[(k * k), $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}\;\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^{+248}:\\
              \;\;\;\;\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(\frac{k \cdot k}{l\_m \cdot l\_m} \cdot \left(k \cdot k\right)\right) \cdot t\_m}\\
              
              
              \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)))) < 2.00000000000000009e248

                1. Initial program 78.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 \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.f6466.3

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

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

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

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

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

                if 2.00000000000000009e248 < (/.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 22.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 \frac{2}{\color{blue}{t \cdot \left(2 \cdot \frac{{t}^{2} \cdot {\sin k}^{2}}{{\ell}^{2} \cdot \cos k} + \frac{{k}^{2} \cdot {\sin k}^{2}}{{\ell}^{2} \cdot \cos k}\right)}} \]
                4. Step-by-step derivation
                  1. *-commutativeN/A

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

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

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

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

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

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

                  \[\leadsto \frac{2}{\left(\mathsf{fma}\left(\mathsf{fma}\left(\frac{t \cdot t}{\ell \cdot \ell}, -0.6666666666666666, {\ell}^{-2}\right) - \left(-\frac{t \cdot t}{\ell \cdot \ell}\right), k \cdot k, \frac{\left(t \cdot t\right) \cdot 2}{\ell \cdot \ell}\right) \cdot \left(k \cdot k\right)\right) \cdot t} \]
                9. Taylor expanded in t around 0

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

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

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

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

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

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

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

                \[\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^{+248}:\\ \;\;\;\;\frac{\ell \cdot \ell}{\left(k \cdot k\right) \cdot \left(\left(t \cdot t\right) \cdot t\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{2}{\left(\frac{k \cdot k}{\ell \cdot \ell} \cdot \left(k \cdot k\right)\right) \cdot t}\\ \end{array} \]
              5. Add Preprocessing

              Alternative 10: 57.3% 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 10^{+262}:\\ \;\;\;\;\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}{\frac{\left(k \cdot k\right) \cdot \left(k \cdot k\right)}{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 (<=
                     (/
                      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)))
                     1e+262)
                  (/ (* l_m l_m) (* (* k k) (* (* t_m t_m) t_m)))
                  (/ 2.0 (* (/ (* (* k k) (* k k)) (* 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 ((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))) <= 1e+262) {
              		tmp = (l_m * l_m) / ((k * k) * ((t_m * t_m) * t_m));
              	} else {
              		tmp = 2.0 / ((((k * k) * (k * k)) / (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 ((2.0d0 / (((((t_m ** 3.0d0) / (l_m * l_m)) * sin(k)) * tan(k)) * ((1.0d0 + ((k / t_m) ** 2.0d0)) + 1.0d0))) <= 1d+262) then
                      tmp = (l_m * l_m) / ((k * k) * ((t_m * t_m) * t_m))
                  else
                      tmp = 2.0d0 / ((((k * k) * (k * k)) / (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 ((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))) <= 1e+262) {
              		tmp = (l_m * l_m) / ((k * k) * ((t_m * t_m) * t_m));
              	} else {
              		tmp = 2.0 / ((((k * k) * (k * k)) / (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 (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))) <= 1e+262:
              		tmp = (l_m * l_m) / ((k * k) * ((t_m * t_m) * t_m))
              	else:
              		tmp = 2.0 / ((((k * k) * (k * k)) / (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 (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))) <= 1e+262)
              		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(Float64(k * k) * Float64(k * k)) / 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 ((2.0 / (((((t_m ^ 3.0) / (l_m * l_m)) * sin(k)) * tan(k)) * ((1.0 + ((k / t_m) ^ 2.0)) + 1.0))) <= 1e+262)
              		tmp = (l_m * l_m) / ((k * k) * ((t_m * t_m) * t_m));
              	else
              		tmp = 2.0 / ((((k * k) * (k * k)) / (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[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], 1e+262], 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[(N[(k * k), $MachinePrecision] * N[(k * k), $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}\;\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 10^{+262}:\\
              \;\;\;\;\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}{\frac{\left(k \cdot k\right) \cdot \left(k \cdot k\right)}{l\_m \cdot l\_m} \cdot t\_m}\\
              
              
              \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)))) < 1e262

                1. Initial program 78.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 \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.f6466.3

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

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

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

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

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

                if 1e262 < (/.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 22.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 \frac{2}{\color{blue}{t \cdot \left(2 \cdot \frac{{t}^{2} \cdot {\sin k}^{2}}{{\ell}^{2} \cdot \cos k} + \frac{{k}^{2} \cdot {\sin k}^{2}}{{\ell}^{2} \cdot \cos k}\right)}} \]
                4. Step-by-step derivation
                  1. *-commutativeN/A

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

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

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

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

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

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

                  \[\leadsto \frac{2}{\left(\mathsf{fma}\left(\mathsf{fma}\left(\frac{t \cdot t}{\ell \cdot \ell}, -0.6666666666666666, {\ell}^{-2}\right) - \left(-\frac{t \cdot t}{\ell \cdot \ell}\right), k \cdot k, \frac{\left(t \cdot t\right) \cdot 2}{\ell \cdot \ell}\right) \cdot \left(k \cdot k\right)\right) \cdot t} \]
                9. Taylor expanded in t around 0

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

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

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

                    \[\leadsto \frac{2}{\frac{{k}^{4}}{\ell \cdot \ell} \cdot t} \]
                  4. lift-*.f6451.5

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

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

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

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

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

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

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

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

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

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

                    \[\leadsto \frac{2}{\frac{\left(k \cdot k\right) \cdot \left(k \cdot k\right)}{\ell \cdot \ell} \cdot t} \]
                13. Applied rewrites51.5%

                  \[\leadsto \frac{2}{\frac{\left(k \cdot k\right) \cdot \left(k \cdot k\right)}{\ell \cdot \ell} \cdot t} \]
              3. Recombined 2 regimes into one program.
              4. Final simplification60.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 10^{+262}:\\ \;\;\;\;\frac{\ell \cdot \ell}{\left(k \cdot k\right) \cdot \left(\left(t \cdot t\right) \cdot t\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{2}{\frac{\left(k \cdot k\right) \cdot \left(k \cdot k\right)}{\ell \cdot \ell} \cdot t}\\ \end{array} \]
              5. Add Preprocessing

              Alternative 11: 83.1% 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}\;t\_m \leq 2.9 \cdot 10^{+23}:\\ \;\;\;\;\frac{2}{{\left(\frac{k}{l\_m}\right)}^{2} \cdot \frac{{\sin k}^{2} \cdot t\_m}{\cos k}}\\ \mathbf{else}:\\ \;\;\;\;\frac{2}{\frac{\frac{{\left(k \cdot t\_m\right)}^{2} \cdot 2}{l\_m} \cdot \frac{t\_m}{l\_m}}{\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 (<= t_m 2.9e+23)
                  (/ 2.0 (* (pow (/ k l_m) 2.0) (/ (* (pow (sin k) 2.0) t_m) (cos k))))
                  (/ 2.0 (/ (* (/ (* (pow (* k t_m) 2.0) 2.0) l_m) (/ t_m l_m)) (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 (t_m <= 2.9e+23) {
              		tmp = 2.0 / (pow((k / l_m), 2.0) * ((pow(sin(k), 2.0) * t_m) / cos(k)));
              	} else {
              		tmp = 2.0 / ((((pow((k * t_m), 2.0) * 2.0) / l_m) * (t_m / l_m)) / 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 (t_m <= 2.9d+23) then
                      tmp = 2.0d0 / (((k / l_m) ** 2.0d0) * (((sin(k) ** 2.0d0) * t_m) / cos(k)))
                  else
                      tmp = 2.0d0 / ((((((k * t_m) ** 2.0d0) * 2.0d0) / l_m) * (t_m / l_m)) / 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 (t_m <= 2.9e+23) {
              		tmp = 2.0 / (Math.pow((k / l_m), 2.0) * ((Math.pow(Math.sin(k), 2.0) * t_m) / Math.cos(k)));
              	} else {
              		tmp = 2.0 / ((((Math.pow((k * t_m), 2.0) * 2.0) / l_m) * (t_m / l_m)) / 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 t_m <= 2.9e+23:
              		tmp = 2.0 / (math.pow((k / l_m), 2.0) * ((math.pow(math.sin(k), 2.0) * t_m) / math.cos(k)))
              	else:
              		tmp = 2.0 / ((((math.pow((k * t_m), 2.0) * 2.0) / l_m) * (t_m / l_m)) / 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 (t_m <= 2.9e+23)
              		tmp = Float64(2.0 / Float64((Float64(k / l_m) ^ 2.0) * Float64(Float64((sin(k) ^ 2.0) * t_m) / cos(k))));
              	else
              		tmp = Float64(2.0 / Float64(Float64(Float64(Float64((Float64(k * t_m) ^ 2.0) * 2.0) / l_m) * Float64(t_m / l_m)) / 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 (t_m <= 2.9e+23)
              		tmp = 2.0 / (((k / l_m) ^ 2.0) * (((sin(k) ^ 2.0) * t_m) / cos(k)));
              	else
              		tmp = 2.0 / ((((((k * t_m) ^ 2.0) * 2.0) / l_m) * (t_m / l_m)) / 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[t$95$m, 2.9e+23], N[(2.0 / N[(N[Power[N[(k / l$95$m), $MachinePrecision], 2.0], $MachinePrecision] * N[(N[(N[Power[N[Sin[k], $MachinePrecision], 2.0], $MachinePrecision] * t$95$m), $MachinePrecision] / N[Cos[k], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(2.0 / N[(N[(N[(N[(N[Power[N[(k * t$95$m), $MachinePrecision], 2.0], $MachinePrecision] * 2.0), $MachinePrecision] / l$95$m), $MachinePrecision] * N[(t$95$m / l$95$m), $MachinePrecision]), $MachinePrecision] / N[Cos[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}\;t\_m \leq 2.9 \cdot 10^{+23}:\\
              \;\;\;\;\frac{2}{{\left(\frac{k}{l\_m}\right)}^{2} \cdot \frac{{\sin k}^{2} \cdot t\_m}{\cos k}}\\
              
              \mathbf{else}:\\
              \;\;\;\;\frac{2}{\frac{\frac{{\left(k \cdot t\_m\right)}^{2} \cdot 2}{l\_m} \cdot \frac{t\_m}{l\_m}}{\cos k}}\\
              
              
              \end{array}
              \end{array}
              
              Derivation
              1. Split input into 2 regimes
              2. if t < 2.90000000000000013e23

                1. Initial program 56.6%

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

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

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

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

                  \[\leadsto \frac{2}{\color{blue}{\frac{\mathsf{fma}\left(2, {\left(\sin k \cdot t\right)}^{2}, {\left(\sin k \cdot k\right)}^{2}\right)}{\cos k \cdot \left(\ell \cdot \ell\right)} \cdot t}} \]
                6. Applied rewrites76.3%

                  \[\leadsto \frac{2}{\frac{\frac{\mathsf{fma}\left({\left(\sin k \cdot t\right)}^{2}, 2, {\left(\sin k \cdot k\right)}^{2}\right) \cdot t}{\ell \cdot \ell}}{\color{blue}{\cos k}}} \]
                7. Step-by-step derivation
                  1. Applied rewrites86.8%

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

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

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

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

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

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

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

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

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

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

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

                      \[\leadsto \frac{2}{\frac{k \cdot k}{\ell \cdot \ell} \cdot \frac{t \cdot \color{blue}{{\sin k}^{2}}}{\cos k}} \]
                    11. 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}} \]
                    12. pow2N/A

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

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

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

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

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

                  if 2.90000000000000013e23 < t

                  1. Initial program 59.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 t around 0

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

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

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

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

                    \[\leadsto \frac{2}{\frac{\frac{\mathsf{fma}\left({\left(\sin k \cdot t\right)}^{2}, 2, {\left(\sin k \cdot k\right)}^{2}\right) \cdot t}{\ell \cdot \ell}}{\color{blue}{\cos k}}} \]
                  7. Step-by-step derivation
                    1. Applied rewrites91.8%

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

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

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

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

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

                        \[\leadsto \frac{2}{\frac{\frac{{\left(k \cdot t\right)}^{2} \cdot 2}{\ell} \cdot \frac{t}{\ell}}{\cos k}} \]
                      5. lower-*.f6481.9

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

                      \[\leadsto \frac{2}{\frac{\frac{{\left(k \cdot t\right)}^{2} \cdot 2}{\ell} \cdot \frac{t}{\ell}}{\cos k}} \]
                  8. Recombined 2 regimes into one program.
                  9. Final simplification77.7%

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

                  Alternative 12: 73.2% 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 3.2 \cdot 10^{-16} \lor \neg \left(k \leq 1.2 \cdot 10^{+189}\right):\\ \;\;\;\;\frac{2}{\frac{\frac{{\left(k \cdot t\_m\right)}^{2} \cdot 2}{l\_m} \cdot \frac{t\_m}{l\_m}}{\cos k}}\\ \mathbf{else}:\\ \;\;\;\;\frac{2}{\frac{\frac{{\left(\sin k \cdot k\right)}^{2} \cdot t\_m}{l\_m \cdot l\_m}}{\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 (or (<= k 3.2e-16) (not (<= k 1.2e+189)))
                      (/ 2.0 (/ (* (/ (* (pow (* k t_m) 2.0) 2.0) l_m) (/ t_m l_m)) (cos k)))
                      (/ 2.0 (/ (/ (* (pow (* (sin k) k) 2.0) t_m) (* l_m l_m)) (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 <= 3.2e-16) || !(k <= 1.2e+189)) {
                  		tmp = 2.0 / ((((pow((k * t_m), 2.0) * 2.0) / l_m) * (t_m / l_m)) / cos(k));
                  	} else {
                  		tmp = 2.0 / (((pow((sin(k) * k), 2.0) * t_m) / (l_m * l_m)) / 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 <= 3.2d-16) .or. (.not. (k <= 1.2d+189))) then
                          tmp = 2.0d0 / ((((((k * t_m) ** 2.0d0) * 2.0d0) / l_m) * (t_m / l_m)) / cos(k))
                      else
                          tmp = 2.0d0 / (((((sin(k) * k) ** 2.0d0) * t_m) / (l_m * l_m)) / 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 <= 3.2e-16) || !(k <= 1.2e+189)) {
                  		tmp = 2.0 / ((((Math.pow((k * t_m), 2.0) * 2.0) / l_m) * (t_m / l_m)) / Math.cos(k));
                  	} else {
                  		tmp = 2.0 / (((Math.pow((Math.sin(k) * k), 2.0) * t_m) / (l_m * l_m)) / 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 <= 3.2e-16) or not (k <= 1.2e+189):
                  		tmp = 2.0 / ((((math.pow((k * t_m), 2.0) * 2.0) / l_m) * (t_m / l_m)) / math.cos(k))
                  	else:
                  		tmp = 2.0 / (((math.pow((math.sin(k) * k), 2.0) * t_m) / (l_m * l_m)) / 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 <= 3.2e-16) || !(k <= 1.2e+189))
                  		tmp = Float64(2.0 / Float64(Float64(Float64(Float64((Float64(k * t_m) ^ 2.0) * 2.0) / l_m) * Float64(t_m / l_m)) / cos(k)));
                  	else
                  		tmp = Float64(2.0 / Float64(Float64(Float64((Float64(sin(k) * k) ^ 2.0) * t_m) / Float64(l_m * l_m)) / 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 <= 3.2e-16) || ~((k <= 1.2e+189)))
                  		tmp = 2.0 / ((((((k * t_m) ^ 2.0) * 2.0) / l_m) * (t_m / l_m)) / cos(k));
                  	else
                  		tmp = 2.0 / (((((sin(k) * k) ^ 2.0) * t_m) / (l_m * l_m)) / 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[Or[LessEqual[k, 3.2e-16], N[Not[LessEqual[k, 1.2e+189]], $MachinePrecision]], N[(2.0 / N[(N[(N[(N[(N[Power[N[(k * t$95$m), $MachinePrecision], 2.0], $MachinePrecision] * 2.0), $MachinePrecision] / l$95$m), $MachinePrecision] * N[(t$95$m / l$95$m), $MachinePrecision]), $MachinePrecision] / N[Cos[k], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(2.0 / N[(N[(N[(N[Power[N[(N[Sin[k], $MachinePrecision] * k), $MachinePrecision], 2.0], $MachinePrecision] * t$95$m), $MachinePrecision] / N[(l$95$m * l$95$m), $MachinePrecision]), $MachinePrecision] / N[Cos[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}\;k \leq 3.2 \cdot 10^{-16} \lor \neg \left(k \leq 1.2 \cdot 10^{+189}\right):\\
                  \;\;\;\;\frac{2}{\frac{\frac{{\left(k \cdot t\_m\right)}^{2} \cdot 2}{l\_m} \cdot \frac{t\_m}{l\_m}}{\cos k}}\\
                  
                  \mathbf{else}:\\
                  \;\;\;\;\frac{2}{\frac{\frac{{\left(\sin k \cdot k\right)}^{2} \cdot t\_m}{l\_m \cdot l\_m}}{\cos k}}\\
                  
                  
                  \end{array}
                  \end{array}
                  
                  Derivation
                  1. Split input into 2 regimes
                  2. if k < 3.20000000000000023e-16 or 1.2e189 < k

                    1. Initial program 59.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 t around 0

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

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

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

                      \[\leadsto \frac{2}{\color{blue}{\frac{\mathsf{fma}\left(2, {\left(\sin k \cdot t\right)}^{2}, {\left(\sin k \cdot k\right)}^{2}\right)}{\cos k \cdot \left(\ell \cdot \ell\right)} \cdot t}} \]
                    6. Applied rewrites77.1%

                      \[\leadsto \frac{2}{\frac{\frac{\mathsf{fma}\left({\left(\sin k \cdot t\right)}^{2}, 2, {\left(\sin k \cdot k\right)}^{2}\right) \cdot t}{\ell \cdot \ell}}{\color{blue}{\cos k}}} \]
                    7. Step-by-step derivation
                      1. Applied rewrites88.8%

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

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

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

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

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

                          \[\leadsto \frac{2}{\frac{\frac{{\left(k \cdot t\right)}^{2} \cdot 2}{\ell} \cdot \frac{t}{\ell}}{\cos k}} \]
                        5. lower-*.f6479.1

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

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

                      if 3.20000000000000023e-16 < k < 1.2e189

                      1. Initial program 49.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 t around 0

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

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

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

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

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

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

                          \[\leadsto \frac{2}{\frac{\frac{\left({\sin k}^{2} \cdot {k}^{2}\right) \cdot t}{\ell \cdot \ell}}{\cos k}} \]
                        2. unpow-prod-downN/A

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

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

                          \[\leadsto \frac{2}{\frac{\frac{{\left(\sin k \cdot k\right)}^{2} \cdot t}{\ell \cdot \ell}}{\cos k}} \]
                        5. lift-pow.f6468.6

                          \[\leadsto \frac{2}{\frac{\frac{{\left(\sin k \cdot k\right)}^{2} \cdot t}{\ell \cdot \ell}}{\cos k}} \]
                      9. Applied rewrites68.6%

                        \[\leadsto \frac{2}{\frac{\frac{{\left(\sin k \cdot k\right)}^{2} \cdot t}{\ell \cdot \ell}}{\cos k}} \]
                    8. Recombined 2 regimes into one program.
                    9. Final simplification77.1%

                      \[\leadsto \begin{array}{l} \mathbf{if}\;k \leq 3.2 \cdot 10^{-16} \lor \neg \left(k \leq 1.2 \cdot 10^{+189}\right):\\ \;\;\;\;\frac{2}{\frac{\frac{{\left(k \cdot t\right)}^{2} \cdot 2}{\ell} \cdot \frac{t}{\ell}}{\cos k}}\\ \mathbf{else}:\\ \;\;\;\;\frac{2}{\frac{\frac{{\left(\sin k \cdot k\right)}^{2} \cdot t}{\ell \cdot \ell}}{\cos k}}\\ \end{array} \]
                    10. Add Preprocessing

                    Alternative 13: 79.6% 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}\;t\_m \leq 9.5 \cdot 10^{-11}:\\ \;\;\;\;\frac{2}{\frac{\frac{{\left(\sin k \cdot k\right)}^{2}}{l\_m} \cdot \frac{t\_m}{l\_m}}{\cos k}}\\ \mathbf{else}:\\ \;\;\;\;\frac{2}{\frac{\frac{{\left(k \cdot t\_m\right)}^{2} \cdot 2}{l\_m} \cdot \frac{t\_m}{l\_m}}{\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 (<= t_m 9.5e-11)
                        (/ 2.0 (/ (* (/ (pow (* (sin k) k) 2.0) l_m) (/ t_m l_m)) (cos k)))
                        (/ 2.0 (/ (* (/ (* (pow (* k t_m) 2.0) 2.0) l_m) (/ t_m l_m)) (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 (t_m <= 9.5e-11) {
                    		tmp = 2.0 / (((pow((sin(k) * k), 2.0) / l_m) * (t_m / l_m)) / cos(k));
                    	} else {
                    		tmp = 2.0 / ((((pow((k * t_m), 2.0) * 2.0) / l_m) * (t_m / l_m)) / 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 (t_m <= 9.5d-11) then
                            tmp = 2.0d0 / (((((sin(k) * k) ** 2.0d0) / l_m) * (t_m / l_m)) / cos(k))
                        else
                            tmp = 2.0d0 / ((((((k * t_m) ** 2.0d0) * 2.0d0) / l_m) * (t_m / l_m)) / 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 (t_m <= 9.5e-11) {
                    		tmp = 2.0 / (((Math.pow((Math.sin(k) * k), 2.0) / l_m) * (t_m / l_m)) / Math.cos(k));
                    	} else {
                    		tmp = 2.0 / ((((Math.pow((k * t_m), 2.0) * 2.0) / l_m) * (t_m / l_m)) / 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 t_m <= 9.5e-11:
                    		tmp = 2.0 / (((math.pow((math.sin(k) * k), 2.0) / l_m) * (t_m / l_m)) / math.cos(k))
                    	else:
                    		tmp = 2.0 / ((((math.pow((k * t_m), 2.0) * 2.0) / l_m) * (t_m / l_m)) / 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 (t_m <= 9.5e-11)
                    		tmp = Float64(2.0 / Float64(Float64(Float64((Float64(sin(k) * k) ^ 2.0) / l_m) * Float64(t_m / l_m)) / cos(k)));
                    	else
                    		tmp = Float64(2.0 / Float64(Float64(Float64(Float64((Float64(k * t_m) ^ 2.0) * 2.0) / l_m) * Float64(t_m / l_m)) / 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 (t_m <= 9.5e-11)
                    		tmp = 2.0 / (((((sin(k) * k) ^ 2.0) / l_m) * (t_m / l_m)) / cos(k));
                    	else
                    		tmp = 2.0 / ((((((k * t_m) ^ 2.0) * 2.0) / l_m) * (t_m / l_m)) / 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[t$95$m, 9.5e-11], N[(2.0 / N[(N[(N[(N[Power[N[(N[Sin[k], $MachinePrecision] * k), $MachinePrecision], 2.0], $MachinePrecision] / l$95$m), $MachinePrecision] * N[(t$95$m / l$95$m), $MachinePrecision]), $MachinePrecision] / N[Cos[k], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(2.0 / N[(N[(N[(N[(N[Power[N[(k * t$95$m), $MachinePrecision], 2.0], $MachinePrecision] * 2.0), $MachinePrecision] / l$95$m), $MachinePrecision] * N[(t$95$m / l$95$m), $MachinePrecision]), $MachinePrecision] / N[Cos[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}\;t\_m \leq 9.5 \cdot 10^{-11}:\\
                    \;\;\;\;\frac{2}{\frac{\frac{{\left(\sin k \cdot k\right)}^{2}}{l\_m} \cdot \frac{t\_m}{l\_m}}{\cos k}}\\
                    
                    \mathbf{else}:\\
                    \;\;\;\;\frac{2}{\frac{\frac{{\left(k \cdot t\_m\right)}^{2} \cdot 2}{l\_m} \cdot \frac{t\_m}{l\_m}}{\cos k}}\\
                    
                    
                    \end{array}
                    \end{array}
                    
                    Derivation
                    1. Split input into 2 regimes
                    2. if t < 9.49999999999999951e-11

                      1. Initial program 56.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 t around 0

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

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

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

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

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

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

                          \[\leadsto \frac{2}{\frac{\frac{{k}^{2} \cdot {\sin k}^{2}}{\ell} \cdot \frac{t}{\ell}}{\cos k}} \]
                        3. Step-by-step derivation
                          1. *-commutativeN/A

                            \[\leadsto \frac{2}{\frac{\frac{{\sin k}^{2} \cdot {k}^{2}}{\ell} \cdot \frac{t}{\ell}}{\cos k}} \]
                          2. unpow-prod-downN/A

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

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

                            \[\leadsto \frac{2}{\frac{\frac{{\left(\sin k \cdot k\right)}^{2}}{\ell} \cdot \frac{t}{\ell}}{\cos k}} \]
                          5. lift-pow.f6473.8

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

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

                        if 9.49999999999999951e-11 < t

                        1. Initial program 60.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 \frac{2}{\color{blue}{t \cdot \left(2 \cdot \frac{{t}^{2} \cdot {\sin k}^{2}}{{\ell}^{2} \cdot \cos k} + \frac{{k}^{2} \cdot {\sin k}^{2}}{{\ell}^{2} \cdot \cos k}\right)}} \]
                        4. Step-by-step derivation
                          1. *-commutativeN/A

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

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

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

                          \[\leadsto \frac{2}{\frac{\frac{\mathsf{fma}\left({\left(\sin k \cdot t\right)}^{2}, 2, {\left(\sin k \cdot k\right)}^{2}\right) \cdot t}{\ell \cdot \ell}}{\color{blue}{\cos k}}} \]
                        7. Step-by-step derivation
                          1. Applied rewrites89.9%

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

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

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

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

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

                              \[\leadsto \frac{2}{\frac{\frac{{\left(k \cdot t\right)}^{2} \cdot 2}{\ell} \cdot \frac{t}{\ell}}{\cos k}} \]
                            5. lower-*.f6481.0

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

                            \[\leadsto \frac{2}{\frac{\frac{{\left(k \cdot t\right)}^{2} \cdot 2}{\ell} \cdot \frac{t}{\ell}}{\cos k}} \]
                        8. Recombined 2 regimes into one program.
                        9. Final simplification75.8%

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

                        Alternative 14: 72.4% 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 3.2 \cdot 10^{-16} \lor \neg \left(k \leq 1.2 \cdot 10^{+189}\right):\\ \;\;\;\;\frac{2}{\frac{\frac{{\left(k \cdot t\_m\right)}^{2} \cdot 2}{l\_m} \cdot \frac{t\_m}{l\_m}}{\cos k}}\\ \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 (or (<= k 3.2e-16) (not (<= k 1.2e+189)))
                            (/ 2.0 (/ (* (/ (* (pow (* k t_m) 2.0) 2.0) l_m) (/ t_m l_m)) (cos k)))
                            (*
                             (* (/ (* 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 <= 3.2e-16) || !(k <= 1.2e+189)) {
                        		tmp = 2.0 / ((((pow((k * t_m), 2.0) * 2.0) / l_m) * (t_m / l_m)) / cos(k));
                        	} 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 <= 3.2d-16) .or. (.not. (k <= 1.2d+189))) then
                                tmp = 2.0d0 / ((((((k * t_m) ** 2.0d0) * 2.0d0) / l_m) * (t_m / l_m)) / cos(k))
                            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 <= 3.2e-16) || !(k <= 1.2e+189)) {
                        		tmp = 2.0 / ((((Math.pow((k * t_m), 2.0) * 2.0) / l_m) * (t_m / l_m)) / Math.cos(k));
                        	} 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 <= 3.2e-16) or not (k <= 1.2e+189):
                        		tmp = 2.0 / ((((math.pow((k * t_m), 2.0) * 2.0) / l_m) * (t_m / l_m)) / math.cos(k))
                        	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 <= 3.2e-16) || !(k <= 1.2e+189))
                        		tmp = Float64(2.0 / Float64(Float64(Float64(Float64((Float64(k * t_m) ^ 2.0) * 2.0) / l_m) * Float64(t_m / l_m)) / cos(k)));
                        	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 <= 3.2e-16) || ~((k <= 1.2e+189)))
                        		tmp = 2.0 / ((((((k * t_m) ^ 2.0) * 2.0) / l_m) * (t_m / l_m)) / cos(k));
                        	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[Or[LessEqual[k, 3.2e-16], N[Not[LessEqual[k, 1.2e+189]], $MachinePrecision]], N[(2.0 / N[(N[(N[(N[(N[Power[N[(k * t$95$m), $MachinePrecision], 2.0], $MachinePrecision] * 2.0), $MachinePrecision] / l$95$m), $MachinePrecision] * N[(t$95$m / l$95$m), $MachinePrecision]), $MachinePrecision] / N[Cos[k], $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 3.2 \cdot 10^{-16} \lor \neg \left(k \leq 1.2 \cdot 10^{+189}\right):\\
                        \;\;\;\;\frac{2}{\frac{\frac{{\left(k \cdot t\_m\right)}^{2} \cdot 2}{l\_m} \cdot \frac{t\_m}{l\_m}}{\cos k}}\\
                        
                        \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 2 regimes
                        2. if k < 3.20000000000000023e-16 or 1.2e189 < k

                          1. Initial program 59.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 t around 0

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

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

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

                            \[\leadsto \frac{2}{\color{blue}{\frac{\mathsf{fma}\left(2, {\left(\sin k \cdot t\right)}^{2}, {\left(\sin k \cdot k\right)}^{2}\right)}{\cos k \cdot \left(\ell \cdot \ell\right)} \cdot t}} \]
                          6. Applied rewrites77.1%

                            \[\leadsto \frac{2}{\frac{\frac{\mathsf{fma}\left({\left(\sin k \cdot t\right)}^{2}, 2, {\left(\sin k \cdot k\right)}^{2}\right) \cdot t}{\ell \cdot \ell}}{\color{blue}{\cos k}}} \]
                          7. Step-by-step derivation
                            1. Applied rewrites88.8%

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

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

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

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

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

                                \[\leadsto \frac{2}{\frac{\frac{{\left(k \cdot t\right)}^{2} \cdot 2}{\ell} \cdot \frac{t}{\ell}}{\cos k}} \]
                              5. lower-*.f6479.1

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

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

                            if 3.20000000000000023e-16 < k < 1.2e189

                            1. Initial program 49.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 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 rewrites68.5%

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

                            \[\leadsto \begin{array}{l} \mathbf{if}\;k \leq 3.2 \cdot 10^{-16} \lor \neg \left(k \leq 1.2 \cdot 10^{+189}\right):\\ \;\;\;\;\frac{2}{\frac{\frac{{\left(k \cdot t\right)}^{2} \cdot 2}{\ell} \cdot \frac{t}{\ell}}{\cos k}}\\ \mathbf{else}:\\ \;\;\;\;\left(\frac{\ell \cdot \ell}{k \cdot k} \cdot \frac{\cos k}{{\sin k}^{2} \cdot t}\right) \cdot 2\\ \end{array} \]
                          10. Add Preprocessing

                          Alternative 15: 72.4% 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 3.2 \cdot 10^{-16} \lor \neg \left(k \leq 1.2 \cdot 10^{+189}\right):\\ \;\;\;\;\frac{2}{\frac{\frac{{\left(k \cdot t\_m\right)}^{2} \cdot 2}{l\_m} \cdot \frac{t\_m}{l\_m}}{\cos k}}\\ \mathbf{else}:\\ \;\;\;\;\frac{2}{\frac{{\left(\sin k \cdot k\right)}^{2}}{\cos k \cdot \left(l\_m \cdot l\_m\right)} \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 (or (<= k 3.2e-16) (not (<= k 1.2e+189)))
                              (/ 2.0 (/ (* (/ (* (pow (* k t_m) 2.0) 2.0) l_m) (/ t_m l_m)) (cos k)))
                              (/ 2.0 (* (/ (pow (* (sin k) k) 2.0) (* (cos k) (* 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 ((k <= 3.2e-16) || !(k <= 1.2e+189)) {
                          		tmp = 2.0 / ((((pow((k * t_m), 2.0) * 2.0) / l_m) * (t_m / l_m)) / cos(k));
                          	} else {
                          		tmp = 2.0 / ((pow((sin(k) * k), 2.0) / (cos(k) * (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 ((k <= 3.2d-16) .or. (.not. (k <= 1.2d+189))) then
                                  tmp = 2.0d0 / ((((((k * t_m) ** 2.0d0) * 2.0d0) / l_m) * (t_m / l_m)) / cos(k))
                              else
                                  tmp = 2.0d0 / ((((sin(k) * k) ** 2.0d0) / (cos(k) * (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 ((k <= 3.2e-16) || !(k <= 1.2e+189)) {
                          		tmp = 2.0 / ((((Math.pow((k * t_m), 2.0) * 2.0) / l_m) * (t_m / l_m)) / Math.cos(k));
                          	} else {
                          		tmp = 2.0 / ((Math.pow((Math.sin(k) * k), 2.0) / (Math.cos(k) * (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 (k <= 3.2e-16) or not (k <= 1.2e+189):
                          		tmp = 2.0 / ((((math.pow((k * t_m), 2.0) * 2.0) / l_m) * (t_m / l_m)) / math.cos(k))
                          	else:
                          		tmp = 2.0 / ((math.pow((math.sin(k) * k), 2.0) / (math.cos(k) * (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 ((k <= 3.2e-16) || !(k <= 1.2e+189))
                          		tmp = Float64(2.0 / Float64(Float64(Float64(Float64((Float64(k * t_m) ^ 2.0) * 2.0) / l_m) * Float64(t_m / l_m)) / cos(k)));
                          	else
                          		tmp = Float64(2.0 / Float64(Float64((Float64(sin(k) * k) ^ 2.0) / Float64(cos(k) * 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 ((k <= 3.2e-16) || ~((k <= 1.2e+189)))
                          		tmp = 2.0 / ((((((k * t_m) ^ 2.0) * 2.0) / l_m) * (t_m / l_m)) / cos(k));
                          	else
                          		tmp = 2.0 / ((((sin(k) * k) ^ 2.0) / (cos(k) * (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[Or[LessEqual[k, 3.2e-16], N[Not[LessEqual[k, 1.2e+189]], $MachinePrecision]], N[(2.0 / N[(N[(N[(N[(N[Power[N[(k * t$95$m), $MachinePrecision], 2.0], $MachinePrecision] * 2.0), $MachinePrecision] / l$95$m), $MachinePrecision] * N[(t$95$m / l$95$m), $MachinePrecision]), $MachinePrecision] / N[Cos[k], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(2.0 / N[(N[(N[Power[N[(N[Sin[k], $MachinePrecision] * k), $MachinePrecision], 2.0], $MachinePrecision] / N[(N[Cos[k], $MachinePrecision] * N[(l$95$m * l$95$m), $MachinePrecision]), $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}\;k \leq 3.2 \cdot 10^{-16} \lor \neg \left(k \leq 1.2 \cdot 10^{+189}\right):\\
                          \;\;\;\;\frac{2}{\frac{\frac{{\left(k \cdot t\_m\right)}^{2} \cdot 2}{l\_m} \cdot \frac{t\_m}{l\_m}}{\cos k}}\\
                          
                          \mathbf{else}:\\
                          \;\;\;\;\frac{2}{\frac{{\left(\sin k \cdot k\right)}^{2}}{\cos k \cdot \left(l\_m \cdot l\_m\right)} \cdot t\_m}\\
                          
                          
                          \end{array}
                          \end{array}
                          
                          Derivation
                          1. Split input into 2 regimes
                          2. if k < 3.20000000000000023e-16 or 1.2e189 < k

                            1. Initial program 59.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 t around 0

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

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

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

                              \[\leadsto \frac{2}{\color{blue}{\frac{\mathsf{fma}\left(2, {\left(\sin k \cdot t\right)}^{2}, {\left(\sin k \cdot k\right)}^{2}\right)}{\cos k \cdot \left(\ell \cdot \ell\right)} \cdot t}} \]
                            6. Applied rewrites77.1%

                              \[\leadsto \frac{2}{\frac{\frac{\mathsf{fma}\left({\left(\sin k \cdot t\right)}^{2}, 2, {\left(\sin k \cdot k\right)}^{2}\right) \cdot t}{\ell \cdot \ell}}{\color{blue}{\cos k}}} \]
                            7. Step-by-step derivation
                              1. Applied rewrites88.8%

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

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

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

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

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

                                  \[\leadsto \frac{2}{\frac{\frac{{\left(k \cdot t\right)}^{2} \cdot 2}{\ell} \cdot \frac{t}{\ell}}{\cos k}} \]
                                5. lower-*.f6479.1

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

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

                              if 3.20000000000000023e-16 < k < 1.2e189

                              1. Initial program 49.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 t around 0

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

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

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

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

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

                                  \[\leadsto \frac{2}{\frac{{\sin k}^{2} \cdot {k}^{2}}{\cos k \cdot \left(\ell \cdot \ell\right)} \cdot t} \]
                                2. unpow-prod-downN/A

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

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

                                  \[\leadsto \frac{2}{\frac{{\left(\sin k \cdot k\right)}^{2}}{\cos k \cdot \left(\ell \cdot \ell\right)} \cdot t} \]
                                5. lift-pow.f6468.5

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

                                \[\leadsto \frac{2}{\frac{{\left(\sin k \cdot k\right)}^{2}}{\cos k \cdot \left(\ell \cdot \ell\right)} \cdot t} \]
                            8. Recombined 2 regimes into one program.
                            9. Final simplification77.1%

                              \[\leadsto \begin{array}{l} \mathbf{if}\;k \leq 3.2 \cdot 10^{-16} \lor \neg \left(k \leq 1.2 \cdot 10^{+189}\right):\\ \;\;\;\;\frac{2}{\frac{\frac{{\left(k \cdot t\right)}^{2} \cdot 2}{\ell} \cdot \frac{t}{\ell}}{\cos k}}\\ \mathbf{else}:\\ \;\;\;\;\frac{2}{\frac{{\left(\sin k \cdot k\right)}^{2}}{\cos k \cdot \left(\ell \cdot \ell\right)} \cdot t}\\ \end{array} \]
                            10. Add Preprocessing

                            Alternative 16: 72.4% accurate, 1.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}\;k \leq 3.2 \cdot 10^{-16} \lor \neg \left(k \leq 1.2 \cdot 10^{+189}\right):\\ \;\;\;\;\frac{2}{\frac{\frac{{\left(k \cdot t\_m\right)}^{2} \cdot 2}{l\_m} \cdot \frac{t\_m}{l\_m}}{\cos k}}\\ \mathbf{else}:\\ \;\;\;\;\frac{2}{\left(k \cdot k\right) \cdot \left(t\_m \cdot \left(\frac{\sin k}{l\_m \cdot l\_m} \cdot \tan k\right)\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 (or (<= k 3.2e-16) (not (<= k 1.2e+189)))
                                (/ 2.0 (/ (* (/ (* (pow (* k t_m) 2.0) 2.0) l_m) (/ t_m l_m)) (cos k)))
                                (/ 2.0 (* (* k k) (* t_m (* (/ (sin k) (* l_m l_m)) (tan 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 <= 3.2e-16) || !(k <= 1.2e+189)) {
                            		tmp = 2.0 / ((((pow((k * t_m), 2.0) * 2.0) / l_m) * (t_m / l_m)) / cos(k));
                            	} else {
                            		tmp = 2.0 / ((k * k) * (t_m * ((sin(k) / (l_m * l_m)) * tan(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 <= 3.2d-16) .or. (.not. (k <= 1.2d+189))) then
                                    tmp = 2.0d0 / ((((((k * t_m) ** 2.0d0) * 2.0d0) / l_m) * (t_m / l_m)) / cos(k))
                                else
                                    tmp = 2.0d0 / ((k * k) * (t_m * ((sin(k) / (l_m * l_m)) * tan(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 <= 3.2e-16) || !(k <= 1.2e+189)) {
                            		tmp = 2.0 / ((((Math.pow((k * t_m), 2.0) * 2.0) / l_m) * (t_m / l_m)) / Math.cos(k));
                            	} else {
                            		tmp = 2.0 / ((k * k) * (t_m * ((Math.sin(k) / (l_m * l_m)) * Math.tan(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 <= 3.2e-16) or not (k <= 1.2e+189):
                            		tmp = 2.0 / ((((math.pow((k * t_m), 2.0) * 2.0) / l_m) * (t_m / l_m)) / math.cos(k))
                            	else:
                            		tmp = 2.0 / ((k * k) * (t_m * ((math.sin(k) / (l_m * l_m)) * math.tan(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 <= 3.2e-16) || !(k <= 1.2e+189))
                            		tmp = Float64(2.0 / Float64(Float64(Float64(Float64((Float64(k * t_m) ^ 2.0) * 2.0) / l_m) * Float64(t_m / l_m)) / cos(k)));
                            	else
                            		tmp = Float64(2.0 / Float64(Float64(k * k) * Float64(t_m * Float64(Float64(sin(k) / Float64(l_m * l_m)) * tan(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 <= 3.2e-16) || ~((k <= 1.2e+189)))
                            		tmp = 2.0 / ((((((k * t_m) ^ 2.0) * 2.0) / l_m) * (t_m / l_m)) / cos(k));
                            	else
                            		tmp = 2.0 / ((k * k) * (t_m * ((sin(k) / (l_m * l_m)) * tan(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[Or[LessEqual[k, 3.2e-16], N[Not[LessEqual[k, 1.2e+189]], $MachinePrecision]], N[(2.0 / N[(N[(N[(N[(N[Power[N[(k * t$95$m), $MachinePrecision], 2.0], $MachinePrecision] * 2.0), $MachinePrecision] / l$95$m), $MachinePrecision] * N[(t$95$m / l$95$m), $MachinePrecision]), $MachinePrecision] / N[Cos[k], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(2.0 / N[(N[(k * k), $MachinePrecision] * N[(t$95$m * N[(N[(N[Sin[k], $MachinePrecision] / N[(l$95$m * l$95$m), $MachinePrecision]), $MachinePrecision] * N[Tan[k], $MachinePrecision]), $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 3.2 \cdot 10^{-16} \lor \neg \left(k \leq 1.2 \cdot 10^{+189}\right):\\
                            \;\;\;\;\frac{2}{\frac{\frac{{\left(k \cdot t\_m\right)}^{2} \cdot 2}{l\_m} \cdot \frac{t\_m}{l\_m}}{\cos k}}\\
                            
                            \mathbf{else}:\\
                            \;\;\;\;\frac{2}{\left(k \cdot k\right) \cdot \left(t\_m \cdot \left(\frac{\sin k}{l\_m \cdot l\_m} \cdot \tan k\right)\right)}\\
                            
                            
                            \end{array}
                            \end{array}
                            
                            Derivation
                            1. Split input into 2 regimes
                            2. if k < 3.20000000000000023e-16 or 1.2e189 < k

                              1. Initial program 59.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 t around 0

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

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

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

                                \[\leadsto \frac{2}{\color{blue}{\frac{\mathsf{fma}\left(2, {\left(\sin k \cdot t\right)}^{2}, {\left(\sin k \cdot k\right)}^{2}\right)}{\cos k \cdot \left(\ell \cdot \ell\right)} \cdot t}} \]
                              6. Applied rewrites77.1%

                                \[\leadsto \frac{2}{\frac{\frac{\mathsf{fma}\left({\left(\sin k \cdot t\right)}^{2}, 2, {\left(\sin k \cdot k\right)}^{2}\right) \cdot t}{\ell \cdot \ell}}{\color{blue}{\cos k}}} \]
                              7. Step-by-step derivation
                                1. Applied rewrites88.8%

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

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

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

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

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

                                    \[\leadsto \frac{2}{\frac{\frac{{\left(k \cdot t\right)}^{2} \cdot 2}{\ell} \cdot \frac{t}{\ell}}{\cos k}} \]
                                  5. lower-*.f6479.1

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

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

                                if 3.20000000000000023e-16 < k < 1.2e189

                                1. Initial program 49.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-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)} \]
                                  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 + {\left(\frac{k}{t}\right)}^{2}\right) + 1\right)} \]
                                  3. unpow2N/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 + {\left(\frac{k}{t}\right)}^{2}\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 + {\left(\frac{k}{t}\right)}^{2}\right) + 1\right)} \]
                                  5. unpow2N/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 + {\left(\frac{k}{t}\right)}^{2}\right) + 1\right)} \]
                                  6. lower-*.f6449.4

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

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

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

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

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

                                    \[\leadsto \frac{2}{\left(\left(\frac{\left(t \cdot t\right) \cdot t}{\ell \cdot \ell} \cdot \sin k\right) \cdot \tan \color{blue}{\left(k + \mathsf{PI}\left(\right)\right)}\right) \cdot \left(\left(1 + {\left(\frac{k}{t}\right)}^{2}\right) + 1\right)} \]
                                  5. lower-PI.f6449.4

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

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

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

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

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

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

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

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

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

                                    \[\leadsto \frac{2}{\left(k \cdot k\right) \cdot \left(t \cdot \left(\frac{\sin k}{{\ell}^{2}} \cdot \color{blue}{\frac{\sin \left(k + \mathsf{PI}\left(\right)\right)}{\cos \left(k + \mathsf{PI}\left(\right)\right)}}\right)\right)} \]
                                  8. tan-quotN/A

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

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

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

                                \[\leadsto \begin{array}{l} \mathbf{if}\;k \leq 3.2 \cdot 10^{-16} \lor \neg \left(k \leq 1.2 \cdot 10^{+189}\right):\\ \;\;\;\;\frac{2}{\frac{\frac{{\left(k \cdot t\right)}^{2} \cdot 2}{\ell} \cdot \frac{t}{\ell}}{\cos k}}\\ \mathbf{else}:\\ \;\;\;\;\frac{2}{\left(k \cdot k\right) \cdot \left(t \cdot \left(\frac{\sin k}{\ell \cdot \ell} \cdot \tan k\right)\right)}\\ \end{array} \]
                              10. Add Preprocessing

                              Alternative 17: 50.4% 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 57.3%

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

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

                                  \[\leadsto \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.f6453.8

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

                                \[\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. pow3N/A

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

                                  \[\leadsto \frac{\ell \cdot \ell}{\left(k \cdot k\right) \cdot \left(\left(t \cdot t\right) \cdot t\right)} \]
                                4. lift-*.f6453.8

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

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

                              Reproduce

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