Toniolo and Linder, Equation (10+)

Percentage Accurate: 54.4% → 88.9%
Time: 10.2s
Alternatives: 21
Speedup: 12.5×

Specification

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

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

Initial Program: 54.4% 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: 88.9% accurate, 0.7× speedup?

\[\begin{array}{l} k_m = \left|k\right| \\ \begin{array}{l} t_1 := \cos k\_m \cdot \ell\\ t_2 := {\left(\sin k\_m \cdot t\right)}^{2}\\ \mathbf{if}\;k\_m \leq 1.6 \cdot 10^{+207}:\\ \;\;\;\;\frac{2}{\mathsf{fma}\left(\sin k\_m \cdot k\_m, \frac{\tan k\_m \cdot k\_m}{\ell}, \frac{t\_2}{\ell} \cdot \frac{2}{\cos k\_m}\right) \cdot \frac{t}{\ell}}\\ \mathbf{else}:\\ \;\;\;\;\frac{2}{\mathsf{fma}\left(\frac{{\sin k\_m}^{2} \cdot k\_m}{\ell}, \frac{k\_m}{t\_1}, t\_2 \cdot \frac{2}{t\_1 \cdot \ell}\right) \cdot t}\\ \end{array} \end{array} \]
k_m = (fabs.f64 k)
(FPCore (t l k_m)
 :precision binary64
 (let* ((t_1 (* (cos k_m) l)) (t_2 (pow (* (sin k_m) t) 2.0)))
   (if (<= k_m 1.6e+207)
     (/
      2.0
      (*
       (fma
        (* (sin k_m) k_m)
        (/ (* (tan k_m) k_m) l)
        (* (/ t_2 l) (/ 2.0 (cos k_m))))
       (/ t l)))
     (/
      2.0
      (*
       (fma
        (/ (* (pow (sin k_m) 2.0) k_m) l)
        (/ k_m t_1)
        (* t_2 (/ 2.0 (* t_1 l))))
       t)))))
k_m = fabs(k);
double code(double t, double l, double k_m) {
	double t_1 = cos(k_m) * l;
	double t_2 = pow((sin(k_m) * t), 2.0);
	double tmp;
	if (k_m <= 1.6e+207) {
		tmp = 2.0 / (fma((sin(k_m) * k_m), ((tan(k_m) * k_m) / l), ((t_2 / l) * (2.0 / cos(k_m)))) * (t / l));
	} else {
		tmp = 2.0 / (fma(((pow(sin(k_m), 2.0) * k_m) / l), (k_m / t_1), (t_2 * (2.0 / (t_1 * l)))) * t);
	}
	return tmp;
}
k_m = abs(k)
function code(t, l, k_m)
	t_1 = Float64(cos(k_m) * l)
	t_2 = Float64(sin(k_m) * t) ^ 2.0
	tmp = 0.0
	if (k_m <= 1.6e+207)
		tmp = Float64(2.0 / Float64(fma(Float64(sin(k_m) * k_m), Float64(Float64(tan(k_m) * k_m) / l), Float64(Float64(t_2 / l) * Float64(2.0 / cos(k_m)))) * Float64(t / l)));
	else
		tmp = Float64(2.0 / Float64(fma(Float64(Float64((sin(k_m) ^ 2.0) * k_m) / l), Float64(k_m / t_1), Float64(t_2 * Float64(2.0 / Float64(t_1 * l)))) * t));
	end
	return tmp
