Toniolo and Linder, Equation (10+)

Percentage Accurate: 53.9% → 85.7%
Time: 20.5s
Alternatives: 7
Speedup: N/A×

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 7 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: 53.9% 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: 85.7% accurate, N/A× 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}\;\frac{2}{\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^{+201}:\\ \;\;\;\;\frac{2}{\frac{\mathsf{fma}\left(2, {\left(\sin k \cdot t\_m\right)}^{2}, {\left(\sin k \cdot k\right)}^{2}\right)}{\cos k \cdot \left(\ell \cdot \ell\right)} \cdot t\_m}\\ \mathbf{else}:\\ \;\;\;\;2 \cdot \left(\frac{\ell}{k} \cdot \left(\frac{\ell}{k} \cdot \frac{\frac{\cos k}{t\_m}}{{\sin k}^{2}}\right)\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 (<=
       (/
        2.0
        (*
         (* (* (/ (pow t_m 3.0) (* l l)) (sin k)) (tan k))
         (+ (+ 1.0 (pow (/ k t_m) 2.0)) 1.0)))
       1e+201)
    (/
     2.0
     (*
      (/
       (fma 2.0 (pow (* (sin k) t_m) 2.0) (pow (* (sin k) k) 2.0))
       (* (cos k) (* l l)))
      t_m))
    (* 2.0 (* (/ l k) (* (/ l k) (/ (/ (cos k) t_m) (pow (sin k) 2.0))))))))
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 ((2.0 / ((((pow(t_m, 3.0) / (l * l)) * sin(k)) * tan(k)) * ((1.0 + pow((k / t_m), 2.0)) + 1.0))) <= 1e+201) {
		tmp = 2.0 / ((fma(2.0, pow((sin(k) * t_m), 2.0), pow((sin(k) * k), 2.0)) / (cos(k) * (l * l))) * t_m);
	} else {
		tmp = 2.0 * ((l / k) * ((l / k) * ((cos(k) / t_m) / pow(sin(k), 2.0))));
	}
	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(2.0 / 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+201)
		tmp = Float64(2.0 / Float64(Float64(fma(2.0, (Float64(sin(k) * t_m) ^ 2.0), (Float64(sin(k) * k) ^ 2.0)) / Float64(cos(k) * Float64(l * l))) * t_m));
	else
		tmp = Float64(2.0 * Float64(Float64(l / k) * Float64(Float64(l / k) * Float64(Float64(cos(k) / t_m) / (sin(k) ^ 2.0)))));
	end
	return Float64(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[(2.0 / 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]), $MachinePrecision], 1e+201], N[(2.0 / N[(N[(N[(2.0 * N[Power[N[(N[Sin[k], $MachinePrecision] * t$95$m), $MachinePrecision], 2.0], $MachinePrecision] + N[Power[N[(N[Sin[k], $MachinePrecision] * k), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision] / N[(N[Cos[k], $MachinePrecision] * N[(l * l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * t$95$m), $MachinePrecision]), $MachinePrecision], N[(2.0 * N[(N[(l / k), $MachinePrecision] * N[(N[(l / k), $MachinePrecision] * N[(N[(N[Cos[k], $MachinePrecision] / t$95$m), $MachinePrecision] / N[Power[N[Sin[k], $MachinePrecision], 2.0], $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}\;\frac{2}{\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^{+201}:\\
\;\;\;\;\frac{2}{\frac{\mathsf{fma}\left(2, {\left(\sin k \cdot t\_m\right)}^{2}, {\left(\sin k \cdot k\right)}^{2}\right)}{\cos k \cdot \left(\ell \cdot \ell\right)} \cdot t\_m}\\

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


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

    1. Initial program 77.9%

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

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

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

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

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

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

    1. Initial program 26.1%

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

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

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

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

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

      \[\leadsto \color{blue}{\frac{2}{\frac{t}{\ell \cdot \ell} \cdot \frac{\mathsf{fma}\left({\left(\sin k \cdot t\right)}^{2}, 2, {\left(\sin k \cdot k\right)}^{2}\right)}{\cos k}}} \]
    7. 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)}} \]
    8. Step-by-step derivation
      1. lower-*.f64N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 2: 85.5% accurate, N/A× 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}\;\frac{2}{\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^{+201}:\\ \;\;\;\;\frac{2}{\frac{t\_m}{\ell \cdot \ell} \cdot \frac{\mathsf{fma}\left({\left(\sin k \cdot t\_m\right)}^{2}, 2, {\left(\sin k \cdot k\right)}^{2}\right)}{\cos k}}\\ \mathbf{else}:\\ \;\;\;\;2 \cdot \left(\frac{\ell}{k} \cdot \left(\frac{\ell}{k} \cdot \frac{\frac{\cos k}{t\_m}}{{\sin k}^{2}}\right)\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 (<=
       (/
        2.0
        (*
         (* (* (/ (pow t_m 3.0) (* l l)) (sin k)) (tan k))
         (+ (+ 1.0 (pow (/ k t_m) 2.0)) 1.0)))
       1e+201)
    (/
     2.0
     (*
      (/ t_m (* l l))
      (/ (fma (pow (* (sin k) t_m) 2.0) 2.0 (pow (* (sin k) k) 2.0)) (cos k))))
    (* 2.0 (* (/ l k) (* (/ l k) (/ (/ (cos k) t_m) (pow (sin k) 2.0))))))))
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 ((2.0 / ((((pow(t_m, 3.0) / (l * l)) * sin(k)) * tan(k)) * ((1.0 + pow((k / t_m), 2.0)) + 1.0))) <= 1e+201) {
		tmp = 2.0 / ((t_m / (l * l)) * (fma(pow((sin(k) * t_m), 2.0), 2.0, pow((sin(k) * k), 2.0)) / cos(k)));
	} else {
		tmp = 2.0 * ((l / k) * ((l / k) * ((cos(k) / t_m) / pow(sin(k), 2.0))));
	}
	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(2.0 / 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+201)
		tmp = Float64(2.0 / Float64(Float64(t_m / Float64(l * l)) * Float64(fma((Float64(sin(k) * t_m) ^ 2.0), 2.0, (Float64(sin(k) * k) ^ 2.0)) / cos(k))));
	else
		tmp = Float64(2.0 * Float64(Float64(l / k) * Float64(Float64(l / k) * Float64(Float64(cos(k) / t_m) / (sin(k) ^ 2.0)))));
	end
	return Float64(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[(2.0 / 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]), $MachinePrecision], 1e+201], N[(2.0 / N[(N[(t$95$m / N[(l * l), $MachinePrecision]), $MachinePrecision] * N[(N[(N[Power[N[(N[Sin[k], $MachinePrecision] * t$95$m), $MachinePrecision], 2.0], $MachinePrecision] * 2.0 + N[Power[N[(N[Sin[k], $MachinePrecision] * k), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision] / N[Cos[k], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(2.0 * N[(N[(l / k), $MachinePrecision] * N[(N[(l / k), $MachinePrecision] * N[(N[(N[Cos[k], $MachinePrecision] / t$95$m), $MachinePrecision] / N[Power[N[Sin[k], $MachinePrecision], 2.0], $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}\;\frac{2}{\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^{+201}:\\
\;\;\;\;\frac{2}{\frac{t\_m}{\ell \cdot \ell} \cdot \frac{\mathsf{fma}\left({\left(\sin k \cdot t\_m\right)}^{2}, 2, {\left(\sin k \cdot k\right)}^{2}\right)}{\cos k}}\\

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


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

    1. Initial program 77.9%

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

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

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

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

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

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

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

    1. Initial program 26.1%

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

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

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

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

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

      \[\leadsto \color{blue}{\frac{2}{\frac{t}{\ell \cdot \ell} \cdot \frac{\mathsf{fma}\left({\left(\sin k \cdot t\right)}^{2}, 2, {\left(\sin k \cdot k\right)}^{2}\right)}{\cos k}}} \]
    7. 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)}} \]
    8. Step-by-step derivation
      1. lower-*.f64N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 3: 71.2% accurate, N/A× 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.76 \cdot 10^{-38}:\\ \;\;\;\;\frac{{\left(\frac{\ell}{k}\right)}^{2}}{{t\_m}^{3}}\\ \mathbf{else}:\\ \;\;\;\;2 \cdot \left(\frac{\ell}{k} \cdot \left(\frac{\ell}{k} \cdot \frac{\frac{\cos k}{t\_m}}{{\sin k}^{2}}\right)\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 1.76e-38)
    (/ (pow (/ l k) 2.0) (pow t_m 3.0))
    (* 2.0 (* (/ l k) (* (/ l k) (/ (/ (cos k) t_m) (pow (sin k) 2.0))))))))
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.76e-38) {
		tmp = pow((l / k), 2.0) / pow(t_m, 3.0);
	} else {
		tmp = 2.0 * ((l / k) * ((l / k) * ((cos(k) / t_m) / pow(sin(k), 2.0))));
	}
	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.76d-38) then
        tmp = ((l / k) ** 2.0d0) / (t_m ** 3.0d0)
    else
        tmp = 2.0d0 * ((l / k) * ((l / k) * ((cos(k) / t_m) / (sin(k) ** 2.0d0))))
    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.76e-38) {
		tmp = Math.pow((l / k), 2.0) / Math.pow(t_m, 3.0);
	} else {
		tmp = 2.0 * ((l / k) * ((l / k) * ((Math.cos(k) / t_m) / Math.pow(Math.sin(k), 2.0))));
	}
	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.76e-38:
		tmp = math.pow((l / k), 2.0) / math.pow(t_m, 3.0)
	else:
		tmp = 2.0 * ((l / k) * ((l / k) * ((math.cos(k) / t_m) / math.pow(math.sin(k), 2.0))))
	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.76e-38)
		tmp = Float64((Float64(l / k) ^ 2.0) / (t_m ^ 3.0));
	else
		tmp = Float64(2.0 * Float64(Float64(l / k) * Float64(Float64(l / k) * Float64(Float64(cos(k) / t_m) / (sin(k) ^ 2.0)))));
	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.76e-38)
		tmp = ((l / k) ^ 2.0) / (t_m ^ 3.0);
	else
		tmp = 2.0 * ((l / k) * ((l / k) * ((cos(k) / t_m) / (sin(k) ^ 2.0))));
	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.76e-38], N[(N[Power[N[(l / k), $MachinePrecision], 2.0], $MachinePrecision] / N[Power[t$95$m, 3.0], $MachinePrecision]), $MachinePrecision], N[(2.0 * N[(N[(l / k), $MachinePrecision] * N[(N[(l / k), $MachinePrecision] * N[(N[(N[Cos[k], $MachinePrecision] / t$95$m), $MachinePrecision] / N[Power[N[Sin[k], $MachinePrecision], 2.0], $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 1.76 \cdot 10^{-38}:\\
\;\;\;\;\frac{{\left(\frac{\ell}{k}\right)}^{2}}{{t\_m}^{3}}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if k < 1.76000000000000001e-38

    1. Initial program 57.8%

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

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

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

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

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

      \[\leadsto \color{blue}{\frac{2}{\frac{t}{\ell \cdot \ell} \cdot \frac{\mathsf{fma}\left({\left(\sin k \cdot t\right)}^{2}, 2, {\left(\sin k \cdot k\right)}^{2}\right)}{\cos k}}} \]
    7. 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)}} \]
    8. Step-by-step derivation
      1. lower-*.f64N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      if 1.76000000000000001e-38 < k

      1. Initial program 49.7%

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

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

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

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

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

        \[\leadsto \color{blue}{\frac{2}{\frac{t}{\ell \cdot \ell} \cdot \frac{\mathsf{fma}\left({\left(\sin k \cdot t\right)}^{2}, 2, {\left(\sin k \cdot k\right)}^{2}\right)}{\cos k}}} \]
      7. 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)}} \]
      8. Step-by-step derivation
        1. lower-*.f64N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    Alternative 4: 69.5% accurate, N/A× 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.76 \cdot 10^{-38}:\\ \;\;\;\;\frac{{\left(\frac{\ell}{k}\right)}^{2}}{{t\_m}^{3}}\\ \mathbf{else}:\\ \;\;\;\;2 \cdot \left(\left(\frac{\ell}{k} \cdot \frac{\ell}{k}\right) \cdot \frac{\cos k}{t\_m \cdot {\sin k}^{2}}\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 1.76e-38)
        (/ (pow (/ l k) 2.0) (pow t_m 3.0))
        (* 2.0 (* (* (/ l k) (/ l k)) (/ (cos k) (* t_m (pow (sin k) 2.0))))))))
    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.76e-38) {
    		tmp = pow((l / k), 2.0) / pow(t_m, 3.0);
    	} else {
    		tmp = 2.0 * (((l / k) * (l / k)) * (cos(k) / (t_m * pow(sin(k), 2.0))));
    	}
    	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.76d-38) then
            tmp = ((l / k) ** 2.0d0) / (t_m ** 3.0d0)
        else
            tmp = 2.0d0 * (((l / k) * (l / k)) * (cos(k) / (t_m * (sin(k) ** 2.0d0))))
        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.76e-38) {
    		tmp = Math.pow((l / k), 2.0) / Math.pow(t_m, 3.0);
    	} else {
    		tmp = 2.0 * (((l / k) * (l / k)) * (Math.cos(k) / (t_m * Math.pow(Math.sin(k), 2.0))));
    	}
    	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.76e-38:
    		tmp = math.pow((l / k), 2.0) / math.pow(t_m, 3.0)
    	else:
    		tmp = 2.0 * (((l / k) * (l / k)) * (math.cos(k) / (t_m * math.pow(math.sin(k), 2.0))))
    	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.76e-38)
    		tmp = Float64((Float64(l / k) ^ 2.0) / (t_m ^ 3.0));
    	else
    		tmp = Float64(2.0 * Float64(Float64(Float64(l / k) * Float64(l / k)) * Float64(cos(k) / Float64(t_m * (sin(k) ^ 2.0)))));
    	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.76e-38)
    		tmp = ((l / k) ^ 2.0) / (t_m ^ 3.0);
    	else
    		tmp = 2.0 * (((l / k) * (l / k)) * (cos(k) / (t_m * (sin(k) ^ 2.0))));
    	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.76e-38], N[(N[Power[N[(l / k), $MachinePrecision], 2.0], $MachinePrecision] / N[Power[t$95$m, 3.0], $MachinePrecision]), $MachinePrecision], N[(2.0 * N[(N[(N[(l / k), $MachinePrecision] * N[(l / k), $MachinePrecision]), $MachinePrecision] * N[(N[Cos[k], $MachinePrecision] / N[(t$95$m * N[Power[N[Sin[k], $MachinePrecision], 2.0], $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 1.76 \cdot 10^{-38}:\\
    \;\;\;\;\frac{{\left(\frac{\ell}{k}\right)}^{2}}{{t\_m}^{3}}\\
    
    \mathbf{else}:\\
    \;\;\;\;2 \cdot \left(\left(\frac{\ell}{k} \cdot \frac{\ell}{k}\right) \cdot \frac{\cos k}{t\_m \cdot {\sin k}^{2}}\right)\\
    
    
    \end{array}
    \end{array}
    
    Derivation
    1. Split input into 2 regimes
    2. if k < 1.76000000000000001e-38

      1. Initial program 57.8%

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

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

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

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

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

        \[\leadsto \color{blue}{\frac{2}{\frac{t}{\ell \cdot \ell} \cdot \frac{\mathsf{fma}\left({\left(\sin k \cdot t\right)}^{2}, 2, {\left(\sin k \cdot k\right)}^{2}\right)}{\cos k}}} \]
      7. 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)}} \]
      8. Step-by-step derivation
        1. lower-*.f64N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        if 1.76000000000000001e-38 < k

        1. Initial program 49.7%

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

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

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

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

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

          \[\leadsto \color{blue}{\frac{2}{\frac{t}{\ell \cdot \ell} \cdot \frac{\mathsf{fma}\left({\left(\sin k \cdot t\right)}^{2}, 2, {\left(\sin k \cdot k\right)}^{2}\right)}{\cos k}}} \]
        7. 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)}} \]
        8. Step-by-step derivation
          1. lower-*.f64N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      Alternative 5: 66.4% accurate, N/A× 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.42 \cdot 10^{-33}:\\ \;\;\;\;\frac{{\left(\frac{\ell}{k}\right)}^{2}}{{t\_m}^{3}}\\ \mathbf{else}:\\ \;\;\;\;\left(2 \cdot \left(\frac{\ell}{k} \cdot \left(\frac{\ell}{k} \cdot \frac{\cos k}{{\left(t\_m \cdot \sin k\right)}^{2}}\right)\right)\right) \cdot 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.42e-33)
          (/ (pow (/ l k) 2.0) (pow t_m 3.0))
          (*
           (* 2.0 (* (/ l k) (* (/ l k) (/ (cos k) (pow (* t_m (sin k)) 2.0)))))
           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.42e-33) {
      		tmp = pow((l / k), 2.0) / pow(t_m, 3.0);
      	} else {
      		tmp = (2.0 * ((l / k) * ((l / k) * (cos(k) / pow((t_m * sin(k)), 2.0))))) * 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.42d-33) then
              tmp = ((l / k) ** 2.0d0) / (t_m ** 3.0d0)
          else
              tmp = (2.0d0 * ((l / k) * ((l / k) * (cos(k) / ((t_m * sin(k)) ** 2.0d0))))) * 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.42e-33) {
      		tmp = Math.pow((l / k), 2.0) / Math.pow(t_m, 3.0);
      	} else {
      		tmp = (2.0 * ((l / k) * ((l / k) * (Math.cos(k) / Math.pow((t_m * Math.sin(k)), 2.0))))) * 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.42e-33:
      		tmp = math.pow((l / k), 2.0) / math.pow(t_m, 3.0)
      	else:
      		tmp = (2.0 * ((l / k) * ((l / k) * (math.cos(k) / math.pow((t_m * math.sin(k)), 2.0))))) * 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.42e-33)
      		tmp = Float64((Float64(l / k) ^ 2.0) / (t_m ^ 3.0));
      	else
      		tmp = Float64(Float64(2.0 * Float64(Float64(l / k) * Float64(Float64(l / k) * Float64(cos(k) / (Float64(t_m * sin(k)) ^ 2.0))))) * 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.42e-33)
      		tmp = ((l / k) ^ 2.0) / (t_m ^ 3.0);
      	else
      		tmp = (2.0 * ((l / k) * ((l / k) * (cos(k) / ((t_m * sin(k)) ^ 2.0))))) * 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.42e-33], N[(N[Power[N[(l / k), $MachinePrecision], 2.0], $MachinePrecision] / N[Power[t$95$m, 3.0], $MachinePrecision]), $MachinePrecision], N[(N[(2.0 * N[(N[(l / k), $MachinePrecision] * N[(N[(l / k), $MachinePrecision] * N[(N[Cos[k], $MachinePrecision] / N[Power[N[(t$95$m * N[Sin[k], $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $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}\;k \leq 1.42 \cdot 10^{-33}:\\
      \;\;\;\;\frac{{\left(\frac{\ell}{k}\right)}^{2}}{{t\_m}^{3}}\\
      
      \mathbf{else}:\\
      \;\;\;\;\left(2 \cdot \left(\frac{\ell}{k} \cdot \left(\frac{\ell}{k} \cdot \frac{\cos k}{{\left(t\_m \cdot \sin k\right)}^{2}}\right)\right)\right) \cdot t\_m\\
      
      
      \end{array}
      \end{array}
      
      Derivation
      1. Split input into 2 regimes
      2. if k < 1.42000000000000007e-33

        1. Initial program 58.0%

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

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

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

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

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

          \[\leadsto \color{blue}{\frac{2}{\frac{t}{\ell \cdot \ell} \cdot \frac{\mathsf{fma}\left({\left(\sin k \cdot t\right)}^{2}, 2, {\left(\sin k \cdot k\right)}^{2}\right)}{\cos k}}} \]
        7. 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)}} \]
        8. Step-by-step derivation
          1. lower-*.f64N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

          if 1.42000000000000007e-33 < k

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

            \[\leadsto \left(2 \cdot \left(\frac{\ell}{k} \cdot \left(\frac{\ell}{k} \cdot \frac{\cos k}{{\left(t \cdot \sin k\right)}^{2}}\right)\right)\right) \cdot t \]
        12. Recombined 2 regimes into one program.
        13. Final simplification67.0%

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

        Alternative 6: 65.8% accurate, N/A× 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.42 \cdot 10^{-33}:\\ \;\;\;\;\frac{{\left(\frac{\ell}{k}\right)}^{2}}{{t\_m}^{3}}\\ \mathbf{else}:\\ \;\;\;\;\left(2 \cdot \left(\left(\frac{\ell}{k} \cdot \frac{\ell}{k}\right) \cdot \frac{\cos k}{{\left(t\_m \cdot \sin k\right)}^{2}}\right)\right) \cdot 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.42e-33)
            (/ (pow (/ l k) 2.0) (pow t_m 3.0))
            (*
             (* 2.0 (* (* (/ l k) (/ l k)) (/ (cos k) (pow (* t_m (sin k)) 2.0))))
             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.42e-33) {
        		tmp = pow((l / k), 2.0) / pow(t_m, 3.0);
        	} else {
        		tmp = (2.0 * (((l / k) * (l / k)) * (cos(k) / pow((t_m * sin(k)), 2.0)))) * 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.42d-33) then
                tmp = ((l / k) ** 2.0d0) / (t_m ** 3.0d0)
            else
                tmp = (2.0d0 * (((l / k) * (l / k)) * (cos(k) / ((t_m * sin(k)) ** 2.0d0)))) * 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.42e-33) {
        		tmp = Math.pow((l / k), 2.0) / Math.pow(t_m, 3.0);
        	} else {
        		tmp = (2.0 * (((l / k) * (l / k)) * (Math.cos(k) / Math.pow((t_m * Math.sin(k)), 2.0)))) * 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.42e-33:
        		tmp = math.pow((l / k), 2.0) / math.pow(t_m, 3.0)
        	else:
        		tmp = (2.0 * (((l / k) * (l / k)) * (math.cos(k) / math.pow((t_m * math.sin(k)), 2.0)))) * 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.42e-33)
        		tmp = Float64((Float64(l / k) ^ 2.0) / (t_m ^ 3.0));
        	else
        		tmp = Float64(Float64(2.0 * Float64(Float64(Float64(l / k) * Float64(l / k)) * Float64(cos(k) / (Float64(t_m * sin(k)) ^ 2.0)))) * 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.42e-33)
        		tmp = ((l / k) ^ 2.0) / (t_m ^ 3.0);
        	else
        		tmp = (2.0 * (((l / k) * (l / k)) * (cos(k) / ((t_m * sin(k)) ^ 2.0)))) * 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.42e-33], N[(N[Power[N[(l / k), $MachinePrecision], 2.0], $MachinePrecision] / N[Power[t$95$m, 3.0], $MachinePrecision]), $MachinePrecision], N[(N[(2.0 * N[(N[(N[(l / k), $MachinePrecision] * N[(l / k), $MachinePrecision]), $MachinePrecision] * N[(N[Cos[k], $MachinePrecision] / N[Power[N[(t$95$m * N[Sin[k], $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision]), $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}\;k \leq 1.42 \cdot 10^{-33}:\\
        \;\;\;\;\frac{{\left(\frac{\ell}{k}\right)}^{2}}{{t\_m}^{3}}\\
        
        \mathbf{else}:\\
        \;\;\;\;\left(2 \cdot \left(\left(\frac{\ell}{k} \cdot \frac{\ell}{k}\right) \cdot \frac{\cos k}{{\left(t\_m \cdot \sin k\right)}^{2}}\right)\right) \cdot t\_m\\
        
        
        \end{array}
        \end{array}
        
        Derivation
        1. Split input into 2 regimes
        2. if k < 1.42000000000000007e-33

          1. Initial program 58.0%

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

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

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

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

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

            \[\leadsto \color{blue}{\frac{2}{\frac{t}{\ell \cdot \ell} \cdot \frac{\mathsf{fma}\left({\left(\sin k \cdot t\right)}^{2}, 2, {\left(\sin k \cdot k\right)}^{2}\right)}{\cos k}}} \]
          7. 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)}} \]
          8. Step-by-step derivation
            1. lower-*.f64N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

            if 1.42000000000000007e-33 < k

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

              \[\leadsto \left(2 \cdot \left(\left(\frac{\ell}{k} \cdot \frac{\ell}{k}\right) \cdot \frac{\cos k}{{\left(t \cdot \sin k\right)}^{2}}\right)\right) \cdot t \]
          12. Recombined 2 regimes into one program.
          13. Final simplification66.6%

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

          Alternative 7: 60.3% accurate, N/A× speedup?

          \[\begin{array}{l} t\_m = \left|t\right| \\ t\_s = \mathsf{copysign}\left(1, t\right) \\ t\_s \cdot \frac{{\left(\frac{\ell}{k}\right)}^{2}}{{t\_m}^{3}} \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 (/ (pow (/ l k) 2.0) (pow t_m 3.0))))
          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 * (pow((l / k), 2.0) / pow(t_m, 3.0));
          }
          
          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 / k) ** 2.0d0) / (t_m ** 3.0d0))
          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 * (Math.pow((l / k), 2.0) / Math.pow(t_m, 3.0));
          }
          
          t\_m = math.fabs(t)
          t\_s = math.copysign(1.0, t)
          def code(t_s, t_m, l, k):
          	return t_s * (math.pow((l / k), 2.0) / math.pow(t_m, 3.0))
          
          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 / k) ^ 2.0) / (t_m ^ 3.0)))
          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 / k) ^ 2.0) / (t_m ^ 3.0));
          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[Power[N[(l / k), $MachinePrecision], 2.0], $MachinePrecision] / N[Power[t$95$m, 3.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
          
          \begin{array}{l}
          t\_m = \left|t\right|
          \\
          t\_s = \mathsf{copysign}\left(1, t\right)
          
          \\
          t\_s \cdot \frac{{\left(\frac{\ell}{k}\right)}^{2}}{{t\_m}^{3}}
          \end{array}
          
          Derivation
          1. Initial program 55.2%

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

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

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

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

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

            \[\leadsto \color{blue}{\frac{2}{\frac{t}{\ell \cdot \ell} \cdot \frac{\mathsf{fma}\left({\left(\sin k \cdot t\right)}^{2}, 2, {\left(\sin k \cdot k\right)}^{2}\right)}{\cos k}}} \]
          7. 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)}} \]
          8. Step-by-step derivation
            1. lower-*.f64N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

              \[\leadsto \color{blue}{\frac{{\left(\frac{\ell}{k}\right)}^{2}}{{t}^{3}}} \]
            2. Final simplification58.4%

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

            Reproduce

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