Toniolo and Linder, Equation (10-)

Percentage Accurate: 35.4% → 96.3%
Time: 20.4s
Alternatives: 25
Speedup: 12.2×

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 25 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: 35.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: 96.3% accurate, 1.2× speedup?

\[\begin{array}{l} t\_m = \left|t\right| \\ t\_s = \mathsf{copysign}\left(1, t\right) \\ \begin{array}{l} t_2 := \frac{k}{\cos k}\\ t_3 := \frac{\sin k}{\ell}\\ t\_s \cdot \begin{array}{l} \mathbf{if}\;t\_m \leq 4.6 \cdot 10^{-209}:\\ \;\;\;\;\frac{2}{\frac{\left(t\_3 \cdot t\_2\right) \cdot \left(\left(\sin k \cdot k\right) \cdot t\_m\right)}{\ell}}\\ \mathbf{else}:\\ \;\;\;\;\frac{2}{\left(t\_2 \cdot t\_3\right) \cdot \left(k \cdot \frac{\sin k \cdot t\_m}{\ell}\right)}\\ \end{array} \end{array} \end{array} \]
t\_m = (fabs.f64 t)
t\_s = (copysign.f64 #s(literal 1 binary64) t)
(FPCore (t_s t_m l k)
 :precision binary64
 (let* ((t_2 (/ k (cos k))) (t_3 (/ (sin k) l)))
   (*
    t_s
    (if (<= t_m 4.6e-209)
      (/ 2.0 (/ (* (* t_3 t_2) (* (* (sin k) k) t_m)) l))
      (/ 2.0 (* (* t_2 t_3) (* k (/ (* (sin k) t_m) l))))))))
t\_m = fabs(t);
t\_s = copysign(1.0, t);
double code(double t_s, double t_m, double l, double k) {
	double t_2 = k / cos(k);
	double t_3 = sin(k) / l;
	double tmp;
	if (t_m <= 4.6e-209) {
		tmp = 2.0 / (((t_3 * t_2) * ((sin(k) * k) * t_m)) / l);
	} else {
		tmp = 2.0 / ((t_2 * t_3) * (k * ((sin(k) * t_m) / l)));
	}
	return t_s * tmp;
}
t\_m =     private
t\_s =     private
module fmin_fmax_functions
    implicit none
    private
    public fmax
    public fmin

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

real(8) function code(t_s, t_m, l, k)
use fmin_fmax_functions
    real(8), intent (in) :: t_s
    real(8), intent (in) :: t_m
    real(8), intent (in) :: l
    real(8), intent (in) :: k
    real(8) :: t_2
    real(8) :: t_3
    real(8) :: tmp
    t_2 = k / cos(k)
    t_3 = sin(k) / l
    if (t_m <= 4.6d-209) then
        tmp = 2.0d0 / (((t_3 * t_2) * ((sin(k) * k) * t_m)) / l)
    else
        tmp = 2.0d0 / ((t_2 * t_3) * (k * ((sin(k) * t_m) / l)))
    end if
    code = t_s * tmp
end function
t\_m = Math.abs(t);
t\_s = Math.copySign(1.0, t);
public static double code(double t_s, double t_m, double l, double k) {
	double t_2 = k / Math.cos(k);
	double t_3 = Math.sin(k) / l;
	double tmp;
	if (t_m <= 4.6e-209) {
		tmp = 2.0 / (((t_3 * t_2) * ((Math.sin(k) * k) * t_m)) / l);
	} else {
		tmp = 2.0 / ((t_2 * t_3) * (k * ((Math.sin(k) * t_m) / l)));
	}
	return t_s * tmp;
}
t\_m = math.fabs(t)
t\_s = math.copysign(1.0, t)
def code(t_s, t_m, l, k):
	t_2 = k / math.cos(k)
	t_3 = math.sin(k) / l
	tmp = 0
	if t_m <= 4.6e-209:
		tmp = 2.0 / (((t_3 * t_2) * ((math.sin(k) * k) * t_m)) / l)
	else:
		tmp = 2.0 / ((t_2 * t_3) * (k * ((math.sin(k) * t_m) / l)))
	return t_s * tmp
t\_m = abs(t)
t\_s = copysign(1.0, t)
function code(t_s, t_m, l, k)
	t_2 = Float64(k / cos(k))
	t_3 = Float64(sin(k) / l)
	tmp = 0.0
	if (t_m <= 4.6e-209)
		tmp = Float64(2.0 / Float64(Float64(Float64(t_3 * t_2) * Float64(Float64(sin(k) * k) * t_m)) / l));
	else
		tmp = Float64(2.0 / Float64(Float64(t_2 * t_3) * Float64(k * Float64(Float64(sin(k) * t_m) / l))));
	end
	return Float64(t_s * tmp)
end
t\_m = abs(t);
t\_s = sign(t) * abs(1.0);
function tmp_2 = code(t_s, t_m, l, k)
	t_2 = k / cos(k);
	t_3 = sin(k) / l;
	tmp = 0.0;
	if (t_m <= 4.6e-209)
		tmp = 2.0 / (((t_3 * t_2) * ((sin(k) * k) * t_m)) / l);
	else
		tmp = 2.0 / ((t_2 * t_3) * (k * ((sin(k) * t_m) / l)));
	end
	tmp_2 = t_s * tmp;
end
t\_m = N[Abs[t], $MachinePrecision]
t\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[t]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[t$95$s_, t$95$m_, l_, k_] := Block[{t$95$2 = N[(k / N[Cos[k], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(N[Sin[k], $MachinePrecision] / l), $MachinePrecision]}, N[(t$95$s * If[LessEqual[t$95$m, 4.6e-209], N[(2.0 / N[(N[(N[(t$95$3 * t$95$2), $MachinePrecision] * N[(N[(N[Sin[k], $MachinePrecision] * k), $MachinePrecision] * t$95$m), $MachinePrecision]), $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision], N[(2.0 / N[(N[(t$95$2 * t$95$3), $MachinePrecision] * N[(k * N[(N[(N[Sin[k], $MachinePrecision] * t$95$m), $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]), $MachinePrecision]]]
\begin{array}{l}
t\_m = \left|t\right|
\\
t\_s = \mathsf{copysign}\left(1, t\right)

\\
\begin{array}{l}
t_2 := \frac{k}{\cos k}\\
t_3 := \frac{\sin k}{\ell}\\
t\_s \cdot \begin{array}{l}
\mathbf{if}\;t\_m \leq 4.6 \cdot 10^{-209}:\\
\;\;\;\;\frac{2}{\frac{\left(t\_3 \cdot t\_2\right) \cdot \left(\left(\sin k \cdot k\right) \cdot t\_m\right)}{\ell}}\\

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


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

    1. Initial program 36.7%

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

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

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

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

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

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

      if 4.5999999999999999e-209 < t

      1. Initial program 41.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}{\frac{{k}^{2} \cdot \left(t \cdot {\sin k}^{2}\right)}{{\ell}^{2} \cdot \cos k}}} \]
      4. Step-by-step derivation
        1. Applied rewrites71.2%

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

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

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

      Alternative 2: 80.6% accurate, 0.6× speedup?

      \[\begin{array}{l} t\_m = \left|t\right| \\ t\_s = \mathsf{copysign}\left(1, t\right) \\ t\_s \cdot \begin{array}{l} \mathbf{if}\;\left(\left(\frac{{t\_m}^{3}}{\ell \cdot \ell} \cdot \sin k\right) \cdot \tan k\right) \cdot \left(\left(1 + {\left(\frac{k}{t\_m}\right)}^{2}\right) - 1\right) \leq 10^{+120}:\\ \;\;\;\;\frac{2}{\left(\left(\left(\frac{t\_m \cdot t\_m}{\ell} \cdot \frac{t\_m}{\ell}\right) \cdot \sin k\right) \cdot \tan k\right) \cdot \left(\frac{k}{t\_m} \cdot \frac{k}{t\_m}\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{2}{\left(k \cdot \frac{\sin k}{\ell}\right) \cdot \left(k \cdot \frac{\sin k \cdot t\_m}{\ell}\right)}\\ \end{array} \end{array} \]
      t\_m = (fabs.f64 t)
      t\_s = (copysign.f64 #s(literal 1 binary64) t)
      (FPCore (t_s t_m l k)
       :precision binary64
       (*
        t_s
        (if (<=
             (*
              (* (* (/ (pow t_m 3.0) (* l l)) (sin k)) (tan k))
              (- (+ 1.0 (pow (/ k t_m) 2.0)) 1.0))
             1e+120)
          (/
           2.0
           (*
            (* (* (* (/ (* t_m t_m) l) (/ t_m l)) (sin k)) (tan k))
            (* (/ k t_m) (/ k t_m))))
          (/ 2.0 (* (* k (/ (sin k) l)) (* k (/ (* (sin k) t_m) l)))))))
      t\_m = fabs(t);
      t\_s = copysign(1.0, t);
      double code(double t_s, double t_m, double l, double k) {
      	double tmp;
      	if (((((pow(t_m, 3.0) / (l * l)) * sin(k)) * tan(k)) * ((1.0 + pow((k / t_m), 2.0)) - 1.0)) <= 1e+120) {
      		tmp = 2.0 / ((((((t_m * t_m) / l) * (t_m / l)) * sin(k)) * tan(k)) * ((k / t_m) * (k / t_m)));
      	} else {
      		tmp = 2.0 / ((k * (sin(k) / l)) * (k * ((sin(k) * t_m) / l)));
      	}
      	return t_s * tmp;
      }
      
      t\_m =     private
      t\_s =     private
      module fmin_fmax_functions
          implicit none
          private
          public fmax
          public fmin
      
          interface fmax
              module procedure fmax88
              module procedure fmax44
              module procedure fmax84
              module procedure fmax48
          end interface
          interface fmin
              module procedure fmin88
              module procedure fmin44
              module procedure fmin84
              module procedure fmin48
          end interface
      contains
          real(8) function fmax88(x, y) result (res)
              real(8), intent (in) :: x
              real(8), intent (in) :: y
              res = merge(y, merge(x, max(x, y), y /= y), x /= x)
          end function
          real(4) function fmax44(x, y) result (res)
              real(4), intent (in) :: x
              real(4), intent (in) :: y
              res = merge(y, merge(x, max(x, y), y /= y), x /= x)
          end function
          real(8) function fmax84(x, y) result(res)
              real(8), intent (in) :: x
              real(4), intent (in) :: y
              res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
          end function
          real(8) function fmax48(x, y) result(res)
              real(4), intent (in) :: x
              real(8), intent (in) :: y
              res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
          end function
          real(8) function fmin88(x, y) result (res)
              real(8), intent (in) :: x
              real(8), intent (in) :: y
              res = merge(y, merge(x, min(x, y), y /= y), x /= x)
          end function
          real(4) function fmin44(x, y) result (res)
              real(4), intent (in) :: x
              real(4), intent (in) :: y
              res = merge(y, merge(x, min(x, y), y /= y), x /= x)
          end function
          real(8) function fmin84(x, y) result(res)
              real(8), intent (in) :: x
              real(4), intent (in) :: y
              res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
          end function
          real(8) function fmin48(x, y) result(res)
              real(4), intent (in) :: x
              real(8), intent (in) :: y
              res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
          end function
      end module
      
      real(8) function code(t_s, t_m, l, k)
      use fmin_fmax_functions
          real(8), intent (in) :: t_s
          real(8), intent (in) :: t_m
          real(8), intent (in) :: l
          real(8), intent (in) :: k
          real(8) :: tmp
          if ((((((t_m ** 3.0d0) / (l * l)) * sin(k)) * tan(k)) * ((1.0d0 + ((k / t_m) ** 2.0d0)) - 1.0d0)) <= 1d+120) then
              tmp = 2.0d0 / ((((((t_m * t_m) / l) * (t_m / l)) * sin(k)) * tan(k)) * ((k / t_m) * (k / t_m)))
          else
              tmp = 2.0d0 / ((k * (sin(k) / l)) * (k * ((sin(k) * t_m) / l)))
          end if
          code = t_s * tmp
      end function
      
      t\_m = Math.abs(t);
      t\_s = Math.copySign(1.0, t);
      public static double code(double t_s, double t_m, double l, double k) {
      	double tmp;
      	if (((((Math.pow(t_m, 3.0) / (l * l)) * Math.sin(k)) * Math.tan(k)) * ((1.0 + Math.pow((k / t_m), 2.0)) - 1.0)) <= 1e+120) {
      		tmp = 2.0 / ((((((t_m * t_m) / l) * (t_m / l)) * Math.sin(k)) * Math.tan(k)) * ((k / t_m) * (k / t_m)));
      	} else {
      		tmp = 2.0 / ((k * (Math.sin(k) / l)) * (k * ((Math.sin(k) * t_m) / l)));
      	}
      	return t_s * tmp;
      }
      
      t\_m = math.fabs(t)
      t\_s = math.copysign(1.0, t)
      def code(t_s, t_m, l, k):
      	tmp = 0
      	if ((((math.pow(t_m, 3.0) / (l * l)) * math.sin(k)) * math.tan(k)) * ((1.0 + math.pow((k / t_m), 2.0)) - 1.0)) <= 1e+120:
      		tmp = 2.0 / ((((((t_m * t_m) / l) * (t_m / l)) * math.sin(k)) * math.tan(k)) * ((k / t_m) * (k / t_m)))
      	else:
      		tmp = 2.0 / ((k * (math.sin(k) / l)) * (k * ((math.sin(k) * t_m) / l)))
      	return t_s * tmp
      
      t\_m = abs(t)
      t\_s = copysign(1.0, t)
      function code(t_s, t_m, l, k)
      	tmp = 0.0
      	if (Float64(Float64(Float64(Float64((t_m ^ 3.0) / Float64(l * l)) * sin(k)) * tan(k)) * Float64(Float64(1.0 + (Float64(k / t_m) ^ 2.0)) - 1.0)) <= 1e+120)
      		tmp = Float64(2.0 / Float64(Float64(Float64(Float64(Float64(Float64(t_m * t_m) / l) * Float64(t_m / l)) * sin(k)) * tan(k)) * Float64(Float64(k / t_m) * Float64(k / t_m))));
      	else
      		tmp = Float64(2.0 / Float64(Float64(k * Float64(sin(k) / l)) * Float64(k * Float64(Float64(sin(k) * t_m) / l))));
      	end
      	return Float64(t_s * tmp)
      end
      
      t\_m = abs(t);
      t\_s = sign(t) * abs(1.0);
      function tmp_2 = code(t_s, t_m, l, k)
      	tmp = 0.0;
      	if ((((((t_m ^ 3.0) / (l * l)) * sin(k)) * tan(k)) * ((1.0 + ((k / t_m) ^ 2.0)) - 1.0)) <= 1e+120)
      		tmp = 2.0 / ((((((t_m * t_m) / l) * (t_m / l)) * sin(k)) * tan(k)) * ((k / t_m) * (k / t_m)));
      	else
      		tmp = 2.0 / ((k * (sin(k) / l)) * (k * ((sin(k) * t_m) / l)));
      	end
      	tmp_2 = t_s * tmp;
      end
      
      t\_m = N[Abs[t], $MachinePrecision]
      t\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[t]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
      code[t$95$s_, t$95$m_, l_, k_] := N[(t$95$s * If[LessEqual[N[(N[(N[(N[(N[Power[t$95$m, 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$95$m), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision] - 1.0), $MachinePrecision]), $MachinePrecision], 1e+120], N[(2.0 / N[(N[(N[(N[(N[(N[(t$95$m * t$95$m), $MachinePrecision] / l), $MachinePrecision] * N[(t$95$m / l), $MachinePrecision]), $MachinePrecision] * N[Sin[k], $MachinePrecision]), $MachinePrecision] * N[Tan[k], $MachinePrecision]), $MachinePrecision] * N[(N[(k / t$95$m), $MachinePrecision] * N[(k / t$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(2.0 / N[(N[(k * N[(N[Sin[k], $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision] * N[(k * N[(N[(N[Sin[k], $MachinePrecision] * t$95$m), $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]), $MachinePrecision]
      
      \begin{array}{l}
      t\_m = \left|t\right|
      \\
      t\_s = \mathsf{copysign}\left(1, t\right)
      
      \\
      t\_s \cdot \begin{array}{l}
      \mathbf{if}\;\left(\left(\frac{{t\_m}^{3}}{\ell \cdot \ell} \cdot \sin k\right) \cdot \tan k\right) \cdot \left(\left(1 + {\left(\frac{k}{t\_m}\right)}^{2}\right) - 1\right) \leq 10^{+120}:\\
      \;\;\;\;\frac{2}{\left(\left(\left(\frac{t\_m \cdot t\_m}{\ell} \cdot \frac{t\_m}{\ell}\right) \cdot \sin k\right) \cdot \tan k\right) \cdot \left(\frac{k}{t\_m} \cdot \frac{k}{t\_m}\right)}\\
      
      \mathbf{else}:\\
      \;\;\;\;\frac{2}{\left(k \cdot \frac{\sin k}{\ell}\right) \cdot \left(k \cdot \frac{\sin k \cdot t\_m}{\ell}\right)}\\
      
      
      \end{array}
      \end{array}
      
      Derivation
      1. Split input into 2 regimes
      2. if (*.f64 (*.f64 (*.f64 (/.f64 (pow.f64 t #s(literal 3 binary64)) (*.f64 l l)) (sin.f64 k)) (tan.f64 k)) (-.f64 (+.f64 #s(literal 1 binary64) (pow.f64 (/.f64 k t) #s(literal 2 binary64))) #s(literal 1 binary64))) < 9.9999999999999998e119

        1. Initial program 93.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-varN/A

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

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

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

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

            \[\leadsto \frac{2}{\left(\left(\frac{{t}^{3}}{\mathsf{Rewrite<=}\left(lift-var-spec, \ell\right) \cdot \color{blue}{\ell}} \cdot \sin k\right) \cdot \tan k\right) \cdot \left(\left(1 + {\left(\frac{k}{t}\right)}^{2}\right) - 1\right)} \]
          6. lift-*.f64N/A

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

            \[\leadsto \frac{2}{\left(\left(\left(\frac{t \cdot \color{blue}{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)} \]
          13. lift-varN/A

            \[\leadsto \frac{2}{\left(\left(\left(\frac{t \cdot t}{\color{blue}{\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)} \]
          14. lower-/.f64N/A

            \[\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)} \]
          15. lift-varN/A

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

            \[\leadsto \frac{2}{\left(\left(\left(\frac{t \cdot t}{\ell} \cdot \frac{t}{\color{blue}{\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 rewrites94.7%

          \[\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. Taylor expanded in t around 0

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

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

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

          1. Initial program 10.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}{\frac{{k}^{2} \cdot \left(t \cdot {\sin k}^{2}\right)}{{\ell}^{2} \cdot \cos k}}} \]
          4. Step-by-step derivation
            1. Applied rewrites63.2%

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

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

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

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

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

            Alternative 3: 96.2% accurate, 1.2× speedup?

            \[\begin{array}{l} t\_m = \left|t\right| \\ t\_s = \mathsf{copysign}\left(1, t\right) \\ \begin{array}{l} t_2 := \frac{\sin k}{\ell}\\ t\_s \cdot \begin{array}{l} \mathbf{if}\;t\_m \leq 8.5 \cdot 10^{-216}:\\ \;\;\;\;\frac{2}{\frac{\left(t\_2 \cdot k\right) \cdot \left(\left(\sin k \cdot k\right) \cdot t\_m\right)}{\cos k \cdot \ell}}\\ \mathbf{else}:\\ \;\;\;\;\frac{2}{\left(\frac{k}{\cos k} \cdot t\_2\right) \cdot \left(k \cdot \frac{\sin k \cdot t\_m}{\ell}\right)}\\ \end{array} \end{array} \end{array} \]
            t\_m = (fabs.f64 t)
            t\_s = (copysign.f64 #s(literal 1 binary64) t)
            (FPCore (t_s t_m l k)
             :precision binary64
             (let* ((t_2 (/ (sin k) l)))
               (*
                t_s
                (if (<= t_m 8.5e-216)
                  (/ 2.0 (/ (* (* t_2 k) (* (* (sin k) k) t_m)) (* (cos k) l)))
                  (/ 2.0 (* (* (/ k (cos k)) t_2) (* k (/ (* (sin k) t_m) l))))))))
            t\_m = fabs(t);
            t\_s = copysign(1.0, t);
            double code(double t_s, double t_m, double l, double k) {
            	double t_2 = sin(k) / l;
            	double tmp;
            	if (t_m <= 8.5e-216) {
            		tmp = 2.0 / (((t_2 * k) * ((sin(k) * k) * t_m)) / (cos(k) * l));
            	} else {
            		tmp = 2.0 / (((k / cos(k)) * t_2) * (k * ((sin(k) * t_m) / l)));
            	}
            	return t_s * tmp;
            }
            
            t\_m =     private
            t\_s =     private
            module fmin_fmax_functions
                implicit none
                private
                public fmax
                public fmin
            
                interface fmax
                    module procedure fmax88
                    module procedure fmax44
                    module procedure fmax84
                    module procedure fmax48
                end interface
                interface fmin
                    module procedure fmin88
                    module procedure fmin44
                    module procedure fmin84
                    module procedure fmin48
                end interface
            contains
                real(8) function fmax88(x, y) result (res)
                    real(8), intent (in) :: x
                    real(8), intent (in) :: y
                    res = merge(y, merge(x, max(x, y), y /= y), x /= x)
                end function
                real(4) function fmax44(x, y) result (res)
                    real(4), intent (in) :: x
                    real(4), intent (in) :: y
                    res = merge(y, merge(x, max(x, y), y /= y), x /= x)
                end function
                real(8) function fmax84(x, y) result(res)
                    real(8), intent (in) :: x
                    real(4), intent (in) :: y
                    res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
                end function
                real(8) function fmax48(x, y) result(res)
                    real(4), intent (in) :: x
                    real(8), intent (in) :: y
                    res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
                end function
                real(8) function fmin88(x, y) result (res)
                    real(8), intent (in) :: x
                    real(8), intent (in) :: y
                    res = merge(y, merge(x, min(x, y), y /= y), x /= x)
                end function
                real(4) function fmin44(x, y) result (res)
                    real(4), intent (in) :: x
                    real(4), intent (in) :: y
                    res = merge(y, merge(x, min(x, y), y /= y), x /= x)
                end function
                real(8) function fmin84(x, y) result(res)
                    real(8), intent (in) :: x
                    real(4), intent (in) :: y
                    res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
                end function
                real(8) function fmin48(x, y) result(res)
                    real(4), intent (in) :: x
                    real(8), intent (in) :: y
                    res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
                end function
            end module
            
            real(8) function code(t_s, t_m, l, k)
            use fmin_fmax_functions
                real(8), intent (in) :: t_s
                real(8), intent (in) :: t_m
                real(8), intent (in) :: l
                real(8), intent (in) :: k
                real(8) :: t_2
                real(8) :: tmp
                t_2 = sin(k) / l
                if (t_m <= 8.5d-216) then
                    tmp = 2.0d0 / (((t_2 * k) * ((sin(k) * k) * t_m)) / (cos(k) * l))
                else
                    tmp = 2.0d0 / (((k / cos(k)) * t_2) * (k * ((sin(k) * t_m) / l)))
                end if
                code = t_s * tmp
            end function
            
            t\_m = Math.abs(t);
            t\_s = Math.copySign(1.0, t);
            public static double code(double t_s, double t_m, double l, double k) {
            	double t_2 = Math.sin(k) / l;
            	double tmp;
            	if (t_m <= 8.5e-216) {
            		tmp = 2.0 / (((t_2 * k) * ((Math.sin(k) * k) * t_m)) / (Math.cos(k) * l));
            	} else {
            		tmp = 2.0 / (((k / Math.cos(k)) * t_2) * (k * ((Math.sin(k) * t_m) / l)));
            	}
            	return t_s * tmp;
            }
            
            t\_m = math.fabs(t)
            t\_s = math.copysign(1.0, t)
            def code(t_s, t_m, l, k):
            	t_2 = math.sin(k) / l
            	tmp = 0
            	if t_m <= 8.5e-216:
            		tmp = 2.0 / (((t_2 * k) * ((math.sin(k) * k) * t_m)) / (math.cos(k) * l))
            	else:
            		tmp = 2.0 / (((k / math.cos(k)) * t_2) * (k * ((math.sin(k) * t_m) / l)))
            	return t_s * tmp
            
            t\_m = abs(t)
            t\_s = copysign(1.0, t)
            function code(t_s, t_m, l, k)
            	t_2 = Float64(sin(k) / l)
            	tmp = 0.0
            	if (t_m <= 8.5e-216)
            		tmp = Float64(2.0 / Float64(Float64(Float64(t_2 * k) * Float64(Float64(sin(k) * k) * t_m)) / Float64(cos(k) * l)));
            	else
            		tmp = Float64(2.0 / Float64(Float64(Float64(k / cos(k)) * t_2) * Float64(k * Float64(Float64(sin(k) * t_m) / l))));
            	end
            	return Float64(t_s * tmp)
            end
            
            t\_m = abs(t);
            t\_s = sign(t) * abs(1.0);
            function tmp_2 = code(t_s, t_m, l, k)
            	t_2 = sin(k) / l;
            	tmp = 0.0;
            	if (t_m <= 8.5e-216)
            		tmp = 2.0 / (((t_2 * k) * ((sin(k) * k) * t_m)) / (cos(k) * l));
            	else
            		tmp = 2.0 / (((k / cos(k)) * t_2) * (k * ((sin(k) * t_m) / l)));
            	end
            	tmp_2 = t_s * tmp;
            end
            
            t\_m = N[Abs[t], $MachinePrecision]
            t\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[t]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
            code[t$95$s_, t$95$m_, l_, k_] := Block[{t$95$2 = N[(N[Sin[k], $MachinePrecision] / l), $MachinePrecision]}, N[(t$95$s * If[LessEqual[t$95$m, 8.5e-216], N[(2.0 / N[(N[(N[(t$95$2 * k), $MachinePrecision] * N[(N[(N[Sin[k], $MachinePrecision] * k), $MachinePrecision] * t$95$m), $MachinePrecision]), $MachinePrecision] / N[(N[Cos[k], $MachinePrecision] * l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(2.0 / N[(N[(N[(k / N[Cos[k], $MachinePrecision]), $MachinePrecision] * t$95$2), $MachinePrecision] * N[(k * N[(N[(N[Sin[k], $MachinePrecision] * t$95$m), $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]), $MachinePrecision]]
            
            \begin{array}{l}
            t\_m = \left|t\right|
            \\
            t\_s = \mathsf{copysign}\left(1, t\right)
            
            \\
            \begin{array}{l}
            t_2 := \frac{\sin k}{\ell}\\
            t\_s \cdot \begin{array}{l}
            \mathbf{if}\;t\_m \leq 8.5 \cdot 10^{-216}:\\
            \;\;\;\;\frac{2}{\frac{\left(t\_2 \cdot k\right) \cdot \left(\left(\sin k \cdot k\right) \cdot t\_m\right)}{\cos k \cdot \ell}}\\
            
            \mathbf{else}:\\
            \;\;\;\;\frac{2}{\left(\frac{k}{\cos k} \cdot t\_2\right) \cdot \left(k \cdot \frac{\sin k \cdot t\_m}{\ell}\right)}\\
            
            
            \end{array}
            \end{array}
            \end{array}
            
            Derivation
            1. Split input into 2 regimes
            2. if t < 8.50000000000000003e-216

              1. Initial program 36.7%

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

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

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

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

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

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

                if 8.50000000000000003e-216 < t

                1. Initial program 41.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}{\frac{{k}^{2} \cdot \left(t \cdot {\sin k}^{2}\right)}{{\ell}^{2} \cdot \cos k}}} \]
                4. Step-by-step derivation
                  1. Applied rewrites71.2%

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

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

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

                Alternative 4: 94.9% accurate, 1.3× speedup?

                \[\begin{array}{l} t\_m = \left|t\right| \\ t\_s = \mathsf{copysign}\left(1, t\right) \\ \begin{array}{l} t_2 := \sin k \cdot k\\ t_3 := \cos k \cdot \ell\\ t\_s \cdot \begin{array}{l} \mathbf{if}\;t\_m \leq 2 \cdot 10^{-202}:\\ \;\;\;\;\frac{2}{\frac{\left(\frac{\sin k}{\ell} \cdot k\right) \cdot \left(t\_2 \cdot t\_m\right)}{t\_3}}\\ \mathbf{else}:\\ \;\;\;\;\frac{2}{\frac{t\_2}{t\_3} \cdot \left(k \cdot \frac{\sin k \cdot t\_m}{\ell}\right)}\\ \end{array} \end{array} \end{array} \]
                t\_m = (fabs.f64 t)
                t\_s = (copysign.f64 #s(literal 1 binary64) t)
                (FPCore (t_s t_m l k)
                 :precision binary64
                 (let* ((t_2 (* (sin k) k)) (t_3 (* (cos k) l)))
                   (*
                    t_s
                    (if (<= t_m 2e-202)
                      (/ 2.0 (/ (* (* (/ (sin k) l) k) (* t_2 t_m)) t_3))
                      (/ 2.0 (* (/ t_2 t_3) (* k (/ (* (sin k) t_m) l))))))))
                t\_m = fabs(t);
                t\_s = copysign(1.0, t);
                double code(double t_s, double t_m, double l, double k) {
                	double t_2 = sin(k) * k;
                	double t_3 = cos(k) * l;
                	double tmp;
                	if (t_m <= 2e-202) {
                		tmp = 2.0 / ((((sin(k) / l) * k) * (t_2 * t_m)) / t_3);
                	} else {
                		tmp = 2.0 / ((t_2 / t_3) * (k * ((sin(k) * t_m) / l)));
                	}
                	return t_s * tmp;
                }
                
                t\_m =     private
                t\_s =     private
                module fmin_fmax_functions
                    implicit none
                    private
                    public fmax
                    public fmin
                
                    interface fmax
                        module procedure fmax88
                        module procedure fmax44
                        module procedure fmax84
                        module procedure fmax48
                    end interface
                    interface fmin
                        module procedure fmin88
                        module procedure fmin44
                        module procedure fmin84
                        module procedure fmin48
                    end interface
                contains
                    real(8) function fmax88(x, y) result (res)
                        real(8), intent (in) :: x
                        real(8), intent (in) :: y
                        res = merge(y, merge(x, max(x, y), y /= y), x /= x)
                    end function
                    real(4) function fmax44(x, y) result (res)
                        real(4), intent (in) :: x
                        real(4), intent (in) :: y
                        res = merge(y, merge(x, max(x, y), y /= y), x /= x)
                    end function
                    real(8) function fmax84(x, y) result(res)
                        real(8), intent (in) :: x
                        real(4), intent (in) :: y
                        res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
                    end function
                    real(8) function fmax48(x, y) result(res)
                        real(4), intent (in) :: x
                        real(8), intent (in) :: y
                        res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
                    end function
                    real(8) function fmin88(x, y) result (res)
                        real(8), intent (in) :: x
                        real(8), intent (in) :: y
                        res = merge(y, merge(x, min(x, y), y /= y), x /= x)
                    end function
                    real(4) function fmin44(x, y) result (res)
                        real(4), intent (in) :: x
                        real(4), intent (in) :: y
                        res = merge(y, merge(x, min(x, y), y /= y), x /= x)
                    end function
                    real(8) function fmin84(x, y) result(res)
                        real(8), intent (in) :: x
                        real(4), intent (in) :: y
                        res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
                    end function
                    real(8) function fmin48(x, y) result(res)
                        real(4), intent (in) :: x
                        real(8), intent (in) :: y
                        res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
                    end function
                end module
                
                real(8) function code(t_s, t_m, l, k)
                use fmin_fmax_functions
                    real(8), intent (in) :: t_s
                    real(8), intent (in) :: t_m
                    real(8), intent (in) :: l
                    real(8), intent (in) :: k
                    real(8) :: t_2
                    real(8) :: t_3
                    real(8) :: tmp
                    t_2 = sin(k) * k
                    t_3 = cos(k) * l
                    if (t_m <= 2d-202) then
                        tmp = 2.0d0 / ((((sin(k) / l) * k) * (t_2 * t_m)) / t_3)
                    else
                        tmp = 2.0d0 / ((t_2 / t_3) * (k * ((sin(k) * t_m) / l)))
                    end if
                    code = t_s * tmp
                end function
                
                t\_m = Math.abs(t);
                t\_s = Math.copySign(1.0, t);
                public static double code(double t_s, double t_m, double l, double k) {
                	double t_2 = Math.sin(k) * k;
                	double t_3 = Math.cos(k) * l;
                	double tmp;
                	if (t_m <= 2e-202) {
                		tmp = 2.0 / ((((Math.sin(k) / l) * k) * (t_2 * t_m)) / t_3);
                	} else {
                		tmp = 2.0 / ((t_2 / t_3) * (k * ((Math.sin(k) * t_m) / l)));
                	}
                	return t_s * tmp;
                }
                
                t\_m = math.fabs(t)
                t\_s = math.copysign(1.0, t)
                def code(t_s, t_m, l, k):
                	t_2 = math.sin(k) * k
                	t_3 = math.cos(k) * l
                	tmp = 0
                	if t_m <= 2e-202:
                		tmp = 2.0 / ((((math.sin(k) / l) * k) * (t_2 * t_m)) / t_3)
                	else:
                		tmp = 2.0 / ((t_2 / t_3) * (k * ((math.sin(k) * t_m) / l)))
                	return t_s * tmp
                
                t\_m = abs(t)
                t\_s = copysign(1.0, t)
                function code(t_s, t_m, l, k)
                	t_2 = Float64(sin(k) * k)
                	t_3 = Float64(cos(k) * l)
                	tmp = 0.0
                	if (t_m <= 2e-202)
                		tmp = Float64(2.0 / Float64(Float64(Float64(Float64(sin(k) / l) * k) * Float64(t_2 * t_m)) / t_3));
                	else
                		tmp = Float64(2.0 / Float64(Float64(t_2 / t_3) * Float64(k * Float64(Float64(sin(k) * t_m) / l))));
                	end
                	return Float64(t_s * tmp)
                end
                
                t\_m = abs(t);
                t\_s = sign(t) * abs(1.0);
                function tmp_2 = code(t_s, t_m, l, k)
                	t_2 = sin(k) * k;
                	t_3 = cos(k) * l;
                	tmp = 0.0;
                	if (t_m <= 2e-202)
                		tmp = 2.0 / ((((sin(k) / l) * k) * (t_2 * t_m)) / t_3);
                	else
                		tmp = 2.0 / ((t_2 / t_3) * (k * ((sin(k) * t_m) / l)));
                	end
                	tmp_2 = t_s * tmp;
                end
                
                t\_m = N[Abs[t], $MachinePrecision]
                t\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[t]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
                code[t$95$s_, t$95$m_, l_, k_] := Block[{t$95$2 = N[(N[Sin[k], $MachinePrecision] * k), $MachinePrecision]}, Block[{t$95$3 = N[(N[Cos[k], $MachinePrecision] * l), $MachinePrecision]}, N[(t$95$s * If[LessEqual[t$95$m, 2e-202], N[(2.0 / N[(N[(N[(N[(N[Sin[k], $MachinePrecision] / l), $MachinePrecision] * k), $MachinePrecision] * N[(t$95$2 * t$95$m), $MachinePrecision]), $MachinePrecision] / t$95$3), $MachinePrecision]), $MachinePrecision], N[(2.0 / N[(N[(t$95$2 / t$95$3), $MachinePrecision] * N[(k * N[(N[(N[Sin[k], $MachinePrecision] * t$95$m), $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]), $MachinePrecision]]]
                
                \begin{array}{l}
                t\_m = \left|t\right|
                \\
                t\_s = \mathsf{copysign}\left(1, t\right)
                
                \\
                \begin{array}{l}
                t_2 := \sin k \cdot k\\
                t_3 := \cos k \cdot \ell\\
                t\_s \cdot \begin{array}{l}
                \mathbf{if}\;t\_m \leq 2 \cdot 10^{-202}:\\
                \;\;\;\;\frac{2}{\frac{\left(\frac{\sin k}{\ell} \cdot k\right) \cdot \left(t\_2 \cdot t\_m\right)}{t\_3}}\\
                
                \mathbf{else}:\\
                \;\;\;\;\frac{2}{\frac{t\_2}{t\_3} \cdot \left(k \cdot \frac{\sin k \cdot t\_m}{\ell}\right)}\\
                
                
                \end{array}
                \end{array}
                \end{array}
                
                Derivation
                1. Split input into 2 regimes
                2. if t < 2.0000000000000001e-202

                  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}{\frac{{k}^{2} \cdot \left(t \cdot {\sin k}^{2}\right)}{{\ell}^{2} \cdot \cos k}}} \]
                  4. Step-by-step derivation
                    1. Applied rewrites75.8%

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

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

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

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

                    if 2.0000000000000001e-202 < t

                    1. Initial program 41.6%

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

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

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

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

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

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

                      Alternative 5: 83.7% accurate, 1.3× speedup?

                      \[\begin{array}{l} t\_m = \left|t\right| \\ t\_s = \mathsf{copysign}\left(1, t\right) \\ \begin{array}{l} t_2 := \cos k \cdot \ell\\ t\_s \cdot \begin{array}{l} \mathbf{if}\;k \leq 1.45 \cdot 10^{-37}:\\ \;\;\;\;\frac{2}{\left(\frac{k}{\ell} \cdot k\right) \cdot \left(k \cdot \frac{\sin k \cdot t\_m}{\ell}\right)}\\ \mathbf{elif}\;k \leq 1.25 \cdot 10^{+151}:\\ \;\;\;\;\frac{2}{\frac{{\left(k \cdot \sin k\right)}^{2} \cdot \frac{t\_m}{\ell}}{t\_2}}\\ \mathbf{else}:\\ \;\;\;\;\frac{2}{k \cdot \frac{\left(k \cdot t\_m\right) \cdot {\sin k}^{2}}{\ell \cdot t\_2}}\\ \end{array} \end{array} \end{array} \]
                      t\_m = (fabs.f64 t)
                      t\_s = (copysign.f64 #s(literal 1 binary64) t)
                      (FPCore (t_s t_m l k)
                       :precision binary64
                       (let* ((t_2 (* (cos k) l)))
                         (*
                          t_s
                          (if (<= k 1.45e-37)
                            (/ 2.0 (* (* (/ k l) k) (* k (/ (* (sin k) t_m) l))))
                            (if (<= k 1.25e+151)
                              (/ 2.0 (/ (* (pow (* k (sin k)) 2.0) (/ t_m l)) t_2))
                              (/ 2.0 (* k (/ (* (* k t_m) (pow (sin k) 2.0)) (* l t_2)))))))))
                      t\_m = fabs(t);
                      t\_s = copysign(1.0, t);
                      double code(double t_s, double t_m, double l, double k) {
                      	double t_2 = cos(k) * l;
                      	double tmp;
                      	if (k <= 1.45e-37) {
                      		tmp = 2.0 / (((k / l) * k) * (k * ((sin(k) * t_m) / l)));
                      	} else if (k <= 1.25e+151) {
                      		tmp = 2.0 / ((pow((k * sin(k)), 2.0) * (t_m / l)) / t_2);
                      	} else {
                      		tmp = 2.0 / (k * (((k * t_m) * pow(sin(k), 2.0)) / (l * t_2)));
                      	}
                      	return t_s * tmp;
                      }
                      
                      t\_m =     private
                      t\_s =     private
                      module fmin_fmax_functions
                          implicit none
                          private
                          public fmax
                          public fmin
                      
                          interface fmax
                              module procedure fmax88
                              module procedure fmax44
                              module procedure fmax84
                              module procedure fmax48
                          end interface
                          interface fmin
                              module procedure fmin88
                              module procedure fmin44
                              module procedure fmin84
                              module procedure fmin48
                          end interface
                      contains
                          real(8) function fmax88(x, y) result (res)
                              real(8), intent (in) :: x
                              real(8), intent (in) :: y
                              res = merge(y, merge(x, max(x, y), y /= y), x /= x)
                          end function
                          real(4) function fmax44(x, y) result (res)
                              real(4), intent (in) :: x
                              real(4), intent (in) :: y
                              res = merge(y, merge(x, max(x, y), y /= y), x /= x)
                          end function
                          real(8) function fmax84(x, y) result(res)
                              real(8), intent (in) :: x
                              real(4), intent (in) :: y
                              res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
                          end function
                          real(8) function fmax48(x, y) result(res)
                              real(4), intent (in) :: x
                              real(8), intent (in) :: y
                              res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
                          end function
                          real(8) function fmin88(x, y) result (res)
                              real(8), intent (in) :: x
                              real(8), intent (in) :: y
                              res = merge(y, merge(x, min(x, y), y /= y), x /= x)
                          end function
                          real(4) function fmin44(x, y) result (res)
                              real(4), intent (in) :: x
                              real(4), intent (in) :: y
                              res = merge(y, merge(x, min(x, y), y /= y), x /= x)
                          end function
                          real(8) function fmin84(x, y) result(res)
                              real(8), intent (in) :: x
                              real(4), intent (in) :: y
                              res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
                          end function
                          real(8) function fmin48(x, y) result(res)
                              real(4), intent (in) :: x
                              real(8), intent (in) :: y
                              res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
                          end function
                      end module
                      
                      real(8) function code(t_s, t_m, l, k)
                      use fmin_fmax_functions
                          real(8), intent (in) :: t_s
                          real(8), intent (in) :: t_m
                          real(8), intent (in) :: l
                          real(8), intent (in) :: k
                          real(8) :: t_2
                          real(8) :: tmp
                          t_2 = cos(k) * l
                          if (k <= 1.45d-37) then
                              tmp = 2.0d0 / (((k / l) * k) * (k * ((sin(k) * t_m) / l)))
                          else if (k <= 1.25d+151) then
                              tmp = 2.0d0 / ((((k * sin(k)) ** 2.0d0) * (t_m / l)) / t_2)
                          else
                              tmp = 2.0d0 / (k * (((k * t_m) * (sin(k) ** 2.0d0)) / (l * t_2)))
                          end if
                          code = t_s * tmp
                      end function
                      
                      t\_m = Math.abs(t);
                      t\_s = Math.copySign(1.0, t);
                      public static double code(double t_s, double t_m, double l, double k) {
                      	double t_2 = Math.cos(k) * l;
                      	double tmp;
                      	if (k <= 1.45e-37) {
                      		tmp = 2.0 / (((k / l) * k) * (k * ((Math.sin(k) * t_m) / l)));
                      	} else if (k <= 1.25e+151) {
                      		tmp = 2.0 / ((Math.pow((k * Math.sin(k)), 2.0) * (t_m / l)) / t_2);
                      	} else {
                      		tmp = 2.0 / (k * (((k * t_m) * Math.pow(Math.sin(k), 2.0)) / (l * t_2)));
                      	}
                      	return t_s * tmp;
                      }
                      
                      t\_m = math.fabs(t)
                      t\_s = math.copysign(1.0, t)
                      def code(t_s, t_m, l, k):
                      	t_2 = math.cos(k) * l
                      	tmp = 0
                      	if k <= 1.45e-37:
                      		tmp = 2.0 / (((k / l) * k) * (k * ((math.sin(k) * t_m) / l)))
                      	elif k <= 1.25e+151:
                      		tmp = 2.0 / ((math.pow((k * math.sin(k)), 2.0) * (t_m / l)) / t_2)
                      	else:
                      		tmp = 2.0 / (k * (((k * t_m) * math.pow(math.sin(k), 2.0)) / (l * t_2)))
                      	return t_s * tmp
                      
                      t\_m = abs(t)
                      t\_s = copysign(1.0, t)
                      function code(t_s, t_m, l, k)
                      	t_2 = Float64(cos(k) * l)
                      	tmp = 0.0
                      	if (k <= 1.45e-37)
                      		tmp = Float64(2.0 / Float64(Float64(Float64(k / l) * k) * Float64(k * Float64(Float64(sin(k) * t_m) / l))));
                      	elseif (k <= 1.25e+151)
                      		tmp = Float64(2.0 / Float64(Float64((Float64(k * sin(k)) ^ 2.0) * Float64(t_m / l)) / t_2));
                      	else
                      		tmp = Float64(2.0 / Float64(k * Float64(Float64(Float64(k * t_m) * (sin(k) ^ 2.0)) / Float64(l * t_2))));
                      	end
                      	return Float64(t_s * tmp)
                      end
                      
                      t\_m = abs(t);
                      t\_s = sign(t) * abs(1.0);
                      function tmp_2 = code(t_s, t_m, l, k)
                      	t_2 = cos(k) * l;
                      	tmp = 0.0;
                      	if (k <= 1.45e-37)
                      		tmp = 2.0 / (((k / l) * k) * (k * ((sin(k) * t_m) / l)));
                      	elseif (k <= 1.25e+151)
                      		tmp = 2.0 / ((((k * sin(k)) ^ 2.0) * (t_m / l)) / t_2);
                      	else
                      		tmp = 2.0 / (k * (((k * t_m) * (sin(k) ^ 2.0)) / (l * t_2)));
                      	end
                      	tmp_2 = t_s * tmp;
                      end
                      
                      t\_m = N[Abs[t], $MachinePrecision]
                      t\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[t]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
                      code[t$95$s_, t$95$m_, l_, k_] := Block[{t$95$2 = N[(N[Cos[k], $MachinePrecision] * l), $MachinePrecision]}, N[(t$95$s * If[LessEqual[k, 1.45e-37], N[(2.0 / N[(N[(N[(k / l), $MachinePrecision] * k), $MachinePrecision] * N[(k * N[(N[(N[Sin[k], $MachinePrecision] * t$95$m), $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[k, 1.25e+151], N[(2.0 / N[(N[(N[Power[N[(k * N[Sin[k], $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision] * N[(t$95$m / l), $MachinePrecision]), $MachinePrecision] / t$95$2), $MachinePrecision]), $MachinePrecision], N[(2.0 / N[(k * N[(N[(N[(k * t$95$m), $MachinePrecision] * N[Power[N[Sin[k], $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision] / N[(l * t$95$2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]), $MachinePrecision]]
                      
                      \begin{array}{l}
                      t\_m = \left|t\right|
                      \\
                      t\_s = \mathsf{copysign}\left(1, t\right)
                      
                      \\
                      \begin{array}{l}
                      t_2 := \cos k \cdot \ell\\
                      t\_s \cdot \begin{array}{l}
                      \mathbf{if}\;k \leq 1.45 \cdot 10^{-37}:\\
                      \;\;\;\;\frac{2}{\left(\frac{k}{\ell} \cdot k\right) \cdot \left(k \cdot \frac{\sin k \cdot t\_m}{\ell}\right)}\\
                      
                      \mathbf{elif}\;k \leq 1.25 \cdot 10^{+151}:\\
                      \;\;\;\;\frac{2}{\frac{{\left(k \cdot \sin k\right)}^{2} \cdot \frac{t\_m}{\ell}}{t\_2}}\\
                      
                      \mathbf{else}:\\
                      \;\;\;\;\frac{2}{k \cdot \frac{\left(k \cdot t\_m\right) \cdot {\sin k}^{2}}{\ell \cdot t\_2}}\\
                      
                      
                      \end{array}
                      \end{array}
                      \end{array}
                      
                      Derivation
                      1. Split input into 3 regimes
                      2. if k < 1.45000000000000002e-37

                        1. Initial program 42.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}{\frac{{k}^{2} \cdot \left(t \cdot {\sin k}^{2}\right)}{{\ell}^{2} \cdot \cos k}}} \]
                        4. Step-by-step derivation
                          1. Applied rewrites73.5%

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

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

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

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

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

                            if 1.45000000000000002e-37 < k < 1.2500000000000001e151

                            1. Initial program 30.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}{\frac{{k}^{2} \cdot \left(t \cdot {\sin k}^{2}\right)}{{\ell}^{2} \cdot \cos k}}} \]
                            4. Step-by-step derivation
                              1. Applied rewrites88.8%

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

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

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

                              if 1.2500000000000001e151 < k

                              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}{\frac{{k}^{2} \cdot \left(t \cdot {\sin k}^{2}\right)}{{\ell}^{2} \cdot \cos k}}} \]
                              4. Step-by-step derivation
                                1. Applied rewrites54.6%

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

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

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

                              Alternative 6: 85.6% accurate, 1.3× speedup?

                              \[\begin{array}{l} t\_m = \left|t\right| \\ t\_s = \mathsf{copysign}\left(1, t\right) \\ t\_s \cdot \begin{array}{l} \mathbf{if}\;k \leq 10^{-39}:\\ \;\;\;\;\frac{2}{\left(\frac{k}{\ell} \cdot k\right) \cdot \left(k \cdot \frac{\sin k \cdot t\_m}{\ell}\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{2}{\left({\sin k}^{2} \cdot \left(\frac{t\_m}{\ell} \cdot k\right)\right) \cdot \frac{k}{\cos k \cdot \ell}}\\ \end{array} \end{array} \]
                              t\_m = (fabs.f64 t)
                              t\_s = (copysign.f64 #s(literal 1 binary64) t)
                              (FPCore (t_s t_m l k)
                               :precision binary64
                               (*
                                t_s
                                (if (<= k 1e-39)
                                  (/ 2.0 (* (* (/ k l) k) (* k (/ (* (sin k) t_m) l))))
                                  (/ 2.0 (* (* (pow (sin k) 2.0) (* (/ t_m l) k)) (/ k (* (cos k) l)))))))
                              t\_m = fabs(t);
                              t\_s = copysign(1.0, t);
                              double code(double t_s, double t_m, double l, double k) {
                              	double tmp;
                              	if (k <= 1e-39) {
                              		tmp = 2.0 / (((k / l) * k) * (k * ((sin(k) * t_m) / l)));
                              	} else {
                              		tmp = 2.0 / ((pow(sin(k), 2.0) * ((t_m / l) * k)) * (k / (cos(k) * l)));
                              	}
                              	return t_s * tmp;
                              }
                              
                              t\_m =     private
                              t\_s =     private
                              module fmin_fmax_functions
                                  implicit none
                                  private
                                  public fmax
                                  public fmin
                              
                                  interface fmax
                                      module procedure fmax88
                                      module procedure fmax44
                                      module procedure fmax84
                                      module procedure fmax48
                                  end interface
                                  interface fmin
                                      module procedure fmin88
                                      module procedure fmin44
                                      module procedure fmin84
                                      module procedure fmin48
                                  end interface
                              contains
                                  real(8) function fmax88(x, y) result (res)
                                      real(8), intent (in) :: x
                                      real(8), intent (in) :: y
                                      res = merge(y, merge(x, max(x, y), y /= y), x /= x)
                                  end function
                                  real(4) function fmax44(x, y) result (res)
                                      real(4), intent (in) :: x
                                      real(4), intent (in) :: y
                                      res = merge(y, merge(x, max(x, y), y /= y), x /= x)
                                  end function
                                  real(8) function fmax84(x, y) result(res)
                                      real(8), intent (in) :: x
                                      real(4), intent (in) :: y
                                      res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
                                  end function
                                  real(8) function fmax48(x, y) result(res)
                                      real(4), intent (in) :: x
                                      real(8), intent (in) :: y
                                      res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
                                  end function
                                  real(8) function fmin88(x, y) result (res)
                                      real(8), intent (in) :: x
                                      real(8), intent (in) :: y
                                      res = merge(y, merge(x, min(x, y), y /= y), x /= x)
                                  end function
                                  real(4) function fmin44(x, y) result (res)
                                      real(4), intent (in) :: x
                                      real(4), intent (in) :: y
                                      res = merge(y, merge(x, min(x, y), y /= y), x /= x)
                                  end function
                                  real(8) function fmin84(x, y) result(res)
                                      real(8), intent (in) :: x
                                      real(4), intent (in) :: y
                                      res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
                                  end function
                                  real(8) function fmin48(x, y) result(res)
                                      real(4), intent (in) :: x
                                      real(8), intent (in) :: y
                                      res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
                                  end function
                              end module
                              
                              real(8) function code(t_s, t_m, l, k)
                              use fmin_fmax_functions
                                  real(8), intent (in) :: t_s
                                  real(8), intent (in) :: t_m
                                  real(8), intent (in) :: l
                                  real(8), intent (in) :: k
                                  real(8) :: tmp
                                  if (k <= 1d-39) then
                                      tmp = 2.0d0 / (((k / l) * k) * (k * ((sin(k) * t_m) / l)))
                                  else
                                      tmp = 2.0d0 / (((sin(k) ** 2.0d0) * ((t_m / l) * k)) * (k / (cos(k) * l)))
                                  end if
                                  code = t_s * tmp
                              end function
                              
                              t\_m = Math.abs(t);
                              t\_s = Math.copySign(1.0, t);
                              public static double code(double t_s, double t_m, double l, double k) {
                              	double tmp;
                              	if (k <= 1e-39) {
                              		tmp = 2.0 / (((k / l) * k) * (k * ((Math.sin(k) * t_m) / l)));
                              	} else {
                              		tmp = 2.0 / ((Math.pow(Math.sin(k), 2.0) * ((t_m / l) * k)) * (k / (Math.cos(k) * l)));
                              	}
                              	return t_s * tmp;
                              }
                              
                              t\_m = math.fabs(t)
                              t\_s = math.copysign(1.0, t)
                              def code(t_s, t_m, l, k):
                              	tmp = 0
                              	if k <= 1e-39:
                              		tmp = 2.0 / (((k / l) * k) * (k * ((math.sin(k) * t_m) / l)))
                              	else:
                              		tmp = 2.0 / ((math.pow(math.sin(k), 2.0) * ((t_m / l) * k)) * (k / (math.cos(k) * l)))
                              	return t_s * tmp
                              
                              t\_m = abs(t)
                              t\_s = copysign(1.0, t)
                              function code(t_s, t_m, l, k)
                              	tmp = 0.0
                              	if (k <= 1e-39)
                              		tmp = Float64(2.0 / Float64(Float64(Float64(k / l) * k) * Float64(k * Float64(Float64(sin(k) * t_m) / l))));
                              	else
                              		tmp = Float64(2.0 / Float64(Float64((sin(k) ^ 2.0) * Float64(Float64(t_m / l) * k)) * Float64(k / Float64(cos(k) * l))));
                              	end
                              	return Float64(t_s * tmp)
                              end
                              
                              t\_m = abs(t);
                              t\_s = sign(t) * abs(1.0);
                              function tmp_2 = code(t_s, t_m, l, k)
                              	tmp = 0.0;
                              	if (k <= 1e-39)
                              		tmp = 2.0 / (((k / l) * k) * (k * ((sin(k) * t_m) / l)));
                              	else
                              		tmp = 2.0 / (((sin(k) ^ 2.0) * ((t_m / l) * k)) * (k / (cos(k) * l)));
                              	end
                              	tmp_2 = t_s * tmp;
                              end
                              
                              t\_m = N[Abs[t], $MachinePrecision]
                              t\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[t]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
                              code[t$95$s_, t$95$m_, l_, k_] := N[(t$95$s * If[LessEqual[k, 1e-39], N[(2.0 / N[(N[(N[(k / l), $MachinePrecision] * k), $MachinePrecision] * N[(k * N[(N[(N[Sin[k], $MachinePrecision] * t$95$m), $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(2.0 / N[(N[(N[Power[N[Sin[k], $MachinePrecision], 2.0], $MachinePrecision] * N[(N[(t$95$m / l), $MachinePrecision] * k), $MachinePrecision]), $MachinePrecision] * N[(k / N[(N[Cos[k], $MachinePrecision] * l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]), $MachinePrecision]
                              
                              \begin{array}{l}
                              t\_m = \left|t\right|
                              \\
                              t\_s = \mathsf{copysign}\left(1, t\right)
                              
                              \\
                              t\_s \cdot \begin{array}{l}
                              \mathbf{if}\;k \leq 10^{-39}:\\
                              \;\;\;\;\frac{2}{\left(\frac{k}{\ell} \cdot k\right) \cdot \left(k \cdot \frac{\sin k \cdot t\_m}{\ell}\right)}\\
                              
                              \mathbf{else}:\\
                              \;\;\;\;\frac{2}{\left({\sin k}^{2} \cdot \left(\frac{t\_m}{\ell} \cdot k\right)\right) \cdot \frac{k}{\cos k \cdot \ell}}\\
                              
                              
                              \end{array}
                              \end{array}
                              
                              Derivation
                              1. Split input into 2 regimes
                              2. if k < 9.99999999999999929e-40

                                1. Initial program 42.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}{\frac{{k}^{2} \cdot \left(t \cdot {\sin k}^{2}\right)}{{\ell}^{2} \cdot \cos k}}} \]
                                4. Step-by-step derivation
                                  1. Applied rewrites73.9%

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

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

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

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

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

                                    if 9.99999999999999929e-40 < k

                                    1. Initial program 28.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}{\frac{{k}^{2} \cdot \left(t \cdot {\sin k}^{2}\right)}{{\ell}^{2} \cdot \cos k}}} \]
                                    4. Step-by-step derivation
                                      1. Applied rewrites74.9%

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

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

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

                                    Alternative 7: 93.6% accurate, 1.3× speedup?

                                    \[\begin{array}{l} t\_m = \left|t\right| \\ t\_s = \mathsf{copysign}\left(1, t\right) \\ t\_s \cdot \frac{2}{\frac{\sin k \cdot k}{\cos k \cdot \ell} \cdot \left(k \cdot \frac{\sin k \cdot t\_m}{\ell}\right)} \end{array} \]
                                    t\_m = (fabs.f64 t)
                                    t\_s = (copysign.f64 #s(literal 1 binary64) t)
                                    (FPCore (t_s t_m l k)
                                     :precision binary64
                                     (*
                                      t_s
                                      (/ 2.0 (* (/ (* (sin k) k) (* (cos k) l)) (* k (/ (* (sin k) t_m) l))))))
                                    t\_m = fabs(t);
                                    t\_s = copysign(1.0, t);
                                    double code(double t_s, double t_m, double l, double k) {
                                    	return t_s * (2.0 / (((sin(k) * k) / (cos(k) * l)) * (k * ((sin(k) * t_m) / l))));
                                    }
                                    
                                    t\_m =     private
                                    t\_s =     private
                                    module fmin_fmax_functions
                                        implicit none
                                        private
                                        public fmax
                                        public fmin
                                    
                                        interface fmax
                                            module procedure fmax88
                                            module procedure fmax44
                                            module procedure fmax84
                                            module procedure fmax48
                                        end interface
                                        interface fmin
                                            module procedure fmin88
                                            module procedure fmin44
                                            module procedure fmin84
                                            module procedure fmin48
                                        end interface
                                    contains
                                        real(8) function fmax88(x, y) result (res)
                                            real(8), intent (in) :: x
                                            real(8), intent (in) :: y
                                            res = merge(y, merge(x, max(x, y), y /= y), x /= x)
                                        end function
                                        real(4) function fmax44(x, y) result (res)
                                            real(4), intent (in) :: x
                                            real(4), intent (in) :: y
                                            res = merge(y, merge(x, max(x, y), y /= y), x /= x)
                                        end function
                                        real(8) function fmax84(x, y) result(res)
                                            real(8), intent (in) :: x
                                            real(4), intent (in) :: y
                                            res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
                                        end function
                                        real(8) function fmax48(x, y) result(res)
                                            real(4), intent (in) :: x
                                            real(8), intent (in) :: y
                                            res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
                                        end function
                                        real(8) function fmin88(x, y) result (res)
                                            real(8), intent (in) :: x
                                            real(8), intent (in) :: y
                                            res = merge(y, merge(x, min(x, y), y /= y), x /= x)
                                        end function
                                        real(4) function fmin44(x, y) result (res)
                                            real(4), intent (in) :: x
                                            real(4), intent (in) :: y
                                            res = merge(y, merge(x, min(x, y), y /= y), x /= x)
                                        end function
                                        real(8) function fmin84(x, y) result(res)
                                            real(8), intent (in) :: x
                                            real(4), intent (in) :: y
                                            res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
                                        end function
                                        real(8) function fmin48(x, y) result(res)
                                            real(4), intent (in) :: x
                                            real(8), intent (in) :: y
                                            res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
                                        end function
                                    end module
                                    
                                    real(8) function code(t_s, t_m, l, k)
                                    use fmin_fmax_functions
                                        real(8), intent (in) :: t_s
                                        real(8), intent (in) :: t_m
                                        real(8), intent (in) :: l
                                        real(8), intent (in) :: k
                                        code = t_s * (2.0d0 / (((sin(k) * k) / (cos(k) * l)) * (k * ((sin(k) * t_m) / l))))
                                    end function
                                    
                                    t\_m = Math.abs(t);
                                    t\_s = Math.copySign(1.0, t);
                                    public static double code(double t_s, double t_m, double l, double k) {
                                    	return t_s * (2.0 / (((Math.sin(k) * k) / (Math.cos(k) * l)) * (k * ((Math.sin(k) * t_m) / l))));
                                    }
                                    
                                    t\_m = math.fabs(t)
                                    t\_s = math.copysign(1.0, t)
                                    def code(t_s, t_m, l, k):
                                    	return t_s * (2.0 / (((math.sin(k) * k) / (math.cos(k) * l)) * (k * ((math.sin(k) * t_m) / l))))
                                    
                                    t\_m = abs(t)
                                    t\_s = copysign(1.0, t)
                                    function code(t_s, t_m, l, k)
                                    	return Float64(t_s * Float64(2.0 / Float64(Float64(Float64(sin(k) * k) / Float64(cos(k) * l)) * Float64(k * Float64(Float64(sin(k) * t_m) / l)))))
                                    end
                                    
                                    t\_m = abs(t);
                                    t\_s = sign(t) * abs(1.0);
                                    function tmp = code(t_s, t_m, l, k)
                                    	tmp = t_s * (2.0 / (((sin(k) * k) / (cos(k) * l)) * (k * ((sin(k) * t_m) / l))));
                                    end
                                    
                                    t\_m = N[Abs[t], $MachinePrecision]
                                    t\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[t]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
                                    code[t$95$s_, t$95$m_, l_, k_] := N[(t$95$s * N[(2.0 / N[(N[(N[(N[Sin[k], $MachinePrecision] * k), $MachinePrecision] / N[(N[Cos[k], $MachinePrecision] * l), $MachinePrecision]), $MachinePrecision] * N[(k * N[(N[(N[Sin[k], $MachinePrecision] * t$95$m), $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
                                    
                                    \begin{array}{l}
                                    t\_m = \left|t\right|
                                    \\
                                    t\_s = \mathsf{copysign}\left(1, t\right)
                                    
                                    \\
                                    t\_s \cdot \frac{2}{\frac{\sin k \cdot k}{\cos k \cdot \ell} \cdot \left(k \cdot \frac{\sin k \cdot t\_m}{\ell}\right)}
                                    \end{array}
                                    
                                    Derivation
                                    1. Initial program 38.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}{\frac{{k}^{2} \cdot \left(t \cdot {\sin k}^{2}\right)}{{\ell}^{2} \cdot \cos k}}} \]
                                    4. Step-by-step derivation
                                      1. Applied rewrites74.2%

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

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

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

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

                                        Alternative 8: 81.0% accurate, 1.3× speedup?

                                        \[\begin{array}{l} t\_m = \left|t\right| \\ t\_s = \mathsf{copysign}\left(1, t\right) \\ \begin{array}{l} t_2 := k \cdot \frac{\sin k \cdot t\_m}{\ell}\\ t\_s \cdot \begin{array}{l} \mathbf{if}\;k \leq 4.8 \cdot 10^{-26}:\\ \;\;\;\;\frac{2}{\left(\frac{k}{\ell} \cdot k\right) \cdot t\_2}\\ \mathbf{elif}\;k \leq 1.6 \cdot 10^{+149}:\\ \;\;\;\;\frac{2}{{\left(k \cdot \sin k\right)}^{2} \cdot \frac{t\_m}{\ell \cdot \left(\cos k \cdot \ell\right)}}\\ \mathbf{else}:\\ \;\;\;\;\frac{2}{\left(k \cdot \frac{\sin k}{\ell}\right) \cdot t\_2}\\ \end{array} \end{array} \end{array} \]
                                        t\_m = (fabs.f64 t)
                                        t\_s = (copysign.f64 #s(literal 1 binary64) t)
                                        (FPCore (t_s t_m l k)
                                         :precision binary64
                                         (let* ((t_2 (* k (/ (* (sin k) t_m) l))))
                                           (*
                                            t_s
                                            (if (<= k 4.8e-26)
                                              (/ 2.0 (* (* (/ k l) k) t_2))
                                              (if (<= k 1.6e+149)
                                                (/ 2.0 (* (pow (* k (sin k)) 2.0) (/ t_m (* l (* (cos k) l)))))
                                                (/ 2.0 (* (* k (/ (sin k) l)) t_2)))))))
                                        t\_m = fabs(t);
                                        t\_s = copysign(1.0, t);
                                        double code(double t_s, double t_m, double l, double k) {
                                        	double t_2 = k * ((sin(k) * t_m) / l);
                                        	double tmp;
                                        	if (k <= 4.8e-26) {
                                        		tmp = 2.0 / (((k / l) * k) * t_2);
                                        	} else if (k <= 1.6e+149) {
                                        		tmp = 2.0 / (pow((k * sin(k)), 2.0) * (t_m / (l * (cos(k) * l))));
                                        	} else {
                                        		tmp = 2.0 / ((k * (sin(k) / l)) * t_2);
                                        	}
                                        	return t_s * tmp;
                                        }
                                        
                                        t\_m =     private
                                        t\_s =     private
                                        module fmin_fmax_functions
                                            implicit none
                                            private
                                            public fmax
                                            public fmin
                                        
                                            interface fmax
                                                module procedure fmax88
                                                module procedure fmax44
                                                module procedure fmax84
                                                module procedure fmax48
                                            end interface
                                            interface fmin
                                                module procedure fmin88
                                                module procedure fmin44
                                                module procedure fmin84
                                                module procedure fmin48
                                            end interface
                                        contains
                                            real(8) function fmax88(x, y) result (res)
                                                real(8), intent (in) :: x
                                                real(8), intent (in) :: y
                                                res = merge(y, merge(x, max(x, y), y /= y), x /= x)
                                            end function
                                            real(4) function fmax44(x, y) result (res)
                                                real(4), intent (in) :: x
                                                real(4), intent (in) :: y
                                                res = merge(y, merge(x, max(x, y), y /= y), x /= x)
                                            end function
                                            real(8) function fmax84(x, y) result(res)
                                                real(8), intent (in) :: x
                                                real(4), intent (in) :: y
                                                res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
                                            end function
                                            real(8) function fmax48(x, y) result(res)
                                                real(4), intent (in) :: x
                                                real(8), intent (in) :: y
                                                res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
                                            end function
                                            real(8) function fmin88(x, y) result (res)
                                                real(8), intent (in) :: x
                                                real(8), intent (in) :: y
                                                res = merge(y, merge(x, min(x, y), y /= y), x /= x)
                                            end function
                                            real(4) function fmin44(x, y) result (res)
                                                real(4), intent (in) :: x
                                                real(4), intent (in) :: y
                                                res = merge(y, merge(x, min(x, y), y /= y), x /= x)
                                            end function
                                            real(8) function fmin84(x, y) result(res)
                                                real(8), intent (in) :: x
                                                real(4), intent (in) :: y
                                                res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
                                            end function
                                            real(8) function fmin48(x, y) result(res)
                                                real(4), intent (in) :: x
                                                real(8), intent (in) :: y
                                                res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
                                            end function
                                        end module
                                        
                                        real(8) function code(t_s, t_m, l, k)
                                        use fmin_fmax_functions
                                            real(8), intent (in) :: t_s
                                            real(8), intent (in) :: t_m
                                            real(8), intent (in) :: l
                                            real(8), intent (in) :: k
                                            real(8) :: t_2
                                            real(8) :: tmp
                                            t_2 = k * ((sin(k) * t_m) / l)
                                            if (k <= 4.8d-26) then
                                                tmp = 2.0d0 / (((k / l) * k) * t_2)
                                            else if (k <= 1.6d+149) then
                                                tmp = 2.0d0 / (((k * sin(k)) ** 2.0d0) * (t_m / (l * (cos(k) * l))))
                                            else
                                                tmp = 2.0d0 / ((k * (sin(k) / l)) * t_2)
                                            end if
                                            code = t_s * tmp
                                        end function
                                        
                                        t\_m = Math.abs(t);
                                        t\_s = Math.copySign(1.0, t);
                                        public static double code(double t_s, double t_m, double l, double k) {
                                        	double t_2 = k * ((Math.sin(k) * t_m) / l);
                                        	double tmp;
                                        	if (k <= 4.8e-26) {
                                        		tmp = 2.0 / (((k / l) * k) * t_2);
                                        	} else if (k <= 1.6e+149) {
                                        		tmp = 2.0 / (Math.pow((k * Math.sin(k)), 2.0) * (t_m / (l * (Math.cos(k) * l))));
                                        	} else {
                                        		tmp = 2.0 / ((k * (Math.sin(k) / l)) * t_2);
                                        	}
                                        	return t_s * tmp;
                                        }
                                        
                                        t\_m = math.fabs(t)
                                        t\_s = math.copysign(1.0, t)
                                        def code(t_s, t_m, l, k):
                                        	t_2 = k * ((math.sin(k) * t_m) / l)
                                        	tmp = 0
                                        	if k <= 4.8e-26:
                                        		tmp = 2.0 / (((k / l) * k) * t_2)
                                        	elif k <= 1.6e+149:
                                        		tmp = 2.0 / (math.pow((k * math.sin(k)), 2.0) * (t_m / (l * (math.cos(k) * l))))
                                        	else:
                                        		tmp = 2.0 / ((k * (math.sin(k) / l)) * t_2)
                                        	return t_s * tmp
                                        
                                        t\_m = abs(t)
                                        t\_s = copysign(1.0, t)
                                        function code(t_s, t_m, l, k)
                                        	t_2 = Float64(k * Float64(Float64(sin(k) * t_m) / l))
                                        	tmp = 0.0
                                        	if (k <= 4.8e-26)
                                        		tmp = Float64(2.0 / Float64(Float64(Float64(k / l) * k) * t_2));
                                        	elseif (k <= 1.6e+149)
                                        		tmp = Float64(2.0 / Float64((Float64(k * sin(k)) ^ 2.0) * Float64(t_m / Float64(l * Float64(cos(k) * l)))));
                                        	else
                                        		tmp = Float64(2.0 / Float64(Float64(k * Float64(sin(k) / l)) * t_2));
                                        	end
                                        	return Float64(t_s * tmp)
                                        end
                                        
                                        t\_m = abs(t);
                                        t\_s = sign(t) * abs(1.0);
                                        function tmp_2 = code(t_s, t_m, l, k)
                                        	t_2 = k * ((sin(k) * t_m) / l);
                                        	tmp = 0.0;
                                        	if (k <= 4.8e-26)
                                        		tmp = 2.0 / (((k / l) * k) * t_2);
                                        	elseif (k <= 1.6e+149)
                                        		tmp = 2.0 / (((k * sin(k)) ^ 2.0) * (t_m / (l * (cos(k) * l))));
                                        	else
                                        		tmp = 2.0 / ((k * (sin(k) / l)) * t_2);
                                        	end
                                        	tmp_2 = t_s * tmp;
                                        end
                                        
                                        t\_m = N[Abs[t], $MachinePrecision]
                                        t\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[t]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
                                        code[t$95$s_, t$95$m_, l_, k_] := Block[{t$95$2 = N[(k * N[(N[(N[Sin[k], $MachinePrecision] * t$95$m), $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision]}, N[(t$95$s * If[LessEqual[k, 4.8e-26], N[(2.0 / N[(N[(N[(k / l), $MachinePrecision] * k), $MachinePrecision] * t$95$2), $MachinePrecision]), $MachinePrecision], If[LessEqual[k, 1.6e+149], N[(2.0 / N[(N[Power[N[(k * N[Sin[k], $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision] * N[(t$95$m / N[(l * N[(N[Cos[k], $MachinePrecision] * l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(2.0 / N[(N[(k * N[(N[Sin[k], $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision] * t$95$2), $MachinePrecision]), $MachinePrecision]]]), $MachinePrecision]]
                                        
                                        \begin{array}{l}
                                        t\_m = \left|t\right|
                                        \\
                                        t\_s = \mathsf{copysign}\left(1, t\right)
                                        
                                        \\
                                        \begin{array}{l}
                                        t_2 := k \cdot \frac{\sin k \cdot t\_m}{\ell}\\
                                        t\_s \cdot \begin{array}{l}
                                        \mathbf{if}\;k \leq 4.8 \cdot 10^{-26}:\\
                                        \;\;\;\;\frac{2}{\left(\frac{k}{\ell} \cdot k\right) \cdot t\_2}\\
                                        
                                        \mathbf{elif}\;k \leq 1.6 \cdot 10^{+149}:\\
                                        \;\;\;\;\frac{2}{{\left(k \cdot \sin k\right)}^{2} \cdot \frac{t\_m}{\ell \cdot \left(\cos k \cdot \ell\right)}}\\
                                        
                                        \mathbf{else}:\\
                                        \;\;\;\;\frac{2}{\left(k \cdot \frac{\sin k}{\ell}\right) \cdot t\_2}\\
                                        
                                        
                                        \end{array}
                                        \end{array}
                                        \end{array}
                                        
                                        Derivation
                                        1. Split input into 3 regimes
                                        2. if k < 4.8000000000000002e-26

                                          1. Initial program 42.8%

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

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

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

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

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

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

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

                                              if 4.8000000000000002e-26 < k < 1.6000000000000001e149

                                              1. Initial program 27.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}{\frac{{k}^{2} \cdot \left(t \cdot {\sin k}^{2}\right)}{{\ell}^{2} \cdot \cos k}}} \]
                                              4. Step-by-step derivation
                                                1. Applied rewrites88.2%

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

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

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

                                                if 1.6000000000000001e149 < k

                                                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}{\frac{{k}^{2} \cdot \left(t \cdot {\sin k}^{2}\right)}{{\ell}^{2} \cdot \cos k}}} \]
                                                4. Step-by-step derivation
                                                  1. Applied rewrites54.6%

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

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

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

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

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

                                                  Alternative 9: 82.2% accurate, 1.3× speedup?

                                                  \[\begin{array}{l} t\_m = \left|t\right| \\ t\_s = \mathsf{copysign}\left(1, t\right) \\ t\_s \cdot \begin{array}{l} \mathbf{if}\;k \leq 3.8 \cdot 10^{-13}:\\ \;\;\;\;\frac{2}{\left(\frac{k}{\ell} \cdot k\right) \cdot \left(k \cdot \frac{\sin k \cdot t\_m}{\ell}\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{2}{k \cdot \frac{\left(k \cdot t\_m\right) \cdot {\sin k}^{2}}{\ell \cdot \left(\cos k \cdot \ell\right)}}\\ \end{array} \end{array} \]
                                                  t\_m = (fabs.f64 t)
                                                  t\_s = (copysign.f64 #s(literal 1 binary64) t)
                                                  (FPCore (t_s t_m l k)
                                                   :precision binary64
                                                   (*
                                                    t_s
                                                    (if (<= k 3.8e-13)
                                                      (/ 2.0 (* (* (/ k l) k) (* k (/ (* (sin k) t_m) l))))
                                                      (/ 2.0 (* k (/ (* (* k t_m) (pow (sin k) 2.0)) (* l (* (cos k) l))))))))
                                                  t\_m = fabs(t);
                                                  t\_s = copysign(1.0, t);
                                                  double code(double t_s, double t_m, double l, double k) {
                                                  	double tmp;
                                                  	if (k <= 3.8e-13) {
                                                  		tmp = 2.0 / (((k / l) * k) * (k * ((sin(k) * t_m) / l)));
                                                  	} else {
                                                  		tmp = 2.0 / (k * (((k * t_m) * pow(sin(k), 2.0)) / (l * (cos(k) * l))));
                                                  	}
                                                  	return t_s * tmp;
                                                  }
                                                  
                                                  t\_m =     private
                                                  t\_s =     private
                                                  module fmin_fmax_functions
                                                      implicit none
                                                      private
                                                      public fmax
                                                      public fmin
                                                  
                                                      interface fmax
                                                          module procedure fmax88
                                                          module procedure fmax44
                                                          module procedure fmax84
                                                          module procedure fmax48
                                                      end interface
                                                      interface fmin
                                                          module procedure fmin88
                                                          module procedure fmin44
                                                          module procedure fmin84
                                                          module procedure fmin48
                                                      end interface
                                                  contains
                                                      real(8) function fmax88(x, y) result (res)
                                                          real(8), intent (in) :: x
                                                          real(8), intent (in) :: y
                                                          res = merge(y, merge(x, max(x, y), y /= y), x /= x)
                                                      end function
                                                      real(4) function fmax44(x, y) result (res)
                                                          real(4), intent (in) :: x
                                                          real(4), intent (in) :: y
                                                          res = merge(y, merge(x, max(x, y), y /= y), x /= x)
                                                      end function
                                                      real(8) function fmax84(x, y) result(res)
                                                          real(8), intent (in) :: x
                                                          real(4), intent (in) :: y
                                                          res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
                                                      end function
                                                      real(8) function fmax48(x, y) result(res)
                                                          real(4), intent (in) :: x
                                                          real(8), intent (in) :: y
                                                          res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
                                                      end function
                                                      real(8) function fmin88(x, y) result (res)
                                                          real(8), intent (in) :: x
                                                          real(8), intent (in) :: y
                                                          res = merge(y, merge(x, min(x, y), y /= y), x /= x)
                                                      end function
                                                      real(4) function fmin44(x, y) result (res)
                                                          real(4), intent (in) :: x
                                                          real(4), intent (in) :: y
                                                          res = merge(y, merge(x, min(x, y), y /= y), x /= x)
                                                      end function
                                                      real(8) function fmin84(x, y) result(res)
                                                          real(8), intent (in) :: x
                                                          real(4), intent (in) :: y
                                                          res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
                                                      end function
                                                      real(8) function fmin48(x, y) result(res)
                                                          real(4), intent (in) :: x
                                                          real(8), intent (in) :: y
                                                          res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
                                                      end function
                                                  end module
                                                  
                                                  real(8) function code(t_s, t_m, l, k)
                                                  use fmin_fmax_functions
                                                      real(8), intent (in) :: t_s
                                                      real(8), intent (in) :: t_m
                                                      real(8), intent (in) :: l
                                                      real(8), intent (in) :: k
                                                      real(8) :: tmp
                                                      if (k <= 3.8d-13) then
                                                          tmp = 2.0d0 / (((k / l) * k) * (k * ((sin(k) * t_m) / l)))
                                                      else
                                                          tmp = 2.0d0 / (k * (((k * t_m) * (sin(k) ** 2.0d0)) / (l * (cos(k) * l))))
                                                      end if
                                                      code = t_s * tmp
                                                  end function
                                                  
                                                  t\_m = Math.abs(t);
                                                  t\_s = Math.copySign(1.0, t);
                                                  public static double code(double t_s, double t_m, double l, double k) {
                                                  	double tmp;
                                                  	if (k <= 3.8e-13) {
                                                  		tmp = 2.0 / (((k / l) * k) * (k * ((Math.sin(k) * t_m) / l)));
                                                  	} else {
                                                  		tmp = 2.0 / (k * (((k * t_m) * Math.pow(Math.sin(k), 2.0)) / (l * (Math.cos(k) * l))));
                                                  	}
                                                  	return t_s * tmp;
                                                  }
                                                  
                                                  t\_m = math.fabs(t)
                                                  t\_s = math.copysign(1.0, t)
                                                  def code(t_s, t_m, l, k):
                                                  	tmp = 0
                                                  	if k <= 3.8e-13:
                                                  		tmp = 2.0 / (((k / l) * k) * (k * ((math.sin(k) * t_m) / l)))
                                                  	else:
                                                  		tmp = 2.0 / (k * (((k * t_m) * math.pow(math.sin(k), 2.0)) / (l * (math.cos(k) * l))))
                                                  	return t_s * tmp
                                                  
                                                  t\_m = abs(t)
                                                  t\_s = copysign(1.0, t)
                                                  function code(t_s, t_m, l, k)
                                                  	tmp = 0.0
                                                  	if (k <= 3.8e-13)
                                                  		tmp = Float64(2.0 / Float64(Float64(Float64(k / l) * k) * Float64(k * Float64(Float64(sin(k) * t_m) / l))));
                                                  	else
                                                  		tmp = Float64(2.0 / Float64(k * Float64(Float64(Float64(k * t_m) * (sin(k) ^ 2.0)) / Float64(l * Float64(cos(k) * l)))));
                                                  	end
                                                  	return Float64(t_s * tmp)
                                                  end
                                                  
                                                  t\_m = abs(t);
                                                  t\_s = sign(t) * abs(1.0);
                                                  function tmp_2 = code(t_s, t_m, l, k)
                                                  	tmp = 0.0;
                                                  	if (k <= 3.8e-13)
                                                  		tmp = 2.0 / (((k / l) * k) * (k * ((sin(k) * t_m) / l)));
                                                  	else
                                                  		tmp = 2.0 / (k * (((k * t_m) * (sin(k) ^ 2.0)) / (l * (cos(k) * l))));
                                                  	end
                                                  	tmp_2 = t_s * tmp;
                                                  end
                                                  
                                                  t\_m = N[Abs[t], $MachinePrecision]
                                                  t\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[t]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
                                                  code[t$95$s_, t$95$m_, l_, k_] := N[(t$95$s * If[LessEqual[k, 3.8e-13], N[(2.0 / N[(N[(N[(k / l), $MachinePrecision] * k), $MachinePrecision] * N[(k * N[(N[(N[Sin[k], $MachinePrecision] * t$95$m), $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(2.0 / N[(k * N[(N[(N[(k * t$95$m), $MachinePrecision] * N[Power[N[Sin[k], $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision] / N[(l * N[(N[Cos[k], $MachinePrecision] * l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]), $MachinePrecision]
                                                  
                                                  \begin{array}{l}
                                                  t\_m = \left|t\right|
                                                  \\
                                                  t\_s = \mathsf{copysign}\left(1, t\right)
                                                  
                                                  \\
                                                  t\_s \cdot \begin{array}{l}
                                                  \mathbf{if}\;k \leq 3.8 \cdot 10^{-13}:\\
                                                  \;\;\;\;\frac{2}{\left(\frac{k}{\ell} \cdot k\right) \cdot \left(k \cdot \frac{\sin k \cdot t\_m}{\ell}\right)}\\
                                                  
                                                  \mathbf{else}:\\
                                                  \;\;\;\;\frac{2}{k \cdot \frac{\left(k \cdot t\_m\right) \cdot {\sin k}^{2}}{\ell \cdot \left(\cos k \cdot \ell\right)}}\\
                                                  
                                                  
                                                  \end{array}
                                                  \end{array}
                                                  
                                                  Derivation
                                                  1. Split input into 2 regimes
                                                  2. if k < 3.8e-13

                                                    1. Initial program 42.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}{\frac{{k}^{2} \cdot \left(t \cdot {\sin k}^{2}\right)}{{\ell}^{2} \cdot \cos k}}} \]
                                                    4. Step-by-step derivation
                                                      1. Applied rewrites74.5%

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

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

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

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

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

                                                        if 3.8e-13 < k

                                                        1. Initial program 26.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}{\frac{{k}^{2} \cdot \left(t \cdot {\sin k}^{2}\right)}{{\ell}^{2} \cdot \cos k}}} \]
                                                        4. Step-by-step derivation
                                                          1. Applied rewrites73.3%

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

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

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

                                                        Alternative 10: 80.9% accurate, 1.3× speedup?

                                                        \[\begin{array}{l} t\_m = \left|t\right| \\ t\_s = \mathsf{copysign}\left(1, t\right) \\ \begin{array}{l} t_2 := k \cdot \frac{\sin k \cdot t\_m}{\ell}\\ t\_s \cdot \begin{array}{l} \mathbf{if}\;k \leq 1.9 \cdot 10^{-15}:\\ \;\;\;\;\frac{2}{\left(\frac{k}{\ell} \cdot k\right) \cdot t\_2}\\ \mathbf{elif}\;k \leq 1.6 \cdot 10^{+149}:\\ \;\;\;\;\frac{\cos k}{\left(k \cdot k\right) \cdot \left({\sin k}^{2} \cdot t\_m\right)} \cdot \left(\ell \cdot \left(\ell + \ell\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\frac{2}{\left(k \cdot \frac{\sin k}{\ell}\right) \cdot t\_2}\\ \end{array} \end{array} \end{array} \]
                                                        t\_m = (fabs.f64 t)
                                                        t\_s = (copysign.f64 #s(literal 1 binary64) t)
                                                        (FPCore (t_s t_m l k)
                                                         :precision binary64
                                                         (let* ((t_2 (* k (/ (* (sin k) t_m) l))))
                                                           (*
                                                            t_s
                                                            (if (<= k 1.9e-15)
                                                              (/ 2.0 (* (* (/ k l) k) t_2))
                                                              (if (<= k 1.6e+149)
                                                                (* (/ (cos k) (* (* k k) (* (pow (sin k) 2.0) t_m))) (* l (+ l l)))
                                                                (/ 2.0 (* (* k (/ (sin k) l)) t_2)))))))
                                                        t\_m = fabs(t);
                                                        t\_s = copysign(1.0, t);
                                                        double code(double t_s, double t_m, double l, double k) {
                                                        	double t_2 = k * ((sin(k) * t_m) / l);
                                                        	double tmp;
                                                        	if (k <= 1.9e-15) {
                                                        		tmp = 2.0 / (((k / l) * k) * t_2);
                                                        	} else if (k <= 1.6e+149) {
                                                        		tmp = (cos(k) / ((k * k) * (pow(sin(k), 2.0) * t_m))) * (l * (l + l));
                                                        	} else {
                                                        		tmp = 2.0 / ((k * (sin(k) / l)) * t_2);
                                                        	}
                                                        	return t_s * tmp;
                                                        }
                                                        
                                                        t\_m =     private
                                                        t\_s =     private
                                                        module fmin_fmax_functions
                                                            implicit none
                                                            private
                                                            public fmax
                                                            public fmin
                                                        
                                                            interface fmax
                                                                module procedure fmax88
                                                                module procedure fmax44
                                                                module procedure fmax84
                                                                module procedure fmax48
                                                            end interface
                                                            interface fmin
                                                                module procedure fmin88
                                                                module procedure fmin44
                                                                module procedure fmin84
                                                                module procedure fmin48
                                                            end interface
                                                        contains
                                                            real(8) function fmax88(x, y) result (res)
                                                                real(8), intent (in) :: x
                                                                real(8), intent (in) :: y
                                                                res = merge(y, merge(x, max(x, y), y /= y), x /= x)
                                                            end function
                                                            real(4) function fmax44(x, y) result (res)
                                                                real(4), intent (in) :: x
                                                                real(4), intent (in) :: y
                                                                res = merge(y, merge(x, max(x, y), y /= y), x /= x)
                                                            end function
                                                            real(8) function fmax84(x, y) result(res)
                                                                real(8), intent (in) :: x
                                                                real(4), intent (in) :: y
                                                                res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
                                                            end function
                                                            real(8) function fmax48(x, y) result(res)
                                                                real(4), intent (in) :: x
                                                                real(8), intent (in) :: y
                                                                res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
                                                            end function
                                                            real(8) function fmin88(x, y) result (res)
                                                                real(8), intent (in) :: x
                                                                real(8), intent (in) :: y
                                                                res = merge(y, merge(x, min(x, y), y /= y), x /= x)
                                                            end function
                                                            real(4) function fmin44(x, y) result (res)
                                                                real(4), intent (in) :: x
                                                                real(4), intent (in) :: y
                                                                res = merge(y, merge(x, min(x, y), y /= y), x /= x)
                                                            end function
                                                            real(8) function fmin84(x, y) result(res)
                                                                real(8), intent (in) :: x
                                                                real(4), intent (in) :: y
                                                                res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
                                                            end function
                                                            real(8) function fmin48(x, y) result(res)
                                                                real(4), intent (in) :: x
                                                                real(8), intent (in) :: y
                                                                res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
                                                            end function
                                                        end module
                                                        
                                                        real(8) function code(t_s, t_m, l, k)
                                                        use fmin_fmax_functions
                                                            real(8), intent (in) :: t_s
                                                            real(8), intent (in) :: t_m
                                                            real(8), intent (in) :: l
                                                            real(8), intent (in) :: k
                                                            real(8) :: t_2
                                                            real(8) :: tmp
                                                            t_2 = k * ((sin(k) * t_m) / l)
                                                            if (k <= 1.9d-15) then
                                                                tmp = 2.0d0 / (((k / l) * k) * t_2)
                                                            else if (k <= 1.6d+149) then
                                                                tmp = (cos(k) / ((k * k) * ((sin(k) ** 2.0d0) * t_m))) * (l * (l + l))
                                                            else
                                                                tmp = 2.0d0 / ((k * (sin(k) / l)) * t_2)
                                                            end if
                                                            code = t_s * tmp
                                                        end function
                                                        
                                                        t\_m = Math.abs(t);
                                                        t\_s = Math.copySign(1.0, t);
                                                        public static double code(double t_s, double t_m, double l, double k) {
                                                        	double t_2 = k * ((Math.sin(k) * t_m) / l);
                                                        	double tmp;
                                                        	if (k <= 1.9e-15) {
                                                        		tmp = 2.0 / (((k / l) * k) * t_2);
                                                        	} else if (k <= 1.6e+149) {
                                                        		tmp = (Math.cos(k) / ((k * k) * (Math.pow(Math.sin(k), 2.0) * t_m))) * (l * (l + l));
                                                        	} else {
                                                        		tmp = 2.0 / ((k * (Math.sin(k) / l)) * t_2);
                                                        	}
                                                        	return t_s * tmp;
                                                        }
                                                        
                                                        t\_m = math.fabs(t)
                                                        t\_s = math.copysign(1.0, t)
                                                        def code(t_s, t_m, l, k):
                                                        	t_2 = k * ((math.sin(k) * t_m) / l)
                                                        	tmp = 0
                                                        	if k <= 1.9e-15:
                                                        		tmp = 2.0 / (((k / l) * k) * t_2)
                                                        	elif k <= 1.6e+149:
                                                        		tmp = (math.cos(k) / ((k * k) * (math.pow(math.sin(k), 2.0) * t_m))) * (l * (l + l))
                                                        	else:
                                                        		tmp = 2.0 / ((k * (math.sin(k) / l)) * t_2)
                                                        	return t_s * tmp
                                                        
                                                        t\_m = abs(t)
                                                        t\_s = copysign(1.0, t)
                                                        function code(t_s, t_m, l, k)
                                                        	t_2 = Float64(k * Float64(Float64(sin(k) * t_m) / l))
                                                        	tmp = 0.0
                                                        	if (k <= 1.9e-15)
                                                        		tmp = Float64(2.0 / Float64(Float64(Float64(k / l) * k) * t_2));
                                                        	elseif (k <= 1.6e+149)
                                                        		tmp = Float64(Float64(cos(k) / Float64(Float64(k * k) * Float64((sin(k) ^ 2.0) * t_m))) * Float64(l * Float64(l + l)));
                                                        	else
                                                        		tmp = Float64(2.0 / Float64(Float64(k * Float64(sin(k) / l)) * t_2));
                                                        	end
                                                        	return Float64(t_s * tmp)
                                                        end
                                                        
                                                        t\_m = abs(t);
                                                        t\_s = sign(t) * abs(1.0);
                                                        function tmp_2 = code(t_s, t_m, l, k)
                                                        	t_2 = k * ((sin(k) * t_m) / l);
                                                        	tmp = 0.0;
                                                        	if (k <= 1.9e-15)
                                                        		tmp = 2.0 / (((k / l) * k) * t_2);
                                                        	elseif (k <= 1.6e+149)
                                                        		tmp = (cos(k) / ((k * k) * ((sin(k) ^ 2.0) * t_m))) * (l * (l + l));
                                                        	else
                                                        		tmp = 2.0 / ((k * (sin(k) / l)) * t_2);
                                                        	end
                                                        	tmp_2 = t_s * tmp;
                                                        end
                                                        
                                                        t\_m = N[Abs[t], $MachinePrecision]
                                                        t\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[t]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
                                                        code[t$95$s_, t$95$m_, l_, k_] := Block[{t$95$2 = N[(k * N[(N[(N[Sin[k], $MachinePrecision] * t$95$m), $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision]}, N[(t$95$s * If[LessEqual[k, 1.9e-15], N[(2.0 / N[(N[(N[(k / l), $MachinePrecision] * k), $MachinePrecision] * t$95$2), $MachinePrecision]), $MachinePrecision], If[LessEqual[k, 1.6e+149], N[(N[(N[Cos[k], $MachinePrecision] / N[(N[(k * k), $MachinePrecision] * N[(N[Power[N[Sin[k], $MachinePrecision], 2.0], $MachinePrecision] * t$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(l * N[(l + l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(2.0 / N[(N[(k * N[(N[Sin[k], $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision] * t$95$2), $MachinePrecision]), $MachinePrecision]]]), $MachinePrecision]]
                                                        
                                                        \begin{array}{l}
                                                        t\_m = \left|t\right|
                                                        \\
                                                        t\_s = \mathsf{copysign}\left(1, t\right)
                                                        
                                                        \\
                                                        \begin{array}{l}
                                                        t_2 := k \cdot \frac{\sin k \cdot t\_m}{\ell}\\
                                                        t\_s \cdot \begin{array}{l}
                                                        \mathbf{if}\;k \leq 1.9 \cdot 10^{-15}:\\
                                                        \;\;\;\;\frac{2}{\left(\frac{k}{\ell} \cdot k\right) \cdot t\_2}\\
                                                        
                                                        \mathbf{elif}\;k \leq 1.6 \cdot 10^{+149}:\\
                                                        \;\;\;\;\frac{\cos k}{\left(k \cdot k\right) \cdot \left({\sin k}^{2} \cdot t\_m\right)} \cdot \left(\ell \cdot \left(\ell + \ell\right)\right)\\
                                                        
                                                        \mathbf{else}:\\
                                                        \;\;\;\;\frac{2}{\left(k \cdot \frac{\sin k}{\ell}\right) \cdot t\_2}\\
                                                        
                                                        
                                                        \end{array}
                                                        \end{array}
                                                        \end{array}
                                                        
                                                        Derivation
                                                        1. Split input into 3 regimes
                                                        2. if k < 1.9000000000000001e-15

                                                          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}{\frac{{k}^{2} \cdot \left(t \cdot {\sin k}^{2}\right)}{{\ell}^{2} \cdot \cos k}}} \]
                                                          4. Step-by-step derivation
                                                            1. Applied rewrites74.3%

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

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

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

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

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

                                                              if 1.9000000000000001e-15 < k < 1.6000000000000001e149

                                                              1. Initial program 24.6%

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

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

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

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

                                                                if 1.6000000000000001e149 < k

                                                                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}{\frac{{k}^{2} \cdot \left(t \cdot {\sin k}^{2}\right)}{{\ell}^{2} \cdot \cos k}}} \]
                                                                4. Step-by-step derivation
                                                                  1. Applied rewrites54.6%

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

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

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

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

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

                                                                  Alternative 11: 78.0% accurate, 1.8× speedup?

                                                                  \[\begin{array}{l} t\_m = \left|t\right| \\ t\_s = \mathsf{copysign}\left(1, t\right) \\ t\_s \cdot \frac{2}{\left(k \cdot \frac{\sin k}{\ell}\right) \cdot \left(k \cdot \frac{\sin k \cdot t\_m}{\ell}\right)} \end{array} \]
                                                                  t\_m = (fabs.f64 t)
                                                                  t\_s = (copysign.f64 #s(literal 1 binary64) t)
                                                                  (FPCore (t_s t_m l k)
                                                                   :precision binary64
                                                                   (* t_s (/ 2.0 (* (* k (/ (sin k) l)) (* k (/ (* (sin k) t_m) l))))))
                                                                  t\_m = fabs(t);
                                                                  t\_s = copysign(1.0, t);
                                                                  double code(double t_s, double t_m, double l, double k) {
                                                                  	return t_s * (2.0 / ((k * (sin(k) / l)) * (k * ((sin(k) * t_m) / l))));
                                                                  }
                                                                  
                                                                  t\_m =     private
                                                                  t\_s =     private
                                                                  module fmin_fmax_functions
                                                                      implicit none
                                                                      private
                                                                      public fmax
                                                                      public fmin
                                                                  
                                                                      interface fmax
                                                                          module procedure fmax88
                                                                          module procedure fmax44
                                                                          module procedure fmax84
                                                                          module procedure fmax48
                                                                      end interface
                                                                      interface fmin
                                                                          module procedure fmin88
                                                                          module procedure fmin44
                                                                          module procedure fmin84
                                                                          module procedure fmin48
                                                                      end interface
                                                                  contains
                                                                      real(8) function fmax88(x, y) result (res)
                                                                          real(8), intent (in) :: x
                                                                          real(8), intent (in) :: y
                                                                          res = merge(y, merge(x, max(x, y), y /= y), x /= x)
                                                                      end function
                                                                      real(4) function fmax44(x, y) result (res)
                                                                          real(4), intent (in) :: x
                                                                          real(4), intent (in) :: y
                                                                          res = merge(y, merge(x, max(x, y), y /= y), x /= x)
                                                                      end function
                                                                      real(8) function fmax84(x, y) result(res)
                                                                          real(8), intent (in) :: x
                                                                          real(4), intent (in) :: y
                                                                          res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
                                                                      end function
                                                                      real(8) function fmax48(x, y) result(res)
                                                                          real(4), intent (in) :: x
                                                                          real(8), intent (in) :: y
                                                                          res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
                                                                      end function
                                                                      real(8) function fmin88(x, y) result (res)
                                                                          real(8), intent (in) :: x
                                                                          real(8), intent (in) :: y
                                                                          res = merge(y, merge(x, min(x, y), y /= y), x /= x)
                                                                      end function
                                                                      real(4) function fmin44(x, y) result (res)
                                                                          real(4), intent (in) :: x
                                                                          real(4), intent (in) :: y
                                                                          res = merge(y, merge(x, min(x, y), y /= y), x /= x)
                                                                      end function
                                                                      real(8) function fmin84(x, y) result(res)
                                                                          real(8), intent (in) :: x
                                                                          real(4), intent (in) :: y
                                                                          res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
                                                                      end function
                                                                      real(8) function fmin48(x, y) result(res)
                                                                          real(4), intent (in) :: x
                                                                          real(8), intent (in) :: y
                                                                          res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
                                                                      end function
                                                                  end module
                                                                  
                                                                  real(8) function code(t_s, t_m, l, k)
                                                                  use fmin_fmax_functions
                                                                      real(8), intent (in) :: t_s
                                                                      real(8), intent (in) :: t_m
                                                                      real(8), intent (in) :: l
                                                                      real(8), intent (in) :: k
                                                                      code = t_s * (2.0d0 / ((k * (sin(k) / l)) * (k * ((sin(k) * t_m) / l))))
                                                                  end function
                                                                  
                                                                  t\_m = Math.abs(t);
                                                                  t\_s = Math.copySign(1.0, t);
                                                                  public static double code(double t_s, double t_m, double l, double k) {
                                                                  	return t_s * (2.0 / ((k * (Math.sin(k) / l)) * (k * ((Math.sin(k) * t_m) / l))));
                                                                  }
                                                                  
                                                                  t\_m = math.fabs(t)
                                                                  t\_s = math.copysign(1.0, t)
                                                                  def code(t_s, t_m, l, k):
                                                                  	return t_s * (2.0 / ((k * (math.sin(k) / l)) * (k * ((math.sin(k) * t_m) / l))))
                                                                  
                                                                  t\_m = abs(t)
                                                                  t\_s = copysign(1.0, t)
                                                                  function code(t_s, t_m, l, k)
                                                                  	return Float64(t_s * Float64(2.0 / Float64(Float64(k * Float64(sin(k) / l)) * Float64(k * Float64(Float64(sin(k) * t_m) / l)))))
                                                                  end
                                                                  
                                                                  t\_m = abs(t);
                                                                  t\_s = sign(t) * abs(1.0);
                                                                  function tmp = code(t_s, t_m, l, k)
                                                                  	tmp = t_s * (2.0 / ((k * (sin(k) / l)) * (k * ((sin(k) * t_m) / l))));
                                                                  end
                                                                  
                                                                  t\_m = N[Abs[t], $MachinePrecision]
                                                                  t\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[t]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
                                                                  code[t$95$s_, t$95$m_, l_, k_] := N[(t$95$s * N[(2.0 / N[(N[(k * N[(N[Sin[k], $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision] * N[(k * N[(N[(N[Sin[k], $MachinePrecision] * t$95$m), $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
                                                                  
                                                                  \begin{array}{l}
                                                                  t\_m = \left|t\right|
                                                                  \\
                                                                  t\_s = \mathsf{copysign}\left(1, t\right)
                                                                  
                                                                  \\
                                                                  t\_s \cdot \frac{2}{\left(k \cdot \frac{\sin k}{\ell}\right) \cdot \left(k \cdot \frac{\sin k \cdot t\_m}{\ell}\right)}
                                                                  \end{array}
                                                                  
                                                                  Derivation
                                                                  1. Initial program 38.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}{\frac{{k}^{2} \cdot \left(t \cdot {\sin k}^{2}\right)}{{\ell}^{2} \cdot \cos k}}} \]
                                                                  4. Step-by-step derivation
                                                                    1. Applied rewrites74.2%

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

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

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

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

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

                                                                      Alternative 12: 77.4% accurate, 2.7× speedup?

                                                                      \[\begin{array}{l} t\_m = \left|t\right| \\ t\_s = \mathsf{copysign}\left(1, t\right) \\ t\_s \cdot \begin{array}{l} \mathbf{if}\;k \leq 6.8 \cdot 10^{-28}:\\ \;\;\;\;\frac{2}{\left(\frac{k}{\ell} \cdot k\right) \cdot \left(k \cdot \frac{\sin k \cdot t\_m}{\ell}\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{2}{\left(\left(\frac{\frac{t\_m}{\ell}}{\ell} \cdot k\right) \cdot k\right) \cdot \frac{k \cdot k}{\cos k}}\\ \end{array} \end{array} \]
                                                                      t\_m = (fabs.f64 t)
                                                                      t\_s = (copysign.f64 #s(literal 1 binary64) t)
                                                                      (FPCore (t_s t_m l k)
                                                                       :precision binary64
                                                                       (*
                                                                        t_s
                                                                        (if (<= k 6.8e-28)
                                                                          (/ 2.0 (* (* (/ k l) k) (* k (/ (* (sin k) t_m) l))))
                                                                          (/ 2.0 (* (* (* (/ (/ t_m l) l) k) k) (/ (* k k) (cos k)))))))
                                                                      t\_m = fabs(t);
                                                                      t\_s = copysign(1.0, t);
                                                                      double code(double t_s, double t_m, double l, double k) {
                                                                      	double tmp;
                                                                      	if (k <= 6.8e-28) {
                                                                      		tmp = 2.0 / (((k / l) * k) * (k * ((sin(k) * t_m) / l)));
                                                                      	} else {
                                                                      		tmp = 2.0 / (((((t_m / l) / l) * k) * k) * ((k * k) / cos(k)));
                                                                      	}
                                                                      	return t_s * tmp;
                                                                      }
                                                                      
                                                                      t\_m =     private
                                                                      t\_s =     private
                                                                      module fmin_fmax_functions
                                                                          implicit none
                                                                          private
                                                                          public fmax
                                                                          public fmin
                                                                      
                                                                          interface fmax
                                                                              module procedure fmax88
                                                                              module procedure fmax44
                                                                              module procedure fmax84
                                                                              module procedure fmax48
                                                                          end interface
                                                                          interface fmin
                                                                              module procedure fmin88
                                                                              module procedure fmin44
                                                                              module procedure fmin84
                                                                              module procedure fmin48
                                                                          end interface
                                                                      contains
                                                                          real(8) function fmax88(x, y) result (res)
                                                                              real(8), intent (in) :: x
                                                                              real(8), intent (in) :: y
                                                                              res = merge(y, merge(x, max(x, y), y /= y), x /= x)
                                                                          end function
                                                                          real(4) function fmax44(x, y) result (res)
                                                                              real(4), intent (in) :: x
                                                                              real(4), intent (in) :: y
                                                                              res = merge(y, merge(x, max(x, y), y /= y), x /= x)
                                                                          end function
                                                                          real(8) function fmax84(x, y) result(res)
                                                                              real(8), intent (in) :: x
                                                                              real(4), intent (in) :: y
                                                                              res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
                                                                          end function
                                                                          real(8) function fmax48(x, y) result(res)
                                                                              real(4), intent (in) :: x
                                                                              real(8), intent (in) :: y
                                                                              res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
                                                                          end function
                                                                          real(8) function fmin88(x, y) result (res)
                                                                              real(8), intent (in) :: x
                                                                              real(8), intent (in) :: y
                                                                              res = merge(y, merge(x, min(x, y), y /= y), x /= x)
                                                                          end function
                                                                          real(4) function fmin44(x, y) result (res)
                                                                              real(4), intent (in) :: x
                                                                              real(4), intent (in) :: y
                                                                              res = merge(y, merge(x, min(x, y), y /= y), x /= x)
                                                                          end function
                                                                          real(8) function fmin84(x, y) result(res)
                                                                              real(8), intent (in) :: x
                                                                              real(4), intent (in) :: y
                                                                              res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
                                                                          end function
                                                                          real(8) function fmin48(x, y) result(res)
                                                                              real(4), intent (in) :: x
                                                                              real(8), intent (in) :: y
                                                                              res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
                                                                          end function
                                                                      end module
                                                                      
                                                                      real(8) function code(t_s, t_m, l, k)
                                                                      use fmin_fmax_functions
                                                                          real(8), intent (in) :: t_s
                                                                          real(8), intent (in) :: t_m
                                                                          real(8), intent (in) :: l
                                                                          real(8), intent (in) :: k
                                                                          real(8) :: tmp
                                                                          if (k <= 6.8d-28) then
                                                                              tmp = 2.0d0 / (((k / l) * k) * (k * ((sin(k) * t_m) / l)))
                                                                          else
                                                                              tmp = 2.0d0 / (((((t_m / l) / l) * k) * k) * ((k * k) / cos(k)))
                                                                          end if
                                                                          code = t_s * tmp
                                                                      end function
                                                                      
                                                                      t\_m = Math.abs(t);
                                                                      t\_s = Math.copySign(1.0, t);
                                                                      public static double code(double t_s, double t_m, double l, double k) {
                                                                      	double tmp;
                                                                      	if (k <= 6.8e-28) {
                                                                      		tmp = 2.0 / (((k / l) * k) * (k * ((Math.sin(k) * t_m) / l)));
                                                                      	} else {
                                                                      		tmp = 2.0 / (((((t_m / l) / l) * k) * k) * ((k * k) / Math.cos(k)));
                                                                      	}
                                                                      	return t_s * tmp;
                                                                      }
                                                                      
                                                                      t\_m = math.fabs(t)
                                                                      t\_s = math.copysign(1.0, t)
                                                                      def code(t_s, t_m, l, k):
                                                                      	tmp = 0
                                                                      	if k <= 6.8e-28:
                                                                      		tmp = 2.0 / (((k / l) * k) * (k * ((math.sin(k) * t_m) / l)))
                                                                      	else:
                                                                      		tmp = 2.0 / (((((t_m / l) / l) * k) * k) * ((k * k) / math.cos(k)))
                                                                      	return t_s * tmp
                                                                      
                                                                      t\_m = abs(t)
                                                                      t\_s = copysign(1.0, t)
                                                                      function code(t_s, t_m, l, k)
                                                                      	tmp = 0.0
                                                                      	if (k <= 6.8e-28)
                                                                      		tmp = Float64(2.0 / Float64(Float64(Float64(k / l) * k) * Float64(k * Float64(Float64(sin(k) * t_m) / l))));
                                                                      	else
                                                                      		tmp = Float64(2.0 / Float64(Float64(Float64(Float64(Float64(t_m / l) / l) * k) * k) * Float64(Float64(k * k) / cos(k))));
                                                                      	end
                                                                      	return Float64(t_s * tmp)
                                                                      end
                                                                      
                                                                      t\_m = abs(t);
                                                                      t\_s = sign(t) * abs(1.0);
                                                                      function tmp_2 = code(t_s, t_m, l, k)
                                                                      	tmp = 0.0;
                                                                      	if (k <= 6.8e-28)
                                                                      		tmp = 2.0 / (((k / l) * k) * (k * ((sin(k) * t_m) / l)));
                                                                      	else
                                                                      		tmp = 2.0 / (((((t_m / l) / l) * k) * k) * ((k * k) / cos(k)));
                                                                      	end
                                                                      	tmp_2 = t_s * tmp;
                                                                      end
                                                                      
                                                                      t\_m = N[Abs[t], $MachinePrecision]
                                                                      t\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[t]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
                                                                      code[t$95$s_, t$95$m_, l_, k_] := N[(t$95$s * If[LessEqual[k, 6.8e-28], N[(2.0 / N[(N[(N[(k / l), $MachinePrecision] * k), $MachinePrecision] * N[(k * N[(N[(N[Sin[k], $MachinePrecision] * t$95$m), $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(2.0 / N[(N[(N[(N[(N[(t$95$m / l), $MachinePrecision] / l), $MachinePrecision] * k), $MachinePrecision] * k), $MachinePrecision] * N[(N[(k * k), $MachinePrecision] / N[Cos[k], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]), $MachinePrecision]
                                                                      
                                                                      \begin{array}{l}
                                                                      t\_m = \left|t\right|
                                                                      \\
                                                                      t\_s = \mathsf{copysign}\left(1, t\right)
                                                                      
                                                                      \\
                                                                      t\_s \cdot \begin{array}{l}
                                                                      \mathbf{if}\;k \leq 6.8 \cdot 10^{-28}:\\
                                                                      \;\;\;\;\frac{2}{\left(\frac{k}{\ell} \cdot k\right) \cdot \left(k \cdot \frac{\sin k \cdot t\_m}{\ell}\right)}\\
                                                                      
                                                                      \mathbf{else}:\\
                                                                      \;\;\;\;\frac{2}{\left(\left(\frac{\frac{t\_m}{\ell}}{\ell} \cdot k\right) \cdot k\right) \cdot \frac{k \cdot k}{\cos k}}\\
                                                                      
                                                                      
                                                                      \end{array}
                                                                      \end{array}
                                                                      
                                                                      Derivation
                                                                      1. Split input into 2 regimes
                                                                      2. if k < 6.8000000000000001e-28

                                                                        1. Initial program 42.8%

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

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

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

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

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

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

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

                                                                            if 6.8000000000000001e-28 < k

                                                                            1. Initial program 27.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}{\frac{{k}^{2} \cdot \left(t \cdot {\sin k}^{2}\right)}{{\ell}^{2} \cdot \cos k}}} \]
                                                                            4. Step-by-step derivation
                                                                              1. Applied rewrites75.2%

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

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

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

                                                                              Alternative 13: 77.2% accurate, 2.8× speedup?

                                                                              \[\begin{array}{l} t\_m = \left|t\right| \\ t\_s = \mathsf{copysign}\left(1, t\right) \\ t\_s \cdot \begin{array}{l} \mathbf{if}\;k \leq 1.45 \cdot 10^{-37}:\\ \;\;\;\;\frac{2}{\left(\frac{k}{\ell} \cdot k\right) \cdot \left(k \cdot \frac{\sin k \cdot t\_m}{\ell}\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{2}{\frac{\left(\frac{t\_m}{\ell} \cdot \left(k \cdot k\right)\right) \cdot \left(k \cdot k\right)}{\ell \cdot \cos k}}\\ \end{array} \end{array} \]
                                                                              t\_m = (fabs.f64 t)
                                                                              t\_s = (copysign.f64 #s(literal 1 binary64) t)
                                                                              (FPCore (t_s t_m l k)
                                                                               :precision binary64
                                                                               (*
                                                                                t_s
                                                                                (if (<= k 1.45e-37)
                                                                                  (/ 2.0 (* (* (/ k l) k) (* k (/ (* (sin k) t_m) l))))
                                                                                  (/ 2.0 (/ (* (* (/ t_m l) (* k k)) (* k k)) (* l (cos k)))))))
                                                                              t\_m = fabs(t);
                                                                              t\_s = copysign(1.0, t);
                                                                              double code(double t_s, double t_m, double l, double k) {
                                                                              	double tmp;
                                                                              	if (k <= 1.45e-37) {
                                                                              		tmp = 2.0 / (((k / l) * k) * (k * ((sin(k) * t_m) / l)));
                                                                              	} else {
                                                                              		tmp = 2.0 / ((((t_m / l) * (k * k)) * (k * k)) / (l * cos(k)));
                                                                              	}
                                                                              	return t_s * tmp;
                                                                              }
                                                                              
                                                                              t\_m =     private
                                                                              t\_s =     private
                                                                              module fmin_fmax_functions
                                                                                  implicit none
                                                                                  private
                                                                                  public fmax
                                                                                  public fmin
                                                                              
                                                                                  interface fmax
                                                                                      module procedure fmax88
                                                                                      module procedure fmax44
                                                                                      module procedure fmax84
                                                                                      module procedure fmax48
                                                                                  end interface
                                                                                  interface fmin
                                                                                      module procedure fmin88
                                                                                      module procedure fmin44
                                                                                      module procedure fmin84
                                                                                      module procedure fmin48
                                                                                  end interface
                                                                              contains
                                                                                  real(8) function fmax88(x, y) result (res)
                                                                                      real(8), intent (in) :: x
                                                                                      real(8), intent (in) :: y
                                                                                      res = merge(y, merge(x, max(x, y), y /= y), x /= x)
                                                                                  end function
                                                                                  real(4) function fmax44(x, y) result (res)
                                                                                      real(4), intent (in) :: x
                                                                                      real(4), intent (in) :: y
                                                                                      res = merge(y, merge(x, max(x, y), y /= y), x /= x)
                                                                                  end function
                                                                                  real(8) function fmax84(x, y) result(res)
                                                                                      real(8), intent (in) :: x
                                                                                      real(4), intent (in) :: y
                                                                                      res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
                                                                                  end function
                                                                                  real(8) function fmax48(x, y) result(res)
                                                                                      real(4), intent (in) :: x
                                                                                      real(8), intent (in) :: y
                                                                                      res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
                                                                                  end function
                                                                                  real(8) function fmin88(x, y) result (res)
                                                                                      real(8), intent (in) :: x
                                                                                      real(8), intent (in) :: y
                                                                                      res = merge(y, merge(x, min(x, y), y /= y), x /= x)
                                                                                  end function
                                                                                  real(4) function fmin44(x, y) result (res)
                                                                                      real(4), intent (in) :: x
                                                                                      real(4), intent (in) :: y
                                                                                      res = merge(y, merge(x, min(x, y), y /= y), x /= x)
                                                                                  end function
                                                                                  real(8) function fmin84(x, y) result(res)
                                                                                      real(8), intent (in) :: x
                                                                                      real(4), intent (in) :: y
                                                                                      res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
                                                                                  end function
                                                                                  real(8) function fmin48(x, y) result(res)
                                                                                      real(4), intent (in) :: x
                                                                                      real(8), intent (in) :: y
                                                                                      res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
                                                                                  end function
                                                                              end module
                                                                              
                                                                              real(8) function code(t_s, t_m, l, k)
                                                                              use fmin_fmax_functions
                                                                                  real(8), intent (in) :: t_s
                                                                                  real(8), intent (in) :: t_m
                                                                                  real(8), intent (in) :: l
                                                                                  real(8), intent (in) :: k
                                                                                  real(8) :: tmp
                                                                                  if (k <= 1.45d-37) then
                                                                                      tmp = 2.0d0 / (((k / l) * k) * (k * ((sin(k) * t_m) / l)))
                                                                                  else
                                                                                      tmp = 2.0d0 / ((((t_m / l) * (k * k)) * (k * k)) / (l * cos(k)))
                                                                                  end if
                                                                                  code = t_s * tmp
                                                                              end function
                                                                              
                                                                              t\_m = Math.abs(t);
                                                                              t\_s = Math.copySign(1.0, t);
                                                                              public static double code(double t_s, double t_m, double l, double k) {
                                                                              	double tmp;
                                                                              	if (k <= 1.45e-37) {
                                                                              		tmp = 2.0 / (((k / l) * k) * (k * ((Math.sin(k) * t_m) / l)));
                                                                              	} else {
                                                                              		tmp = 2.0 / ((((t_m / l) * (k * k)) * (k * k)) / (l * Math.cos(k)));
                                                                              	}
                                                                              	return t_s * tmp;
                                                                              }
                                                                              
                                                                              t\_m = math.fabs(t)
                                                                              t\_s = math.copysign(1.0, t)
                                                                              def code(t_s, t_m, l, k):
                                                                              	tmp = 0
                                                                              	if k <= 1.45e-37:
                                                                              		tmp = 2.0 / (((k / l) * k) * (k * ((math.sin(k) * t_m) / l)))
                                                                              	else:
                                                                              		tmp = 2.0 / ((((t_m / l) * (k * k)) * (k * k)) / (l * math.cos(k)))
                                                                              	return t_s * tmp
                                                                              
                                                                              t\_m = abs(t)
                                                                              t\_s = copysign(1.0, t)
                                                                              function code(t_s, t_m, l, k)
                                                                              	tmp = 0.0
                                                                              	if (k <= 1.45e-37)
                                                                              		tmp = Float64(2.0 / Float64(Float64(Float64(k / l) * k) * Float64(k * Float64(Float64(sin(k) * t_m) / l))));
                                                                              	else
                                                                              		tmp = Float64(2.0 / Float64(Float64(Float64(Float64(t_m / l) * Float64(k * k)) * Float64(k * k)) / Float64(l * cos(k))));
                                                                              	end
                                                                              	return Float64(t_s * tmp)
                                                                              end
                                                                              
                                                                              t\_m = abs(t);
                                                                              t\_s = sign(t) * abs(1.0);
                                                                              function tmp_2 = code(t_s, t_m, l, k)
                                                                              	tmp = 0.0;
                                                                              	if (k <= 1.45e-37)
                                                                              		tmp = 2.0 / (((k / l) * k) * (k * ((sin(k) * t_m) / l)));
                                                                              	else
                                                                              		tmp = 2.0 / ((((t_m / l) * (k * k)) * (k * k)) / (l * cos(k)));
                                                                              	end
                                                                              	tmp_2 = t_s * tmp;
                                                                              end
                                                                              
                                                                              t\_m = N[Abs[t], $MachinePrecision]
                                                                              t\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[t]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
                                                                              code[t$95$s_, t$95$m_, l_, k_] := N[(t$95$s * If[LessEqual[k, 1.45e-37], N[(2.0 / N[(N[(N[(k / l), $MachinePrecision] * k), $MachinePrecision] * N[(k * N[(N[(N[Sin[k], $MachinePrecision] * t$95$m), $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(2.0 / N[(N[(N[(N[(t$95$m / l), $MachinePrecision] * N[(k * k), $MachinePrecision]), $MachinePrecision] * N[(k * k), $MachinePrecision]), $MachinePrecision] / N[(l * N[Cos[k], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]), $MachinePrecision]
                                                                              
                                                                              \begin{array}{l}
                                                                              t\_m = \left|t\right|
                                                                              \\
                                                                              t\_s = \mathsf{copysign}\left(1, t\right)
                                                                              
                                                                              \\
                                                                              t\_s \cdot \begin{array}{l}
                                                                              \mathbf{if}\;k \leq 1.45 \cdot 10^{-37}:\\
                                                                              \;\;\;\;\frac{2}{\left(\frac{k}{\ell} \cdot k\right) \cdot \left(k \cdot \frac{\sin k \cdot t\_m}{\ell}\right)}\\
                                                                              
                                                                              \mathbf{else}:\\
                                                                              \;\;\;\;\frac{2}{\frac{\left(\frac{t\_m}{\ell} \cdot \left(k \cdot k\right)\right) \cdot \left(k \cdot k\right)}{\ell \cdot \cos k}}\\
                                                                              
                                                                              
                                                                              \end{array}
                                                                              \end{array}
                                                                              
                                                                              Derivation
                                                                              1. Split input into 2 regimes
                                                                              2. if k < 1.45000000000000002e-37

                                                                                1. Initial program 42.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}{\frac{{k}^{2} \cdot \left(t \cdot {\sin k}^{2}\right)}{{\ell}^{2} \cdot \cos k}}} \]
                                                                                4. Step-by-step derivation
                                                                                  1. Applied rewrites73.5%

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

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

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

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

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

                                                                                    if 1.45000000000000002e-37 < k

                                                                                    1. Initial program 29.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}{\frac{{k}^{2} \cdot \left(t \cdot {\sin k}^{2}\right)}{{\ell}^{2} \cdot \cos k}}} \]
                                                                                    4. Step-by-step derivation
                                                                                      1. Applied rewrites75.9%

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

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

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

                                                                                          \[\leadsto \frac{2}{\frac{\left(\frac{t}{\ell} \cdot \left(k \cdot k\right)\right) \cdot \left(k \cdot k\right)}{\ell \cdot \cos k}} \]
                                                                                      5. Recombined 2 regimes into one program.
                                                                                      6. Add Preprocessing

                                                                                      Alternative 14: 76.5% accurate, 3.0× speedup?

                                                                                      \[\begin{array}{l} t\_m = \left|t\right| \\ t\_s = \mathsf{copysign}\left(1, t\right) \\ t\_s \cdot \frac{2}{\left(\frac{k}{\ell} \cdot k\right) \cdot \left(k \cdot \frac{\sin k \cdot t\_m}{\ell}\right)} \end{array} \]
                                                                                      t\_m = (fabs.f64 t)
                                                                                      t\_s = (copysign.f64 #s(literal 1 binary64) t)
                                                                                      (FPCore (t_s t_m l k)
                                                                                       :precision binary64
                                                                                       (* t_s (/ 2.0 (* (* (/ k l) k) (* k (/ (* (sin k) t_m) l))))))
                                                                                      t\_m = fabs(t);
                                                                                      t\_s = copysign(1.0, t);
                                                                                      double code(double t_s, double t_m, double l, double k) {
                                                                                      	return t_s * (2.0 / (((k / l) * k) * (k * ((sin(k) * t_m) / l))));
                                                                                      }
                                                                                      
                                                                                      t\_m =     private
                                                                                      t\_s =     private
                                                                                      module fmin_fmax_functions
                                                                                          implicit none
                                                                                          private
                                                                                          public fmax
                                                                                          public fmin
                                                                                      
                                                                                          interface fmax
                                                                                              module procedure fmax88
                                                                                              module procedure fmax44
                                                                                              module procedure fmax84
                                                                                              module procedure fmax48
                                                                                          end interface
                                                                                          interface fmin
                                                                                              module procedure fmin88
                                                                                              module procedure fmin44
                                                                                              module procedure fmin84
                                                                                              module procedure fmin48
                                                                                          end interface
                                                                                      contains
                                                                                          real(8) function fmax88(x, y) result (res)
                                                                                              real(8), intent (in) :: x
                                                                                              real(8), intent (in) :: y
                                                                                              res = merge(y, merge(x, max(x, y), y /= y), x /= x)
                                                                                          end function
                                                                                          real(4) function fmax44(x, y) result (res)
                                                                                              real(4), intent (in) :: x
                                                                                              real(4), intent (in) :: y
                                                                                              res = merge(y, merge(x, max(x, y), y /= y), x /= x)
                                                                                          end function
                                                                                          real(8) function fmax84(x, y) result(res)
                                                                                              real(8), intent (in) :: x
                                                                                              real(4), intent (in) :: y
                                                                                              res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
                                                                                          end function
                                                                                          real(8) function fmax48(x, y) result(res)
                                                                                              real(4), intent (in) :: x
                                                                                              real(8), intent (in) :: y
                                                                                              res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
                                                                                          end function
                                                                                          real(8) function fmin88(x, y) result (res)
                                                                                              real(8), intent (in) :: x
                                                                                              real(8), intent (in) :: y
                                                                                              res = merge(y, merge(x, min(x, y), y /= y), x /= x)
                                                                                          end function
                                                                                          real(4) function fmin44(x, y) result (res)
                                                                                              real(4), intent (in) :: x
                                                                                              real(4), intent (in) :: y
                                                                                              res = merge(y, merge(x, min(x, y), y /= y), x /= x)
                                                                                          end function
                                                                                          real(8) function fmin84(x, y) result(res)
                                                                                              real(8), intent (in) :: x
                                                                                              real(4), intent (in) :: y
                                                                                              res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
                                                                                          end function
                                                                                          real(8) function fmin48(x, y) result(res)
                                                                                              real(4), intent (in) :: x
                                                                                              real(8), intent (in) :: y
                                                                                              res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
                                                                                          end function
                                                                                      end module
                                                                                      
                                                                                      real(8) function code(t_s, t_m, l, k)
                                                                                      use fmin_fmax_functions
                                                                                          real(8), intent (in) :: t_s
                                                                                          real(8), intent (in) :: t_m
                                                                                          real(8), intent (in) :: l
                                                                                          real(8), intent (in) :: k
                                                                                          code = t_s * (2.0d0 / (((k / l) * k) * (k * ((sin(k) * t_m) / l))))
                                                                                      end function
                                                                                      
                                                                                      t\_m = Math.abs(t);
                                                                                      t\_s = Math.copySign(1.0, t);
                                                                                      public static double code(double t_s, double t_m, double l, double k) {
                                                                                      	return t_s * (2.0 / (((k / l) * k) * (k * ((Math.sin(k) * t_m) / l))));
                                                                                      }
                                                                                      
                                                                                      t\_m = math.fabs(t)
                                                                                      t\_s = math.copysign(1.0, t)
                                                                                      def code(t_s, t_m, l, k):
                                                                                      	return t_s * (2.0 / (((k / l) * k) * (k * ((math.sin(k) * t_m) / l))))
                                                                                      
                                                                                      t\_m = abs(t)
                                                                                      t\_s = copysign(1.0, t)
                                                                                      function code(t_s, t_m, l, k)
                                                                                      	return Float64(t_s * Float64(2.0 / Float64(Float64(Float64(k / l) * k) * Float64(k * Float64(Float64(sin(k) * t_m) / l)))))
                                                                                      end
                                                                                      
                                                                                      t\_m = abs(t);
                                                                                      t\_s = sign(t) * abs(1.0);
                                                                                      function tmp = code(t_s, t_m, l, k)
                                                                                      	tmp = t_s * (2.0 / (((k / l) * k) * (k * ((sin(k) * t_m) / l))));
                                                                                      end
                                                                                      
                                                                                      t\_m = N[Abs[t], $MachinePrecision]
                                                                                      t\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[t]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
                                                                                      code[t$95$s_, t$95$m_, l_, k_] := N[(t$95$s * N[(2.0 / N[(N[(N[(k / l), $MachinePrecision] * k), $MachinePrecision] * N[(k * N[(N[(N[Sin[k], $MachinePrecision] * t$95$m), $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
                                                                                      
                                                                                      \begin{array}{l}
                                                                                      t\_m = \left|t\right|
                                                                                      \\
                                                                                      t\_s = \mathsf{copysign}\left(1, t\right)
                                                                                      
                                                                                      \\
                                                                                      t\_s \cdot \frac{2}{\left(\frac{k}{\ell} \cdot k\right) \cdot \left(k \cdot \frac{\sin k \cdot t\_m}{\ell}\right)}
                                                                                      \end{array}
                                                                                      
                                                                                      Derivation
                                                                                      1. Initial program 38.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}{\frac{{k}^{2} \cdot \left(t \cdot {\sin k}^{2}\right)}{{\ell}^{2} \cdot \cos k}}} \]
                                                                                      4. Step-by-step derivation
                                                                                        1. Applied rewrites74.2%

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

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

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

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

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

                                                                                          Alternative 15: 73.8% accurate, 7.7× speedup?

                                                                                          \[\begin{array}{l} t\_m = \left|t\right| \\ t\_s = \mathsf{copysign}\left(1, t\right) \\ t\_s \cdot \begin{array}{l} \mathbf{if}\;t\_m \leq 2 \cdot 10^{+41}:\\ \;\;\;\;\frac{2}{\left(\left(\left(\frac{t\_m}{\ell} \cdot k\right) \cdot \frac{k}{\ell}\right) \cdot k\right) \cdot k}\\ \mathbf{else}:\\ \;\;\;\;\frac{\frac{\ell + \ell}{k} \cdot \frac{\ell}{\left(k \cdot k\right) \cdot k}}{t\_m}\\ \end{array} \end{array} \]
                                                                                          t\_m = (fabs.f64 t)
                                                                                          t\_s = (copysign.f64 #s(literal 1 binary64) t)
                                                                                          (FPCore (t_s t_m l k)
                                                                                           :precision binary64
                                                                                           (*
                                                                                            t_s
                                                                                            (if (<= t_m 2e+41)
                                                                                              (/ 2.0 (* (* (* (* (/ t_m l) k) (/ k l)) k) k))
                                                                                              (/ (* (/ (+ l l) k) (/ l (* (* k k) k))) t_m))))
                                                                                          t\_m = fabs(t);
                                                                                          t\_s = copysign(1.0, t);
                                                                                          double code(double t_s, double t_m, double l, double k) {
                                                                                          	double tmp;
                                                                                          	if (t_m <= 2e+41) {
                                                                                          		tmp = 2.0 / (((((t_m / l) * k) * (k / l)) * k) * k);
                                                                                          	} else {
                                                                                          		tmp = (((l + l) / k) * (l / ((k * k) * k))) / t_m;
                                                                                          	}
                                                                                          	return t_s * tmp;
                                                                                          }
                                                                                          
                                                                                          t\_m =     private
                                                                                          t\_s =     private
                                                                                          module fmin_fmax_functions
                                                                                              implicit none
                                                                                              private
                                                                                              public fmax
                                                                                              public fmin
                                                                                          
                                                                                              interface fmax
                                                                                                  module procedure fmax88
                                                                                                  module procedure fmax44
                                                                                                  module procedure fmax84
                                                                                                  module procedure fmax48
                                                                                              end interface
                                                                                              interface fmin
                                                                                                  module procedure fmin88
                                                                                                  module procedure fmin44
                                                                                                  module procedure fmin84
                                                                                                  module procedure fmin48
                                                                                              end interface
                                                                                          contains
                                                                                              real(8) function fmax88(x, y) result (res)
                                                                                                  real(8), intent (in) :: x
                                                                                                  real(8), intent (in) :: y
                                                                                                  res = merge(y, merge(x, max(x, y), y /= y), x /= x)
                                                                                              end function
                                                                                              real(4) function fmax44(x, y) result (res)
                                                                                                  real(4), intent (in) :: x
                                                                                                  real(4), intent (in) :: y
                                                                                                  res = merge(y, merge(x, max(x, y), y /= y), x /= x)
                                                                                              end function
                                                                                              real(8) function fmax84(x, y) result(res)
                                                                                                  real(8), intent (in) :: x
                                                                                                  real(4), intent (in) :: y
                                                                                                  res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
                                                                                              end function
                                                                                              real(8) function fmax48(x, y) result(res)
                                                                                                  real(4), intent (in) :: x
                                                                                                  real(8), intent (in) :: y
                                                                                                  res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
                                                                                              end function
                                                                                              real(8) function fmin88(x, y) result (res)
                                                                                                  real(8), intent (in) :: x
                                                                                                  real(8), intent (in) :: y
                                                                                                  res = merge(y, merge(x, min(x, y), y /= y), x /= x)
                                                                                              end function
                                                                                              real(4) function fmin44(x, y) result (res)
                                                                                                  real(4), intent (in) :: x
                                                                                                  real(4), intent (in) :: y
                                                                                                  res = merge(y, merge(x, min(x, y), y /= y), x /= x)
                                                                                              end function
                                                                                              real(8) function fmin84(x, y) result(res)
                                                                                                  real(8), intent (in) :: x
                                                                                                  real(4), intent (in) :: y
                                                                                                  res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
                                                                                              end function
                                                                                              real(8) function fmin48(x, y) result(res)
                                                                                                  real(4), intent (in) :: x
                                                                                                  real(8), intent (in) :: y
                                                                                                  res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
                                                                                              end function
                                                                                          end module
                                                                                          
                                                                                          real(8) function code(t_s, t_m, l, k)
                                                                                          use fmin_fmax_functions
                                                                                              real(8), intent (in) :: t_s
                                                                                              real(8), intent (in) :: t_m
                                                                                              real(8), intent (in) :: l
                                                                                              real(8), intent (in) :: k
                                                                                              real(8) :: tmp
                                                                                              if (t_m <= 2d+41) then
                                                                                                  tmp = 2.0d0 / (((((t_m / l) * k) * (k / l)) * k) * k)
                                                                                              else
                                                                                                  tmp = (((l + l) / k) * (l / ((k * k) * k))) / t_m
                                                                                              end if
                                                                                              code = t_s * tmp
                                                                                          end function
                                                                                          
                                                                                          t\_m = Math.abs(t);
                                                                                          t\_s = Math.copySign(1.0, t);
                                                                                          public static double code(double t_s, double t_m, double l, double k) {
                                                                                          	double tmp;
                                                                                          	if (t_m <= 2e+41) {
                                                                                          		tmp = 2.0 / (((((t_m / l) * k) * (k / l)) * k) * k);
                                                                                          	} else {
                                                                                          		tmp = (((l + l) / k) * (l / ((k * k) * k))) / t_m;
                                                                                          	}
                                                                                          	return t_s * tmp;
                                                                                          }
                                                                                          
                                                                                          t\_m = math.fabs(t)
                                                                                          t\_s = math.copysign(1.0, t)
                                                                                          def code(t_s, t_m, l, k):
                                                                                          	tmp = 0
                                                                                          	if t_m <= 2e+41:
                                                                                          		tmp = 2.0 / (((((t_m / l) * k) * (k / l)) * k) * k)
                                                                                          	else:
                                                                                          		tmp = (((l + l) / k) * (l / ((k * k) * k))) / t_m
                                                                                          	return t_s * tmp
                                                                                          
                                                                                          t\_m = abs(t)
                                                                                          t\_s = copysign(1.0, t)
                                                                                          function code(t_s, t_m, l, k)
                                                                                          	tmp = 0.0
                                                                                          	if (t_m <= 2e+41)
                                                                                          		tmp = Float64(2.0 / Float64(Float64(Float64(Float64(Float64(t_m / l) * k) * Float64(k / l)) * k) * k));
                                                                                          	else
                                                                                          		tmp = Float64(Float64(Float64(Float64(l + l) / k) * Float64(l / Float64(Float64(k * k) * k))) / t_m);
                                                                                          	end
                                                                                          	return Float64(t_s * tmp)
                                                                                          end
                                                                                          
                                                                                          t\_m = abs(t);
                                                                                          t\_s = sign(t) * abs(1.0);
                                                                                          function tmp_2 = code(t_s, t_m, l, k)
                                                                                          	tmp = 0.0;
                                                                                          	if (t_m <= 2e+41)
                                                                                          		tmp = 2.0 / (((((t_m / l) * k) * (k / l)) * k) * k);
                                                                                          	else
                                                                                          		tmp = (((l + l) / k) * (l / ((k * k) * k))) / t_m;
                                                                                          	end
                                                                                          	tmp_2 = t_s * tmp;
                                                                                          end
                                                                                          
                                                                                          t\_m = N[Abs[t], $MachinePrecision]
                                                                                          t\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[t]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
                                                                                          code[t$95$s_, t$95$m_, l_, k_] := N[(t$95$s * If[LessEqual[t$95$m, 2e+41], N[(2.0 / N[(N[(N[(N[(N[(t$95$m / l), $MachinePrecision] * k), $MachinePrecision] * N[(k / l), $MachinePrecision]), $MachinePrecision] * k), $MachinePrecision] * k), $MachinePrecision]), $MachinePrecision], N[(N[(N[(N[(l + l), $MachinePrecision] / k), $MachinePrecision] * N[(l / N[(N[(k * k), $MachinePrecision] * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / t$95$m), $MachinePrecision]]), $MachinePrecision]
                                                                                          
                                                                                          \begin{array}{l}
                                                                                          t\_m = \left|t\right|
                                                                                          \\
                                                                                          t\_s = \mathsf{copysign}\left(1, t\right)
                                                                                          
                                                                                          \\
                                                                                          t\_s \cdot \begin{array}{l}
                                                                                          \mathbf{if}\;t\_m \leq 2 \cdot 10^{+41}:\\
                                                                                          \;\;\;\;\frac{2}{\left(\left(\left(\frac{t\_m}{\ell} \cdot k\right) \cdot \frac{k}{\ell}\right) \cdot k\right) \cdot k}\\
                                                                                          
                                                                                          \mathbf{else}:\\
                                                                                          \;\;\;\;\frac{\frac{\ell + \ell}{k} \cdot \frac{\ell}{\left(k \cdot k\right) \cdot k}}{t\_m}\\
                                                                                          
                                                                                          
                                                                                          \end{array}
                                                                                          \end{array}
                                                                                          
                                                                                          Derivation
                                                                                          1. Split input into 2 regimes
                                                                                          2. if t < 2.00000000000000001e41

                                                                                            1. Initial program 41.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}{\frac{{k}^{2} \cdot \left(t \cdot {\sin k}^{2}\right)}{{\ell}^{2} \cdot \cos k}}} \]
                                                                                            4. Step-by-step derivation
                                                                                              1. Applied rewrites74.4%

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

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

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

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

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

                                                                                                if 2.00000000000000001e41 < t

                                                                                                1. Initial program 27.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}{2 \cdot \frac{{\ell}^{2}}{{k}^{4} \cdot t}} \]
                                                                                                4. Step-by-step derivation
                                                                                                  1. Applied rewrites64.4%

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

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

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

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

                                                                                                  Alternative 16: 73.2% accurate, 7.7× speedup?

                                                                                                  \[\begin{array}{l} t\_m = \left|t\right| \\ t\_s = \mathsf{copysign}\left(1, t\right) \\ t\_s \cdot \begin{array}{l} \mathbf{if}\;t\_m \leq 3.6 \cdot 10^{+90}:\\ \;\;\;\;\frac{2}{\frac{k \cdot k}{\ell} \cdot \left(\left(\frac{t\_m}{\ell} \cdot k\right) \cdot k\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{\frac{\ell + \ell}{k} \cdot \frac{\ell}{\left(k \cdot k\right) \cdot k}}{t\_m}\\ \end{array} \end{array} \]
                                                                                                  t\_m = (fabs.f64 t)
                                                                                                  t\_s = (copysign.f64 #s(literal 1 binary64) t)
                                                                                                  (FPCore (t_s t_m l k)
                                                                                                   :precision binary64
                                                                                                   (*
                                                                                                    t_s
                                                                                                    (if (<= t_m 3.6e+90)
                                                                                                      (/ 2.0 (* (/ (* k k) l) (* (* (/ t_m l) k) k)))
                                                                                                      (/ (* (/ (+ l l) k) (/ l (* (* k k) k))) t_m))))
                                                                                                  t\_m = fabs(t);
                                                                                                  t\_s = copysign(1.0, t);
                                                                                                  double code(double t_s, double t_m, double l, double k) {
                                                                                                  	double tmp;
                                                                                                  	if (t_m <= 3.6e+90) {
                                                                                                  		tmp = 2.0 / (((k * k) / l) * (((t_m / l) * k) * k));
                                                                                                  	} else {
                                                                                                  		tmp = (((l + l) / k) * (l / ((k * k) * k))) / t_m;
                                                                                                  	}
                                                                                                  	return t_s * tmp;
                                                                                                  }
                                                                                                  
                                                                                                  t\_m =     private
                                                                                                  t\_s =     private
                                                                                                  module fmin_fmax_functions
                                                                                                      implicit none
                                                                                                      private
                                                                                                      public fmax
                                                                                                      public fmin
                                                                                                  
                                                                                                      interface fmax
                                                                                                          module procedure fmax88
                                                                                                          module procedure fmax44
                                                                                                          module procedure fmax84
                                                                                                          module procedure fmax48
                                                                                                      end interface
                                                                                                      interface fmin
                                                                                                          module procedure fmin88
                                                                                                          module procedure fmin44
                                                                                                          module procedure fmin84
                                                                                                          module procedure fmin48
                                                                                                      end interface
                                                                                                  contains
                                                                                                      real(8) function fmax88(x, y) result (res)
                                                                                                          real(8), intent (in) :: x
                                                                                                          real(8), intent (in) :: y
                                                                                                          res = merge(y, merge(x, max(x, y), y /= y), x /= x)
                                                                                                      end function
                                                                                                      real(4) function fmax44(x, y) result (res)
                                                                                                          real(4), intent (in) :: x
                                                                                                          real(4), intent (in) :: y
                                                                                                          res = merge(y, merge(x, max(x, y), y /= y), x /= x)
                                                                                                      end function
                                                                                                      real(8) function fmax84(x, y) result(res)
                                                                                                          real(8), intent (in) :: x
                                                                                                          real(4), intent (in) :: y
                                                                                                          res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
                                                                                                      end function
                                                                                                      real(8) function fmax48(x, y) result(res)
                                                                                                          real(4), intent (in) :: x
                                                                                                          real(8), intent (in) :: y
                                                                                                          res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
                                                                                                      end function
                                                                                                      real(8) function fmin88(x, y) result (res)
                                                                                                          real(8), intent (in) :: x
                                                                                                          real(8), intent (in) :: y
                                                                                                          res = merge(y, merge(x, min(x, y), y /= y), x /= x)
                                                                                                      end function
                                                                                                      real(4) function fmin44(x, y) result (res)
                                                                                                          real(4), intent (in) :: x
                                                                                                          real(4), intent (in) :: y
                                                                                                          res = merge(y, merge(x, min(x, y), y /= y), x /= x)
                                                                                                      end function
                                                                                                      real(8) function fmin84(x, y) result(res)
                                                                                                          real(8), intent (in) :: x
                                                                                                          real(4), intent (in) :: y
                                                                                                          res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
                                                                                                      end function
                                                                                                      real(8) function fmin48(x, y) result(res)
                                                                                                          real(4), intent (in) :: x
                                                                                                          real(8), intent (in) :: y
                                                                                                          res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
                                                                                                      end function
                                                                                                  end module
                                                                                                  
                                                                                                  real(8) function code(t_s, t_m, l, k)
                                                                                                  use fmin_fmax_functions
                                                                                                      real(8), intent (in) :: t_s
                                                                                                      real(8), intent (in) :: t_m
                                                                                                      real(8), intent (in) :: l
                                                                                                      real(8), intent (in) :: k
                                                                                                      real(8) :: tmp
                                                                                                      if (t_m <= 3.6d+90) then
                                                                                                          tmp = 2.0d0 / (((k * k) / l) * (((t_m / l) * k) * k))
                                                                                                      else
                                                                                                          tmp = (((l + l) / k) * (l / ((k * k) * k))) / t_m
                                                                                                      end if
                                                                                                      code = t_s * tmp
                                                                                                  end function
                                                                                                  
                                                                                                  t\_m = Math.abs(t);
                                                                                                  t\_s = Math.copySign(1.0, t);
                                                                                                  public static double code(double t_s, double t_m, double l, double k) {
                                                                                                  	double tmp;
                                                                                                  	if (t_m <= 3.6e+90) {
                                                                                                  		tmp = 2.0 / (((k * k) / l) * (((t_m / l) * k) * k));
                                                                                                  	} else {
                                                                                                  		tmp = (((l + l) / k) * (l / ((k * k) * k))) / t_m;
                                                                                                  	}
                                                                                                  	return t_s * tmp;
                                                                                                  }
                                                                                                  
                                                                                                  t\_m = math.fabs(t)
                                                                                                  t\_s = math.copysign(1.0, t)
                                                                                                  def code(t_s, t_m, l, k):
                                                                                                  	tmp = 0
                                                                                                  	if t_m <= 3.6e+90:
                                                                                                  		tmp = 2.0 / (((k * k) / l) * (((t_m / l) * k) * k))
                                                                                                  	else:
                                                                                                  		tmp = (((l + l) / k) * (l / ((k * k) * k))) / t_m
                                                                                                  	return t_s * tmp
                                                                                                  
                                                                                                  t\_m = abs(t)
                                                                                                  t\_s = copysign(1.0, t)
                                                                                                  function code(t_s, t_m, l, k)
                                                                                                  	tmp = 0.0
                                                                                                  	if (t_m <= 3.6e+90)
                                                                                                  		tmp = Float64(2.0 / Float64(Float64(Float64(k * k) / l) * Float64(Float64(Float64(t_m / l) * k) * k)));
                                                                                                  	else
                                                                                                  		tmp = Float64(Float64(Float64(Float64(l + l) / k) * Float64(l / Float64(Float64(k * k) * k))) / t_m);
                                                                                                  	end
                                                                                                  	return Float64(t_s * tmp)
                                                                                                  end
                                                                                                  
                                                                                                  t\_m = abs(t);
                                                                                                  t\_s = sign(t) * abs(1.0);
                                                                                                  function tmp_2 = code(t_s, t_m, l, k)
                                                                                                  	tmp = 0.0;
                                                                                                  	if (t_m <= 3.6e+90)
                                                                                                  		tmp = 2.0 / (((k * k) / l) * (((t_m / l) * k) * k));
                                                                                                  	else
                                                                                                  		tmp = (((l + l) / k) * (l / ((k * k) * k))) / t_m;
                                                                                                  	end
                                                                                                  	tmp_2 = t_s * tmp;
                                                                                                  end
                                                                                                  
                                                                                                  t\_m = N[Abs[t], $MachinePrecision]
                                                                                                  t\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[t]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
                                                                                                  code[t$95$s_, t$95$m_, l_, k_] := N[(t$95$s * If[LessEqual[t$95$m, 3.6e+90], N[(2.0 / N[(N[(N[(k * k), $MachinePrecision] / l), $MachinePrecision] * N[(N[(N[(t$95$m / l), $MachinePrecision] * k), $MachinePrecision] * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(N[(l + l), $MachinePrecision] / k), $MachinePrecision] * N[(l / N[(N[(k * k), $MachinePrecision] * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / t$95$m), $MachinePrecision]]), $MachinePrecision]
                                                                                                  
                                                                                                  \begin{array}{l}
                                                                                                  t\_m = \left|t\right|
                                                                                                  \\
                                                                                                  t\_s = \mathsf{copysign}\left(1, t\right)
                                                                                                  
                                                                                                  \\
                                                                                                  t\_s \cdot \begin{array}{l}
                                                                                                  \mathbf{if}\;t\_m \leq 3.6 \cdot 10^{+90}:\\
                                                                                                  \;\;\;\;\frac{2}{\frac{k \cdot k}{\ell} \cdot \left(\left(\frac{t\_m}{\ell} \cdot k\right) \cdot k\right)}\\
                                                                                                  
                                                                                                  \mathbf{else}:\\
                                                                                                  \;\;\;\;\frac{\frac{\ell + \ell}{k} \cdot \frac{\ell}{\left(k \cdot k\right) \cdot k}}{t\_m}\\
                                                                                                  
                                                                                                  
                                                                                                  \end{array}
                                                                                                  \end{array}
                                                                                                  
                                                                                                  Derivation
                                                                                                  1. Split input into 2 regimes
                                                                                                  2. if t < 3.6e90

                                                                                                    1. Initial program 42.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}{\frac{{k}^{2} \cdot \left(t \cdot {\sin k}^{2}\right)}{{\ell}^{2} \cdot \cos k}}} \]
                                                                                                    4. Step-by-step derivation
                                                                                                      1. Applied rewrites74.8%

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

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

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

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

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

                                                                                                          if 3.6e90 < t

                                                                                                          1. Initial program 18.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}{2 \cdot \frac{{\ell}^{2}}{{k}^{4} \cdot t}} \]
                                                                                                          4. Step-by-step derivation
                                                                                                            1. Applied rewrites62.6%

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

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

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

                                                                                                            Alternative 17: 73.1% accurate, 7.7× speedup?

                                                                                                            \[\begin{array}{l} t\_m = \left|t\right| \\ t\_s = \mathsf{copysign}\left(1, t\right) \\ t\_s \cdot \begin{array}{l} \mathbf{if}\;t\_m \leq 2 \cdot 10^{+41}:\\ \;\;\;\;\frac{2}{\left(\frac{t\_m}{\ell} \cdot \frac{k \cdot k}{\ell}\right) \cdot \left(k \cdot k\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{\frac{\ell + \ell}{k} \cdot \frac{\ell}{\left(k \cdot k\right) \cdot k}}{t\_m}\\ \end{array} \end{array} \]
                                                                                                            t\_m = (fabs.f64 t)
                                                                                                            t\_s = (copysign.f64 #s(literal 1 binary64) t)
                                                                                                            (FPCore (t_s t_m l k)
                                                                                                             :precision binary64
                                                                                                             (*
                                                                                                              t_s
                                                                                                              (if (<= t_m 2e+41)
                                                                                                                (/ 2.0 (* (* (/ t_m l) (/ (* k k) l)) (* k k)))
                                                                                                                (/ (* (/ (+ l l) k) (/ l (* (* k k) k))) t_m))))
                                                                                                            t\_m = fabs(t);
                                                                                                            t\_s = copysign(1.0, t);
                                                                                                            double code(double t_s, double t_m, double l, double k) {
                                                                                                            	double tmp;
                                                                                                            	if (t_m <= 2e+41) {
                                                                                                            		tmp = 2.0 / (((t_m / l) * ((k * k) / l)) * (k * k));
                                                                                                            	} else {
                                                                                                            		tmp = (((l + l) / k) * (l / ((k * k) * k))) / t_m;
                                                                                                            	}
                                                                                                            	return t_s * tmp;
                                                                                                            }
                                                                                                            
                                                                                                            t\_m =     private
                                                                                                            t\_s =     private
                                                                                                            module fmin_fmax_functions
                                                                                                                implicit none
                                                                                                                private
                                                                                                                public fmax
                                                                                                                public fmin
                                                                                                            
                                                                                                                interface fmax
                                                                                                                    module procedure fmax88
                                                                                                                    module procedure fmax44
                                                                                                                    module procedure fmax84
                                                                                                                    module procedure fmax48
                                                                                                                end interface
                                                                                                                interface fmin
                                                                                                                    module procedure fmin88
                                                                                                                    module procedure fmin44
                                                                                                                    module procedure fmin84
                                                                                                                    module procedure fmin48
                                                                                                                end interface
                                                                                                            contains
                                                                                                                real(8) function fmax88(x, y) result (res)
                                                                                                                    real(8), intent (in) :: x
                                                                                                                    real(8), intent (in) :: y
                                                                                                                    res = merge(y, merge(x, max(x, y), y /= y), x /= x)
                                                                                                                end function
                                                                                                                real(4) function fmax44(x, y) result (res)
                                                                                                                    real(4), intent (in) :: x
                                                                                                                    real(4), intent (in) :: y
                                                                                                                    res = merge(y, merge(x, max(x, y), y /= y), x /= x)
                                                                                                                end function
                                                                                                                real(8) function fmax84(x, y) result(res)
                                                                                                                    real(8), intent (in) :: x
                                                                                                                    real(4), intent (in) :: y
                                                                                                                    res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
                                                                                                                end function
                                                                                                                real(8) function fmax48(x, y) result(res)
                                                                                                                    real(4), intent (in) :: x
                                                                                                                    real(8), intent (in) :: y
                                                                                                                    res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
                                                                                                                end function
                                                                                                                real(8) function fmin88(x, y) result (res)
                                                                                                                    real(8), intent (in) :: x
                                                                                                                    real(8), intent (in) :: y
                                                                                                                    res = merge(y, merge(x, min(x, y), y /= y), x /= x)
                                                                                                                end function
                                                                                                                real(4) function fmin44(x, y) result (res)
                                                                                                                    real(4), intent (in) :: x
                                                                                                                    real(4), intent (in) :: y
                                                                                                                    res = merge(y, merge(x, min(x, y), y /= y), x /= x)
                                                                                                                end function
                                                                                                                real(8) function fmin84(x, y) result(res)
                                                                                                                    real(8), intent (in) :: x
                                                                                                                    real(4), intent (in) :: y
                                                                                                                    res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
                                                                                                                end function
                                                                                                                real(8) function fmin48(x, y) result(res)
                                                                                                                    real(4), intent (in) :: x
                                                                                                                    real(8), intent (in) :: y
                                                                                                                    res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
                                                                                                                end function
                                                                                                            end module
                                                                                                            
                                                                                                            real(8) function code(t_s, t_m, l, k)
                                                                                                            use fmin_fmax_functions
                                                                                                                real(8), intent (in) :: t_s
                                                                                                                real(8), intent (in) :: t_m
                                                                                                                real(8), intent (in) :: l
                                                                                                                real(8), intent (in) :: k
                                                                                                                real(8) :: tmp
                                                                                                                if (t_m <= 2d+41) then
                                                                                                                    tmp = 2.0d0 / (((t_m / l) * ((k * k) / l)) * (k * k))
                                                                                                                else
                                                                                                                    tmp = (((l + l) / k) * (l / ((k * k) * k))) / t_m
                                                                                                                end if
                                                                                                                code = t_s * tmp
                                                                                                            end function
                                                                                                            
                                                                                                            t\_m = Math.abs(t);
                                                                                                            t\_s = Math.copySign(1.0, t);
                                                                                                            public static double code(double t_s, double t_m, double l, double k) {
                                                                                                            	double tmp;
                                                                                                            	if (t_m <= 2e+41) {
                                                                                                            		tmp = 2.0 / (((t_m / l) * ((k * k) / l)) * (k * k));
                                                                                                            	} else {
                                                                                                            		tmp = (((l + l) / k) * (l / ((k * k) * k))) / t_m;
                                                                                                            	}
                                                                                                            	return t_s * tmp;
                                                                                                            }
                                                                                                            
                                                                                                            t\_m = math.fabs(t)
                                                                                                            t\_s = math.copysign(1.0, t)
                                                                                                            def code(t_s, t_m, l, k):
                                                                                                            	tmp = 0
                                                                                                            	if t_m <= 2e+41:
                                                                                                            		tmp = 2.0 / (((t_m / l) * ((k * k) / l)) * (k * k))
                                                                                                            	else:
                                                                                                            		tmp = (((l + l) / k) * (l / ((k * k) * k))) / t_m
                                                                                                            	return t_s * tmp
                                                                                                            
                                                                                                            t\_m = abs(t)
                                                                                                            t\_s = copysign(1.0, t)
                                                                                                            function code(t_s, t_m, l, k)
                                                                                                            	tmp = 0.0
                                                                                                            	if (t_m <= 2e+41)
                                                                                                            		tmp = Float64(2.0 / Float64(Float64(Float64(t_m / l) * Float64(Float64(k * k) / l)) * Float64(k * k)));
                                                                                                            	else
                                                                                                            		tmp = Float64(Float64(Float64(Float64(l + l) / k) * Float64(l / Float64(Float64(k * k) * k))) / t_m);
                                                                                                            	end
                                                                                                            	return Float64(t_s * tmp)
                                                                                                            end
                                                                                                            
                                                                                                            t\_m = abs(t);
                                                                                                            t\_s = sign(t) * abs(1.0);
                                                                                                            function tmp_2 = code(t_s, t_m, l, k)
                                                                                                            	tmp = 0.0;
                                                                                                            	if (t_m <= 2e+41)
                                                                                                            		tmp = 2.0 / (((t_m / l) * ((k * k) / l)) * (k * k));
                                                                                                            	else
                                                                                                            		tmp = (((l + l) / k) * (l / ((k * k) * k))) / t_m;
                                                                                                            	end
                                                                                                            	tmp_2 = t_s * tmp;
                                                                                                            end
                                                                                                            
                                                                                                            t\_m = N[Abs[t], $MachinePrecision]
                                                                                                            t\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[t]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
                                                                                                            code[t$95$s_, t$95$m_, l_, k_] := N[(t$95$s * If[LessEqual[t$95$m, 2e+41], N[(2.0 / N[(N[(N[(t$95$m / l), $MachinePrecision] * N[(N[(k * k), $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision] * N[(k * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(N[(l + l), $MachinePrecision] / k), $MachinePrecision] * N[(l / N[(N[(k * k), $MachinePrecision] * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / t$95$m), $MachinePrecision]]), $MachinePrecision]
                                                                                                            
                                                                                                            \begin{array}{l}
                                                                                                            t\_m = \left|t\right|
                                                                                                            \\
                                                                                                            t\_s = \mathsf{copysign}\left(1, t\right)
                                                                                                            
                                                                                                            \\
                                                                                                            t\_s \cdot \begin{array}{l}
                                                                                                            \mathbf{if}\;t\_m \leq 2 \cdot 10^{+41}:\\
                                                                                                            \;\;\;\;\frac{2}{\left(\frac{t\_m}{\ell} \cdot \frac{k \cdot k}{\ell}\right) \cdot \left(k \cdot k\right)}\\
                                                                                                            
                                                                                                            \mathbf{else}:\\
                                                                                                            \;\;\;\;\frac{\frac{\ell + \ell}{k} \cdot \frac{\ell}{\left(k \cdot k\right) \cdot k}}{t\_m}\\
                                                                                                            
                                                                                                            
                                                                                                            \end{array}
                                                                                                            \end{array}
                                                                                                            
                                                                                                            Derivation
                                                                                                            1. Split input into 2 regimes
                                                                                                            2. if t < 2.00000000000000001e41

                                                                                                              1. Initial program 41.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}{\frac{{k}^{2} \cdot \left(t \cdot {\sin k}^{2}\right)}{{\ell}^{2} \cdot \cos k}}} \]
                                                                                                              4. Step-by-step derivation
                                                                                                                1. Applied rewrites74.4%

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

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

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

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

                                                                                                                  if 2.00000000000000001e41 < t

                                                                                                                  1. Initial program 27.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}{2 \cdot \frac{{\ell}^{2}}{{k}^{4} \cdot t}} \]
                                                                                                                  4. Step-by-step derivation
                                                                                                                    1. Applied rewrites64.4%

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

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

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

                                                                                                                    Alternative 18: 72.1% accurate, 7.7× speedup?

                                                                                                                    \[\begin{array}{l} t\_m = \left|t\right| \\ t\_s = \mathsf{copysign}\left(1, t\right) \\ t\_s \cdot \begin{array}{l} \mathbf{if}\;\ell \leq 3 \cdot 10^{-40}:\\ \;\;\;\;\frac{\frac{\ell + \ell}{k} \cdot \frac{\ell}{\left(k \cdot k\right) \cdot k}}{t\_m}\\ \mathbf{else}:\\ \;\;\;\;\frac{2}{\left(\left(\frac{\frac{t\_m}{\ell}}{\ell} \cdot k\right) \cdot \left(k \cdot k\right)\right) \cdot k}\\ \end{array} \end{array} \]
                                                                                                                    t\_m = (fabs.f64 t)
                                                                                                                    t\_s = (copysign.f64 #s(literal 1 binary64) t)
                                                                                                                    (FPCore (t_s t_m l k)
                                                                                                                     :precision binary64
                                                                                                                     (*
                                                                                                                      t_s
                                                                                                                      (if (<= l 3e-40)
                                                                                                                        (/ (* (/ (+ l l) k) (/ l (* (* k k) k))) t_m)
                                                                                                                        (/ 2.0 (* (* (* (/ (/ t_m l) l) k) (* k k)) k)))))
                                                                                                                    t\_m = fabs(t);
                                                                                                                    t\_s = copysign(1.0, t);
                                                                                                                    double code(double t_s, double t_m, double l, double k) {
                                                                                                                    	double tmp;
                                                                                                                    	if (l <= 3e-40) {
                                                                                                                    		tmp = (((l + l) / k) * (l / ((k * k) * k))) / t_m;
                                                                                                                    	} else {
                                                                                                                    		tmp = 2.0 / (((((t_m / l) / l) * k) * (k * k)) * k);
                                                                                                                    	}
                                                                                                                    	return t_s * tmp;
                                                                                                                    }
                                                                                                                    
                                                                                                                    t\_m =     private
                                                                                                                    t\_s =     private
                                                                                                                    module fmin_fmax_functions
                                                                                                                        implicit none
                                                                                                                        private
                                                                                                                        public fmax
                                                                                                                        public fmin
                                                                                                                    
                                                                                                                        interface fmax
                                                                                                                            module procedure fmax88
                                                                                                                            module procedure fmax44
                                                                                                                            module procedure fmax84
                                                                                                                            module procedure fmax48
                                                                                                                        end interface
                                                                                                                        interface fmin
                                                                                                                            module procedure fmin88
                                                                                                                            module procedure fmin44
                                                                                                                            module procedure fmin84
                                                                                                                            module procedure fmin48
                                                                                                                        end interface
                                                                                                                    contains
                                                                                                                        real(8) function fmax88(x, y) result (res)
                                                                                                                            real(8), intent (in) :: x
                                                                                                                            real(8), intent (in) :: y
                                                                                                                            res = merge(y, merge(x, max(x, y), y /= y), x /= x)
                                                                                                                        end function
                                                                                                                        real(4) function fmax44(x, y) result (res)
                                                                                                                            real(4), intent (in) :: x
                                                                                                                            real(4), intent (in) :: y
                                                                                                                            res = merge(y, merge(x, max(x, y), y /= y), x /= x)
                                                                                                                        end function
                                                                                                                        real(8) function fmax84(x, y) result(res)
                                                                                                                            real(8), intent (in) :: x
                                                                                                                            real(4), intent (in) :: y
                                                                                                                            res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
                                                                                                                        end function
                                                                                                                        real(8) function fmax48(x, y) result(res)
                                                                                                                            real(4), intent (in) :: x
                                                                                                                            real(8), intent (in) :: y
                                                                                                                            res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
                                                                                                                        end function
                                                                                                                        real(8) function fmin88(x, y) result (res)
                                                                                                                            real(8), intent (in) :: x
                                                                                                                            real(8), intent (in) :: y
                                                                                                                            res = merge(y, merge(x, min(x, y), y /= y), x /= x)
                                                                                                                        end function
                                                                                                                        real(4) function fmin44(x, y) result (res)
                                                                                                                            real(4), intent (in) :: x
                                                                                                                            real(4), intent (in) :: y
                                                                                                                            res = merge(y, merge(x, min(x, y), y /= y), x /= x)
                                                                                                                        end function
                                                                                                                        real(8) function fmin84(x, y) result(res)
                                                                                                                            real(8), intent (in) :: x
                                                                                                                            real(4), intent (in) :: y
                                                                                                                            res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
                                                                                                                        end function
                                                                                                                        real(8) function fmin48(x, y) result(res)
                                                                                                                            real(4), intent (in) :: x
                                                                                                                            real(8), intent (in) :: y
                                                                                                                            res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
                                                                                                                        end function
                                                                                                                    end module
                                                                                                                    
                                                                                                                    real(8) function code(t_s, t_m, l, k)
                                                                                                                    use fmin_fmax_functions
                                                                                                                        real(8), intent (in) :: t_s
                                                                                                                        real(8), intent (in) :: t_m
                                                                                                                        real(8), intent (in) :: l
                                                                                                                        real(8), intent (in) :: k
                                                                                                                        real(8) :: tmp
                                                                                                                        if (l <= 3d-40) then
                                                                                                                            tmp = (((l + l) / k) * (l / ((k * k) * k))) / t_m
                                                                                                                        else
                                                                                                                            tmp = 2.0d0 / (((((t_m / l) / l) * k) * (k * k)) * k)
                                                                                                                        end if
                                                                                                                        code = t_s * tmp
                                                                                                                    end function
                                                                                                                    
                                                                                                                    t\_m = Math.abs(t);
                                                                                                                    t\_s = Math.copySign(1.0, t);
                                                                                                                    public static double code(double t_s, double t_m, double l, double k) {
                                                                                                                    	double tmp;
                                                                                                                    	if (l <= 3e-40) {
                                                                                                                    		tmp = (((l + l) / k) * (l / ((k * k) * k))) / t_m;
                                                                                                                    	} else {
                                                                                                                    		tmp = 2.0 / (((((t_m / l) / l) * k) * (k * k)) * k);
                                                                                                                    	}
                                                                                                                    	return t_s * tmp;
                                                                                                                    }
                                                                                                                    
                                                                                                                    t\_m = math.fabs(t)
                                                                                                                    t\_s = math.copysign(1.0, t)
                                                                                                                    def code(t_s, t_m, l, k):
                                                                                                                    	tmp = 0
                                                                                                                    	if l <= 3e-40:
                                                                                                                    		tmp = (((l + l) / k) * (l / ((k * k) * k))) / t_m
                                                                                                                    	else:
                                                                                                                    		tmp = 2.0 / (((((t_m / l) / l) * k) * (k * k)) * k)
                                                                                                                    	return t_s * tmp
                                                                                                                    
                                                                                                                    t\_m = abs(t)
                                                                                                                    t\_s = copysign(1.0, t)
                                                                                                                    function code(t_s, t_m, l, k)
                                                                                                                    	tmp = 0.0
                                                                                                                    	if (l <= 3e-40)
                                                                                                                    		tmp = Float64(Float64(Float64(Float64(l + l) / k) * Float64(l / Float64(Float64(k * k) * k))) / t_m);
                                                                                                                    	else
                                                                                                                    		tmp = Float64(2.0 / Float64(Float64(Float64(Float64(Float64(t_m / l) / l) * k) * Float64(k * k)) * k));
                                                                                                                    	end
                                                                                                                    	return Float64(t_s * tmp)
                                                                                                                    end
                                                                                                                    
                                                                                                                    t\_m = abs(t);
                                                                                                                    t\_s = sign(t) * abs(1.0);
                                                                                                                    function tmp_2 = code(t_s, t_m, l, k)
                                                                                                                    	tmp = 0.0;
                                                                                                                    	if (l <= 3e-40)
                                                                                                                    		tmp = (((l + l) / k) * (l / ((k * k) * k))) / t_m;
                                                                                                                    	else
                                                                                                                    		tmp = 2.0 / (((((t_m / l) / l) * k) * (k * k)) * k);
                                                                                                                    	end
                                                                                                                    	tmp_2 = t_s * tmp;
                                                                                                                    end
                                                                                                                    
                                                                                                                    t\_m = N[Abs[t], $MachinePrecision]
                                                                                                                    t\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[t]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
                                                                                                                    code[t$95$s_, t$95$m_, l_, k_] := N[(t$95$s * If[LessEqual[l, 3e-40], N[(N[(N[(N[(l + l), $MachinePrecision] / k), $MachinePrecision] * N[(l / N[(N[(k * k), $MachinePrecision] * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / t$95$m), $MachinePrecision], N[(2.0 / N[(N[(N[(N[(N[(t$95$m / l), $MachinePrecision] / l), $MachinePrecision] * k), $MachinePrecision] * N[(k * k), $MachinePrecision]), $MachinePrecision] * k), $MachinePrecision]), $MachinePrecision]]), $MachinePrecision]
                                                                                                                    
                                                                                                                    \begin{array}{l}
                                                                                                                    t\_m = \left|t\right|
                                                                                                                    \\
                                                                                                                    t\_s = \mathsf{copysign}\left(1, t\right)
                                                                                                                    
                                                                                                                    \\
                                                                                                                    t\_s \cdot \begin{array}{l}
                                                                                                                    \mathbf{if}\;\ell \leq 3 \cdot 10^{-40}:\\
                                                                                                                    \;\;\;\;\frac{\frac{\ell + \ell}{k} \cdot \frac{\ell}{\left(k \cdot k\right) \cdot k}}{t\_m}\\
                                                                                                                    
                                                                                                                    \mathbf{else}:\\
                                                                                                                    \;\;\;\;\frac{2}{\left(\left(\frac{\frac{t\_m}{\ell}}{\ell} \cdot k\right) \cdot \left(k \cdot k\right)\right) \cdot k}\\
                                                                                                                    
                                                                                                                    
                                                                                                                    \end{array}
                                                                                                                    \end{array}
                                                                                                                    
                                                                                                                    Derivation
                                                                                                                    1. Split input into 2 regimes
                                                                                                                    2. if l < 3.0000000000000002e-40

                                                                                                                      1. Initial program 39.3%

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

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

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

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

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

                                                                                                                          if 3.0000000000000002e-40 < l

                                                                                                                          1. Initial program 37.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}{\frac{{k}^{2} \cdot \left(t \cdot {\sin k}^{2}\right)}{{\ell}^{2} \cdot \cos k}}} \]
                                                                                                                          4. Step-by-step derivation
                                                                                                                            1. Applied rewrites74.5%

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

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

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

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

                                                                                                                            Alternative 19: 64.2% accurate, 8.6× speedup?

                                                                                                                            \[\begin{array}{l} t\_m = \left|t\right| \\ t\_s = \mathsf{copysign}\left(1, t\right) \\ t\_s \cdot \begin{array}{l} \mathbf{if}\;k \leq 5.5 \cdot 10^{-167}:\\ \;\;\;\;\frac{\frac{2}{\left(k \cdot k\right) \cdot \left(k \cdot k\right)}}{t\_m}\\ \mathbf{else}:\\ \;\;\;\;\frac{2}{\left(t\_m \cdot \frac{k \cdot k}{\ell \cdot \ell}\right) \cdot \left(k \cdot k\right)}\\ \end{array} \end{array} \]
                                                                                                                            t\_m = (fabs.f64 t)
                                                                                                                            t\_s = (copysign.f64 #s(literal 1 binary64) t)
                                                                                                                            (FPCore (t_s t_m l k)
                                                                                                                             :precision binary64
                                                                                                                             (*
                                                                                                                              t_s
                                                                                                                              (if (<= k 5.5e-167)
                                                                                                                                (/ (/ 2.0 (* (* k k) (* k k))) t_m)
                                                                                                                                (/ 2.0 (* (* t_m (/ (* k k) (* l l))) (* k k))))))
                                                                                                                            t\_m = fabs(t);
                                                                                                                            t\_s = copysign(1.0, t);
                                                                                                                            double code(double t_s, double t_m, double l, double k) {
                                                                                                                            	double tmp;
                                                                                                                            	if (k <= 5.5e-167) {
                                                                                                                            		tmp = (2.0 / ((k * k) * (k * k))) / t_m;
                                                                                                                            	} else {
                                                                                                                            		tmp = 2.0 / ((t_m * ((k * k) / (l * l))) * (k * k));
                                                                                                                            	}
                                                                                                                            	return t_s * tmp;
                                                                                                                            }
                                                                                                                            
                                                                                                                            t\_m =     private
                                                                                                                            t\_s =     private
                                                                                                                            module fmin_fmax_functions
                                                                                                                                implicit none
                                                                                                                                private
                                                                                                                                public fmax
                                                                                                                                public fmin
                                                                                                                            
                                                                                                                                interface fmax
                                                                                                                                    module procedure fmax88
                                                                                                                                    module procedure fmax44
                                                                                                                                    module procedure fmax84
                                                                                                                                    module procedure fmax48
                                                                                                                                end interface
                                                                                                                                interface fmin
                                                                                                                                    module procedure fmin88
                                                                                                                                    module procedure fmin44
                                                                                                                                    module procedure fmin84
                                                                                                                                    module procedure fmin48
                                                                                                                                end interface
                                                                                                                            contains
                                                                                                                                real(8) function fmax88(x, y) result (res)
                                                                                                                                    real(8), intent (in) :: x
                                                                                                                                    real(8), intent (in) :: y
                                                                                                                                    res = merge(y, merge(x, max(x, y), y /= y), x /= x)
                                                                                                                                end function
                                                                                                                                real(4) function fmax44(x, y) result (res)
                                                                                                                                    real(4), intent (in) :: x
                                                                                                                                    real(4), intent (in) :: y
                                                                                                                                    res = merge(y, merge(x, max(x, y), y /= y), x /= x)
                                                                                                                                end function
                                                                                                                                real(8) function fmax84(x, y) result(res)
                                                                                                                                    real(8), intent (in) :: x
                                                                                                                                    real(4), intent (in) :: y
                                                                                                                                    res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
                                                                                                                                end function
                                                                                                                                real(8) function fmax48(x, y) result(res)
                                                                                                                                    real(4), intent (in) :: x
                                                                                                                                    real(8), intent (in) :: y
                                                                                                                                    res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
                                                                                                                                end function
                                                                                                                                real(8) function fmin88(x, y) result (res)
                                                                                                                                    real(8), intent (in) :: x
                                                                                                                                    real(8), intent (in) :: y
                                                                                                                                    res = merge(y, merge(x, min(x, y), y /= y), x /= x)
                                                                                                                                end function
                                                                                                                                real(4) function fmin44(x, y) result (res)
                                                                                                                                    real(4), intent (in) :: x
                                                                                                                                    real(4), intent (in) :: y
                                                                                                                                    res = merge(y, merge(x, min(x, y), y /= y), x /= x)
                                                                                                                                end function
                                                                                                                                real(8) function fmin84(x, y) result(res)
                                                                                                                                    real(8), intent (in) :: x
                                                                                                                                    real(4), intent (in) :: y
                                                                                                                                    res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
                                                                                                                                end function
                                                                                                                                real(8) function fmin48(x, y) result(res)
                                                                                                                                    real(4), intent (in) :: x
                                                                                                                                    real(8), intent (in) :: y
                                                                                                                                    res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
                                                                                                                                end function
                                                                                                                            end module
                                                                                                                            
                                                                                                                            real(8) function code(t_s, t_m, l, k)
                                                                                                                            use fmin_fmax_functions
                                                                                                                                real(8), intent (in) :: t_s
                                                                                                                                real(8), intent (in) :: t_m
                                                                                                                                real(8), intent (in) :: l
                                                                                                                                real(8), intent (in) :: k
                                                                                                                                real(8) :: tmp
                                                                                                                                if (k <= 5.5d-167) then
                                                                                                                                    tmp = (2.0d0 / ((k * k) * (k * k))) / t_m
                                                                                                                                else
                                                                                                                                    tmp = 2.0d0 / ((t_m * ((k * k) / (l * l))) * (k * k))
                                                                                                                                end if
                                                                                                                                code = t_s * tmp
                                                                                                                            end function
                                                                                                                            
                                                                                                                            t\_m = Math.abs(t);
                                                                                                                            t\_s = Math.copySign(1.0, t);
                                                                                                                            public static double code(double t_s, double t_m, double l, double k) {
                                                                                                                            	double tmp;
                                                                                                                            	if (k <= 5.5e-167) {
                                                                                                                            		tmp = (2.0 / ((k * k) * (k * k))) / t_m;
                                                                                                                            	} else {
                                                                                                                            		tmp = 2.0 / ((t_m * ((k * k) / (l * l))) * (k * k));
                                                                                                                            	}
                                                                                                                            	return t_s * tmp;
                                                                                                                            }
                                                                                                                            
                                                                                                                            t\_m = math.fabs(t)
                                                                                                                            t\_s = math.copysign(1.0, t)
                                                                                                                            def code(t_s, t_m, l, k):
                                                                                                                            	tmp = 0
                                                                                                                            	if k <= 5.5e-167:
                                                                                                                            		tmp = (2.0 / ((k * k) * (k * k))) / t_m
                                                                                                                            	else:
                                                                                                                            		tmp = 2.0 / ((t_m * ((k * k) / (l * l))) * (k * k))
                                                                                                                            	return t_s * tmp
                                                                                                                            
                                                                                                                            t\_m = abs(t)
                                                                                                                            t\_s = copysign(1.0, t)
                                                                                                                            function code(t_s, t_m, l, k)
                                                                                                                            	tmp = 0.0
                                                                                                                            	if (k <= 5.5e-167)
                                                                                                                            		tmp = Float64(Float64(2.0 / Float64(Float64(k * k) * Float64(k * k))) / t_m);
                                                                                                                            	else
                                                                                                                            		tmp = Float64(2.0 / Float64(Float64(t_m * Float64(Float64(k * k) / Float64(l * l))) * Float64(k * k)));
                                                                                                                            	end
                                                                                                                            	return Float64(t_s * tmp)
                                                                                                                            end
                                                                                                                            
                                                                                                                            t\_m = abs(t);
                                                                                                                            t\_s = sign(t) * abs(1.0);
                                                                                                                            function tmp_2 = code(t_s, t_m, l, k)
                                                                                                                            	tmp = 0.0;
                                                                                                                            	if (k <= 5.5e-167)
                                                                                                                            		tmp = (2.0 / ((k * k) * (k * k))) / t_m;
                                                                                                                            	else
                                                                                                                            		tmp = 2.0 / ((t_m * ((k * k) / (l * l))) * (k * k));
                                                                                                                            	end
                                                                                                                            	tmp_2 = t_s * tmp;
                                                                                                                            end
                                                                                                                            
                                                                                                                            t\_m = N[Abs[t], $MachinePrecision]
                                                                                                                            t\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[t]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
                                                                                                                            code[t$95$s_, t$95$m_, l_, k_] := N[(t$95$s * If[LessEqual[k, 5.5e-167], N[(N[(2.0 / N[(N[(k * k), $MachinePrecision] * N[(k * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / t$95$m), $MachinePrecision], N[(2.0 / N[(N[(t$95$m * N[(N[(k * k), $MachinePrecision] / N[(l * l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(k * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]), $MachinePrecision]
                                                                                                                            
                                                                                                                            \begin{array}{l}
                                                                                                                            t\_m = \left|t\right|
                                                                                                                            \\
                                                                                                                            t\_s = \mathsf{copysign}\left(1, t\right)
                                                                                                                            
                                                                                                                            \\
                                                                                                                            t\_s \cdot \begin{array}{l}
                                                                                                                            \mathbf{if}\;k \leq 5.5 \cdot 10^{-167}:\\
                                                                                                                            \;\;\;\;\frac{\frac{2}{\left(k \cdot k\right) \cdot \left(k \cdot k\right)}}{t\_m}\\
                                                                                                                            
                                                                                                                            \mathbf{else}:\\
                                                                                                                            \;\;\;\;\frac{2}{\left(t\_m \cdot \frac{k \cdot k}{\ell \cdot \ell}\right) \cdot \left(k \cdot k\right)}\\
                                                                                                                            
                                                                                                                            
                                                                                                                            \end{array}
                                                                                                                            \end{array}
                                                                                                                            
                                                                                                                            Derivation
                                                                                                                            1. Split input into 2 regimes
                                                                                                                            2. if k < 5.5000000000000003e-167

                                                                                                                              1. Initial program 40.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}{2 \cdot \frac{{\ell}^{2}}{{k}^{4} \cdot t}} \]
                                                                                                                              4. Step-by-step derivation
                                                                                                                                1. Applied rewrites64.9%

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

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

                                                                                                                                  if 5.5000000000000003e-167 < k

                                                                                                                                  1. Initial program 35.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}{\frac{{k}^{2} \cdot \left(t \cdot {\sin k}^{2}\right)}{{\ell}^{2} \cdot \cos k}}} \]
                                                                                                                                  4. Step-by-step derivation
                                                                                                                                    1. Applied rewrites79.1%

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

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

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

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

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

                                                                                                                                      Alternative 20: 63.1% accurate, 8.9× speedup?

                                                                                                                                      \[\begin{array}{l} t\_m = \left|t\right| \\ t\_s = \mathsf{copysign}\left(1, t\right) \\ t\_s \cdot \begin{array}{l} \mathbf{if}\;k \leq 1.8 \cdot 10^{-86}:\\ \;\;\;\;\frac{\frac{2}{\left(k \cdot k\right) \cdot \left(k \cdot k\right)}}{t\_m}\\ \mathbf{else}:\\ \;\;\;\;\frac{\frac{\ell \cdot \left(\ell + \ell\right)}{\left(\left(k \cdot k\right) \cdot k\right) \cdot k}}{t\_m}\\ \end{array} \end{array} \]
                                                                                                                                      t\_m = (fabs.f64 t)
                                                                                                                                      t\_s = (copysign.f64 #s(literal 1 binary64) t)
                                                                                                                                      (FPCore (t_s t_m l k)
                                                                                                                                       :precision binary64
                                                                                                                                       (*
                                                                                                                                        t_s
                                                                                                                                        (if (<= k 1.8e-86)
                                                                                                                                          (/ (/ 2.0 (* (* k k) (* k k))) t_m)
                                                                                                                                          (/ (/ (* l (+ l l)) (* (* (* k k) k) k)) t_m))))
                                                                                                                                      t\_m = fabs(t);
                                                                                                                                      t\_s = copysign(1.0, t);
                                                                                                                                      double code(double t_s, double t_m, double l, double k) {
                                                                                                                                      	double tmp;
                                                                                                                                      	if (k <= 1.8e-86) {
                                                                                                                                      		tmp = (2.0 / ((k * k) * (k * k))) / t_m;
                                                                                                                                      	} else {
                                                                                                                                      		tmp = ((l * (l + l)) / (((k * k) * k) * k)) / t_m;
                                                                                                                                      	}
                                                                                                                                      	return t_s * tmp;
                                                                                                                                      }
                                                                                                                                      
                                                                                                                                      t\_m =     private
                                                                                                                                      t\_s =     private
                                                                                                                                      module fmin_fmax_functions
                                                                                                                                          implicit none
                                                                                                                                          private
                                                                                                                                          public fmax
                                                                                                                                          public fmin
                                                                                                                                      
                                                                                                                                          interface fmax
                                                                                                                                              module procedure fmax88
                                                                                                                                              module procedure fmax44
                                                                                                                                              module procedure fmax84
                                                                                                                                              module procedure fmax48
                                                                                                                                          end interface
                                                                                                                                          interface fmin
                                                                                                                                              module procedure fmin88
                                                                                                                                              module procedure fmin44
                                                                                                                                              module procedure fmin84
                                                                                                                                              module procedure fmin48
                                                                                                                                          end interface
                                                                                                                                      contains
                                                                                                                                          real(8) function fmax88(x, y) result (res)
                                                                                                                                              real(8), intent (in) :: x
                                                                                                                                              real(8), intent (in) :: y
                                                                                                                                              res = merge(y, merge(x, max(x, y), y /= y), x /= x)
                                                                                                                                          end function
                                                                                                                                          real(4) function fmax44(x, y) result (res)
                                                                                                                                              real(4), intent (in) :: x
                                                                                                                                              real(4), intent (in) :: y
                                                                                                                                              res = merge(y, merge(x, max(x, y), y /= y), x /= x)
                                                                                                                                          end function
                                                                                                                                          real(8) function fmax84(x, y) result(res)
                                                                                                                                              real(8), intent (in) :: x
                                                                                                                                              real(4), intent (in) :: y
                                                                                                                                              res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
                                                                                                                                          end function
                                                                                                                                          real(8) function fmax48(x, y) result(res)
                                                                                                                                              real(4), intent (in) :: x
                                                                                                                                              real(8), intent (in) :: y
                                                                                                                                              res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
                                                                                                                                          end function
                                                                                                                                          real(8) function fmin88(x, y) result (res)
                                                                                                                                              real(8), intent (in) :: x
                                                                                                                                              real(8), intent (in) :: y
                                                                                                                                              res = merge(y, merge(x, min(x, y), y /= y), x /= x)
                                                                                                                                          end function
                                                                                                                                          real(4) function fmin44(x, y) result (res)
                                                                                                                                              real(4), intent (in) :: x
                                                                                                                                              real(4), intent (in) :: y
                                                                                                                                              res = merge(y, merge(x, min(x, y), y /= y), x /= x)
                                                                                                                                          end function
                                                                                                                                          real(8) function fmin84(x, y) result(res)
                                                                                                                                              real(8), intent (in) :: x
                                                                                                                                              real(4), intent (in) :: y
                                                                                                                                              res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
                                                                                                                                          end function
                                                                                                                                          real(8) function fmin48(x, y) result(res)
                                                                                                                                              real(4), intent (in) :: x
                                                                                                                                              real(8), intent (in) :: y
                                                                                                                                              res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
                                                                                                                                          end function
                                                                                                                                      end module
                                                                                                                                      
                                                                                                                                      real(8) function code(t_s, t_m, l, k)
                                                                                                                                      use fmin_fmax_functions
                                                                                                                                          real(8), intent (in) :: t_s
                                                                                                                                          real(8), intent (in) :: t_m
                                                                                                                                          real(8), intent (in) :: l
                                                                                                                                          real(8), intent (in) :: k
                                                                                                                                          real(8) :: tmp
                                                                                                                                          if (k <= 1.8d-86) then
                                                                                                                                              tmp = (2.0d0 / ((k * k) * (k * k))) / t_m
                                                                                                                                          else
                                                                                                                                              tmp = ((l * (l + l)) / (((k * k) * k) * k)) / t_m
                                                                                                                                          end if
                                                                                                                                          code = t_s * tmp
                                                                                                                                      end function
                                                                                                                                      
                                                                                                                                      t\_m = Math.abs(t);
                                                                                                                                      t\_s = Math.copySign(1.0, t);
                                                                                                                                      public static double code(double t_s, double t_m, double l, double k) {
                                                                                                                                      	double tmp;
                                                                                                                                      	if (k <= 1.8e-86) {
                                                                                                                                      		tmp = (2.0 / ((k * k) * (k * k))) / t_m;
                                                                                                                                      	} else {
                                                                                                                                      		tmp = ((l * (l + l)) / (((k * k) * k) * k)) / t_m;
                                                                                                                                      	}
                                                                                                                                      	return t_s * tmp;
                                                                                                                                      }
                                                                                                                                      
                                                                                                                                      t\_m = math.fabs(t)
                                                                                                                                      t\_s = math.copysign(1.0, t)
                                                                                                                                      def code(t_s, t_m, l, k):
                                                                                                                                      	tmp = 0
                                                                                                                                      	if k <= 1.8e-86:
                                                                                                                                      		tmp = (2.0 / ((k * k) * (k * k))) / t_m
                                                                                                                                      	else:
                                                                                                                                      		tmp = ((l * (l + l)) / (((k * k) * k) * k)) / t_m
                                                                                                                                      	return t_s * tmp
                                                                                                                                      
                                                                                                                                      t\_m = abs(t)
                                                                                                                                      t\_s = copysign(1.0, t)
                                                                                                                                      function code(t_s, t_m, l, k)
                                                                                                                                      	tmp = 0.0
                                                                                                                                      	if (k <= 1.8e-86)
                                                                                                                                      		tmp = Float64(Float64(2.0 / Float64(Float64(k * k) * Float64(k * k))) / t_m);
                                                                                                                                      	else
                                                                                                                                      		tmp = Float64(Float64(Float64(l * Float64(l + l)) / Float64(Float64(Float64(k * k) * k) * k)) / t_m);
                                                                                                                                      	end
                                                                                                                                      	return Float64(t_s * tmp)
                                                                                                                                      end
                                                                                                                                      
                                                                                                                                      t\_m = abs(t);
                                                                                                                                      t\_s = sign(t) * abs(1.0);
                                                                                                                                      function tmp_2 = code(t_s, t_m, l, k)
                                                                                                                                      	tmp = 0.0;
                                                                                                                                      	if (k <= 1.8e-86)
                                                                                                                                      		tmp = (2.0 / ((k * k) * (k * k))) / t_m;
                                                                                                                                      	else
                                                                                                                                      		tmp = ((l * (l + l)) / (((k * k) * k) * k)) / t_m;
                                                                                                                                      	end
                                                                                                                                      	tmp_2 = t_s * tmp;
                                                                                                                                      end
                                                                                                                                      
                                                                                                                                      t\_m = N[Abs[t], $MachinePrecision]
                                                                                                                                      t\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[t]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
                                                                                                                                      code[t$95$s_, t$95$m_, l_, k_] := N[(t$95$s * If[LessEqual[k, 1.8e-86], N[(N[(2.0 / N[(N[(k * k), $MachinePrecision] * N[(k * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / t$95$m), $MachinePrecision], N[(N[(N[(l * N[(l + l), $MachinePrecision]), $MachinePrecision] / N[(N[(N[(k * k), $MachinePrecision] * k), $MachinePrecision] * k), $MachinePrecision]), $MachinePrecision] / t$95$m), $MachinePrecision]]), $MachinePrecision]
                                                                                                                                      
                                                                                                                                      \begin{array}{l}
                                                                                                                                      t\_m = \left|t\right|
                                                                                                                                      \\
                                                                                                                                      t\_s = \mathsf{copysign}\left(1, t\right)
                                                                                                                                      
                                                                                                                                      \\
                                                                                                                                      t\_s \cdot \begin{array}{l}
                                                                                                                                      \mathbf{if}\;k \leq 1.8 \cdot 10^{-86}:\\
                                                                                                                                      \;\;\;\;\frac{\frac{2}{\left(k \cdot k\right) \cdot \left(k \cdot k\right)}}{t\_m}\\
                                                                                                                                      
                                                                                                                                      \mathbf{else}:\\
                                                                                                                                      \;\;\;\;\frac{\frac{\ell \cdot \left(\ell + \ell\right)}{\left(\left(k \cdot k\right) \cdot k\right) \cdot k}}{t\_m}\\
                                                                                                                                      
                                                                                                                                      
                                                                                                                                      \end{array}
                                                                                                                                      \end{array}
                                                                                                                                      
                                                                                                                                      Derivation
                                                                                                                                      1. Split input into 2 regimes
                                                                                                                                      2. if k < 1.79999999999999983e-86

                                                                                                                                        1. Initial program 42.2%

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

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

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

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

                                                                                                                                            if 1.79999999999999983e-86 < k

                                                                                                                                            1. Initial program 30.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}{2 \cdot \frac{{\ell}^{2}}{{k}^{4} \cdot t}} \]
                                                                                                                                            4. Step-by-step derivation
                                                                                                                                              1. Applied rewrites55.2%

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

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

                                                                                                                                              Alternative 21: 63.1% accurate, 8.9× speedup?

                                                                                                                                              \[\begin{array}{l} t\_m = \left|t\right| \\ t\_s = \mathsf{copysign}\left(1, t\right) \\ \begin{array}{l} t_2 := \left(k \cdot k\right) \cdot \left(k \cdot k\right)\\ t\_s \cdot \begin{array}{l} \mathbf{if}\;k \leq 1.8 \cdot 10^{-86}:\\ \;\;\;\;\frac{\frac{2}{t\_2}}{t\_m}\\ \mathbf{else}:\\ \;\;\;\;\frac{\frac{\ell \cdot \left(\ell + \ell\right)}{t\_2}}{t\_m}\\ \end{array} \end{array} \end{array} \]
                                                                                                                                              t\_m = (fabs.f64 t)
                                                                                                                                              t\_s = (copysign.f64 #s(literal 1 binary64) t)
                                                                                                                                              (FPCore (t_s t_m l k)
                                                                                                                                               :precision binary64
                                                                                                                                               (let* ((t_2 (* (* k k) (* k k))))
                                                                                                                                                 (*
                                                                                                                                                  t_s
                                                                                                                                                  (if (<= k 1.8e-86) (/ (/ 2.0 t_2) t_m) (/ (/ (* l (+ l l)) t_2) t_m)))))
                                                                                                                                              t\_m = fabs(t);
                                                                                                                                              t\_s = copysign(1.0, t);
                                                                                                                                              double code(double t_s, double t_m, double l, double k) {
                                                                                                                                              	double t_2 = (k * k) * (k * k);
                                                                                                                                              	double tmp;
                                                                                                                                              	if (k <= 1.8e-86) {
                                                                                                                                              		tmp = (2.0 / t_2) / t_m;
                                                                                                                                              	} else {
                                                                                                                                              		tmp = ((l * (l + l)) / t_2) / t_m;
                                                                                                                                              	}
                                                                                                                                              	return t_s * tmp;
                                                                                                                                              }
                                                                                                                                              
                                                                                                                                              t\_m =     private
                                                                                                                                              t\_s =     private
                                                                                                                                              module fmin_fmax_functions
                                                                                                                                                  implicit none
                                                                                                                                                  private
                                                                                                                                                  public fmax
                                                                                                                                                  public fmin
                                                                                                                                              
                                                                                                                                                  interface fmax
                                                                                                                                                      module procedure fmax88
                                                                                                                                                      module procedure fmax44
                                                                                                                                                      module procedure fmax84
                                                                                                                                                      module procedure fmax48
                                                                                                                                                  end interface
                                                                                                                                                  interface fmin
                                                                                                                                                      module procedure fmin88
                                                                                                                                                      module procedure fmin44
                                                                                                                                                      module procedure fmin84
                                                                                                                                                      module procedure fmin48
                                                                                                                                                  end interface
                                                                                                                                              contains
                                                                                                                                                  real(8) function fmax88(x, y) result (res)
                                                                                                                                                      real(8), intent (in) :: x
                                                                                                                                                      real(8), intent (in) :: y
                                                                                                                                                      res = merge(y, merge(x, max(x, y), y /= y), x /= x)
                                                                                                                                                  end function
                                                                                                                                                  real(4) function fmax44(x, y) result (res)
                                                                                                                                                      real(4), intent (in) :: x
                                                                                                                                                      real(4), intent (in) :: y
                                                                                                                                                      res = merge(y, merge(x, max(x, y), y /= y), x /= x)
                                                                                                                                                  end function
                                                                                                                                                  real(8) function fmax84(x, y) result(res)
                                                                                                                                                      real(8), intent (in) :: x
                                                                                                                                                      real(4), intent (in) :: y
                                                                                                                                                      res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
                                                                                                                                                  end function
                                                                                                                                                  real(8) function fmax48(x, y) result(res)
                                                                                                                                                      real(4), intent (in) :: x
                                                                                                                                                      real(8), intent (in) :: y
                                                                                                                                                      res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
                                                                                                                                                  end function
                                                                                                                                                  real(8) function fmin88(x, y) result (res)
                                                                                                                                                      real(8), intent (in) :: x
                                                                                                                                                      real(8), intent (in) :: y
                                                                                                                                                      res = merge(y, merge(x, min(x, y), y /= y), x /= x)
                                                                                                                                                  end function
                                                                                                                                                  real(4) function fmin44(x, y) result (res)
                                                                                                                                                      real(4), intent (in) :: x
                                                                                                                                                      real(4), intent (in) :: y
                                                                                                                                                      res = merge(y, merge(x, min(x, y), y /= y), x /= x)
                                                                                                                                                  end function
                                                                                                                                                  real(8) function fmin84(x, y) result(res)
                                                                                                                                                      real(8), intent (in) :: x
                                                                                                                                                      real(4), intent (in) :: y
                                                                                                                                                      res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
                                                                                                                                                  end function
                                                                                                                                                  real(8) function fmin48(x, y) result(res)
                                                                                                                                                      real(4), intent (in) :: x
                                                                                                                                                      real(8), intent (in) :: y
                                                                                                                                                      res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
                                                                                                                                                  end function
                                                                                                                                              end module
                                                                                                                                              
                                                                                                                                              real(8) function code(t_s, t_m, l, k)
                                                                                                                                              use fmin_fmax_functions
                                                                                                                                                  real(8), intent (in) :: t_s
                                                                                                                                                  real(8), intent (in) :: t_m
                                                                                                                                                  real(8), intent (in) :: l
                                                                                                                                                  real(8), intent (in) :: k
                                                                                                                                                  real(8) :: t_2
                                                                                                                                                  real(8) :: tmp
                                                                                                                                                  t_2 = (k * k) * (k * k)
                                                                                                                                                  if (k <= 1.8d-86) then
                                                                                                                                                      tmp = (2.0d0 / t_2) / t_m
                                                                                                                                                  else
                                                                                                                                                      tmp = ((l * (l + l)) / t_2) / t_m
                                                                                                                                                  end if
                                                                                                                                                  code = t_s * tmp
                                                                                                                                              end function
                                                                                                                                              
                                                                                                                                              t\_m = Math.abs(t);
                                                                                                                                              t\_s = Math.copySign(1.0, t);
                                                                                                                                              public static double code(double t_s, double t_m, double l, double k) {
                                                                                                                                              	double t_2 = (k * k) * (k * k);
                                                                                                                                              	double tmp;
                                                                                                                                              	if (k <= 1.8e-86) {
                                                                                                                                              		tmp = (2.0 / t_2) / t_m;
                                                                                                                                              	} else {
                                                                                                                                              		tmp = ((l * (l + l)) / t_2) / t_m;
                                                                                                                                              	}
                                                                                                                                              	return t_s * tmp;
                                                                                                                                              }
                                                                                                                                              
                                                                                                                                              t\_m = math.fabs(t)
                                                                                                                                              t\_s = math.copysign(1.0, t)
                                                                                                                                              def code(t_s, t_m, l, k):
                                                                                                                                              	t_2 = (k * k) * (k * k)
                                                                                                                                              	tmp = 0
                                                                                                                                              	if k <= 1.8e-86:
                                                                                                                                              		tmp = (2.0 / t_2) / t_m
                                                                                                                                              	else:
                                                                                                                                              		tmp = ((l * (l + l)) / t_2) / t_m
                                                                                                                                              	return t_s * tmp
                                                                                                                                              
                                                                                                                                              t\_m = abs(t)
                                                                                                                                              t\_s = copysign(1.0, t)
                                                                                                                                              function code(t_s, t_m, l, k)
                                                                                                                                              	t_2 = Float64(Float64(k * k) * Float64(k * k))
                                                                                                                                              	tmp = 0.0
                                                                                                                                              	if (k <= 1.8e-86)
                                                                                                                                              		tmp = Float64(Float64(2.0 / t_2) / t_m);
                                                                                                                                              	else
                                                                                                                                              		tmp = Float64(Float64(Float64(l * Float64(l + l)) / t_2) / t_m);
                                                                                                                                              	end
                                                                                                                                              	return Float64(t_s * tmp)
                                                                                                                                              end
                                                                                                                                              
                                                                                                                                              t\_m = abs(t);
                                                                                                                                              t\_s = sign(t) * abs(1.0);
                                                                                                                                              function tmp_2 = code(t_s, t_m, l, k)
                                                                                                                                              	t_2 = (k * k) * (k * k);
                                                                                                                                              	tmp = 0.0;
                                                                                                                                              	if (k <= 1.8e-86)
                                                                                                                                              		tmp = (2.0 / t_2) / t_m;
                                                                                                                                              	else
                                                                                                                                              		tmp = ((l * (l + l)) / t_2) / t_m;
                                                                                                                                              	end
                                                                                                                                              	tmp_2 = t_s * tmp;
                                                                                                                                              end
                                                                                                                                              
                                                                                                                                              t\_m = N[Abs[t], $MachinePrecision]
                                                                                                                                              t\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[t]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
                                                                                                                                              code[t$95$s_, t$95$m_, l_, k_] := Block[{t$95$2 = N[(N[(k * k), $MachinePrecision] * N[(k * k), $MachinePrecision]), $MachinePrecision]}, N[(t$95$s * If[LessEqual[k, 1.8e-86], N[(N[(2.0 / t$95$2), $MachinePrecision] / t$95$m), $MachinePrecision], N[(N[(N[(l * N[(l + l), $MachinePrecision]), $MachinePrecision] / t$95$2), $MachinePrecision] / t$95$m), $MachinePrecision]]), $MachinePrecision]]
                                                                                                                                              
                                                                                                                                              \begin{array}{l}
                                                                                                                                              t\_m = \left|t\right|
                                                                                                                                              \\
                                                                                                                                              t\_s = \mathsf{copysign}\left(1, t\right)
                                                                                                                                              
                                                                                                                                              \\
                                                                                                                                              \begin{array}{l}
                                                                                                                                              t_2 := \left(k \cdot k\right) \cdot \left(k \cdot k\right)\\
                                                                                                                                              t\_s \cdot \begin{array}{l}
                                                                                                                                              \mathbf{if}\;k \leq 1.8 \cdot 10^{-86}:\\
                                                                                                                                              \;\;\;\;\frac{\frac{2}{t\_2}}{t\_m}\\
                                                                                                                                              
                                                                                                                                              \mathbf{else}:\\
                                                                                                                                              \;\;\;\;\frac{\frac{\ell \cdot \left(\ell + \ell\right)}{t\_2}}{t\_m}\\
                                                                                                                                              
                                                                                                                                              
                                                                                                                                              \end{array}
                                                                                                                                              \end{array}
                                                                                                                                              \end{array}
                                                                                                                                              
                                                                                                                                              Derivation
                                                                                                                                              1. Split input into 2 regimes
                                                                                                                                              2. if k < 1.79999999999999983e-86

                                                                                                                                                1. Initial program 42.2%

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

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

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

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

                                                                                                                                                    if 1.79999999999999983e-86 < k

                                                                                                                                                    1. Initial program 30.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}{2 \cdot \frac{{\ell}^{2}}{{k}^{4} \cdot t}} \]
                                                                                                                                                    4. Step-by-step derivation
                                                                                                                                                      1. Applied rewrites55.2%

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

                                                                                                                                                    Alternative 22: 71.5% accurate, 8.9× speedup?

                                                                                                                                                    \[\begin{array}{l} t\_m = \left|t\right| \\ t\_s = \mathsf{copysign}\left(1, t\right) \\ t\_s \cdot \frac{\frac{\ell + \ell}{k} \cdot \frac{\ell}{\left(k \cdot k\right) \cdot k}}{t\_m} \end{array} \]
                                                                                                                                                    t\_m = (fabs.f64 t)
                                                                                                                                                    t\_s = (copysign.f64 #s(literal 1 binary64) t)
                                                                                                                                                    (FPCore (t_s t_m l k)
                                                                                                                                                     :precision binary64
                                                                                                                                                     (* t_s (/ (* (/ (+ l l) k) (/ l (* (* k k) k))) t_m)))
                                                                                                                                                    t\_m = fabs(t);
                                                                                                                                                    t\_s = copysign(1.0, t);
                                                                                                                                                    double code(double t_s, double t_m, double l, double k) {
                                                                                                                                                    	return t_s * ((((l + l) / k) * (l / ((k * k) * k))) / t_m);
                                                                                                                                                    }
                                                                                                                                                    
                                                                                                                                                    t\_m =     private
                                                                                                                                                    t\_s =     private
                                                                                                                                                    module fmin_fmax_functions
                                                                                                                                                        implicit none
                                                                                                                                                        private
                                                                                                                                                        public fmax
                                                                                                                                                        public fmin
                                                                                                                                                    
                                                                                                                                                        interface fmax
                                                                                                                                                            module procedure fmax88
                                                                                                                                                            module procedure fmax44
                                                                                                                                                            module procedure fmax84
                                                                                                                                                            module procedure fmax48
                                                                                                                                                        end interface
                                                                                                                                                        interface fmin
                                                                                                                                                            module procedure fmin88
                                                                                                                                                            module procedure fmin44
                                                                                                                                                            module procedure fmin84
                                                                                                                                                            module procedure fmin48
                                                                                                                                                        end interface
                                                                                                                                                    contains
                                                                                                                                                        real(8) function fmax88(x, y) result (res)
                                                                                                                                                            real(8), intent (in) :: x
                                                                                                                                                            real(8), intent (in) :: y
                                                                                                                                                            res = merge(y, merge(x, max(x, y), y /= y), x /= x)
                                                                                                                                                        end function
                                                                                                                                                        real(4) function fmax44(x, y) result (res)
                                                                                                                                                            real(4), intent (in) :: x
                                                                                                                                                            real(4), intent (in) :: y
                                                                                                                                                            res = merge(y, merge(x, max(x, y), y /= y), x /= x)
                                                                                                                                                        end function
                                                                                                                                                        real(8) function fmax84(x, y) result(res)
                                                                                                                                                            real(8), intent (in) :: x
                                                                                                                                                            real(4), intent (in) :: y
                                                                                                                                                            res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
                                                                                                                                                        end function
                                                                                                                                                        real(8) function fmax48(x, y) result(res)
                                                                                                                                                            real(4), intent (in) :: x
                                                                                                                                                            real(8), intent (in) :: y
                                                                                                                                                            res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
                                                                                                                                                        end function
                                                                                                                                                        real(8) function fmin88(x, y) result (res)
                                                                                                                                                            real(8), intent (in) :: x
                                                                                                                                                            real(8), intent (in) :: y
                                                                                                                                                            res = merge(y, merge(x, min(x, y), y /= y), x /= x)
                                                                                                                                                        end function
                                                                                                                                                        real(4) function fmin44(x, y) result (res)
                                                                                                                                                            real(4), intent (in) :: x
                                                                                                                                                            real(4), intent (in) :: y
                                                                                                                                                            res = merge(y, merge(x, min(x, y), y /= y), x /= x)
                                                                                                                                                        end function
                                                                                                                                                        real(8) function fmin84(x, y) result(res)
                                                                                                                                                            real(8), intent (in) :: x
                                                                                                                                                            real(4), intent (in) :: y
                                                                                                                                                            res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
                                                                                                                                                        end function
                                                                                                                                                        real(8) function fmin48(x, y) result(res)
                                                                                                                                                            real(4), intent (in) :: x
                                                                                                                                                            real(8), intent (in) :: y
                                                                                                                                                            res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
                                                                                                                                                        end function
                                                                                                                                                    end module
                                                                                                                                                    
                                                                                                                                                    real(8) function code(t_s, t_m, l, k)
                                                                                                                                                    use fmin_fmax_functions
                                                                                                                                                        real(8), intent (in) :: t_s
                                                                                                                                                        real(8), intent (in) :: t_m
                                                                                                                                                        real(8), intent (in) :: l
                                                                                                                                                        real(8), intent (in) :: k
                                                                                                                                                        code = t_s * ((((l + l) / k) * (l / ((k * k) * k))) / t_m)
                                                                                                                                                    end function
                                                                                                                                                    
                                                                                                                                                    t\_m = Math.abs(t);
                                                                                                                                                    t\_s = Math.copySign(1.0, t);
                                                                                                                                                    public static double code(double t_s, double t_m, double l, double k) {
                                                                                                                                                    	return t_s * ((((l + l) / k) * (l / ((k * k) * k))) / t_m);
                                                                                                                                                    }
                                                                                                                                                    
                                                                                                                                                    t\_m = math.fabs(t)
                                                                                                                                                    t\_s = math.copysign(1.0, t)
                                                                                                                                                    def code(t_s, t_m, l, k):
                                                                                                                                                    	return t_s * ((((l + l) / k) * (l / ((k * k) * k))) / t_m)
                                                                                                                                                    
                                                                                                                                                    t\_m = abs(t)
                                                                                                                                                    t\_s = copysign(1.0, t)
                                                                                                                                                    function code(t_s, t_m, l, k)
                                                                                                                                                    	return Float64(t_s * Float64(Float64(Float64(Float64(l + l) / k) * Float64(l / Float64(Float64(k * k) * k))) / t_m))
                                                                                                                                                    end
                                                                                                                                                    
                                                                                                                                                    t\_m = abs(t);
                                                                                                                                                    t\_s = sign(t) * abs(1.0);
                                                                                                                                                    function tmp = code(t_s, t_m, l, k)
                                                                                                                                                    	tmp = t_s * ((((l + l) / k) * (l / ((k * k) * k))) / t_m);
                                                                                                                                                    end
                                                                                                                                                    
                                                                                                                                                    t\_m = N[Abs[t], $MachinePrecision]
                                                                                                                                                    t\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[t]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
                                                                                                                                                    code[t$95$s_, t$95$m_, l_, k_] := N[(t$95$s * N[(N[(N[(N[(l + l), $MachinePrecision] / k), $MachinePrecision] * N[(l / N[(N[(k * k), $MachinePrecision] * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / t$95$m), $MachinePrecision]), $MachinePrecision]
                                                                                                                                                    
                                                                                                                                                    \begin{array}{l}
                                                                                                                                                    t\_m = \left|t\right|
                                                                                                                                                    \\
                                                                                                                                                    t\_s = \mathsf{copysign}\left(1, t\right)
                                                                                                                                                    
                                                                                                                                                    \\
                                                                                                                                                    t\_s \cdot \frac{\frac{\ell + \ell}{k} \cdot \frac{\ell}{\left(k \cdot k\right) \cdot k}}{t\_m}
                                                                                                                                                    \end{array}
                                                                                                                                                    
                                                                                                                                                    Derivation
                                                                                                                                                    1. Initial program 38.7%

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

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

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

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

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

                                                                                                                                                        Alternative 23: 70.2% accurate, 8.9× speedup?

                                                                                                                                                        \[\begin{array}{l} t\_m = \left|t\right| \\ t\_s = \mathsf{copysign}\left(1, t\right) \\ t\_s \cdot \left(\frac{\ell}{t\_m} \cdot \frac{\frac{\ell + \ell}{k}}{\left(k \cdot k\right) \cdot k}\right) \end{array} \]
                                                                                                                                                        t\_m = (fabs.f64 t)
                                                                                                                                                        t\_s = (copysign.f64 #s(literal 1 binary64) t)
                                                                                                                                                        (FPCore (t_s t_m l k)
                                                                                                                                                         :precision binary64
                                                                                                                                                         (* t_s (* (/ l t_m) (/ (/ (+ l l) k) (* (* k k) k)))))
                                                                                                                                                        t\_m = fabs(t);
                                                                                                                                                        t\_s = copysign(1.0, t);
                                                                                                                                                        double code(double t_s, double t_m, double l, double k) {
                                                                                                                                                        	return t_s * ((l / t_m) * (((l + l) / k) / ((k * k) * k)));
                                                                                                                                                        }
                                                                                                                                                        
                                                                                                                                                        t\_m =     private
                                                                                                                                                        t\_s =     private
                                                                                                                                                        module fmin_fmax_functions
                                                                                                                                                            implicit none
                                                                                                                                                            private
                                                                                                                                                            public fmax
                                                                                                                                                            public fmin
                                                                                                                                                        
                                                                                                                                                            interface fmax
                                                                                                                                                                module procedure fmax88
                                                                                                                                                                module procedure fmax44
                                                                                                                                                                module procedure fmax84
                                                                                                                                                                module procedure fmax48
                                                                                                                                                            end interface
                                                                                                                                                            interface fmin
                                                                                                                                                                module procedure fmin88
                                                                                                                                                                module procedure fmin44
                                                                                                                                                                module procedure fmin84
                                                                                                                                                                module procedure fmin48
                                                                                                                                                            end interface
                                                                                                                                                        contains
                                                                                                                                                            real(8) function fmax88(x, y) result (res)
                                                                                                                                                                real(8), intent (in) :: x
                                                                                                                                                                real(8), intent (in) :: y
                                                                                                                                                                res = merge(y, merge(x, max(x, y), y /= y), x /= x)
                                                                                                                                                            end function
                                                                                                                                                            real(4) function fmax44(x, y) result (res)
                                                                                                                                                                real(4), intent (in) :: x
                                                                                                                                                                real(4), intent (in) :: y
                                                                                                                                                                res = merge(y, merge(x, max(x, y), y /= y), x /= x)
                                                                                                                                                            end function
                                                                                                                                                            real(8) function fmax84(x, y) result(res)
                                                                                                                                                                real(8), intent (in) :: x
                                                                                                                                                                real(4), intent (in) :: y
                                                                                                                                                                res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
                                                                                                                                                            end function
                                                                                                                                                            real(8) function fmax48(x, y) result(res)
                                                                                                                                                                real(4), intent (in) :: x
                                                                                                                                                                real(8), intent (in) :: y
                                                                                                                                                                res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
                                                                                                                                                            end function
                                                                                                                                                            real(8) function fmin88(x, y) result (res)
                                                                                                                                                                real(8), intent (in) :: x
                                                                                                                                                                real(8), intent (in) :: y
                                                                                                                                                                res = merge(y, merge(x, min(x, y), y /= y), x /= x)
                                                                                                                                                            end function
                                                                                                                                                            real(4) function fmin44(x, y) result (res)
                                                                                                                                                                real(4), intent (in) :: x
                                                                                                                                                                real(4), intent (in) :: y
                                                                                                                                                                res = merge(y, merge(x, min(x, y), y /= y), x /= x)
                                                                                                                                                            end function
                                                                                                                                                            real(8) function fmin84(x, y) result(res)
                                                                                                                                                                real(8), intent (in) :: x
                                                                                                                                                                real(4), intent (in) :: y
                                                                                                                                                                res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
                                                                                                                                                            end function
                                                                                                                                                            real(8) function fmin48(x, y) result(res)
                                                                                                                                                                real(4), intent (in) :: x
                                                                                                                                                                real(8), intent (in) :: y
                                                                                                                                                                res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
                                                                                                                                                            end function
                                                                                                                                                        end module
                                                                                                                                                        
                                                                                                                                                        real(8) function code(t_s, t_m, l, k)
                                                                                                                                                        use fmin_fmax_functions
                                                                                                                                                            real(8), intent (in) :: t_s
                                                                                                                                                            real(8), intent (in) :: t_m
                                                                                                                                                            real(8), intent (in) :: l
                                                                                                                                                            real(8), intent (in) :: k
                                                                                                                                                            code = t_s * ((l / t_m) * (((l + l) / k) / ((k * k) * k)))
                                                                                                                                                        end function
                                                                                                                                                        
                                                                                                                                                        t\_m = Math.abs(t);
                                                                                                                                                        t\_s = Math.copySign(1.0, t);
                                                                                                                                                        public static double code(double t_s, double t_m, double l, double k) {
                                                                                                                                                        	return t_s * ((l / t_m) * (((l + l) / k) / ((k * k) * k)));
                                                                                                                                                        }
                                                                                                                                                        
                                                                                                                                                        t\_m = math.fabs(t)
                                                                                                                                                        t\_s = math.copysign(1.0, t)
                                                                                                                                                        def code(t_s, t_m, l, k):
                                                                                                                                                        	return t_s * ((l / t_m) * (((l + l) / k) / ((k * k) * k)))
                                                                                                                                                        
                                                                                                                                                        t\_m = abs(t)
                                                                                                                                                        t\_s = copysign(1.0, t)
                                                                                                                                                        function code(t_s, t_m, l, k)
                                                                                                                                                        	return Float64(t_s * Float64(Float64(l / t_m) * Float64(Float64(Float64(l + l) / k) / Float64(Float64(k * k) * k))))
                                                                                                                                                        end
                                                                                                                                                        
                                                                                                                                                        t\_m = abs(t);
                                                                                                                                                        t\_s = sign(t) * abs(1.0);
                                                                                                                                                        function tmp = code(t_s, t_m, l, k)
                                                                                                                                                        	tmp = t_s * ((l / t_m) * (((l + l) / k) / ((k * k) * k)));
                                                                                                                                                        end
                                                                                                                                                        
                                                                                                                                                        t\_m = N[Abs[t], $MachinePrecision]
                                                                                                                                                        t\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[t]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
                                                                                                                                                        code[t$95$s_, t$95$m_, l_, k_] := N[(t$95$s * N[(N[(l / t$95$m), $MachinePrecision] * N[(N[(N[(l + l), $MachinePrecision] / k), $MachinePrecision] / N[(N[(k * k), $MachinePrecision] * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
                                                                                                                                                        
                                                                                                                                                        \begin{array}{l}
                                                                                                                                                        t\_m = \left|t\right|
                                                                                                                                                        \\
                                                                                                                                                        t\_s = \mathsf{copysign}\left(1, t\right)
                                                                                                                                                        
                                                                                                                                                        \\
                                                                                                                                                        t\_s \cdot \left(\frac{\ell}{t\_m} \cdot \frac{\frac{\ell + \ell}{k}}{\left(k \cdot k\right) \cdot k}\right)
                                                                                                                                                        \end{array}
                                                                                                                                                        
                                                                                                                                                        Derivation
                                                                                                                                                        1. Initial program 38.7%

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

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

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

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

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

                                                                                                                                                          Alternative 24: 44.6% accurate, 11.3× speedup?

                                                                                                                                                          \[\begin{array}{l} t\_m = \left|t\right| \\ t\_s = \mathsf{copysign}\left(1, t\right) \\ t\_s \cdot \frac{\frac{\ell + \ell}{\left(k \cdot k\right) \cdot \left(k \cdot k\right)}}{t\_m} \end{array} \]
                                                                                                                                                          t\_m = (fabs.f64 t)
                                                                                                                                                          t\_s = (copysign.f64 #s(literal 1 binary64) t)
                                                                                                                                                          (FPCore (t_s t_m l k)
                                                                                                                                                           :precision binary64
                                                                                                                                                           (* t_s (/ (/ (+ l l) (* (* k k) (* k k))) t_m)))
                                                                                                                                                          t\_m = fabs(t);
                                                                                                                                                          t\_s = copysign(1.0, t);
                                                                                                                                                          double code(double t_s, double t_m, double l, double k) {
                                                                                                                                                          	return t_s * (((l + l) / ((k * k) * (k * k))) / t_m);
                                                                                                                                                          }
                                                                                                                                                          
                                                                                                                                                          t\_m =     private
                                                                                                                                                          t\_s =     private
                                                                                                                                                          module fmin_fmax_functions
                                                                                                                                                              implicit none
                                                                                                                                                              private
                                                                                                                                                              public fmax
                                                                                                                                                              public fmin
                                                                                                                                                          
                                                                                                                                                              interface fmax
                                                                                                                                                                  module procedure fmax88
                                                                                                                                                                  module procedure fmax44
                                                                                                                                                                  module procedure fmax84
                                                                                                                                                                  module procedure fmax48
                                                                                                                                                              end interface
                                                                                                                                                              interface fmin
                                                                                                                                                                  module procedure fmin88
                                                                                                                                                                  module procedure fmin44
                                                                                                                                                                  module procedure fmin84
                                                                                                                                                                  module procedure fmin48
                                                                                                                                                              end interface
                                                                                                                                                          contains
                                                                                                                                                              real(8) function fmax88(x, y) result (res)
                                                                                                                                                                  real(8), intent (in) :: x
                                                                                                                                                                  real(8), intent (in) :: y
                                                                                                                                                                  res = merge(y, merge(x, max(x, y), y /= y), x /= x)
                                                                                                                                                              end function
                                                                                                                                                              real(4) function fmax44(x, y) result (res)
                                                                                                                                                                  real(4), intent (in) :: x
                                                                                                                                                                  real(4), intent (in) :: y
                                                                                                                                                                  res = merge(y, merge(x, max(x, y), y /= y), x /= x)
                                                                                                                                                              end function
                                                                                                                                                              real(8) function fmax84(x, y) result(res)
                                                                                                                                                                  real(8), intent (in) :: x
                                                                                                                                                                  real(4), intent (in) :: y
                                                                                                                                                                  res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
                                                                                                                                                              end function
                                                                                                                                                              real(8) function fmax48(x, y) result(res)
                                                                                                                                                                  real(4), intent (in) :: x
                                                                                                                                                                  real(8), intent (in) :: y
                                                                                                                                                                  res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
                                                                                                                                                              end function
                                                                                                                                                              real(8) function fmin88(x, y) result (res)
                                                                                                                                                                  real(8), intent (in) :: x
                                                                                                                                                                  real(8), intent (in) :: y
                                                                                                                                                                  res = merge(y, merge(x, min(x, y), y /= y), x /= x)
                                                                                                                                                              end function
                                                                                                                                                              real(4) function fmin44(x, y) result (res)
                                                                                                                                                                  real(4), intent (in) :: x
                                                                                                                                                                  real(4), intent (in) :: y
                                                                                                                                                                  res = merge(y, merge(x, min(x, y), y /= y), x /= x)
                                                                                                                                                              end function
                                                                                                                                                              real(8) function fmin84(x, y) result(res)
                                                                                                                                                                  real(8), intent (in) :: x
                                                                                                                                                                  real(4), intent (in) :: y
                                                                                                                                                                  res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
                                                                                                                                                              end function
                                                                                                                                                              real(8) function fmin48(x, y) result(res)
                                                                                                                                                                  real(4), intent (in) :: x
                                                                                                                                                                  real(8), intent (in) :: y
                                                                                                                                                                  res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
                                                                                                                                                              end function
                                                                                                                                                          end module
                                                                                                                                                          
                                                                                                                                                          real(8) function code(t_s, t_m, l, k)
                                                                                                                                                          use fmin_fmax_functions
                                                                                                                                                              real(8), intent (in) :: t_s
                                                                                                                                                              real(8), intent (in) :: t_m
                                                                                                                                                              real(8), intent (in) :: l
                                                                                                                                                              real(8), intent (in) :: k
                                                                                                                                                              code = t_s * (((l + l) / ((k * k) * (k * k))) / t_m)
                                                                                                                                                          end function
                                                                                                                                                          
                                                                                                                                                          t\_m = Math.abs(t);
                                                                                                                                                          t\_s = Math.copySign(1.0, t);
                                                                                                                                                          public static double code(double t_s, double t_m, double l, double k) {
                                                                                                                                                          	return t_s * (((l + l) / ((k * k) * (k * k))) / t_m);
                                                                                                                                                          }
                                                                                                                                                          
                                                                                                                                                          t\_m = math.fabs(t)
                                                                                                                                                          t\_s = math.copysign(1.0, t)
                                                                                                                                                          def code(t_s, t_m, l, k):
                                                                                                                                                          	return t_s * (((l + l) / ((k * k) * (k * k))) / t_m)
                                                                                                                                                          
                                                                                                                                                          t\_m = abs(t)
                                                                                                                                                          t\_s = copysign(1.0, t)
                                                                                                                                                          function code(t_s, t_m, l, k)
                                                                                                                                                          	return Float64(t_s * Float64(Float64(Float64(l + l) / Float64(Float64(k * k) * Float64(k * k))) / t_m))
                                                                                                                                                          end
                                                                                                                                                          
                                                                                                                                                          t\_m = abs(t);
                                                                                                                                                          t\_s = sign(t) * abs(1.0);
                                                                                                                                                          function tmp = code(t_s, t_m, l, k)
                                                                                                                                                          	tmp = t_s * (((l + l) / ((k * k) * (k * k))) / t_m);
                                                                                                                                                          end
                                                                                                                                                          
                                                                                                                                                          t\_m = N[Abs[t], $MachinePrecision]
                                                                                                                                                          t\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[t]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
                                                                                                                                                          code[t$95$s_, t$95$m_, l_, k_] := N[(t$95$s * N[(N[(N[(l + l), $MachinePrecision] / N[(N[(k * k), $MachinePrecision] * N[(k * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / t$95$m), $MachinePrecision]), $MachinePrecision]
                                                                                                                                                          
                                                                                                                                                          \begin{array}{l}
                                                                                                                                                          t\_m = \left|t\right|
                                                                                                                                                          \\
                                                                                                                                                          t\_s = \mathsf{copysign}\left(1, t\right)
                                                                                                                                                          
                                                                                                                                                          \\
                                                                                                                                                          t\_s \cdot \frac{\frac{\ell + \ell}{\left(k \cdot k\right) \cdot \left(k \cdot k\right)}}{t\_m}
                                                                                                                                                          \end{array}
                                                                                                                                                          
                                                                                                                                                          Derivation
                                                                                                                                                          1. Initial program 38.7%

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

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

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

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

                                                                                                                                                              Alternative 25: 57.7% accurate, 12.2× speedup?

                                                                                                                                                              \[\begin{array}{l} t\_m = \left|t\right| \\ t\_s = \mathsf{copysign}\left(1, t\right) \\ t\_s \cdot \frac{\frac{2}{\left(k \cdot k\right) \cdot \left(k \cdot k\right)}}{t\_m} \end{array} \]
                                                                                                                                                              t\_m = (fabs.f64 t)
                                                                                                                                                              t\_s = (copysign.f64 #s(literal 1 binary64) t)
                                                                                                                                                              (FPCore (t_s t_m l k)
                                                                                                                                                               :precision binary64
                                                                                                                                                               (* t_s (/ (/ 2.0 (* (* k k) (* k k))) t_m)))
                                                                                                                                                              t\_m = fabs(t);
                                                                                                                                                              t\_s = copysign(1.0, t);
                                                                                                                                                              double code(double t_s, double t_m, double l, double k) {
                                                                                                                                                              	return t_s * ((2.0 / ((k * k) * (k * k))) / t_m);
                                                                                                                                                              }
                                                                                                                                                              
                                                                                                                                                              t\_m =     private
                                                                                                                                                              t\_s =     private
                                                                                                                                                              module fmin_fmax_functions
                                                                                                                                                                  implicit none
                                                                                                                                                                  private
                                                                                                                                                                  public fmax
                                                                                                                                                                  public fmin
                                                                                                                                                              
                                                                                                                                                                  interface fmax
                                                                                                                                                                      module procedure fmax88
                                                                                                                                                                      module procedure fmax44
                                                                                                                                                                      module procedure fmax84
                                                                                                                                                                      module procedure fmax48
                                                                                                                                                                  end interface
                                                                                                                                                                  interface fmin
                                                                                                                                                                      module procedure fmin88
                                                                                                                                                                      module procedure fmin44
                                                                                                                                                                      module procedure fmin84
                                                                                                                                                                      module procedure fmin48
                                                                                                                                                                  end interface
                                                                                                                                                              contains
                                                                                                                                                                  real(8) function fmax88(x, y) result (res)
                                                                                                                                                                      real(8), intent (in) :: x
                                                                                                                                                                      real(8), intent (in) :: y
                                                                                                                                                                      res = merge(y, merge(x, max(x, y), y /= y), x /= x)
                                                                                                                                                                  end function
                                                                                                                                                                  real(4) function fmax44(x, y) result (res)
                                                                                                                                                                      real(4), intent (in) :: x
                                                                                                                                                                      real(4), intent (in) :: y
                                                                                                                                                                      res = merge(y, merge(x, max(x, y), y /= y), x /= x)
                                                                                                                                                                  end function
                                                                                                                                                                  real(8) function fmax84(x, y) result(res)
                                                                                                                                                                      real(8), intent (in) :: x
                                                                                                                                                                      real(4), intent (in) :: y
                                                                                                                                                                      res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
                                                                                                                                                                  end function
                                                                                                                                                                  real(8) function fmax48(x, y) result(res)
                                                                                                                                                                      real(4), intent (in) :: x
                                                                                                                                                                      real(8), intent (in) :: y
                                                                                                                                                                      res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
                                                                                                                                                                  end function
                                                                                                                                                                  real(8) function fmin88(x, y) result (res)
                                                                                                                                                                      real(8), intent (in) :: x
                                                                                                                                                                      real(8), intent (in) :: y
                                                                                                                                                                      res = merge(y, merge(x, min(x, y), y /= y), x /= x)
                                                                                                                                                                  end function
                                                                                                                                                                  real(4) function fmin44(x, y) result (res)
                                                                                                                                                                      real(4), intent (in) :: x
                                                                                                                                                                      real(4), intent (in) :: y
                                                                                                                                                                      res = merge(y, merge(x, min(x, y), y /= y), x /= x)
                                                                                                                                                                  end function
                                                                                                                                                                  real(8) function fmin84(x, y) result(res)
                                                                                                                                                                      real(8), intent (in) :: x
                                                                                                                                                                      real(4), intent (in) :: y
                                                                                                                                                                      res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
                                                                                                                                                                  end function
                                                                                                                                                                  real(8) function fmin48(x, y) result(res)
                                                                                                                                                                      real(4), intent (in) :: x
                                                                                                                                                                      real(8), intent (in) :: y
                                                                                                                                                                      res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
                                                                                                                                                                  end function
                                                                                                                                                              end module
                                                                                                                                                              
                                                                                                                                                              real(8) function code(t_s, t_m, l, k)
                                                                                                                                                              use fmin_fmax_functions
                                                                                                                                                                  real(8), intent (in) :: t_s
                                                                                                                                                                  real(8), intent (in) :: t_m
                                                                                                                                                                  real(8), intent (in) :: l
                                                                                                                                                                  real(8), intent (in) :: k
                                                                                                                                                                  code = t_s * ((2.0d0 / ((k * k) * (k * k))) / t_m)
                                                                                                                                                              end function
                                                                                                                                                              
                                                                                                                                                              t\_m = Math.abs(t);
                                                                                                                                                              t\_s = Math.copySign(1.0, t);
                                                                                                                                                              public static double code(double t_s, double t_m, double l, double k) {
                                                                                                                                                              	return t_s * ((2.0 / ((k * k) * (k * k))) / t_m);
                                                                                                                                                              }
                                                                                                                                                              
                                                                                                                                                              t\_m = math.fabs(t)
                                                                                                                                                              t\_s = math.copysign(1.0, t)
                                                                                                                                                              def code(t_s, t_m, l, k):
                                                                                                                                                              	return t_s * ((2.0 / ((k * k) * (k * k))) / t_m)
                                                                                                                                                              
                                                                                                                                                              t\_m = abs(t)
                                                                                                                                                              t\_s = copysign(1.0, t)
                                                                                                                                                              function code(t_s, t_m, l, k)
                                                                                                                                                              	return Float64(t_s * Float64(Float64(2.0 / Float64(Float64(k * k) * Float64(k * k))) / t_m))
                                                                                                                                                              end
                                                                                                                                                              
                                                                                                                                                              t\_m = abs(t);
                                                                                                                                                              t\_s = sign(t) * abs(1.0);
                                                                                                                                                              function tmp = code(t_s, t_m, l, k)
                                                                                                                                                              	tmp = t_s * ((2.0 / ((k * k) * (k * k))) / t_m);
                                                                                                                                                              end
                                                                                                                                                              
                                                                                                                                                              t\_m = N[Abs[t], $MachinePrecision]
                                                                                                                                                              t\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[t]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
                                                                                                                                                              code[t$95$s_, t$95$m_, l_, k_] := N[(t$95$s * N[(N[(2.0 / N[(N[(k * k), $MachinePrecision] * N[(k * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / t$95$m), $MachinePrecision]), $MachinePrecision]
                                                                                                                                                              
                                                                                                                                                              \begin{array}{l}
                                                                                                                                                              t\_m = \left|t\right|
                                                                                                                                                              \\
                                                                                                                                                              t\_s = \mathsf{copysign}\left(1, t\right)
                                                                                                                                                              
                                                                                                                                                              \\
                                                                                                                                                              t\_s \cdot \frac{\frac{2}{\left(k \cdot k\right) \cdot \left(k \cdot k\right)}}{t\_m}
                                                                                                                                                              \end{array}
                                                                                                                                                              
                                                                                                                                                              Derivation
                                                                                                                                                              1. Initial program 38.7%

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

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

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

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

                                                                                                                                                                  Reproduce

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