end
k_m = N[Abs[k], $MachinePrecision]
code[t_, l_, k$95$m_] := Block[{t$95$1 = N[(N[Cos[k$95$m], $MachinePrecision] * l), $MachinePrecision]}, Block[{t$95$2 = N[Power[N[(N[Sin[k$95$m], $MachinePrecision] * t), $MachinePrecision], 2.0], $MachinePrecision]}, If[LessEqual[k$95$m, 1.6e+207], N[(2.0 / N[(N[(N[(N[Sin[k$95$m], $MachinePrecision] * k$95$m), $MachinePrecision] * N[(N[(N[Tan[k$95$m], $MachinePrecision] * k$95$m), $MachinePrecision] / l), $MachinePrecision] + N[(N[(t$95$2 / l), $MachinePrecision] * N[(2.0 / N[Cos[k$95$m], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(t / l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(2.0 / N[(N[(N[(N[(N[Power[N[Sin[k$95$m], $MachinePrecision], 2.0], $MachinePrecision] * k$95$m), $MachinePrecision] / l), $MachinePrecision] * N[(k$95$m / t$95$1), $MachinePrecision] + N[(t$95$2 * N[(2.0 / N[(t$95$1 * l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * t), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
k_m = \left|k\right|

\\
\begin{array}{l}
t_1 := \cos k\_m \cdot \ell\\
t_2 := {\left(\sin k\_m \cdot t\right)}^{2}\\
\mathbf{if}\;k\_m \leq 1.6 \cdot 10^{+207}:\\
\;\;\;\;\frac{2}{\mathsf{fma}\left(\sin k\_m \cdot k\_m, \frac{\tan k\_m \cdot k\_m}{\ell}, \frac{t\_2}{\ell} \cdot \frac{2}{\cos k\_m}\right) \cdot \frac{t}{\ell}}\\

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


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

    1. Initial program 54.0%

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

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

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

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

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

            if 1.6000000000000001e207 < k

            1. Initial program 42.9%

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

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

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

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

              Alternative 2: 87.8% accurate, 0.8× speedup?

              \[\begin{array}{l} k_m = \left|k\right| \\ \frac{2}{\mathsf{fma}\left(\sin k\_m \cdot k\_m, \frac{\tan k\_m \cdot k\_m}{\ell}, \frac{{\left(\sin k\_m \cdot t\right)}^{2}}{\ell} \cdot \frac{2}{\cos k\_m}\right) \cdot \frac{t}{\ell}} \end{array} \]
              k_m = (fabs.f64 k)
              (FPCore (t l k_m)
               :precision binary64
               (/
                2.0
                (*
                 (fma
                  (* (sin k_m) k_m)
                  (/ (* (tan k_m) k_m) l)
                  (* (/ (pow (* (sin k_m) t) 2.0) l) (/ 2.0 (cos k_m))))
                 (/ t l))))
              k_m = fabs(k);
              double code(double t, double l, double k_m) {
              	return 2.0 / (fma((sin(k_m) * k_m), ((tan(k_m) * k_m) / l), ((pow((sin(k_m) * t), 2.0) / l) * (2.0 / cos(k_m)))) * (t / l));
              }
              
              k_m = abs(k)
              function code(t, l, k_m)
              	return Float64(2.0 / Float64(fma(Float64(sin(k_m) * k_m), Float64(Float64(tan(k_m) * k_m) / l), Float64(Float64((Float64(sin(k_m) * t) ^ 2.0) / l) * Float64(2.0 / cos(k_m)))) * Float64(t / l)))
              end
              
              k_m = N[Abs[k], $MachinePrecision]
              code[t_, l_, k$95$m_] := N[(2.0 / N[(N[(N[(N[Sin[k$95$m], $MachinePrecision] * k$95$m), $MachinePrecision] * N[(N[(N[Tan[k$95$m], $MachinePrecision] * k$95$m), $MachinePrecision] / l), $MachinePrecision] + N[(N[(N[Power[N[(N[Sin[k$95$m], $MachinePrecision] * t), $MachinePrecision], 2.0], $MachinePrecision] / l), $MachinePrecision] * N[(2.0 / N[Cos[k$95$m], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(t / l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
              
              \begin{array}{l}
              k_m = \left|k\right|
              
              \\
              \frac{2}{\mathsf{fma}\left(\sin k\_m \cdot k\_m, \frac{\tan k\_m \cdot k\_m}{\ell}, \frac{{\left(\sin k\_m \cdot t\right)}^{2}}{\ell} \cdot \frac{2}{\cos k\_m}\right) \cdot \frac{t}{\ell}}
              \end{array}
              
              Derivation
              1. Initial program 53.1%

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

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

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

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

                        \[\leadsto \frac{2}{\mathsf{fma}\left(\sin k \cdot k, \frac{\tan k \cdot k}{\ell}, \frac{{\left(\sin k \cdot t\right)}^{2}}{\ell} \cdot \frac{2}{\cos k}\right) \cdot \frac{t}{\ell}} \]
                      2. Final simplification86.5%

                        \[\leadsto \frac{2}{\mathsf{fma}\left(\sin k \cdot k, \frac{\tan k \cdot k}{\ell}, \frac{{\left(\sin k \cdot t\right)}^{2}}{\ell} \cdot \frac{2}{\cos k}\right) \cdot \frac{t}{\ell}} \]
                      3. Add Preprocessing

                      Alternative 3: 87.8% accurate, 0.8× speedup?

                      \[\begin{array}{l} k_m = \left|k\right| \\ \frac{2}{\mathsf{fma}\left({\left(t \cdot \sin k\_m\right)}^{2}, \frac{2}{\ell \cdot \cos k\_m}, \frac{\sin k\_m \cdot k\_m}{\ell} \cdot \left(k\_m \cdot \tan k\_m\right)\right) \cdot \frac{t}{\ell}} \end{array} \]
                      k_m = (fabs.f64 k)
                      (FPCore (t l k_m)
                       :precision binary64
                       (/
                        2.0
                        (*
                         (fma
                          (pow (* t (sin k_m)) 2.0)
                          (/ 2.0 (* l (cos k_m)))
                          (* (/ (* (sin k_m) k_m) l) (* k_m (tan k_m))))
                         (/ t l))))
                      k_m = fabs(k);
                      double code(double t, double l, double k_m) {
                      	return 2.0 / (fma(pow((t * sin(k_m)), 2.0), (2.0 / (l * cos(k_m))), (((sin(k_m) * k_m) / l) * (k_m * tan(k_m)))) * (t / l));
                      }
                      
                      k_m = abs(k)
                      function code(t, l, k_m)
                      	return Float64(2.0 / Float64(fma((Float64(t * sin(k_m)) ^ 2.0), Float64(2.0 / Float64(l * cos(k_m))), Float64(Float64(Float64(sin(k_m) * k_m) / l) * Float64(k_m * tan(k_m)))) * Float64(t / l)))
                      end
                      
                      k_m = N[Abs[k], $MachinePrecision]
                      code[t_, l_, k$95$m_] := N[(2.0 / N[(N[(N[Power[N[(t * N[Sin[k$95$m], $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision] * N[(2.0 / N[(l * N[Cos[k$95$m], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(N[(N[Sin[k$95$m], $MachinePrecision] * k$95$m), $MachinePrecision] / l), $MachinePrecision] * N[(k$95$m * N[Tan[k$95$m], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(t / l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
                      
                      \begin{array}{l}
                      k_m = \left|k\right|
                      
                      \\
                      \frac{2}{\mathsf{fma}\left({\left(t \cdot \sin k\_m\right)}^{2}, \frac{2}{\ell \cdot \cos k\_m}, \frac{\sin k\_m \cdot k\_m}{\ell} \cdot \left(k\_m \cdot \tan k\_m\right)\right) \cdot \frac{t}{\ell}}
                      \end{array}
                      
                      Derivation
                      1. Initial program 53.1%

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

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

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

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

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

                                \[\leadsto \frac{2}{\mathsf{fma}\left({\left(t \cdot \sin k\right)}^{2}, \frac{2}{\ell \cdot \cos k}, \frac{\sin k \cdot k}{\ell} \cdot \left(k \cdot \tan k\right)\right) \cdot \frac{t}{\ell}} \]
                              3. Add Preprocessing

                              Alternative 4: 84.6% accurate, 0.8× speedup?

                              \[\begin{array}{l} k_m = \left|k\right| \\ \begin{array}{l} t_1 := \sin k\_m \cdot t\\ \mathbf{if}\;t \leq 6.4 \cdot 10^{-22}:\\ \;\;\;\;\frac{2}{\frac{\frac{t}{\ell} \cdot \mathsf{fma}\left({t\_1}^{2}, 2, {\left(\sin k\_m \cdot k\_m\right)}^{2}\right)}{\ell \cdot \cos k\_m}}\\ \mathbf{else}:\\ \;\;\;\;\frac{2}{\left(\left(t \cdot \left(\frac{t}{\ell} \cdot \frac{t\_1}{\ell}\right)\right) \cdot \tan k\_m\right) \cdot \left(\left(1 + {\left(\frac{k\_m}{t}\right)}^{2}\right) + 1\right)}\\ \end{array} \end{array} \]
                              k_m = (fabs.f64 k)
                              (FPCore (t l k_m)
                               :precision binary64
                               (let* ((t_1 (* (sin k_m) t)))
                                 (if (<= t 6.4e-22)
                                   (/
                                    2.0
                                    (/
                                     (* (/ t l) (fma (pow t_1 2.0) 2.0 (pow (* (sin k_m) k_m) 2.0)))
                                     (* l (cos k_m))))
                                   (/
                                    2.0
                                    (*
                                     (* (* t (* (/ t l) (/ t_1 l))) (tan k_m))
                                     (+ (+ 1.0 (pow (/ k_m t) 2.0)) 1.0))))))
                              k_m = fabs(k);
                              double code(double t, double l, double k_m) {
                              	double t_1 = sin(k_m) * t;
                              	double tmp;
                              	if (t <= 6.4e-22) {
                              		tmp = 2.0 / (((t / l) * fma(pow(t_1, 2.0), 2.0, pow((sin(k_m) * k_m), 2.0))) / (l * cos(k_m)));
                              	} else {
                              		tmp = 2.0 / (((t * ((t / l) * (t_1 / l))) * tan(k_m)) * ((1.0 + pow((k_m / t), 2.0)) + 1.0));
                              	}
                              	return tmp;
                              }
                              
                              k_m = abs(k)
                              function code(t, l, k_m)
                              	t_1 = Float64(sin(k_m) * t)
                              	tmp = 0.0
                              	if (t <= 6.4e-22)
                              		tmp = Float64(2.0 / Float64(Float64(Float64(t / l) * fma((t_1 ^ 2.0), 2.0, (Float64(sin(k_m) * k_m) ^ 2.0))) / Float64(l * cos(k_m))));
                              	else
                              		tmp = Float64(2.0 / Float64(Float64(Float64(t * Float64(Float64(t / l) * Float64(t_1 / l))) * tan(k_m)) * Float64(Float64(1.0 + (Float64(k_m / t) ^ 2.0)) + 1.0)));
                              	end
                              	return tmp
                              end
                              
                              k_m = N[Abs[k], $MachinePrecision]
                              code[t_, l_, k$95$m_] := Block[{t$95$1 = N[(N[Sin[k$95$m], $MachinePrecision] * t), $MachinePrecision]}, If[LessEqual[t, 6.4e-22], N[(2.0 / N[(N[(N[(t / l), $MachinePrecision] * N[(N[Power[t$95$1, 2.0], $MachinePrecision] * 2.0 + N[Power[N[(N[Sin[k$95$m], $MachinePrecision] * k$95$m), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(l * N[Cos[k$95$m], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(2.0 / N[(N[(N[(t * N[(N[(t / l), $MachinePrecision] * N[(t$95$1 / l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[Tan[k$95$m], $MachinePrecision]), $MachinePrecision] * N[(N[(1.0 + N[Power[N[(k$95$m / t), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
                              
                              \begin{array}{l}
                              k_m = \left|k\right|
                              
                              \\
                              \begin{array}{l}
                              t_1 := \sin k\_m \cdot t\\
                              \mathbf{if}\;t \leq 6.4 \cdot 10^{-22}:\\
                              \;\;\;\;\frac{2}{\frac{\frac{t}{\ell} \cdot \mathsf{fma}\left({t\_1}^{2}, 2, {\left(\sin k\_m \cdot k\_m\right)}^{2}\right)}{\ell \cdot \cos k\_m}}\\
                              
                              \mathbf{else}:\\
                              \;\;\;\;\frac{2}{\left(\left(t \cdot \left(\frac{t}{\ell} \cdot \frac{t\_1}{\ell}\right)\right) \cdot \tan k\_m\right) \cdot \left(\left(1 + {\left(\frac{k\_m}{t}\right)}^{2}\right) + 1\right)}\\
                              
                              
                              \end{array}
                              \end{array}
                              
                              Derivation
                              1. Split input into 2 regimes
                              2. if t < 6.39999999999999975e-22

                                1. Initial program 48.1%

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

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

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

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

                                      if 6.39999999999999975e-22 < t

                                      1. Initial program 69.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                    Alternative 5: 82.2% accurate, 0.8× speedup?

                                    \[\begin{array}{l} k_m = \left|k\right| \\ \begin{array}{l} t_1 := \sin k\_m \cdot t\\ t_2 := {\left(\frac{k\_m}{t}\right)}^{2}\\ \mathbf{if}\;t \leq 9 \cdot 10^{-103}:\\ \;\;\;\;\frac{2}{\mathsf{fma}\left({t\_1}^{2}, 2, {\left(\sin k\_m \cdot k\_m\right)}^{2}\right) \cdot \frac{\frac{t}{\ell}}{\cos k\_m \cdot \ell}}\\ \mathbf{elif}\;t \leq 1.26 \cdot 10^{+94}:\\ \;\;\;\;\frac{2}{\frac{\left(t\_2 + 2\right) \cdot \left(\left({t}^{3} \cdot \sin k\_m\right) \cdot \frac{\tan k\_m}{\ell}\right)}{\ell}}\\ \mathbf{else}:\\ \;\;\;\;\frac{2}{\left(\left(t \cdot \left(\frac{t}{\ell} \cdot \frac{t\_1}{\ell}\right)\right) \cdot \tan k\_m\right) \cdot \left(\left(1 + t\_2\right) + 1\right)}\\ \end{array} \end{array} \]
                                    k_m = (fabs.f64 k)
                                    (FPCore (t l k_m)
                                     :precision binary64
                                     (let* ((t_1 (* (sin k_m) t)) (t_2 (pow (/ k_m t) 2.0)))
                                       (if (<= t 9e-103)
                                         (/
                                          2.0
                                          (*
                                           (fma (pow t_1 2.0) 2.0 (pow (* (sin k_m) k_m) 2.0))
                                           (/ (/ t l) (* (cos k_m) l))))
                                         (if (<= t 1.26e+94)
                                           (/
                                            2.0
                                            (/ (* (+ t_2 2.0) (* (* (pow t 3.0) (sin k_m)) (/ (tan k_m) l))) l))
                                           (/
                                            2.0
                                            (* (* (* t (* (/ t l) (/ t_1 l))) (tan k_m)) (+ (+ 1.0 t_2) 1.0)))))))
                                    k_m = fabs(k);
                                    double code(double t, double l, double k_m) {
                                    	double t_1 = sin(k_m) * t;
                                    	double t_2 = pow((k_m / t), 2.0);
                                    	double tmp;
                                    	if (t <= 9e-103) {
                                    		tmp = 2.0 / (fma(pow(t_1, 2.0), 2.0, pow((sin(k_m) * k_m), 2.0)) * ((t / l) / (cos(k_m) * l)));
                                    	} else if (t <= 1.26e+94) {
                                    		tmp = 2.0 / (((t_2 + 2.0) * ((pow(t, 3.0) * sin(k_m)) * (tan(k_m) / l))) / l);
                                    	} else {
                                    		tmp = 2.0 / (((t * ((t / l) * (t_1 / l))) * tan(k_m)) * ((1.0 + t_2) + 1.0));
                                    	}
                                    	return tmp;
                                    }
                                    
                                    k_m = abs(k)
                                    function code(t, l, k_m)
                                    	t_1 = Float64(sin(k_m) * t)
                                    	t_2 = Float64(k_m / t) ^ 2.0
                                    	tmp = 0.0
                                    	if (t <= 9e-103)
                                    		tmp = Float64(2.0 / Float64(fma((t_1 ^ 2.0), 2.0, (Float64(sin(k_m) * k_m) ^ 2.0)) * Float64(Float64(t / l) / Float64(cos(k_m) * l))));
                                    	elseif (t <= 1.26e+94)
                                    		tmp = Float64(2.0 / Float64(Float64(Float64(t_2 + 2.0) * Float64(Float64((t ^ 3.0) * sin(k_m)) * Float64(tan(k_m) / l))) / l));
                                    	else
                                    		tmp = Float64(2.0 / Float64(Float64(Float64(t * Float64(Float64(t / l) * Float64(t_1 / l))) * tan(k_m)) * Float64(Float64(1.0 + t_2) + 1.0)));
                                    	end
                                    	return tmp
                                    end
                                    
                                    k_m = N[Abs[k], $MachinePrecision]
                                    code[t_, l_, k$95$m_] := Block[{t$95$1 = N[(N[Sin[k$95$m], $MachinePrecision] * t), $MachinePrecision]}, Block[{t$95$2 = N[Power[N[(k$95$m / t), $MachinePrecision], 2.0], $MachinePrecision]}, If[LessEqual[t, 9e-103], N[(2.0 / N[(N[(N[Power[t$95$1, 2.0], $MachinePrecision] * 2.0 + N[Power[N[(N[Sin[k$95$m], $MachinePrecision] * k$95$m), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision] * N[(N[(t / l), $MachinePrecision] / N[(N[Cos[k$95$m], $MachinePrecision] * l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 1.26e+94], N[(2.0 / N[(N[(N[(t$95$2 + 2.0), $MachinePrecision] * N[(N[(N[Power[t, 3.0], $MachinePrecision] * N[Sin[k$95$m], $MachinePrecision]), $MachinePrecision] * N[(N[Tan[k$95$m], $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision], N[(2.0 / N[(N[(N[(t * N[(N[(t / l), $MachinePrecision] * N[(t$95$1 / l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[Tan[k$95$m], $MachinePrecision]), $MachinePrecision] * N[(N[(1.0 + t$95$2), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]
                                    
                                    \begin{array}{l}
                                    k_m = \left|k\right|
                                    
                                    \\
                                    \begin{array}{l}
                                    t_1 := \sin k\_m \cdot t\\
                                    t_2 := {\left(\frac{k\_m}{t}\right)}^{2}\\
                                    \mathbf{if}\;t \leq 9 \cdot 10^{-103}:\\
                                    \;\;\;\;\frac{2}{\mathsf{fma}\left({t\_1}^{2}, 2, {\left(\sin k\_m \cdot k\_m\right)}^{2}\right) \cdot \frac{\frac{t}{\ell}}{\cos k\_m \cdot \ell}}\\
                                    
                                    \mathbf{elif}\;t \leq 1.26 \cdot 10^{+94}:\\
                                    \;\;\;\;\frac{2}{\frac{\left(t\_2 + 2\right) \cdot \left(\left({t}^{3} \cdot \sin k\_m\right) \cdot \frac{\tan k\_m}{\ell}\right)}{\ell}}\\
                                    
                                    \mathbf{else}:\\
                                    \;\;\;\;\frac{2}{\left(\left(t \cdot \left(\frac{t}{\ell} \cdot \frac{t\_1}{\ell}\right)\right) \cdot \tan k\_m\right) \cdot \left(\left(1 + t\_2\right) + 1\right)}\\
                                    
                                    
                                    \end{array}
                                    \end{array}
                                    
                                    Derivation
                                    1. Split input into 3 regimes
                                    2. if t < 9e-103

                                      1. Initial program 48.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. Applied rewrites68.2%

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

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

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

                                            if 9e-103 < t < 1.25999999999999997e94

                                            1. Initial program 65.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                            if 1.25999999999999997e94 < t

                                            1. Initial program 65.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                          Alternative 6: 83.4% accurate, 1.2× speedup?

                                          \[\begin{array}{l} k_m = \left|k\right| \\ \begin{array}{l} \mathbf{if}\;k\_m \leq 2100000000000:\\ \;\;\;\;\frac{2}{\frac{\mathsf{fma}\left(\left(t \cdot k\_m\right) \cdot \left(t \cdot k\_m\right), 2, {\left(\sin k\_m \cdot k\_m\right)}^{2}\right)}{\cos k\_m \cdot \ell} \cdot \frac{t}{\ell}}\\ \mathbf{elif}\;k\_m \leq 1.9 \cdot 10^{+145}:\\ \;\;\;\;\frac{2}{\frac{\frac{\left(\mathsf{fma}\left(t \cdot t, 2, k\_m \cdot k\_m\right) \cdot \left(\tan k\_m \cdot \sin k\_m\right)\right) \cdot t}{\ell}}{\ell}}\\ \mathbf{else}:\\ \;\;\;\;\frac{2}{\left(\frac{t}{\ell} \cdot t\right) \cdot \left(\frac{\sin k\_m \cdot t}{\ell} \cdot \left(\tan k\_m \cdot \left({\left(\frac{k\_m}{t}\right)}^{2} + 2\right)\right)\right)}\\ \end{array} \end{array} \]
                                          k_m = (fabs.f64 k)
                                          (FPCore (t l k_m)
                                           :precision binary64
                                           (if (<= k_m 2100000000000.0)
                                             (/
                                              2.0
                                              (*
                                               (/
                                                (fma (* (* t k_m) (* t k_m)) 2.0 (pow (* (sin k_m) k_m) 2.0))
                                                (* (cos k_m) l))
                                               (/ t l)))
                                             (if (<= k_m 1.9e+145)
                                               (/
                                                2.0
                                                (/
                                                 (/ (* (* (fma (* t t) 2.0 (* k_m k_m)) (* (tan k_m) (sin k_m))) t) l)
                                                 l))
                                               (/
                                                2.0
                                                (*
                                                 (* (/ t l) t)
                                                 (* (/ (* (sin k_m) t) l) (* (tan k_m) (+ (pow (/ k_m t) 2.0) 2.0))))))))
                                          k_m = fabs(k);
                                          double code(double t, double l, double k_m) {
                                          	double tmp;
                                          	if (k_m <= 2100000000000.0) {
                                          		tmp = 2.0 / ((fma(((t * k_m) * (t * k_m)), 2.0, pow((sin(k_m) * k_m), 2.0)) / (cos(k_m) * l)) * (t / l));
                                          	} else if (k_m <= 1.9e+145) {
                                          		tmp = 2.0 / ((((fma((t * t), 2.0, (k_m * k_m)) * (tan(k_m) * sin(k_m))) * t) / l) / l);
                                          	} else {
                                          		tmp = 2.0 / (((t / l) * t) * (((sin(k_m) * t) / l) * (tan(k_m) * (pow((k_m / t), 2.0) + 2.0))));
                                          	}
                                          	return tmp;
                                          }
                                          
                                          k_m = abs(k)
                                          function code(t, l, k_m)
                                          	tmp = 0.0
                                          	if (k_m <= 2100000000000.0)
                                          		tmp = Float64(2.0 / Float64(Float64(fma(Float64(Float64(t * k_m) * Float64(t * k_m)), 2.0, (Float64(sin(k_m) * k_m) ^ 2.0)) / Float64(cos(k_m) * l)) * Float64(t / l)));
                                          	elseif (k_m <= 1.9e+145)
                                          		tmp = Float64(2.0 / Float64(Float64(Float64(Float64(fma(Float64(t * t), 2.0, Float64(k_m * k_m)) * Float64(tan(k_m) * sin(k_m))) * t) / l) / l));
                                          	else
                                          		tmp = Float64(2.0 / Float64(Float64(Float64(t / l) * t) * Float64(Float64(Float64(sin(k_m) * t) / l) * Float64(tan(k_m) * Float64((Float64(k_m / t) ^ 2.0) + 2.0)))));
                                          	end
                                          	return tmp
                                          end
                                          
                                          k_m = N[Abs[k], $MachinePrecision]
                                          code[t_, l_, k$95$m_] := If[LessEqual[k$95$m, 2100000000000.0], N[(2.0 / N[(N[(N[(N[(N[(t * k$95$m), $MachinePrecision] * N[(t * k$95$m), $MachinePrecision]), $MachinePrecision] * 2.0 + N[Power[N[(N[Sin[k$95$m], $MachinePrecision] * k$95$m), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision] / N[(N[Cos[k$95$m], $MachinePrecision] * l), $MachinePrecision]), $MachinePrecision] * N[(t / l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[k$95$m, 1.9e+145], N[(2.0 / N[(N[(N[(N[(N[(N[(t * t), $MachinePrecision] * 2.0 + N[(k$95$m * k$95$m), $MachinePrecision]), $MachinePrecision] * N[(N[Tan[k$95$m], $MachinePrecision] * N[Sin[k$95$m], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * t), $MachinePrecision] / l), $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision], N[(2.0 / N[(N[(N[(t / l), $MachinePrecision] * t), $MachinePrecision] * N[(N[(N[(N[Sin[k$95$m], $MachinePrecision] * t), $MachinePrecision] / l), $MachinePrecision] * N[(N[Tan[k$95$m], $MachinePrecision] * N[(N[Power[N[(k$95$m / t), $MachinePrecision], 2.0], $MachinePrecision] + 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
                                          
                                          \begin{array}{l}
                                          k_m = \left|k\right|
                                          
                                          \\
                                          \begin{array}{l}
                                          \mathbf{if}\;k\_m \leq 2100000000000:\\
                                          \;\;\;\;\frac{2}{\frac{\mathsf{fma}\left(\left(t \cdot k\_m\right) \cdot \left(t \cdot k\_m\right), 2, {\left(\sin k\_m \cdot k\_m\right)}^{2}\right)}{\cos k\_m \cdot \ell} \cdot \frac{t}{\ell}}\\
                                          
                                          \mathbf{elif}\;k\_m \leq 1.9 \cdot 10^{+145}:\\
                                          \;\;\;\;\frac{2}{\frac{\frac{\left(\mathsf{fma}\left(t \cdot t, 2, k\_m \cdot k\_m\right) \cdot \left(\tan k\_m \cdot \sin k\_m\right)\right) \cdot t}{\ell}}{\ell}}\\
                                          
                                          \mathbf{else}:\\
                                          \;\;\;\;\frac{2}{\left(\frac{t}{\ell} \cdot t\right) \cdot \left(\frac{\sin k\_m \cdot t}{\ell} \cdot \left(\tan k\_m \cdot \left({\left(\frac{k\_m}{t}\right)}^{2} + 2\right)\right)\right)}\\
                                          
                                          
                                          \end{array}
                                          \end{array}
                                          
                                          Derivation
                                          1. Split input into 3 regimes
                                          2. if k < 2.1e12

                                            1. Initial program 57.9%

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

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

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

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

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

                                                  if 2.1e12 < k < 1.90000000000000006e145

                                                  1. Initial program 26.9%

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

                                                      \[\leadsto \frac{2}{\color{blue}{\frac{\mathsf{fma}\left({\sin k}^{2} \cdot k, k, \left(\left({\sin k}^{2} \cdot t\right) \cdot t\right) \cdot 2\right)}{\left(\cos k \cdot \ell\right) \cdot \ell} \cdot t}} \]
                                                    2. 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)}} \]
                                                    3. Applied rewrites81.2%

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

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

                                                      if 1.90000000000000006e145 < k

                                                      1. Initial program 44.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                                      \[\leadsto \begin{array}{l} \mathbf{if}\;k \leq 2100000000000:\\ \;\;\;\;\frac{2}{\frac{\mathsf{fma}\left(\left(t \cdot k\right) \cdot \left(t \cdot k\right), 2, {\left(\sin k \cdot k\right)}^{2}\right)}{\cos k \cdot \ell} \cdot \frac{t}{\ell}}\\ \mathbf{elif}\;k \leq 1.9 \cdot 10^{+145}:\\ \;\;\;\;\frac{2}{\frac{\frac{\left(\mathsf{fma}\left(t \cdot t, 2, k \cdot k\right) \cdot \left(\tan k \cdot \sin k\right)\right) \cdot t}{\ell}}{\ell}}\\ \mathbf{else}:\\ \;\;\;\;\frac{2}{\left(\frac{t}{\ell} \cdot t\right) \cdot \left(\frac{\sin k \cdot t}{\ell} \cdot \left(\tan k \cdot \left({\left(\frac{k}{t}\right)}^{2} + 2\right)\right)\right)}\\ \end{array} \]
                                                    7. Add Preprocessing

                                                    Alternative 7: 80.2% accurate, 1.2× speedup?

                                                    \[\begin{array}{l} k_m = \left|k\right| \\ \begin{array}{l} \mathbf{if}\;t \leq 6.4 \cdot 10^{-22}:\\ \;\;\;\;\frac{2}{\frac{t}{\ell} \cdot \frac{\mathsf{fma}\left(t \cdot t, 2, k\_m \cdot k\_m\right) \cdot \left(\tan k\_m \cdot \sin k\_m\right)}{\ell}}\\ \mathbf{else}:\\ \;\;\;\;\frac{2}{\left(\left(t \cdot \left(\frac{t}{\ell} \cdot \frac{\sin k\_m \cdot t}{\ell}\right)\right) \cdot \tan k\_m\right) \cdot \left(\left(1 + {\left(\frac{k\_m}{t}\right)}^{2}\right) + 1\right)}\\ \end{array} \end{array} \]
                                                    k_m = (fabs.f64 k)
                                                    (FPCore (t l k_m)
                                                     :precision binary64
                                                     (if (<= t 6.4e-22)
                                                       (/
                                                        2.0
                                                        (*
                                                         (/ t l)
                                                         (/ (* (fma (* t t) 2.0 (* k_m k_m)) (* (tan k_m) (sin k_m))) l)))
                                                       (/
                                                        2.0
                                                        (*
                                                         (* (* t (* (/ t l) (/ (* (sin k_m) t) l))) (tan k_m))
                                                         (+ (+ 1.0 (pow (/ k_m t) 2.0)) 1.0)))))
                                                    k_m = fabs(k);
                                                    double code(double t, double l, double k_m) {
                                                    	double tmp;
                                                    	if (t <= 6.4e-22) {
                                                    		tmp = 2.0 / ((t / l) * ((fma((t * t), 2.0, (k_m * k_m)) * (tan(k_m) * sin(k_m))) / l));
                                                    	} else {
                                                    		tmp = 2.0 / (((t * ((t / l) * ((sin(k_m) * t) / l))) * tan(k_m)) * ((1.0 + pow((k_m / t), 2.0)) + 1.0));
                                                    	}
                                                    	return tmp;
                                                    }
                                                    
                                                    k_m = abs(k)
                                                    function code(t, l, k_m)
                                                    	tmp = 0.0
                                                    	if (t <= 6.4e-22)
                                                    		tmp = Float64(2.0 / Float64(Float64(t / l) * Float64(Float64(fma(Float64(t * t), 2.0, Float64(k_m * k_m)) * Float64(tan(k_m) * sin(k_m))) / l)));
                                                    	else
                                                    		tmp = Float64(2.0 / Float64(Float64(Float64(t * Float64(Float64(t / l) * Float64(Float64(sin(k_m) * t) / l))) * tan(k_m)) * Float64(Float64(1.0 + (Float64(k_m / t) ^ 2.0)) + 1.0)));
                                                    	end
                                                    	return tmp
                                                    end
                                                    
                                                    k_m = N[Abs[k], $MachinePrecision]
                                                    code[t_, l_, k$95$m_] := If[LessEqual[t, 6.4e-22], N[(2.0 / N[(N[(t / l), $MachinePrecision] * N[(N[(N[(N[(t * t), $MachinePrecision] * 2.0 + N[(k$95$m * k$95$m), $MachinePrecision]), $MachinePrecision] * N[(N[Tan[k$95$m], $MachinePrecision] * N[Sin[k$95$m], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(2.0 / N[(N[(N[(t * N[(N[(t / l), $MachinePrecision] * N[(N[(N[Sin[k$95$m], $MachinePrecision] * t), $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[Tan[k$95$m], $MachinePrecision]), $MachinePrecision] * N[(N[(1.0 + N[Power[N[(k$95$m / t), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
                                                    
                                                    \begin{array}{l}
                                                    k_m = \left|k\right|
                                                    
                                                    \\
                                                    \begin{array}{l}
                                                    \mathbf{if}\;t \leq 6.4 \cdot 10^{-22}:\\
                                                    \;\;\;\;\frac{2}{\frac{t}{\ell} \cdot \frac{\mathsf{fma}\left(t \cdot t, 2, k\_m \cdot k\_m\right) \cdot \left(\tan k\_m \cdot \sin k\_m\right)}{\ell}}\\
                                                    
                                                    \mathbf{else}:\\
                                                    \;\;\;\;\frac{2}{\left(\left(t \cdot \left(\frac{t}{\ell} \cdot \frac{\sin k\_m \cdot t}{\ell}\right)\right) \cdot \tan k\_m\right) \cdot \left(\left(1 + {\left(\frac{k\_m}{t}\right)}^{2}\right) + 1\right)}\\
                                                    
                                                    
                                                    \end{array}
                                                    \end{array}
                                                    
                                                    Derivation
                                                    1. Split input into 2 regimes
                                                    2. if t < 6.39999999999999975e-22

                                                      1. Initial program 48.1%

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

                                                          \[\leadsto \frac{2}{\color{blue}{\frac{\mathsf{fma}\left({\sin k}^{2} \cdot k, k, \left(\left({\sin k}^{2} \cdot t\right) \cdot t\right) \cdot 2\right)}{\left(\cos k \cdot \ell\right) \cdot \ell} \cdot t}} \]
                                                        2. 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)}} \]
                                                        3. Applied rewrites67.9%

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

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

                                                          if 6.39999999999999975e-22 < t

                                                          1. Initial program 69.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                                        Alternative 8: 83.5% accurate, 1.2× speedup?

                                                        \[\begin{array}{l} k_m = \left|k\right| \\ \begin{array}{l} \mathbf{if}\;k\_m \leq 2100000000000:\\ \;\;\;\;\frac{2}{\frac{\mathsf{fma}\left(\left(t \cdot k\_m\right) \cdot \left(t \cdot k\_m\right), 2, {\left(\sin k\_m \cdot k\_m\right)}^{2}\right)}{\cos k\_m \cdot \ell} \cdot \frac{t}{\ell}}\\ \mathbf{else}:\\ \;\;\;\;\frac{2}{\frac{\frac{\left(\mathsf{fma}\left(t \cdot t, 2, k\_m \cdot k\_m\right) \cdot \left(\tan k\_m \cdot \sin k\_m\right)\right) \cdot t}{\ell}}{\ell}}\\ \end{array} \end{array} \]
                                                        k_m = (fabs.f64 k)
                                                        (FPCore (t l k_m)
                                                         :precision binary64
                                                         (if (<= k_m 2100000000000.0)
                                                           (/
                                                            2.0
                                                            (*
                                                             (/
                                                              (fma (* (* t k_m) (* t k_m)) 2.0 (pow (* (sin k_m) k_m) 2.0))
                                                              (* (cos k_m) l))
                                                             (/ t l)))
                                                           (/
                                                            2.0
                                                            (/
                                                             (/ (* (* (fma (* t t) 2.0 (* k_m k_m)) (* (tan k_m) (sin k_m))) t) l)
                                                             l))))
                                                        k_m = fabs(k);
                                                        double code(double t, double l, double k_m) {
                                                        	double tmp;
                                                        	if (k_m <= 2100000000000.0) {
                                                        		tmp = 2.0 / ((fma(((t * k_m) * (t * k_m)), 2.0, pow((sin(k_m) * k_m), 2.0)) / (cos(k_m) * l)) * (t / l));
                                                        	} else {
                                                        		tmp = 2.0 / ((((fma((t * t), 2.0, (k_m * k_m)) * (tan(k_m) * sin(k_m))) * t) / l) / l);
                                                        	}
                                                        	return tmp;
                                                        }
                                                        
                                                        k_m = abs(k)
                                                        function code(t, l, k_m)
                                                        	tmp = 0.0
                                                        	if (k_m <= 2100000000000.0)
                                                        		tmp = Float64(2.0 / Float64(Float64(fma(Float64(Float64(t * k_m) * Float64(t * k_m)), 2.0, (Float64(sin(k_m) * k_m) ^ 2.0)) / Float64(cos(k_m) * l)) * Float64(t / l)));
                                                        	else
                                                        		tmp = Float64(2.0 / Float64(Float64(Float64(Float64(fma(Float64(t * t), 2.0, Float64(k_m * k_m)) * Float64(tan(k_m) * sin(k_m))) * t) / l) / l));
                                                        	end
                                                        	return tmp
                                                        end
                                                        
                                                        k_m = N[Abs[k], $MachinePrecision]
                                                        code[t_, l_, k$95$m_] := If[LessEqual[k$95$m, 2100000000000.0], N[(2.0 / N[(N[(N[(N[(N[(t * k$95$m), $MachinePrecision] * N[(t * k$95$m), $MachinePrecision]), $MachinePrecision] * 2.0 + N[Power[N[(N[Sin[k$95$m], $MachinePrecision] * k$95$m), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision] / N[(N[Cos[k$95$m], $MachinePrecision] * l), $MachinePrecision]), $MachinePrecision] * N[(t / l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(2.0 / N[(N[(N[(N[(N[(N[(t * t), $MachinePrecision] * 2.0 + N[(k$95$m * k$95$m), $MachinePrecision]), $MachinePrecision] * N[(N[Tan[k$95$m], $MachinePrecision] * N[Sin[k$95$m], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * t), $MachinePrecision] / l), $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision]]
                                                        
                                                        \begin{array}{l}
                                                        k_m = \left|k\right|
                                                        
                                                        \\
                                                        \begin{array}{l}
                                                        \mathbf{if}\;k\_m \leq 2100000000000:\\
                                                        \;\;\;\;\frac{2}{\frac{\mathsf{fma}\left(\left(t \cdot k\_m\right) \cdot \left(t \cdot k\_m\right), 2, {\left(\sin k\_m \cdot k\_m\right)}^{2}\right)}{\cos k\_m \cdot \ell} \cdot \frac{t}{\ell}}\\
                                                        
                                                        \mathbf{else}:\\
                                                        \;\;\;\;\frac{2}{\frac{\frac{\left(\mathsf{fma}\left(t \cdot t, 2, k\_m \cdot k\_m\right) \cdot \left(\tan k\_m \cdot \sin k\_m\right)\right) \cdot t}{\ell}}{\ell}}\\
                                                        
                                                        
                                                        \end{array}
                                                        \end{array}
                                                        
                                                        Derivation
                                                        1. Split input into 2 regimes
                                                        2. if k < 2.1e12

                                                          1. Initial program 57.9%

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

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

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

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

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

                                                                if 2.1e12 < k

                                                                1. Initial program 36.9%

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

                                                                    \[\leadsto \frac{2}{\color{blue}{\frac{\mathsf{fma}\left({\sin k}^{2} \cdot k, k, \left(\left({\sin k}^{2} \cdot t\right) \cdot t\right) \cdot 2\right)}{\left(\cos k \cdot \ell\right) \cdot \ell} \cdot t}} \]
                                                                  2. 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)}} \]
                                                                  3. Applied rewrites67.5%

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

                                                                      \[\leadsto \frac{2}{\frac{\frac{\left(\mathsf{fma}\left(t \cdot t, 2, k \cdot k\right) \cdot \left(\tan k \cdot \sin k\right)\right) \cdot t}{\ell}}{\color{blue}{\ell}}} \]
                                                                  5. Recombined 2 regimes into one program.
                                                                  6. Final simplification80.6%

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

                                                                  Alternative 9: 83.7% accurate, 1.3× speedup?

                                                                  \[\begin{array}{l} k_m = \left|k\right| \\ \begin{array}{l} t_1 := \frac{t \cdot t}{\ell}\\ \mathbf{if}\;k\_m \leq 1.85 \cdot 10^{-144}:\\ \;\;\;\;\frac{2}{\left(\frac{2}{\cos k\_m} \cdot \frac{{\left(\sin k\_m \cdot t\right)}^{2}}{\ell}\right) \cdot \frac{t}{\ell}}\\ \mathbf{elif}\;k\_m \leq 4 \cdot 10^{-16}:\\ \;\;\;\;\frac{2}{\left(\mathsf{fma}\left(\mathsf{fma}\left(t\_1, 0.3333333333333333, \frac{1}{\ell}\right), k\_m \cdot k\_m, t\_1 \cdot 2\right) \cdot \left(k\_m \cdot k\_m\right)\right) \cdot \frac{t}{\ell}}\\ \mathbf{else}:\\ \;\;\;\;\frac{2}{\frac{\frac{\left(\mathsf{fma}\left(t \cdot t, 2, k\_m \cdot k\_m\right) \cdot \left(\tan k\_m \cdot \sin k\_m\right)\right) \cdot t}{\ell}}{\ell}}\\ \end{array} \end{array} \]
                                                                  k_m = (fabs.f64 k)
                                                                  (FPCore (t l k_m)
                                                                   :precision binary64
                                                                   (let* ((t_1 (/ (* t t) l)))
                                                                     (if (<= k_m 1.85e-144)
                                                                       (/ 2.0 (* (* (/ 2.0 (cos k_m)) (/ (pow (* (sin k_m) t) 2.0) l)) (/ t l)))
                                                                       (if (<= k_m 4e-16)
                                                                         (/
                                                                          2.0
                                                                          (*
                                                                           (*
                                                                            (fma (fma t_1 0.3333333333333333 (/ 1.0 l)) (* k_m k_m) (* t_1 2.0))
                                                                            (* k_m k_m))
                                                                           (/ t l)))
                                                                         (/
                                                                          2.0
                                                                          (/
                                                                           (/ (* (* (fma (* t t) 2.0 (* k_m k_m)) (* (tan k_m) (sin k_m))) t) l)
                                                                           l))))))
                                                                  k_m = fabs(k);
                                                                  double code(double t, double l, double k_m) {
                                                                  	double t_1 = (t * t) / l;
                                                                  	double tmp;
                                                                  	if (k_m <= 1.85e-144) {
                                                                  		tmp = 2.0 / (((2.0 / cos(k_m)) * (pow((sin(k_m) * t), 2.0) / l)) * (t / l));
                                                                  	} else if (k_m <= 4e-16) {
                                                                  		tmp = 2.0 / ((fma(fma(t_1, 0.3333333333333333, (1.0 / l)), (k_m * k_m), (t_1 * 2.0)) * (k_m * k_m)) * (t / l));
                                                                  	} else {
                                                                  		tmp = 2.0 / ((((fma((t * t), 2.0, (k_m * k_m)) * (tan(k_m) * sin(k_m))) * t) / l) / l);
                                                                  	}
                                                                  	return tmp;
                                                                  }
                                                                  
                                                                  k_m = abs(k)
                                                                  function code(t, l, k_m)
                                                                  	t_1 = Float64(Float64(t * t) / l)
                                                                  	tmp = 0.0
                                                                  	if (k_m <= 1.85e-144)
                                                                  		tmp = Float64(2.0 / Float64(Float64(Float64(2.0 / cos(k_m)) * Float64((Float64(sin(k_m) * t) ^ 2.0) / l)) * Float64(t / l)));
                                                                  	elseif (k_m <= 4e-16)
                                                                  		tmp = Float64(2.0 / Float64(Float64(fma(fma(t_1, 0.3333333333333333, Float64(1.0 / l)), Float64(k_m * k_m), Float64(t_1 * 2.0)) * Float64(k_m * k_m)) * Float64(t / l)));
                                                                  	else
                                                                  		tmp = Float64(2.0 / Float64(Float64(Float64(Float64(fma(Float64(t * t), 2.0, Float64(k_m * k_m)) * Float64(tan(k_m) * sin(k_m))) * t) / l) / l));
                                                                  	end
                                                                  	return tmp
                                                                  end
                                                                  
                                                                  k_m = N[Abs[k], $MachinePrecision]
                                                                  code[t_, l_, k$95$m_] := Block[{t$95$1 = N[(N[(t * t), $MachinePrecision] / l), $MachinePrecision]}, If[LessEqual[k$95$m, 1.85e-144], N[(2.0 / N[(N[(N[(2.0 / N[Cos[k$95$m], $MachinePrecision]), $MachinePrecision] * N[(N[Power[N[(N[Sin[k$95$m], $MachinePrecision] * t), $MachinePrecision], 2.0], $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision] * N[(t / l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[k$95$m, 4e-16], N[(2.0 / N[(N[(N[(N[(t$95$1 * 0.3333333333333333 + N[(1.0 / l), $MachinePrecision]), $MachinePrecision] * N[(k$95$m * k$95$m), $MachinePrecision] + N[(t$95$1 * 2.0), $MachinePrecision]), $MachinePrecision] * N[(k$95$m * k$95$m), $MachinePrecision]), $MachinePrecision] * N[(t / l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(2.0 / N[(N[(N[(N[(N[(N[(t * t), $MachinePrecision] * 2.0 + N[(k$95$m * k$95$m), $MachinePrecision]), $MachinePrecision] * N[(N[Tan[k$95$m], $MachinePrecision] * N[Sin[k$95$m], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * t), $MachinePrecision] / l), $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision]]]]
                                                                  
                                                                  \begin{array}{l}
                                                                  k_m = \left|k\right|
                                                                  
                                                                  \\
                                                                  \begin{array}{l}
                                                                  t_1 := \frac{t \cdot t}{\ell}\\
                                                                  \mathbf{if}\;k\_m \leq 1.85 \cdot 10^{-144}:\\
                                                                  \;\;\;\;\frac{2}{\left(\frac{2}{\cos k\_m} \cdot \frac{{\left(\sin k\_m \cdot t\right)}^{2}}{\ell}\right) \cdot \frac{t}{\ell}}\\
                                                                  
                                                                  \mathbf{elif}\;k\_m \leq 4 \cdot 10^{-16}:\\
                                                                  \;\;\;\;\frac{2}{\left(\mathsf{fma}\left(\mathsf{fma}\left(t\_1, 0.3333333333333333, \frac{1}{\ell}\right), k\_m \cdot k\_m, t\_1 \cdot 2\right) \cdot \left(k\_m \cdot k\_m\right)\right) \cdot \frac{t}{\ell}}\\
                                                                  
                                                                  \mathbf{else}:\\
                                                                  \;\;\;\;\frac{2}{\frac{\frac{\left(\mathsf{fma}\left(t \cdot t, 2, k\_m \cdot k\_m\right) \cdot \left(\tan k\_m \cdot \sin k\_m\right)\right) \cdot t}{\ell}}{\ell}}\\
                                                                  
                                                                  
                                                                  \end{array}
                                                                  \end{array}
                                                                  
                                                                  Derivation
                                                                  1. Split input into 3 regimes
                                                                  2. if k < 1.8500000000000001e-144

                                                                    1. Initial program 57.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. Applied rewrites68.1%

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

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

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

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

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

                                                                            if 1.8500000000000001e-144 < k < 3.9999999999999999e-16

                                                                            1. Initial program 58.7%

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

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

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

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

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

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

                                                                                    if 3.9999999999999999e-16 < k

                                                                                    1. Initial program 38.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 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. Applied rewrites64.7%

                                                                                        \[\leadsto \frac{2}{\color{blue}{\frac{\mathsf{fma}\left({\sin k}^{2} \cdot k, k, \left(\left({\sin k}^{2} \cdot t\right) \cdot t\right) \cdot 2\right)}{\left(\cos k \cdot \ell\right) \cdot \ell} \cdot t}} \]
                                                                                      2. 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)}} \]
                                                                                      3. Applied rewrites67.5%

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

                                                                                          \[\leadsto \frac{2}{\frac{\frac{\left(\mathsf{fma}\left(t \cdot t, 2, k \cdot k\right) \cdot \left(\tan k \cdot \sin k\right)\right) \cdot t}{\ell}}{\color{blue}{\ell}}} \]
                                                                                      5. Recombined 3 regimes into one program.
                                                                                      6. Final simplification76.3%

                                                                                        \[\leadsto \begin{array}{l} \mathbf{if}\;k \leq 1.85 \cdot 10^{-144}:\\ \;\;\;\;\frac{2}{\left(\frac{2}{\cos k} \cdot \frac{{\left(\sin k \cdot t\right)}^{2}}{\ell}\right) \cdot \frac{t}{\ell}}\\ \mathbf{elif}\;k \leq 4 \cdot 10^{-16}:\\ \;\;\;\;\frac{2}{\left(\mathsf{fma}\left(\mathsf{fma}\left(\frac{t \cdot t}{\ell}, 0.3333333333333333, \frac{1}{\ell}\right), k \cdot k, \frac{t \cdot t}{\ell} \cdot 2\right) \cdot \left(k \cdot k\right)\right) \cdot \frac{t}{\ell}}\\ \mathbf{else}:\\ \;\;\;\;\frac{2}{\frac{\frac{\left(\mathsf{fma}\left(t \cdot t, 2, k \cdot k\right) \cdot \left(\tan k \cdot \sin k\right)\right) \cdot t}{\ell}}{\ell}}\\ \end{array} \]
                                                                                      7. Add Preprocessing

                                                                                      Alternative 10: 81.9% accurate, 1.7× speedup?

                                                                                      \[\begin{array}{l} k_m = \left|k\right| \\ \begin{array}{l} t_1 := \frac{t \cdot t}{\ell}\\ \mathbf{if}\;k\_m \leq 1.8 \cdot 10^{-102}:\\ \;\;\;\;\frac{\frac{\ell}{t \cdot k\_m} \cdot \frac{\frac{\ell}{k\_m}}{t}}{t}\\ \mathbf{elif}\;k\_m \leq 0.0032 \lor \neg \left(k\_m \leq 1.9 \cdot 10^{+145}\right):\\ \;\;\;\;\frac{2}{\left(\mathsf{fma}\left(\mathsf{fma}\left(t\_1, 0.3333333333333333, \frac{1}{\ell}\right), k\_m \cdot k\_m, t\_1 \cdot 2\right) \cdot \left(k\_m \cdot k\_m\right)\right) \cdot \frac{t}{\ell}}\\ \mathbf{else}:\\ \;\;\;\;\frac{2}{\frac{\left(\mathsf{fma}\left(t \cdot t, 2, k\_m \cdot k\_m\right) \cdot \left(\tan k\_m \cdot \sin k\_m\right)\right) \cdot t}{\ell \cdot \ell}}\\ \end{array} \end{array} \]
                                                                                      k_m = (fabs.f64 k)
                                                                                      (FPCore (t l k_m)
                                                                                       :precision binary64
                                                                                       (let* ((t_1 (/ (* t t) l)))
                                                                                         (if (<= k_m 1.8e-102)
                                                                                           (/ (* (/ l (* t k_m)) (/ (/ l k_m) t)) t)
                                                                                           (if (or (<= k_m 0.0032) (not (<= k_m 1.9e+145)))
                                                                                             (/
                                                                                              2.0
                                                                                              (*
                                                                                               (*
                                                                                                (fma (fma t_1 0.3333333333333333 (/ 1.0 l)) (* k_m k_m) (* t_1 2.0))
                                                                                                (* k_m k_m))
                                                                                               (/ t l)))
                                                                                             (/
                                                                                              2.0
                                                                                              (/
                                                                                               (* (* (fma (* t t) 2.0 (* k_m k_m)) (* (tan k_m) (sin k_m))) t)
                                                                                               (* l l)))))))
                                                                                      k_m = fabs(k);
                                                                                      double code(double t, double l, double k_m) {
                                                                                      	double t_1 = (t * t) / l;
                                                                                      	double tmp;
                                                                                      	if (k_m <= 1.8e-102) {
                                                                                      		tmp = ((l / (t * k_m)) * ((l / k_m) / t)) / t;
                                                                                      	} else if ((k_m <= 0.0032) || !(k_m <= 1.9e+145)) {
                                                                                      		tmp = 2.0 / ((fma(fma(t_1, 0.3333333333333333, (1.0 / l)), (k_m * k_m), (t_1 * 2.0)) * (k_m * k_m)) * (t / l));
                                                                                      	} else {
                                                                                      		tmp = 2.0 / (((fma((t * t), 2.0, (k_m * k_m)) * (tan(k_m) * sin(k_m))) * t) / (l * l));
                                                                                      	}
                                                                                      	return tmp;
                                                                                      }
                                                                                      
                                                                                      k_m = abs(k)
                                                                                      function code(t, l, k_m)
                                                                                      	t_1 = Float64(Float64(t * t) / l)
                                                                                      	tmp = 0.0
                                                                                      	if (k_m <= 1.8e-102)
                                                                                      		tmp = Float64(Float64(Float64(l / Float64(t * k_m)) * Float64(Float64(l / k_m) / t)) / t);
                                                                                      	elseif ((k_m <= 0.0032) || !(k_m <= 1.9e+145))
                                                                                      		tmp = Float64(2.0 / Float64(Float64(fma(fma(t_1, 0.3333333333333333, Float64(1.0 / l)), Float64(k_m * k_m), Float64(t_1 * 2.0)) * Float64(k_m * k_m)) * Float64(t / l)));
                                                                                      	else
                                                                                      		tmp = Float64(2.0 / Float64(Float64(Float64(fma(Float64(t * t), 2.0, Float64(k_m * k_m)) * Float64(tan(k_m) * sin(k_m))) * t) / Float64(l * l)));
                                                                                      	end
                                                                                      	return tmp
                                                                                      end
                                                                                      
                                                                                      k_m = N[Abs[k], $MachinePrecision]
                                                                                      code[t_, l_, k$95$m_] := Block[{t$95$1 = N[(N[(t * t), $MachinePrecision] / l), $MachinePrecision]}, If[LessEqual[k$95$m, 1.8e-102], N[(N[(N[(l / N[(t * k$95$m), $MachinePrecision]), $MachinePrecision] * N[(N[(l / k$95$m), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision] / t), $MachinePrecision], If[Or[LessEqual[k$95$m, 0.0032], N[Not[LessEqual[k$95$m, 1.9e+145]], $MachinePrecision]], N[(2.0 / N[(N[(N[(N[(t$95$1 * 0.3333333333333333 + N[(1.0 / l), $MachinePrecision]), $MachinePrecision] * N[(k$95$m * k$95$m), $MachinePrecision] + N[(t$95$1 * 2.0), $MachinePrecision]), $MachinePrecision] * N[(k$95$m * k$95$m), $MachinePrecision]), $MachinePrecision] * N[(t / l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(2.0 / N[(N[(N[(N[(N[(t * t), $MachinePrecision] * 2.0 + N[(k$95$m * k$95$m), $MachinePrecision]), $MachinePrecision] * N[(N[Tan[k$95$m], $MachinePrecision] * N[Sin[k$95$m], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * t), $MachinePrecision] / N[(l * l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
                                                                                      
                                                                                      \begin{array}{l}
                                                                                      k_m = \left|k\right|
                                                                                      
                                                                                      \\
                                                                                      \begin{array}{l}
                                                                                      t_1 := \frac{t \cdot t}{\ell}\\
                                                                                      \mathbf{if}\;k\_m \leq 1.8 \cdot 10^{-102}:\\
                                                                                      \;\;\;\;\frac{\frac{\ell}{t \cdot k\_m} \cdot \frac{\frac{\ell}{k\_m}}{t}}{t}\\
                                                                                      
                                                                                      \mathbf{elif}\;k\_m \leq 0.0032 \lor \neg \left(k\_m \leq 1.9 \cdot 10^{+145}\right):\\
                                                                                      \;\;\;\;\frac{2}{\left(\mathsf{fma}\left(\mathsf{fma}\left(t\_1, 0.3333333333333333, \frac{1}{\ell}\right), k\_m \cdot k\_m, t\_1 \cdot 2\right) \cdot \left(k\_m \cdot k\_m\right)\right) \cdot \frac{t}{\ell}}\\
                                                                                      
                                                                                      \mathbf{else}:\\
                                                                                      \;\;\;\;\frac{2}{\frac{\left(\mathsf{fma}\left(t \cdot t, 2, k\_m \cdot k\_m\right) \cdot \left(\tan k\_m \cdot \sin k\_m\right)\right) \cdot t}{\ell \cdot \ell}}\\
                                                                                      
                                                                                      
                                                                                      \end{array}
                                                                                      \end{array}
                                                                                      
                                                                                      Derivation
                                                                                      1. Split input into 3 regimes
                                                                                      2. if k < 1.8e-102

                                                                                        1. Initial program 58.1%

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

                                                                                          \[\leadsto \color{blue}{\frac{{\ell}^{2}}{{k}^{2} \cdot {t}^{3}}} \]
                                                                                        4. Step-by-step derivation
                                                                                          1. Applied rewrites59.6%

                                                                                            \[\leadsto \color{blue}{\frac{\ell}{{t}^{3}} \cdot \frac{\ell}{k \cdot k}} \]
                                                                                          2. Step-by-step derivation
                                                                                            1. Applied rewrites63.5%

                                                                                              \[\leadsto \frac{\frac{\ell}{k} \cdot \ell}{\color{blue}{{t}^{3} \cdot k}} \]
                                                                                            2. Step-by-step derivation
                                                                                              1. Applied rewrites67.1%

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

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

                                                                                                if 1.8e-102 < k < 0.00320000000000000015 or 1.90000000000000006e145 < k

                                                                                                1. Initial program 49.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. Applied rewrites61.0%

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

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

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

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

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

                                                                                                        if 0.00320000000000000015 < k < 1.90000000000000006e145

                                                                                                        1. Initial program 29.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. Applied rewrites75.0%

                                                                                                            \[\leadsto \frac{2}{\color{blue}{\frac{\mathsf{fma}\left({\sin k}^{2} \cdot k, k, \left(\left({\sin k}^{2} \cdot t\right) \cdot t\right) \cdot 2\right)}{\left(\cos k \cdot \ell\right) \cdot \ell} \cdot t}} \]
                                                                                                          2. 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)}} \]
                                                                                                          3. Applied rewrites81.9%

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

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

                                                                                                            \[\leadsto \begin{array}{l} \mathbf{if}\;k \leq 1.8 \cdot 10^{-102}:\\ \;\;\;\;\frac{\frac{\ell}{t \cdot k} \cdot \frac{\frac{\ell}{k}}{t}}{t}\\ \mathbf{elif}\;k \leq 0.0032 \lor \neg \left(k \leq 1.9 \cdot 10^{+145}\right):\\ \;\;\;\;\frac{2}{\left(\mathsf{fma}\left(\mathsf{fma}\left(\frac{t \cdot t}{\ell}, 0.3333333333333333, \frac{1}{\ell}\right), k \cdot k, \frac{t \cdot t}{\ell} \cdot 2\right) \cdot \left(k \cdot k\right)\right) \cdot \frac{t}{\ell}}\\ \mathbf{else}:\\ \;\;\;\;\frac{2}{\frac{\left(\mathsf{fma}\left(t \cdot t, 2, k \cdot k\right) \cdot \left(\tan k \cdot \sin k\right)\right) \cdot t}{\ell \cdot \ell}}\\ \end{array} \]
                                                                                                          7. Add Preprocessing

                                                                                                          Alternative 11: 81.5% accurate, 1.7× speedup?

                                                                                                          \[\begin{array}{l} k_m = \left|k\right| \\ \begin{array}{l} t_1 := \frac{t \cdot t}{\ell}\\ \mathbf{if}\;k\_m \leq 1.8 \cdot 10^{-102}:\\ \;\;\;\;\frac{\frac{\ell}{t \cdot k\_m} \cdot \frac{\frac{\ell}{k\_m}}{t}}{t}\\ \mathbf{elif}\;k\_m \leq 0.0005 \lor \neg \left(k\_m \leq 8.6 \cdot 10^{+148}\right):\\ \;\;\;\;\frac{2}{\left(\mathsf{fma}\left(\mathsf{fma}\left(t\_1, 0.3333333333333333, \frac{1}{\ell}\right), k\_m \cdot k\_m, t\_1 \cdot 2\right) \cdot \left(k\_m \cdot k\_m\right)\right) \cdot \frac{t}{\ell}}\\ \mathbf{else}:\\ \;\;\;\;\frac{2}{t \cdot \frac{\mathsf{fma}\left(t \cdot t, 2, k\_m \cdot k\_m\right) \cdot \left(\tan k\_m \cdot \sin k\_m\right)}{\ell \cdot \ell}}\\ \end{array} \end{array} \]
                                                                                                          k_m = (fabs.f64 k)
                                                                                                          (FPCore (t l k_m)
                                                                                                           :precision binary64
                                                                                                           (let* ((t_1 (/ (* t t) l)))
                                                                                                             (if (<= k_m 1.8e-102)
                                                                                                               (/ (* (/ l (* t k_m)) (/ (/ l k_m) t)) t)
                                                                                                               (if (or (<= k_m 0.0005) (not (<= k_m 8.6e+148)))
                                                                                                                 (/
                                                                                                                  2.0
                                                                                                                  (*
                                                                                                                   (*
                                                                                                                    (fma (fma t_1 0.3333333333333333 (/ 1.0 l)) (* k_m k_m) (* t_1 2.0))
                                                                                                                    (* k_m k_m))
                                                                                                                   (/ t l)))
                                                                                                                 (/
                                                                                                                  2.0
                                                                                                                  (*
                                                                                                                   t
                                                                                                                   (/
                                                                                                                    (* (fma (* t t) 2.0 (* k_m k_m)) (* (tan k_m) (sin k_m)))
                                                                                                                    (* l l))))))))
                                                                                                          k_m = fabs(k);
                                                                                                          double code(double t, double l, double k_m) {
                                                                                                          	double t_1 = (t * t) / l;
                                                                                                          	double tmp;
                                                                                                          	if (k_m <= 1.8e-102) {
                                                                                                          		tmp = ((l / (t * k_m)) * ((l / k_m) / t)) / t;
                                                                                                          	} else if ((k_m <= 0.0005) || !(k_m <= 8.6e+148)) {
                                                                                                          		tmp = 2.0 / ((fma(fma(t_1, 0.3333333333333333, (1.0 / l)), (k_m * k_m), (t_1 * 2.0)) * (k_m * k_m)) * (t / l));
                                                                                                          	} else {
                                                                                                          		tmp = 2.0 / (t * ((fma((t * t), 2.0, (k_m * k_m)) * (tan(k_m) * sin(k_m))) / (l * l)));
                                                                                                          	}
                                                                                                          	return tmp;
                                                                                                          }
                                                                                                          
                                                                                                          k_m = abs(k)
                                                                                                          function code(t, l, k_m)
                                                                                                          	t_1 = Float64(Float64(t * t) / l)
                                                                                                          	tmp = 0.0
                                                                                                          	if (k_m <= 1.8e-102)
                                                                                                          		tmp = Float64(Float64(Float64(l / Float64(t * k_m)) * Float64(Float64(l / k_m) / t)) / t);
                                                                                                          	elseif ((k_m <= 0.0005) || !(k_m <= 8.6e+148))
                                                                                                          		tmp = Float64(2.0 / Float64(Float64(fma(fma(t_1, 0.3333333333333333, Float64(1.0 / l)), Float64(k_m * k_m), Float64(t_1 * 2.0)) * Float64(k_m * k_m)) * Float64(t / l)));
                                                                                                          	else
                                                                                                          		tmp = Float64(2.0 / Float64(t * Float64(Float64(fma(Float64(t * t), 2.0, Float64(k_m * k_m)) * Float64(tan(k_m) * sin(k_m))) / Float64(l * l))));
                                                                                                          	end
                                                                                                          	return tmp
                                                                                                          end
                                                                                                          
                                                                                                          k_m = N[Abs[k], $MachinePrecision]
                                                                                                          code[t_, l_, k$95$m_] := Block[{t$95$1 = N[(N[(t * t), $MachinePrecision] / l), $MachinePrecision]}, If[LessEqual[k$95$m, 1.8e-102], N[(N[(N[(l / N[(t * k$95$m), $MachinePrecision]), $MachinePrecision] * N[(N[(l / k$95$m), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision] / t), $MachinePrecision], If[Or[LessEqual[k$95$m, 0.0005], N[Not[LessEqual[k$95$m, 8.6e+148]], $MachinePrecision]], N[(2.0 / N[(N[(N[(N[(t$95$1 * 0.3333333333333333 + N[(1.0 / l), $MachinePrecision]), $MachinePrecision] * N[(k$95$m * k$95$m), $MachinePrecision] + N[(t$95$1 * 2.0), $MachinePrecision]), $MachinePrecision] * N[(k$95$m * k$95$m), $MachinePrecision]), $MachinePrecision] * N[(t / l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(2.0 / N[(t * N[(N[(N[(N[(t * t), $MachinePrecision] * 2.0 + N[(k$95$m * k$95$m), $MachinePrecision]), $MachinePrecision] * N[(N[Tan[k$95$m], $MachinePrecision] * N[Sin[k$95$m], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(l * l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
                                                                                                          
                                                                                                          \begin{array}{l}
                                                                                                          k_m = \left|k\right|
                                                                                                          
                                                                                                          \\
                                                                                                          \begin{array}{l}
                                                                                                          t_1 := \frac{t \cdot t}{\ell}\\
                                                                                                          \mathbf{if}\;k\_m \leq 1.8 \cdot 10^{-102}:\\
                                                                                                          \;\;\;\;\frac{\frac{\ell}{t \cdot k\_m} \cdot \frac{\frac{\ell}{k\_m}}{t}}{t}\\
                                                                                                          
                                                                                                          \mathbf{elif}\;k\_m \leq 0.0005 \lor \neg \left(k\_m \leq 8.6 \cdot 10^{+148}\right):\\
                                                                                                          \;\;\;\;\frac{2}{\left(\mathsf{fma}\left(\mathsf{fma}\left(t\_1, 0.3333333333333333, \frac{1}{\ell}\right), k\_m \cdot k\_m, t\_1 \cdot 2\right) \cdot \left(k\_m \cdot k\_m\right)\right) \cdot \frac{t}{\ell}}\\
                                                                                                          
                                                                                                          \mathbf{else}:\\
                                                                                                          \;\;\;\;\frac{2}{t \cdot \frac{\mathsf{fma}\left(t \cdot t, 2, k\_m \cdot k\_m\right) \cdot \left(\tan k\_m \cdot \sin k\_m\right)}{\ell \cdot \ell}}\\
                                                                                                          
                                                                                                          
                                                                                                          \end{array}
                                                                                                          \end{array}
                                                                                                          
                                                                                                          Derivation
                                                                                                          1. Split input into 3 regimes
                                                                                                          2. if k < 1.8e-102

                                                                                                            1. Initial program 58.1%

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

                                                                                                              \[\leadsto \color{blue}{\frac{{\ell}^{2}}{{k}^{2} \cdot {t}^{3}}} \]
                                                                                                            4. Step-by-step derivation
                                                                                                              1. Applied rewrites59.6%

                                                                                                                \[\leadsto \color{blue}{\frac{\ell}{{t}^{3}} \cdot \frac{\ell}{k \cdot k}} \]
                                                                                                              2. Step-by-step derivation
                                                                                                                1. Applied rewrites63.5%

                                                                                                                  \[\leadsto \frac{\frac{\ell}{k} \cdot \ell}{\color{blue}{{t}^{3} \cdot k}} \]
                                                                                                                2. Step-by-step derivation
                                                                                                                  1. Applied rewrites67.1%

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

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

                                                                                                                    if 1.8e-102 < k < 5.0000000000000001e-4 or 8.6000000000000003e148 < k

                                                                                                                    1. Initial program 49.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. Applied rewrites61.0%

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

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

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

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

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

                                                                                                                            if 5.0000000000000001e-4 < k < 8.6000000000000003e148

                                                                                                                            1. Initial program 29.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. Applied rewrites75.0%

                                                                                                                                \[\leadsto \frac{2}{\color{blue}{\frac{\mathsf{fma}\left({\sin k}^{2} \cdot k, k, \left(\left({\sin k}^{2} \cdot t\right) \cdot t\right) \cdot 2\right)}{\left(\cos k \cdot \ell\right) \cdot \ell} \cdot t}} \]
                                                                                                                              2. 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)}} \]
                                                                                                                              3. Applied rewrites81.9%

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

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

                                                                                                                                \[\leadsto \begin{array}{l} \mathbf{if}\;k \leq 1.8 \cdot 10^{-102}:\\ \;\;\;\;\frac{\frac{\ell}{t \cdot k} \cdot \frac{\frac{\ell}{k}}{t}}{t}\\ \mathbf{elif}\;k \leq 0.0005 \lor \neg \left(k \leq 8.6 \cdot 10^{+148}\right):\\ \;\;\;\;\frac{2}{\left(\mathsf{fma}\left(\mathsf{fma}\left(\frac{t \cdot t}{\ell}, 0.3333333333333333, \frac{1}{\ell}\right), k \cdot k, \frac{t \cdot t}{\ell} \cdot 2\right) \cdot \left(k \cdot k\right)\right) \cdot \frac{t}{\ell}}\\ \mathbf{else}:\\ \;\;\;\;\frac{2}{t \cdot \frac{\mathsf{fma}\left(t \cdot t, 2, k \cdot k\right) \cdot \left(\tan k \cdot \sin k\right)}{\ell \cdot \ell}}\\ \end{array} \]
                                                                                                                              7. Add Preprocessing

                                                                                                                              Alternative 12: 84.4% accurate, 1.7× speedup?

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

                                                                                                                                1. Initial program 58.1%

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

                                                                                                                                  \[\leadsto \color{blue}{\frac{{\ell}^{2}}{{k}^{2} \cdot {t}^{3}}} \]
                                                                                                                                4. Step-by-step derivation
                                                                                                                                  1. Applied rewrites59.6%

                                                                                                                                    \[\leadsto \color{blue}{\frac{\ell}{{t}^{3}} \cdot \frac{\ell}{k \cdot k}} \]
                                                                                                                                  2. Step-by-step derivation
                                                                                                                                    1. Applied rewrites63.5%

                                                                                                                                      \[\leadsto \frac{\frac{\ell}{k} \cdot \ell}{\color{blue}{{t}^{3} \cdot k}} \]
                                                                                                                                    2. Step-by-step derivation
                                                                                                                                      1. Applied rewrites67.1%

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

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

                                                                                                                                        if 6.4999999999999996e-101 < k

                                                                                                                                        1. Initial program 43.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. Applied rewrites65.3%

                                                                                                                                            \[\leadsto \frac{2}{\color{blue}{\frac{\mathsf{fma}\left({\sin k}^{2} \cdot k, k, \left(\left({\sin k}^{2} \cdot t\right) \cdot t\right) \cdot 2\right)}{\left(\cos k \cdot \ell\right) \cdot \ell} \cdot t}} \]
                                                                                                                                          2. 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)}} \]
                                                                                                                                          3. Applied rewrites67.3%

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

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

                                                                                                                                          Alternative 13: 70.7% accurate, 4.2× speedup?

                                                                                                                                          \[\begin{array}{l} k_m = \left|k\right| \\ \begin{array}{l} t_1 := \frac{t \cdot t}{\ell}\\ \mathbf{if}\;t \leq 1.6 \cdot 10^{-28}:\\ \;\;\;\;\frac{2}{\left(\mathsf{fma}\left(\mathsf{fma}\left(t\_1, 0.3333333333333333, \frac{1}{\ell}\right), k\_m \cdot k\_m, t\_1 \cdot 2\right) \cdot \left(k\_m \cdot k\_m\right)\right) \cdot \frac{t}{\ell}}\\ \mathbf{else}:\\ \;\;\;\;\frac{\frac{\ell}{t \cdot k\_m} \cdot \frac{\frac{\ell}{k\_m}}{t}}{t}\\ \end{array} \end{array} \]
                                                                                                                                          k_m = (fabs.f64 k)
                                                                                                                                          (FPCore (t l k_m)
                                                                                                                                           :precision binary64
                                                                                                                                           (let* ((t_1 (/ (* t t) l)))
                                                                                                                                             (if (<= t 1.6e-28)
                                                                                                                                               (/
                                                                                                                                                2.0
                                                                                                                                                (*
                                                                                                                                                 (*
                                                                                                                                                  (fma (fma t_1 0.3333333333333333 (/ 1.0 l)) (* k_m k_m) (* t_1 2.0))
                                                                                                                                                  (* k_m k_m))
                                                                                                                                                 (/ t l)))
                                                                                                                                               (/ (* (/ l (* t k_m)) (/ (/ l k_m) t)) t))))
                                                                                                                                          k_m = fabs(k);
                                                                                                                                          double code(double t, double l, double k_m) {
                                                                                                                                          	double t_1 = (t * t) / l;
                                                                                                                                          	double tmp;
                                                                                                                                          	if (t <= 1.6e-28) {
                                                                                                                                          		tmp = 2.0 / ((fma(fma(t_1, 0.3333333333333333, (1.0 / l)), (k_m * k_m), (t_1 * 2.0)) * (k_m * k_m)) * (t / l));
                                                                                                                                          	} else {
                                                                                                                                          		tmp = ((l / (t * k_m)) * ((l / k_m) / t)) / t;
                                                                                                                                          	}
                                                                                                                                          	return tmp;
                                                                                                                                          }
                                                                                                                                          
                                                                                                                                          k_m = abs(k)
                                                                                                                                          function code(t, l, k_m)
                                                                                                                                          	t_1 = Float64(Float64(t * t) / l)
                                                                                                                                          	tmp = 0.0
                                                                                                                                          	if (t <= 1.6e-28)
                                                                                                                                          		tmp = Float64(2.0 / Float64(Float64(fma(fma(t_1, 0.3333333333333333, Float64(1.0 / l)), Float64(k_m * k_m), Float64(t_1 * 2.0)) * Float64(k_m * k_m)) * Float64(t / l)));
                                                                                                                                          	else
                                                                                                                                          		tmp = Float64(Float64(Float64(l / Float64(t * k_m)) * Float64(Float64(l / k_m) / t)) / t);
                                                                                                                                          	end
                                                                                                                                          	return tmp
                                                                                                                                          end
                                                                                                                                          
                                                                                                                                          k_m = N[Abs[k], $MachinePrecision]
                                                                                                                                          code[t_, l_, k$95$m_] := Block[{t$95$1 = N[(N[(t * t), $MachinePrecision] / l), $MachinePrecision]}, If[LessEqual[t, 1.6e-28], N[(2.0 / N[(N[(N[(N[(t$95$1 * 0.3333333333333333 + N[(1.0 / l), $MachinePrecision]), $MachinePrecision] * N[(k$95$m * k$95$m), $MachinePrecision] + N[(t$95$1 * 2.0), $MachinePrecision]), $MachinePrecision] * N[(k$95$m * k$95$m), $MachinePrecision]), $MachinePrecision] * N[(t / l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(l / N[(t * k$95$m), $MachinePrecision]), $MachinePrecision] * N[(N[(l / k$95$m), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision] / t), $MachinePrecision]]]
                                                                                                                                          
                                                                                                                                          \begin{array}{l}
                                                                                                                                          k_m = \left|k\right|
                                                                                                                                          
                                                                                                                                          \\
                                                                                                                                          \begin{array}{l}
                                                                                                                                          t_1 := \frac{t \cdot t}{\ell}\\
                                                                                                                                          \mathbf{if}\;t \leq 1.6 \cdot 10^{-28}:\\
                                                                                                                                          \;\;\;\;\frac{2}{\left(\mathsf{fma}\left(\mathsf{fma}\left(t\_1, 0.3333333333333333, \frac{1}{\ell}\right), k\_m \cdot k\_m, t\_1 \cdot 2\right) \cdot \left(k\_m \cdot k\_m\right)\right) \cdot \frac{t}{\ell}}\\
                                                                                                                                          
                                                                                                                                          \mathbf{else}:\\
                                                                                                                                          \;\;\;\;\frac{\frac{\ell}{t \cdot k\_m} \cdot \frac{\frac{\ell}{k\_m}}{t}}{t}\\
                                                                                                                                          
                                                                                                                                          
                                                                                                                                          \end{array}
                                                                                                                                          \end{array}
                                                                                                                                          
                                                                                                                                          Derivation
                                                                                                                                          1. Split input into 2 regimes
                                                                                                                                          2. if t < 1.59999999999999991e-28

                                                                                                                                            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 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. Applied rewrites66.9%

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

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

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

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

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

                                                                                                                                                    if 1.59999999999999991e-28 < t

                                                                                                                                                    1. Initial program 68.5%

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

                                                                                                                                                      \[\leadsto \color{blue}{\frac{{\ell}^{2}}{{k}^{2} \cdot {t}^{3}}} \]
                                                                                                                                                    4. Step-by-step derivation
                                                                                                                                                      1. Applied rewrites60.4%

                                                                                                                                                        \[\leadsto \color{blue}{\frac{\ell}{{t}^{3}} \cdot \frac{\ell}{k \cdot k}} \]
                                                                                                                                                      2. Step-by-step derivation
                                                                                                                                                        1. Applied rewrites67.3%

                                                                                                                                                          \[\leadsto \frac{\frac{\ell}{k} \cdot \ell}{\color{blue}{{t}^{3} \cdot k}} \]
                                                                                                                                                        2. Step-by-step derivation
                                                                                                                                                          1. Applied rewrites67.4%

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

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

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

                                                                                                                                                          Alternative 14: 62.9% accurate, 7.6× speedup?

                                                                                                                                                          \[\begin{array}{l} k_m = \left|k\right| \\ \begin{array}{l} \mathbf{if}\;t \leq 1.05 \cdot 10^{-28}:\\ \;\;\;\;\frac{2}{\left(\left(k\_m \cdot k\_m\right) \cdot \frac{t}{\ell \cdot \ell}\right) \cdot \left(k\_m \cdot k\_m\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{\frac{\ell}{t \cdot k\_m} \cdot \frac{\frac{\ell}{k\_m}}{t}}{t}\\ \end{array} \end{array} \]
                                                                                                                                                          k_m = (fabs.f64 k)
                                                                                                                                                          (FPCore (t l k_m)
                                                                                                                                                           :precision binary64
                                                                                                                                                           (if (<= t 1.05e-28)
                                                                                                                                                             (/ 2.0 (* (* (* k_m k_m) (/ t (* l l))) (* k_m k_m)))
                                                                                                                                                             (/ (* (/ l (* t k_m)) (/ (/ l k_m) t)) t)))
                                                                                                                                                          k_m = fabs(k);
                                                                                                                                                          double code(double t, double l, double k_m) {
                                                                                                                                                          	double tmp;
                                                                                                                                                          	if (t <= 1.05e-28) {
                                                                                                                                                          		tmp = 2.0 / (((k_m * k_m) * (t / (l * l))) * (k_m * k_m));
                                                                                                                                                          	} else {
                                                                                                                                                          		tmp = ((l / (t * k_m)) * ((l / k_m) / t)) / t;
                                                                                                                                                          	}
                                                                                                                                                          	return tmp;
                                                                                                                                                          }
                                                                                                                                                          
                                                                                                                                                          k_m =     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, l, k_m)
                                                                                                                                                          use fmin_fmax_functions
                                                                                                                                                              real(8), intent (in) :: t
                                                                                                                                                              real(8), intent (in) :: l
                                                                                                                                                              real(8), intent (in) :: k_m
                                                                                                                                                              real(8) :: tmp
                                                                                                                                                              if (t <= 1.05d-28) then
                                                                                                                                                                  tmp = 2.0d0 / (((k_m * k_m) * (t / (l * l))) * (k_m * k_m))
                                                                                                                                                              else
                                                                                                                                                                  tmp = ((l / (t * k_m)) * ((l / k_m) / t)) / t
                                                                                                                                                              end if
                                                                                                                                                              code = tmp
                                                                                                                                                          end function
                                                                                                                                                          
                                                                                                                                                          k_m = Math.abs(k);
                                                                                                                                                          public static double code(double t, double l, double k_m) {
                                                                                                                                                          	double tmp;
                                                                                                                                                          	if (t <= 1.05e-28) {
                                                                                                                                                          		tmp = 2.0 / (((k_m * k_m) * (t / (l * l))) * (k_m * k_m));
                                                                                                                                                          	} else {
                                                                                                                                                          		tmp = ((l / (t * k_m)) * ((l / k_m) / t)) / t;
                                                                                                                                                          	}
                                                                                                                                                          	return tmp;
                                                                                                                                                          }
                                                                                                                                                          
                                                                                                                                                          k_m = math.fabs(k)
                                                                                                                                                          def code(t, l, k_m):
                                                                                                                                                          	tmp = 0
                                                                                                                                                          	if t <= 1.05e-28:
                                                                                                                                                          		tmp = 2.0 / (((k_m * k_m) * (t / (l * l))) * (k_m * k_m))
                                                                                                                                                          	else:
                                                                                                                                                          		tmp = ((l / (t * k_m)) * ((l / k_m) / t)) / t
                                                                                                                                                          	return tmp
                                                                                                                                                          
                                                                                                                                                          k_m = abs(k)
                                                                                                                                                          function code(t, l, k_m)
                                                                                                                                                          	tmp = 0.0
                                                                                                                                                          	if (t <= 1.05e-28)
                                                                                                                                                          		tmp = Float64(2.0 / Float64(Float64(Float64(k_m * k_m) * Float64(t / Float64(l * l))) * Float64(k_m * k_m)));
                                                                                                                                                          	else
                                                                                                                                                          		tmp = Float64(Float64(Float64(l / Float64(t * k_m)) * Float64(Float64(l / k_m) / t)) / t);
                                                                                                                                                          	end
                                                                                                                                                          	return tmp
                                                                                                                                                          end
                                                                                                                                                          
                                                                                                                                                          k_m = abs(k);
                                                                                                                                                          function tmp_2 = code(t, l, k_m)
                                                                                                                                                          	tmp = 0.0;
                                                                                                                                                          	if (t <= 1.05e-28)
                                                                                                                                                          		tmp = 2.0 / (((k_m * k_m) * (t / (l * l))) * (k_m * k_m));
                                                                                                                                                          	else
                                                                                                                                                          		tmp = ((l / (t * k_m)) * ((l / k_m) / t)) / t;
                                                                                                                                                          	end
                                                                                                                                                          	tmp_2 = tmp;
                                                                                                                                                          end
                                                                                                                                                          
                                                                                                                                                          k_m = N[Abs[k], $MachinePrecision]
                                                                                                                                                          code[t_, l_, k$95$m_] := If[LessEqual[t, 1.05e-28], N[(2.0 / N[(N[(N[(k$95$m * k$95$m), $MachinePrecision] * N[(t / N[(l * l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(k$95$m * k$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(l / N[(t * k$95$m), $MachinePrecision]), $MachinePrecision] * N[(N[(l / k$95$m), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision] / t), $MachinePrecision]]
                                                                                                                                                          
                                                                                                                                                          \begin{array}{l}
                                                                                                                                                          k_m = \left|k\right|
                                                                                                                                                          
                                                                                                                                                          \\
                                                                                                                                                          \begin{array}{l}
                                                                                                                                                          \mathbf{if}\;t \leq 1.05 \cdot 10^{-28}:\\
                                                                                                                                                          \;\;\;\;\frac{2}{\left(\left(k\_m \cdot k\_m\right) \cdot \frac{t}{\ell \cdot \ell}\right) \cdot \left(k\_m \cdot k\_m\right)}\\
                                                                                                                                                          
                                                                                                                                                          \mathbf{else}:\\
                                                                                                                                                          \;\;\;\;\frac{\frac{\ell}{t \cdot k\_m} \cdot \frac{\frac{\ell}{k\_m}}{t}}{t}\\
                                                                                                                                                          
                                                                                                                                                          
                                                                                                                                                          \end{array}
                                                                                                                                                          \end{array}
                                                                                                                                                          
                                                                                                                                                          Derivation
                                                                                                                                                          1. Split input into 2 regimes
                                                                                                                                                          2. if t < 1.05000000000000003e-28

                                                                                                                                                            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 k around 0

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

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

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

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

                                                                                                                                                                if 1.05000000000000003e-28 < t

                                                                                                                                                                1. Initial program 68.5%

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

                                                                                                                                                                  \[\leadsto \color{blue}{\frac{{\ell}^{2}}{{k}^{2} \cdot {t}^{3}}} \]
                                                                                                                                                                4. Step-by-step derivation
                                                                                                                                                                  1. Applied rewrites60.4%

                                                                                                                                                                    \[\leadsto \color{blue}{\frac{\ell}{{t}^{3}} \cdot \frac{\ell}{k \cdot k}} \]
                                                                                                                                                                  2. Step-by-step derivation
                                                                                                                                                                    1. Applied rewrites67.3%

                                                                                                                                                                      \[\leadsto \frac{\frac{\ell}{k} \cdot \ell}{\color{blue}{{t}^{3} \cdot k}} \]
                                                                                                                                                                    2. Step-by-step derivation
                                                                                                                                                                      1. Applied rewrites67.4%

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

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

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

                                                                                                                                                                      Alternative 15: 61.4% accurate, 8.4× speedup?

                                                                                                                                                                      \[\begin{array}{l} k_m = \left|k\right| \\ \begin{array}{l} \mathbf{if}\;t \leq 1.05 \cdot 10^{-28}:\\ \;\;\;\;\frac{2}{\left(\left(k\_m \cdot k\_m\right) \cdot \frac{t}{\ell \cdot \ell}\right) \cdot \left(k\_m \cdot k\_m\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{\frac{\ell}{k\_m}}{t} \cdot \frac{\ell}{\left(t \cdot t\right) \cdot k\_m}\\ \end{array} \end{array} \]
                                                                                                                                                                      k_m = (fabs.f64 k)
                                                                                                                                                                      (FPCore (t l k_m)
                                                                                                                                                                       :precision binary64
                                                                                                                                                                       (if (<= t 1.05e-28)
                                                                                                                                                                         (/ 2.0 (* (* (* k_m k_m) (/ t (* l l))) (* k_m k_m)))
                                                                                                                                                                         (* (/ (/ l k_m) t) (/ l (* (* t t) k_m)))))
                                                                                                                                                                      k_m = fabs(k);
                                                                                                                                                                      double code(double t, double l, double k_m) {
                                                                                                                                                                      	double tmp;
                                                                                                                                                                      	if (t <= 1.05e-28) {
                                                                                                                                                                      		tmp = 2.0 / (((k_m * k_m) * (t / (l * l))) * (k_m * k_m));
                                                                                                                                                                      	} else {
                                                                                                                                                                      		tmp = ((l / k_m) / t) * (l / ((t * t) * k_m));
                                                                                                                                                                      	}
                                                                                                                                                                      	return tmp;
                                                                                                                                                                      }
                                                                                                                                                                      
                                                                                                                                                                      k_m =     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, l, k_m)
                                                                                                                                                                      use fmin_fmax_functions
                                                                                                                                                                          real(8), intent (in) :: t
                                                                                                                                                                          real(8), intent (in) :: l
                                                                                                                                                                          real(8), intent (in) :: k_m
                                                                                                                                                                          real(8) :: tmp
                                                                                                                                                                          if (t <= 1.05d-28) then
                                                                                                                                                                              tmp = 2.0d0 / (((k_m * k_m) * (t / (l * l))) * (k_m * k_m))
                                                                                                                                                                          else
                                                                                                                                                                              tmp = ((l / k_m) / t) * (l / ((t * t) * k_m))
                                                                                                                                                                          end if
                                                                                                                                                                          code = tmp
                                                                                                                                                                      end function
                                                                                                                                                                      
                                                                                                                                                                      k_m = Math.abs(k);
                                                                                                                                                                      public static double code(double t, double l, double k_m) {
                                                                                                                                                                      	double tmp;
                                                                                                                                                                      	if (t <= 1.05e-28) {
                                                                                                                                                                      		tmp = 2.0 / (((k_m * k_m) * (t / (l * l))) * (k_m * k_m));
                                                                                                                                                                      	} else {
                                                                                                                                                                      		tmp = ((l / k_m) / t) * (l / ((t * t) * k_m));
                                                                                                                                                                      	}
                                                                                                                                                                      	return tmp;
                                                                                                                                                                      }
                                                                                                                                                                      
                                                                                                                                                                      k_m = math.fabs(k)
                                                                                                                                                                      def code(t, l, k_m):
                                                                                                                                                                      	tmp = 0
                                                                                                                                                                      	if t <= 1.05e-28:
                                                                                                                                                                      		tmp = 2.0 / (((k_m * k_m) * (t / (l * l))) * (k_m * k_m))
                                                                                                                                                                      	else:
                                                                                                                                                                      		tmp = ((l / k_m) / t) * (l / ((t * t) * k_m))
                                                                                                                                                                      	return tmp
                                                                                                                                                                      
                                                                                                                                                                      k_m = abs(k)
                                                                                                                                                                      function code(t, l, k_m)
                                                                                                                                                                      	tmp = 0.0
                                                                                                                                                                      	if (t <= 1.05e-28)
                                                                                                                                                                      		tmp = Float64(2.0 / Float64(Float64(Float64(k_m * k_m) * Float64(t / Float64(l * l))) * Float64(k_m * k_m)));
                                                                                                                                                                      	else
                                                                                                                                                                      		tmp = Float64(Float64(Float64(l / k_m) / t) * Float64(l / Float64(Float64(t * t) * k_m)));
                                                                                                                                                                      	end
                                                                                                                                                                      	return tmp
                                                                                                                                                                      end
                                                                                                                                                                      
                                                                                                                                                                      k_m = abs(k);
                                                                                                                                                                      function tmp_2 = code(t, l, k_m)
                                                                                                                                                                      	tmp = 0.0;
                                                                                                                                                                      	if (t <= 1.05e-28)
                                                                                                                                                                      		tmp = 2.0 / (((k_m * k_m) * (t / (l * l))) * (k_m * k_m));
                                                                                                                                                                      	else
                                                                                                                                                                      		tmp = ((l / k_m) / t) * (l / ((t * t) * k_m));
                                                                                                                                                                      	end
                                                                                                                                                                      	tmp_2 = tmp;
                                                                                                                                                                      end
                                                                                                                                                                      
                                                                                                                                                                      k_m = N[Abs[k], $MachinePrecision]
                                                                                                                                                                      code[t_, l_, k$95$m_] := If[LessEqual[t, 1.05e-28], N[(2.0 / N[(N[(N[(k$95$m * k$95$m), $MachinePrecision] * N[(t / N[(l * l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(k$95$m * k$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(l / k$95$m), $MachinePrecision] / t), $MachinePrecision] * N[(l / N[(N[(t * t), $MachinePrecision] * k$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
                                                                                                                                                                      
                                                                                                                                                                      \begin{array}{l}
                                                                                                                                                                      k_m = \left|k\right|
                                                                                                                                                                      
                                                                                                                                                                      \\
                                                                                                                                                                      \begin{array}{l}
                                                                                                                                                                      \mathbf{if}\;t \leq 1.05 \cdot 10^{-28}:\\
                                                                                                                                                                      \;\;\;\;\frac{2}{\left(\left(k\_m \cdot k\_m\right) \cdot \frac{t}{\ell \cdot \ell}\right) \cdot \left(k\_m \cdot k\_m\right)}\\
                                                                                                                                                                      
                                                                                                                                                                      \mathbf{else}:\\
                                                                                                                                                                      \;\;\;\;\frac{\frac{\ell}{k\_m}}{t} \cdot \frac{\ell}{\left(t \cdot t\right) \cdot k\_m}\\
                                                                                                                                                                      
                                                                                                                                                                      
                                                                                                                                                                      \end{array}
                                                                                                                                                                      \end{array}
                                                                                                                                                                      
                                                                                                                                                                      Derivation
                                                                                                                                                                      1. Split input into 2 regimes
                                                                                                                                                                      2. if t < 1.05000000000000003e-28

                                                                                                                                                                        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 k around 0

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

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

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

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

                                                                                                                                                                            if 1.05000000000000003e-28 < t

                                                                                                                                                                            1. Initial program 68.5%

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

                                                                                                                                                                              \[\leadsto \color{blue}{\frac{{\ell}^{2}}{{k}^{2} \cdot {t}^{3}}} \]
                                                                                                                                                                            4. Step-by-step derivation
                                                                                                                                                                              1. Applied rewrites60.4%

                                                                                                                                                                                \[\leadsto \color{blue}{\frac{\ell}{{t}^{3}} \cdot \frac{\ell}{k \cdot k}} \]
                                                                                                                                                                              2. Step-by-step derivation
                                                                                                                                                                                1. Applied rewrites67.3%

                                                                                                                                                                                  \[\leadsto \frac{\frac{\ell}{k} \cdot \ell}{\color{blue}{{t}^{3} \cdot k}} \]
                                                                                                                                                                                2. Step-by-step derivation
                                                                                                                                                                                  1. Applied rewrites67.4%

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

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

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

                                                                                                                                                                                  Alternative 16: 60.9% accurate, 8.6× speedup?

                                                                                                                                                                                  \[\begin{array}{l} k_m = \left|k\right| \\ \begin{array}{l} \mathbf{if}\;t \leq 1.05 \cdot 10^{-28}:\\ \;\;\;\;\frac{2}{\left(\left(k\_m \cdot k\_m\right) \cdot \frac{t}{\ell \cdot \ell}\right) \cdot \left(k\_m \cdot k\_m\right)}\\ \mathbf{else}:\\ \;\;\;\;\ell \cdot \frac{\ell}{\left(\left(t \cdot t\right) \cdot k\_m\right) \cdot \left(t \cdot k\_m\right)}\\ \end{array} \end{array} \]
                                                                                                                                                                                  k_m = (fabs.f64 k)
                                                                                                                                                                                  (FPCore (t l k_m)
                                                                                                                                                                                   :precision binary64
                                                                                                                                                                                   (if (<= t 1.05e-28)
                                                                                                                                                                                     (/ 2.0 (* (* (* k_m k_m) (/ t (* l l))) (* k_m k_m)))
                                                                                                                                                                                     (* l (/ l (* (* (* t t) k_m) (* t k_m))))))
                                                                                                                                                                                  k_m = fabs(k);
                                                                                                                                                                                  double code(double t, double l, double k_m) {
                                                                                                                                                                                  	double tmp;
                                                                                                                                                                                  	if (t <= 1.05e-28) {
                                                                                                                                                                                  		tmp = 2.0 / (((k_m * k_m) * (t / (l * l))) * (k_m * k_m));
                                                                                                                                                                                  	} else {
                                                                                                                                                                                  		tmp = l * (l / (((t * t) * k_m) * (t * k_m)));
                                                                                                                                                                                  	}
                                                                                                                                                                                  	return tmp;
                                                                                                                                                                                  }
                                                                                                                                                                                  
                                                                                                                                                                                  k_m =     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, l, k_m)
                                                                                                                                                                                  use fmin_fmax_functions
                                                                                                                                                                                      real(8), intent (in) :: t
                                                                                                                                                                                      real(8), intent (in) :: l
                                                                                                                                                                                      real(8), intent (in) :: k_m
                                                                                                                                                                                      real(8) :: tmp
                                                                                                                                                                                      if (t <= 1.05d-28) then
                                                                                                                                                                                          tmp = 2.0d0 / (((k_m * k_m) * (t / (l * l))) * (k_m * k_m))
                                                                                                                                                                                      else
                                                                                                                                                                                          tmp = l * (l / (((t * t) * k_m) * (t * k_m)))
                                                                                                                                                                                      end if
                                                                                                                                                                                      code = tmp
                                                                                                                                                                                  end function
                                                                                                                                                                                  
                                                                                                                                                                                  k_m = Math.abs(k);
                                                                                                                                                                                  public static double code(double t, double l, double k_m) {
                                                                                                                                                                                  	double tmp;
                                                                                                                                                                                  	if (t <= 1.05e-28) {
                                                                                                                                                                                  		tmp = 2.0 / (((k_m * k_m) * (t / (l * l))) * (k_m * k_m));
                                                                                                                                                                                  	} else {
                                                                                                                                                                                  		tmp = l * (l / (((t * t) * k_m) * (t * k_m)));
                                                                                                                                                                                  	}
                                                                                                                                                                                  	return tmp;
                                                                                                                                                                                  }
                                                                                                                                                                                  
                                                                                                                                                                                  k_m = math.fabs(k)
                                                                                                                                                                                  def code(t, l, k_m):
                                                                                                                                                                                  	tmp = 0
                                                                                                                                                                                  	if t <= 1.05e-28:
                                                                                                                                                                                  		tmp = 2.0 / (((k_m * k_m) * (t / (l * l))) * (k_m * k_m))
                                                                                                                                                                                  	else:
                                                                                                                                                                                  		tmp = l * (l / (((t * t) * k_m) * (t * k_m)))
                                                                                                                                                                                  	return tmp
                                                                                                                                                                                  
                                                                                                                                                                                  k_m = abs(k)
                                                                                                                                                                                  function code(t, l, k_m)
                                                                                                                                                                                  	tmp = 0.0
                                                                                                                                                                                  	if (t <= 1.05e-28)
                                                                                                                                                                                  		tmp = Float64(2.0 / Float64(Float64(Float64(k_m * k_m) * Float64(t / Float64(l * l))) * Float64(k_m * k_m)));
                                                                                                                                                                                  	else
                                                                                                                                                                                  		tmp = Float64(l * Float64(l / Float64(Float64(Float64(t * t) * k_m) * Float64(t * k_m))));
                                                                                                                                                                                  	end
                                                                                                                                                                                  	return tmp
                                                                                                                                                                                  end
                                                                                                                                                                                  
                                                                                                                                                                                  k_m = abs(k);
                                                                                                                                                                                  function tmp_2 = code(t, l, k_m)
                                                                                                                                                                                  	tmp = 0.0;
                                                                                                                                                                                  	if (t <= 1.05e-28)
                                                                                                                                                                                  		tmp = 2.0 / (((k_m * k_m) * (t / (l * l))) * (k_m * k_m));
                                                                                                                                                                                  	else
                                                                                                                                                                                  		tmp = l * (l / (((t * t) * k_m) * (t * k_m)));
                                                                                                                                                                                  	end
                                                                                                                                                                                  	tmp_2 = tmp;
                                                                                                                                                                                  end
                                                                                                                                                                                  
                                                                                                                                                                                  k_m = N[Abs[k], $MachinePrecision]
                                                                                                                                                                                  code[t_, l_, k$95$m_] := If[LessEqual[t, 1.05e-28], N[(2.0 / N[(N[(N[(k$95$m * k$95$m), $MachinePrecision] * N[(t / N[(l * l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(k$95$m * k$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(l * N[(l / N[(N[(N[(t * t), $MachinePrecision] * k$95$m), $MachinePrecision] * N[(t * k$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
                                                                                                                                                                                  
                                                                                                                                                                                  \begin{array}{l}
                                                                                                                                                                                  k_m = \left|k\right|
                                                                                                                                                                                  
                                                                                                                                                                                  \\
                                                                                                                                                                                  \begin{array}{l}
                                                                                                                                                                                  \mathbf{if}\;t \leq 1.05 \cdot 10^{-28}:\\
                                                                                                                                                                                  \;\;\;\;\frac{2}{\left(\left(k\_m \cdot k\_m\right) \cdot \frac{t}{\ell \cdot \ell}\right) \cdot \left(k\_m \cdot k\_m\right)}\\
                                                                                                                                                                                  
                                                                                                                                                                                  \mathbf{else}:\\
                                                                                                                                                                                  \;\;\;\;\ell \cdot \frac{\ell}{\left(\left(t \cdot t\right) \cdot k\_m\right) \cdot \left(t \cdot k\_m\right)}\\
                                                                                                                                                                                  
                                                                                                                                                                                  
                                                                                                                                                                                  \end{array}
                                                                                                                                                                                  \end{array}
                                                                                                                                                                                  
                                                                                                                                                                                  Derivation
                                                                                                                                                                                  1. Split input into 2 regimes
                                                                                                                                                                                  2. if t < 1.05000000000000003e-28

                                                                                                                                                                                    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 k around 0

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

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

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

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

                                                                                                                                                                                        if 1.05000000000000003e-28 < t

                                                                                                                                                                                        1. Initial program 68.5%

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

                                                                                                                                                                                          \[\leadsto \color{blue}{\frac{{\ell}^{2}}{{k}^{2} \cdot {t}^{3}}} \]
                                                                                                                                                                                        4. Step-by-step derivation
                                                                                                                                                                                          1. Applied rewrites60.4%

                                                                                                                                                                                            \[\leadsto \color{blue}{\frac{\ell}{{t}^{3}} \cdot \frac{\ell}{k \cdot k}} \]
                                                                                                                                                                                          2. Step-by-step derivation
                                                                                                                                                                                            1. Applied rewrites67.5%

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

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

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

                                                                                                                                                                                            Alternative 17: 63.6% accurate, 9.4× speedup?

                                                                                                                                                                                            \[\begin{array}{l} k_m = \left|k\right| \\ \begin{array}{l} \mathbf{if}\;\ell \leq 4 \cdot 10^{-50}:\\ \;\;\;\;\frac{\frac{\ell}{k\_m} \cdot \ell}{\left(\left(t \cdot k\_m\right) \cdot t\right) \cdot t}\\ \mathbf{else}:\\ \;\;\;\;\frac{\frac{\ell}{t \cdot t} \cdot \ell}{t \cdot \left(k\_m \cdot k\_m\right)}\\ \end{array} \end{array} \]
                                                                                                                                                                                            k_m = (fabs.f64 k)
                                                                                                                                                                                            (FPCore (t l k_m)
                                                                                                                                                                                             :precision binary64
                                                                                                                                                                                             (if (<= l 4e-50)
                                                                                                                                                                                               (/ (* (/ l k_m) l) (* (* (* t k_m) t) t))
                                                                                                                                                                                               (/ (* (/ l (* t t)) l) (* t (* k_m k_m)))))
                                                                                                                                                                                            k_m = fabs(k);
                                                                                                                                                                                            double code(double t, double l, double k_m) {
                                                                                                                                                                                            	double tmp;
                                                                                                                                                                                            	if (l <= 4e-50) {
                                                                                                                                                                                            		tmp = ((l / k_m) * l) / (((t * k_m) * t) * t);
                                                                                                                                                                                            	} else {
                                                                                                                                                                                            		tmp = ((l / (t * t)) * l) / (t * (k_m * k_m));
                                                                                                                                                                                            	}
                                                                                                                                                                                            	return tmp;
                                                                                                                                                                                            }
                                                                                                                                                                                            
                                                                                                                                                                                            k_m =     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, l, k_m)
                                                                                                                                                                                            use fmin_fmax_functions
                                                                                                                                                                                                real(8), intent (in) :: t
                                                                                                                                                                                                real(8), intent (in) :: l
                                                                                                                                                                                                real(8), intent (in) :: k_m
                                                                                                                                                                                                real(8) :: tmp
                                                                                                                                                                                                if (l <= 4d-50) then
                                                                                                                                                                                                    tmp = ((l / k_m) * l) / (((t * k_m) * t) * t)
                                                                                                                                                                                                else
                                                                                                                                                                                                    tmp = ((l / (t * t)) * l) / (t * (k_m * k_m))
                                                                                                                                                                                                end if
                                                                                                                                                                                                code = tmp
                                                                                                                                                                                            end function
                                                                                                                                                                                            
                                                                                                                                                                                            k_m = Math.abs(k);
                                                                                                                                                                                            public static double code(double t, double l, double k_m) {
                                                                                                                                                                                            	double tmp;
                                                                                                                                                                                            	if (l <= 4e-50) {
                                                                                                                                                                                            		tmp = ((l / k_m) * l) / (((t * k_m) * t) * t);
                                                                                                                                                                                            	} else {
                                                                                                                                                                                            		tmp = ((l / (t * t)) * l) / (t * (k_m * k_m));
                                                                                                                                                                                            	}
                                                                                                                                                                                            	return tmp;
                                                                                                                                                                                            }
                                                                                                                                                                                            
                                                                                                                                                                                            k_m = math.fabs(k)
                                                                                                                                                                                            def code(t, l, k_m):
                                                                                                                                                                                            	tmp = 0
                                                                                                                                                                                            	if l <= 4e-50:
                                                                                                                                                                                            		tmp = ((l / k_m) * l) / (((t * k_m) * t) * t)
                                                                                                                                                                                            	else:
                                                                                                                                                                                            		tmp = ((l / (t * t)) * l) / (t * (k_m * k_m))
                                                                                                                                                                                            	return tmp
                                                                                                                                                                                            
                                                                                                                                                                                            k_m = abs(k)
                                                                                                                                                                                            function code(t, l, k_m)
                                                                                                                                                                                            	tmp = 0.0
                                                                                                                                                                                            	if (l <= 4e-50)
                                                                                                                                                                                            		tmp = Float64(Float64(Float64(l / k_m) * l) / Float64(Float64(Float64(t * k_m) * t) * t));
                                                                                                                                                                                            	else
                                                                                                                                                                                            		tmp = Float64(Float64(Float64(l / Float64(t * t)) * l) / Float64(t * Float64(k_m * k_m)));
                                                                                                                                                                                            	end
                                                                                                                                                                                            	return tmp
                                                                                                                                                                                            end
                                                                                                                                                                                            
                                                                                                                                                                                            k_m = abs(k);
                                                                                                                                                                                            function tmp_2 = code(t, l, k_m)
                                                                                                                                                                                            	tmp = 0.0;
                                                                                                                                                                                            	if (l <= 4e-50)
                                                                                                                                                                                            		tmp = ((l / k_m) * l) / (((t * k_m) * t) * t);
                                                                                                                                                                                            	else
                                                                                                                                                                                            		tmp = ((l / (t * t)) * l) / (t * (k_m * k_m));
                                                                                                                                                                                            	end
                                                                                                                                                                                            	tmp_2 = tmp;
                                                                                                                                                                                            end
                                                                                                                                                                                            
                                                                                                                                                                                            k_m = N[Abs[k], $MachinePrecision]
                                                                                                                                                                                            code[t_, l_, k$95$m_] := If[LessEqual[l, 4e-50], N[(N[(N[(l / k$95$m), $MachinePrecision] * l), $MachinePrecision] / N[(N[(N[(t * k$95$m), $MachinePrecision] * t), $MachinePrecision] * t), $MachinePrecision]), $MachinePrecision], N[(N[(N[(l / N[(t * t), $MachinePrecision]), $MachinePrecision] * l), $MachinePrecision] / N[(t * N[(k$95$m * k$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
                                                                                                                                                                                            
                                                                                                                                                                                            \begin{array}{l}
                                                                                                                                                                                            k_m = \left|k\right|
                                                                                                                                                                                            
                                                                                                                                                                                            \\
                                                                                                                                                                                            \begin{array}{l}
                                                                                                                                                                                            \mathbf{if}\;\ell \leq 4 \cdot 10^{-50}:\\
                                                                                                                                                                                            \;\;\;\;\frac{\frac{\ell}{k\_m} \cdot \ell}{\left(\left(t \cdot k\_m\right) \cdot t\right) \cdot t}\\
                                                                                                                                                                                            
                                                                                                                                                                                            \mathbf{else}:\\
                                                                                                                                                                                            \;\;\;\;\frac{\frac{\ell}{t \cdot t} \cdot \ell}{t \cdot \left(k\_m \cdot k\_m\right)}\\
                                                                                                                                                                                            
                                                                                                                                                                                            
                                                                                                                                                                                            \end{array}
                                                                                                                                                                                            \end{array}
                                                                                                                                                                                            
                                                                                                                                                                                            Derivation
                                                                                                                                                                                            1. Split input into 2 regimes
                                                                                                                                                                                            2. if l < 4.00000000000000003e-50

                                                                                                                                                                                              1. Initial program 55.1%

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

                                                                                                                                                                                                \[\leadsto \color{blue}{\frac{{\ell}^{2}}{{k}^{2} \cdot {t}^{3}}} \]
                                                                                                                                                                                              4. Step-by-step derivation
                                                                                                                                                                                                1. Applied rewrites57.6%

                                                                                                                                                                                                  \[\leadsto \color{blue}{\frac{\ell}{{t}^{3}} \cdot \frac{\ell}{k \cdot k}} \]
                                                                                                                                                                                                2. Step-by-step derivation
                                                                                                                                                                                                  1. Applied rewrites61.8%

                                                                                                                                                                                                    \[\leadsto \frac{\frac{\ell}{k} \cdot \ell}{\color{blue}{{t}^{3} \cdot k}} \]
                                                                                                                                                                                                  2. Step-by-step derivation
                                                                                                                                                                                                    1. Applied rewrites65.2%

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

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

                                                                                                                                                                                                      if 4.00000000000000003e-50 < l

                                                                                                                                                                                                      1. Initial program 48.6%

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

                                                                                                                                                                                                        \[\leadsto \color{blue}{\frac{{\ell}^{2}}{{k}^{2} \cdot {t}^{3}}} \]
                                                                                                                                                                                                      4. Step-by-step derivation
                                                                                                                                                                                                        1. Applied rewrites53.0%

                                                                                                                                                                                                          \[\leadsto \color{blue}{\frac{\ell}{{t}^{3}} \cdot \frac{\ell}{k \cdot k}} \]
                                                                                                                                                                                                        2. Step-by-step derivation
                                                                                                                                                                                                          1. Applied rewrites53.0%

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

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

                                                                                                                                                                                                          Alternative 18: 64.2% accurate, 9.4× speedup?

                                                                                                                                                                                                          \[\begin{array}{l} k_m = \left|k\right| \\ \begin{array}{l} \mathbf{if}\;\ell \leq 7.5 \cdot 10^{-41}:\\ \;\;\;\;\frac{\frac{\ell}{k\_m} \cdot \ell}{\left(\left(t \cdot k\_m\right) \cdot t\right) \cdot t}\\ \mathbf{else}:\\ \;\;\;\;\ell \cdot \frac{\ell}{\left(k\_m \cdot \left(\left(t \cdot t\right) \cdot k\_m\right)\right) \cdot t}\\ \end{array} \end{array} \]
                                                                                                                                                                                                          k_m = (fabs.f64 k)
                                                                                                                                                                                                          (FPCore (t l k_m)
                                                                                                                                                                                                           :precision binary64
                                                                                                                                                                                                           (if (<= l 7.5e-41)
                                                                                                                                                                                                             (/ (* (/ l k_m) l) (* (* (* t k_m) t) t))
                                                                                                                                                                                                             (* l (/ l (* (* k_m (* (* t t) k_m)) t)))))
                                                                                                                                                                                                          k_m = fabs(k);
                                                                                                                                                                                                          double code(double t, double l, double k_m) {
                                                                                                                                                                                                          	double tmp;
                                                                                                                                                                                                          	if (l <= 7.5e-41) {
                                                                                                                                                                                                          		tmp = ((l / k_m) * l) / (((t * k_m) * t) * t);
                                                                                                                                                                                                          	} else {
                                                                                                                                                                                                          		tmp = l * (l / ((k_m * ((t * t) * k_m)) * t));
                                                                                                                                                                                                          	}
                                                                                                                                                                                                          	return tmp;
                                                                                                                                                                                                          }
                                                                                                                                                                                                          
                                                                                                                                                                                                          k_m =     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, l, k_m)
                                                                                                                                                                                                          use fmin_fmax_functions
                                                                                                                                                                                                              real(8), intent (in) :: t
                                                                                                                                                                                                              real(8), intent (in) :: l
                                                                                                                                                                                                              real(8), intent (in) :: k_m
                                                                                                                                                                                                              real(8) :: tmp
                                                                                                                                                                                                              if (l <= 7.5d-41) then
                                                                                                                                                                                                                  tmp = ((l / k_m) * l) / (((t * k_m) * t) * t)
                                                                                                                                                                                                              else
                                                                                                                                                                                                                  tmp = l * (l / ((k_m * ((t * t) * k_m)) * t))
                                                                                                                                                                                                              end if
                                                                                                                                                                                                              code = tmp
                                                                                                                                                                                                          end function
                                                                                                                                                                                                          
                                                                                                                                                                                                          k_m = Math.abs(k);
                                                                                                                                                                                                          public static double code(double t, double l, double k_m) {
                                                                                                                                                                                                          	double tmp;
                                                                                                                                                                                                          	if (l <= 7.5e-41) {
                                                                                                                                                                                                          		tmp = ((l / k_m) * l) / (((t * k_m) * t) * t);
                                                                                                                                                                                                          	} else {
                                                                                                                                                                                                          		tmp = l * (l / ((k_m * ((t * t) * k_m)) * t));
                                                                                                                                                                                                          	}
                                                                                                                                                                                                          	return tmp;
                                                                                                                                                                                                          }
                                                                                                                                                                                                          
                                                                                                                                                                                                          k_m = math.fabs(k)
                                                                                                                                                                                                          def code(t, l, k_m):
                                                                                                                                                                                                          	tmp = 0
                                                                                                                                                                                                          	if l <= 7.5e-41:
                                                                                                                                                                                                          		tmp = ((l / k_m) * l) / (((t * k_m) * t) * t)
                                                                                                                                                                                                          	else:
                                                                                                                                                                                                          		tmp = l * (l / ((k_m * ((t * t) * k_m)) * t))
                                                                                                                                                                                                          	return tmp
                                                                                                                                                                                                          
                                                                                                                                                                                                          k_m = abs(k)
                                                                                                                                                                                                          function code(t, l, k_m)
                                                                                                                                                                                                          	tmp = 0.0
                                                                                                                                                                                                          	if (l <= 7.5e-41)
                                                                                                                                                                                                          		tmp = Float64(Float64(Float64(l / k_m) * l) / Float64(Float64(Float64(t * k_m) * t) * t));
                                                                                                                                                                                                          	else
                                                                                                                                                                                                          		tmp = Float64(l * Float64(l / Float64(Float64(k_m * Float64(Float64(t * t) * k_m)) * t)));
                                                                                                                                                                                                          	end
                                                                                                                                                                                                          	return tmp
                                                                                                                                                                                                          end
                                                                                                                                                                                                          
                                                                                                                                                                                                          k_m = abs(k);
                                                                                                                                                                                                          function tmp_2 = code(t, l, k_m)
                                                                                                                                                                                                          	tmp = 0.0;
                                                                                                                                                                                                          	if (l <= 7.5e-41)
                                                                                                                                                                                                          		tmp = ((l / k_m) * l) / (((t * k_m) * t) * t);
                                                                                                                                                                                                          	else
                                                                                                                                                                                                          		tmp = l * (l / ((k_m * ((t * t) * k_m)) * t));
                                                                                                                                                                                                          	end
                                                                                                                                                                                                          	tmp_2 = tmp;
                                                                                                                                                                                                          end
                                                                                                                                                                                                          
                                                                                                                                                                                                          k_m = N[Abs[k], $MachinePrecision]
                                                                                                                                                                                                          code[t_, l_, k$95$m_] := If[LessEqual[l, 7.5e-41], N[(N[(N[(l / k$95$m), $MachinePrecision] * l), $MachinePrecision] / N[(N[(N[(t * k$95$m), $MachinePrecision] * t), $MachinePrecision] * t), $MachinePrecision]), $MachinePrecision], N[(l * N[(l / N[(N[(k$95$m * N[(N[(t * t), $MachinePrecision] * k$95$m), $MachinePrecision]), $MachinePrecision] * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
                                                                                                                                                                                                          
                                                                                                                                                                                                          \begin{array}{l}
                                                                                                                                                                                                          k_m = \left|k\right|
                                                                                                                                                                                                          
                                                                                                                                                                                                          \\
                                                                                                                                                                                                          \begin{array}{l}
                                                                                                                                                                                                          \mathbf{if}\;\ell \leq 7.5 \cdot 10^{-41}:\\
                                                                                                                                                                                                          \;\;\;\;\frac{\frac{\ell}{k\_m} \cdot \ell}{\left(\left(t \cdot k\_m\right) \cdot t\right) \cdot t}\\
                                                                                                                                                                                                          
                                                                                                                                                                                                          \mathbf{else}:\\
                                                                                                                                                                                                          \;\;\;\;\ell \cdot \frac{\ell}{\left(k\_m \cdot \left(\left(t \cdot t\right) \cdot k\_m\right)\right) \cdot t}\\
                                                                                                                                                                                                          
                                                                                                                                                                                                          
                                                                                                                                                                                                          \end{array}
                                                                                                                                                                                                          \end{array}
                                                                                                                                                                                                          
                                                                                                                                                                                                          Derivation
                                                                                                                                                                                                          1. Split input into 2 regimes
                                                                                                                                                                                                          2. if l < 7.50000000000000049e-41

                                                                                                                                                                                                            1. Initial program 55.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. Applied rewrites57.9%

                                                                                                                                                                                                                \[\leadsto \color{blue}{\frac{\ell}{{t}^{3}} \cdot \frac{\ell}{k \cdot k}} \]
                                                                                                                                                                                                              2. Step-by-step derivation
                                                                                                                                                                                                                1. Applied rewrites62.0%

                                                                                                                                                                                                                  \[\leadsto \frac{\frac{\ell}{k} \cdot \ell}{\color{blue}{{t}^{3} \cdot k}} \]
                                                                                                                                                                                                                2. Step-by-step derivation
                                                                                                                                                                                                                  1. Applied rewrites65.4%

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

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

                                                                                                                                                                                                                    if 7.50000000000000049e-41 < l

                                                                                                                                                                                                                    1. Initial program 47.9%

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

                                                                                                                                                                                                                      \[\leadsto \color{blue}{\frac{{\ell}^{2}}{{k}^{2} \cdot {t}^{3}}} \]
                                                                                                                                                                                                                    4. Step-by-step derivation
                                                                                                                                                                                                                      1. Applied rewrites52.4%

                                                                                                                                                                                                                        \[\leadsto \color{blue}{\frac{\ell}{{t}^{3}} \cdot \frac{\ell}{k \cdot k}} \]
                                                                                                                                                                                                                      2. Step-by-step derivation
                                                                                                                                                                                                                        1. Applied rewrites52.8%

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

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

                                                                                                                                                                                                                        Alternative 19: 63.6% accurate, 9.4× speedup?

                                                                                                                                                                                                                        \[\begin{array}{l} k_m = \left|k\right| \\ \begin{array}{l} \mathbf{if}\;\ell \leq 10^{-43}:\\ \;\;\;\;\frac{\frac{\ell}{k\_m} \cdot \ell}{\left(k\_m \cdot \left(t \cdot t\right)\right) \cdot t}\\ \mathbf{else}:\\ \;\;\;\;\ell \cdot \frac{\ell}{\left(k\_m \cdot \left(\left(t \cdot t\right) \cdot k\_m\right)\right) \cdot t}\\ \end{array} \end{array} \]
                                                                                                                                                                                                                        k_m = (fabs.f64 k)
                                                                                                                                                                                                                        (FPCore (t l k_m)
                                                                                                                                                                                                                         :precision binary64
                                                                                                                                                                                                                         (if (<= l 1e-43)
                                                                                                                                                                                                                           (/ (* (/ l k_m) l) (* (* k_m (* t t)) t))
                                                                                                                                                                                                                           (* l (/ l (* (* k_m (* (* t t) k_m)) t)))))
                                                                                                                                                                                                                        k_m = fabs(k);
                                                                                                                                                                                                                        double code(double t, double l, double k_m) {
                                                                                                                                                                                                                        	double tmp;
                                                                                                                                                                                                                        	if (l <= 1e-43) {
                                                                                                                                                                                                                        		tmp = ((l / k_m) * l) / ((k_m * (t * t)) * t);
                                                                                                                                                                                                                        	} else {
                                                                                                                                                                                                                        		tmp = l * (l / ((k_m * ((t * t) * k_m)) * t));
                                                                                                                                                                                                                        	}
                                                                                                                                                                                                                        	return tmp;
                                                                                                                                                                                                                        }
                                                                                                                                                                                                                        
                                                                                                                                                                                                                        k_m =     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, l, k_m)
                                                                                                                                                                                                                        use fmin_fmax_functions
                                                                                                                                                                                                                            real(8), intent (in) :: t
                                                                                                                                                                                                                            real(8), intent (in) :: l
                                                                                                                                                                                                                            real(8), intent (in) :: k_m
                                                                                                                                                                                                                            real(8) :: tmp
                                                                                                                                                                                                                            if (l <= 1d-43) then
                                                                                                                                                                                                                                tmp = ((l / k_m) * l) / ((k_m * (t * t)) * t)
                                                                                                                                                                                                                            else
                                                                                                                                                                                                                                tmp = l * (l / ((k_m * ((t * t) * k_m)) * t))
                                                                                                                                                                                                                            end if
                                                                                                                                                                                                                            code = tmp
                                                                                                                                                                                                                        end function
                                                                                                                                                                                                                        
                                                                                                                                                                                                                        k_m = Math.abs(k);
                                                                                                                                                                                                                        public static double code(double t, double l, double k_m) {
                                                                                                                                                                                                                        	double tmp;
                                                                                                                                                                                                                        	if (l <= 1e-43) {
                                                                                                                                                                                                                        		tmp = ((l / k_m) * l) / ((k_m * (t * t)) * t);
                                                                                                                                                                                                                        	} else {
                                                                                                                                                                                                                        		tmp = l * (l / ((k_m * ((t * t) * k_m)) * t));
                                                                                                                                                                                                                        	}
                                                                                                                                                                                                                        	return tmp;
                                                                                                                                                                                                                        }
                                                                                                                                                                                                                        
                                                                                                                                                                                                                        k_m = math.fabs(k)
                                                                                                                                                                                                                        def code(t, l, k_m):
                                                                                                                                                                                                                        	tmp = 0
                                                                                                                                                                                                                        	if l <= 1e-43:
                                                                                                                                                                                                                        		tmp = ((l / k_m) * l) / ((k_m * (t * t)) * t)
                                                                                                                                                                                                                        	else:
                                                                                                                                                                                                                        		tmp = l * (l / ((k_m * ((t * t) * k_m)) * t))
                                                                                                                                                                                                                        	return tmp
                                                                                                                                                                                                                        
                                                                                                                                                                                                                        k_m = abs(k)
                                                                                                                                                                                                                        function code(t, l, k_m)
                                                                                                                                                                                                                        	tmp = 0.0
                                                                                                                                                                                                                        	if (l <= 1e-43)
                                                                                                                                                                                                                        		tmp = Float64(Float64(Float64(l / k_m) * l) / Float64(Float64(k_m * Float64(t * t)) * t));
                                                                                                                                                                                                                        	else
                                                                                                                                                                                                                        		tmp = Float64(l * Float64(l / Float64(Float64(k_m * Float64(Float64(t * t) * k_m)) * t)));
                                                                                                                                                                                                                        	end
                                                                                                                                                                                                                        	return tmp
                                                                                                                                                                                                                        end
                                                                                                                                                                                                                        
                                                                                                                                                                                                                        k_m = abs(k);
                                                                                                                                                                                                                        function tmp_2 = code(t, l, k_m)
                                                                                                                                                                                                                        	tmp = 0.0;
                                                                                                                                                                                                                        	if (l <= 1e-43)
                                                                                                                                                                                                                        		tmp = ((l / k_m) * l) / ((k_m * (t * t)) * t);
                                                                                                                                                                                                                        	else
                                                                                                                                                                                                                        		tmp = l * (l / ((k_m * ((t * t) * k_m)) * t));
                                                                                                                                                                                                                        	end
                                                                                                                                                                                                                        	tmp_2 = tmp;
                                                                                                                                                                                                                        end
                                                                                                                                                                                                                        
                                                                                                                                                                                                                        k_m = N[Abs[k], $MachinePrecision]
                                                                                                                                                                                                                        code[t_, l_, k$95$m_] := If[LessEqual[l, 1e-43], N[(N[(N[(l / k$95$m), $MachinePrecision] * l), $MachinePrecision] / N[(N[(k$95$m * N[(t * t), $MachinePrecision]), $MachinePrecision] * t), $MachinePrecision]), $MachinePrecision], N[(l * N[(l / N[(N[(k$95$m * N[(N[(t * t), $MachinePrecision] * k$95$m), $MachinePrecision]), $MachinePrecision] * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
                                                                                                                                                                                                                        
                                                                                                                                                                                                                        \begin{array}{l}
                                                                                                                                                                                                                        k_m = \left|k\right|
                                                                                                                                                                                                                        
                                                                                                                                                                                                                        \\
                                                                                                                                                                                                                        \begin{array}{l}
                                                                                                                                                                                                                        \mathbf{if}\;\ell \leq 10^{-43}:\\
                                                                                                                                                                                                                        \;\;\;\;\frac{\frac{\ell}{k\_m} \cdot \ell}{\left(k\_m \cdot \left(t \cdot t\right)\right) \cdot t}\\
                                                                                                                                                                                                                        
                                                                                                                                                                                                                        \mathbf{else}:\\
                                                                                                                                                                                                                        \;\;\;\;\ell \cdot \frac{\ell}{\left(k\_m \cdot \left(\left(t \cdot t\right) \cdot k\_m\right)\right) \cdot t}\\
                                                                                                                                                                                                                        
                                                                                                                                                                                                                        
                                                                                                                                                                                                                        \end{array}
                                                                                                                                                                                                                        \end{array}
                                                                                                                                                                                                                        
                                                                                                                                                                                                                        Derivation
                                                                                                                                                                                                                        1. Split input into 2 regimes
                                                                                                                                                                                                                        2. if l < 1.00000000000000008e-43

                                                                                                                                                                                                                          1. Initial program 55.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. Applied rewrites57.9%

                                                                                                                                                                                                                              \[\leadsto \color{blue}{\frac{\ell}{{t}^{3}} \cdot \frac{\ell}{k \cdot k}} \]
                                                                                                                                                                                                                            2. Step-by-step derivation
                                                                                                                                                                                                                              1. Applied rewrites62.0%

                                                                                                                                                                                                                                \[\leadsto \frac{\frac{\ell}{k} \cdot \ell}{\color{blue}{{t}^{3} \cdot k}} \]
                                                                                                                                                                                                                              2. Step-by-step derivation
                                                                                                                                                                                                                                1. Applied rewrites65.4%

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

                                                                                                                                                                                                                                if 1.00000000000000008e-43 < l

                                                                                                                                                                                                                                1. Initial program 47.9%

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

                                                                                                                                                                                                                                  \[\leadsto \color{blue}{\frac{{\ell}^{2}}{{k}^{2} \cdot {t}^{3}}} \]
                                                                                                                                                                                                                                4. Step-by-step derivation
                                                                                                                                                                                                                                  1. Applied rewrites52.4%

                                                                                                                                                                                                                                    \[\leadsto \color{blue}{\frac{\ell}{{t}^{3}} \cdot \frac{\ell}{k \cdot k}} \]
                                                                                                                                                                                                                                  2. Step-by-step derivation
                                                                                                                                                                                                                                    1. Applied rewrites52.8%

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

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

                                                                                                                                                                                                                                    Alternative 20: 62.6% accurate, 12.5× speedup?

                                                                                                                                                                                                                                    \[\begin{array}{l} k_m = \left|k\right| \\ \ell \cdot \frac{\ell}{\left(k\_m \cdot \left(\left(t \cdot t\right) \cdot k\_m\right)\right) \cdot t} \end{array} \]
                                                                                                                                                                                                                                    k_m = (fabs.f64 k)
                                                                                                                                                                                                                                    (FPCore (t l k_m)
                                                                                                                                                                                                                                     :precision binary64
                                                                                                                                                                                                                                     (* l (/ l (* (* k_m (* (* t t) k_m)) t))))
                                                                                                                                                                                                                                    k_m = fabs(k);
                                                                                                                                                                                                                                    double code(double t, double l, double k_m) {
                                                                                                                                                                                                                                    	return l * (l / ((k_m * ((t * t) * k_m)) * t));
                                                                                                                                                                                                                                    }
                                                                                                                                                                                                                                    
                                                                                                                                                                                                                                    k_m =     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, l, k_m)
                                                                                                                                                                                                                                    use fmin_fmax_functions
                                                                                                                                                                                                                                        real(8), intent (in) :: t
                                                                                                                                                                                                                                        real(8), intent (in) :: l
                                                                                                                                                                                                                                        real(8), intent (in) :: k_m
                                                                                                                                                                                                                                        code = l * (l / ((k_m * ((t * t) * k_m)) * t))
                                                                                                                                                                                                                                    end function
                                                                                                                                                                                                                                    
                                                                                                                                                                                                                                    k_m = Math.abs(k);
                                                                                                                                                                                                                                    public static double code(double t, double l, double k_m) {
                                                                                                                                                                                                                                    	return l * (l / ((k_m * ((t * t) * k_m)) * t));
                                                                                                                                                                                                                                    }
                                                                                                                                                                                                                                    
                                                                                                                                                                                                                                    k_m = math.fabs(k)
                                                                                                                                                                                                                                    def code(t, l, k_m):
                                                                                                                                                                                                                                    	return l * (l / ((k_m * ((t * t) * k_m)) * t))
                                                                                                                                                                                                                                    
                                                                                                                                                                                                                                    k_m = abs(k)
                                                                                                                                                                                                                                    function code(t, l, k_m)
                                                                                                                                                                                                                                    	return Float64(l * Float64(l / Float64(Float64(k_m * Float64(Float64(t * t) * k_m)) * t)))
                                                                                                                                                                                                                                    end
                                                                                                                                                                                                                                    
                                                                                                                                                                                                                                    k_m = abs(k);
                                                                                                                                                                                                                                    function tmp = code(t, l, k_m)
                                                                                                                                                                                                                                    	tmp = l * (l / ((k_m * ((t * t) * k_m)) * t));
                                                                                                                                                                                                                                    end
                                                                                                                                                                                                                                    
                                                                                                                                                                                                                                    k_m = N[Abs[k], $MachinePrecision]
                                                                                                                                                                                                                                    code[t_, l_, k$95$m_] := N[(l * N[(l / N[(N[(k$95$m * N[(N[(t * t), $MachinePrecision] * k$95$m), $MachinePrecision]), $MachinePrecision] * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
                                                                                                                                                                                                                                    
                                                                                                                                                                                                                                    \begin{array}{l}
                                                                                                                                                                                                                                    k_m = \left|k\right|
                                                                                                                                                                                                                                    
                                                                                                                                                                                                                                    \\
                                                                                                                                                                                                                                    \ell \cdot \frac{\ell}{\left(k\_m \cdot \left(\left(t \cdot t\right) \cdot k\_m\right)\right) \cdot t}
                                                                                                                                                                                                                                    \end{array}
                                                                                                                                                                                                                                    
                                                                                                                                                                                                                                    Derivation
                                                                                                                                                                                                                                    1. Initial program 53.1%

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

                                                                                                                                                                                                                                      \[\leadsto \color{blue}{\frac{{\ell}^{2}}{{k}^{2} \cdot {t}^{3}}} \]
                                                                                                                                                                                                                                    4. Step-by-step derivation
                                                                                                                                                                                                                                      1. Applied rewrites56.2%

                                                                                                                                                                                                                                        \[\leadsto \color{blue}{\frac{\ell}{{t}^{3}} \cdot \frac{\ell}{k \cdot k}} \]
                                                                                                                                                                                                                                      2. Step-by-step derivation
                                                                                                                                                                                                                                        1. Applied rewrites58.6%

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

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

                                                                                                                                                                                                                                          Alternative 21: 58.2% accurate, 12.5× speedup?

                                                                                                                                                                                                                                          \[\begin{array}{l} k_m = \left|k\right| \\ \ell \cdot \frac{\ell}{t \cdot \left(\left(t \cdot t\right) \cdot \left(k\_m \cdot k\_m\right)\right)} \end{array} \]
                                                                                                                                                                                                                                          k_m = (fabs.f64 k)
                                                                                                                                                                                                                                          (FPCore (t l k_m)
                                                                                                                                                                                                                                           :precision binary64
                                                                                                                                                                                                                                           (* l (/ l (* t (* (* t t) (* k_m k_m))))))
                                                                                                                                                                                                                                          k_m = fabs(k);
                                                                                                                                                                                                                                          double code(double t, double l, double k_m) {
                                                                                                                                                                                                                                          	return l * (l / (t * ((t * t) * (k_m * k_m))));
                                                                                                                                                                                                                                          }
                                                                                                                                                                                                                                          
                                                                                                                                                                                                                                          k_m =     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, l, k_m)
                                                                                                                                                                                                                                          use fmin_fmax_functions
                                                                                                                                                                                                                                              real(8), intent (in) :: t
                                                                                                                                                                                                                                              real(8), intent (in) :: l
                                                                                                                                                                                                                                              real(8), intent (in) :: k_m
                                                                                                                                                                                                                                              code = l * (l / (t * ((t * t) * (k_m * k_m))))
                                                                                                                                                                                                                                          end function
                                                                                                                                                                                                                                          
                                                                                                                                                                                                                                          k_m = Math.abs(k);
                                                                                                                                                                                                                                          public static double code(double t, double l, double k_m) {
                                                                                                                                                                                                                                          	return l * (l / (t * ((t * t) * (k_m * k_m))));
                                                                                                                                                                                                                                          }
                                                                                                                                                                                                                                          
                                                                                                                                                                                                                                          k_m = math.fabs(k)
                                                                                                                                                                                                                                          def code(t, l, k_m):
                                                                                                                                                                                                                                          	return l * (l / (t * ((t * t) * (k_m * k_m))))
                                                                                                                                                                                                                                          
                                                                                                                                                                                                                                          k_m = abs(k)
                                                                                                                                                                                                                                          function code(t, l, k_m)
                                                                                                                                                                                                                                          	return Float64(l * Float64(l / Float64(t * Float64(Float64(t * t) * Float64(k_m * k_m)))))
                                                                                                                                                                                                                                          end
                                                                                                                                                                                                                                          
                                                                                                                                                                                                                                          k_m = abs(k);
                                                                                                                                                                                                                                          function tmp = code(t, l, k_m)
                                                                                                                                                                                                                                          	tmp = l * (l / (t * ((t * t) * (k_m * k_m))));
                                                                                                                                                                                                                                          end
                                                                                                                                                                                                                                          
                                                                                                                                                                                                                                          k_m = N[Abs[k], $MachinePrecision]
                                                                                                                                                                                                                                          code[t_, l_, k$95$m_] := N[(l * N[(l / N[(t * N[(N[(t * t), $MachinePrecision] * N[(k$95$m * k$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
                                                                                                                                                                                                                                          
                                                                                                                                                                                                                                          \begin{array}{l}
                                                                                                                                                                                                                                          k_m = \left|k\right|
                                                                                                                                                                                                                                          
                                                                                                                                                                                                                                          \\
                                                                                                                                                                                                                                          \ell \cdot \frac{\ell}{t \cdot \left(\left(t \cdot t\right) \cdot \left(k\_m \cdot k\_m\right)\right)}
                                                                                                                                                                                                                                          \end{array}
                                                                                                                                                                                                                                          
                                                                                                                                                                                                                                          Derivation
                                                                                                                                                                                                                                          1. Initial program 53.1%

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

                                                                                                                                                                                                                                            \[\leadsto \color{blue}{\frac{{\ell}^{2}}{{k}^{2} \cdot {t}^{3}}} \]
                                                                                                                                                                                                                                          4. Step-by-step derivation
                                                                                                                                                                                                                                            1. Applied rewrites56.2%

                                                                                                                                                                                                                                              \[\leadsto \color{blue}{\frac{\ell}{{t}^{3}} \cdot \frac{\ell}{k \cdot k}} \]
                                                                                                                                                                                                                                            2. Step-by-step derivation
                                                                                                                                                                                                                                              1. Applied rewrites58.6%

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

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

                                                                                                                                                                                                                                                Reproduce

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