Toniolo and Linder, Equation (10+)

Percentage Accurate: 55.2% → 88.7%
Time: 7.7s
Alternatives: 25
Speedup: 3.4×

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}

Local Percentage Accuracy vs ?

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

Accuracy vs Speed?

Herbie found 25 alternatives:

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

Initial Program: 55.2% accurate, 1.0× speedup?

\[\begin{array}{l} \\ \frac{2}{\left(\left(\frac{{t}^{3}}{\ell \cdot \ell} \cdot \sin k\right) \cdot \tan k\right) \cdot \left(\left(1 + {\left(\frac{k}{t}\right)}^{2}\right) + 1\right)} \end{array} \]
(FPCore (t l k)
 :precision binary64
 (/
  2.0
  (*
   (* (* (/ (pow t 3.0) (* l l)) (sin k)) (tan k))
   (+ (+ 1.0 (pow (/ k t) 2.0)) 1.0))))
double code(double t, double l, double k) {
	return 2.0 / ((((pow(t, 3.0) / (l * l)) * sin(k)) * tan(k)) * ((1.0 + pow((k / t), 2.0)) + 1.0));
}
module fmin_fmax_functions
    implicit none
    private
    public fmax
    public fmin

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

real(8) function code(t, l, k)
use fmin_fmax_functions
    real(8), intent (in) :: t
    real(8), intent (in) :: l
    real(8), intent (in) :: k
    code = 2.0d0 / (((((t ** 3.0d0) / (l * l)) * sin(k)) * tan(k)) * ((1.0d0 + ((k / t) ** 2.0d0)) + 1.0d0))
end function
public static double code(double t, double l, double k) {
	return 2.0 / ((((Math.pow(t, 3.0) / (l * l)) * Math.sin(k)) * Math.tan(k)) * ((1.0 + Math.pow((k / t), 2.0)) + 1.0));
}
def code(t, l, k):
	return 2.0 / ((((math.pow(t, 3.0) / (l * l)) * math.sin(k)) * math.tan(k)) * ((1.0 + math.pow((k / t), 2.0)) + 1.0))
function code(t, l, k)
	return Float64(2.0 / Float64(Float64(Float64(Float64((t ^ 3.0) / Float64(l * l)) * sin(k)) * tan(k)) * Float64(Float64(1.0 + (Float64(k / t) ^ 2.0)) + 1.0)))
end
function tmp = code(t, l, k)
	tmp = 2.0 / (((((t ^ 3.0) / (l * l)) * sin(k)) * tan(k)) * ((1.0 + ((k / t) ^ 2.0)) + 1.0));
end
code[t_, l_, k_] := N[(2.0 / N[(N[(N[(N[(N[Power[t, 3.0], $MachinePrecision] / N[(l * l), $MachinePrecision]), $MachinePrecision] * N[Sin[k], $MachinePrecision]), $MachinePrecision] * N[Tan[k], $MachinePrecision]), $MachinePrecision] * N[(N[(1.0 + N[Power[N[(k / t), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}

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

Alternative 1: 88.7% accurate, 0.6× speedup?

\[\begin{array}{l} \\ \frac{2}{\mathsf{fma}\left({\left(\frac{k}{\ell}\right)}^{2}, \frac{{\sin k}^{2}}{\cos k}, \frac{\frac{{\left(\sin k \cdot t\right)}^{2} \cdot 2}{\cos k \cdot \ell}}{\ell}\right) \cdot t} \end{array} \]
(FPCore (t l k)
 :precision binary64
 (/
  2.0
  (*
   (fma
    (pow (/ k l) 2.0)
    (/ (pow (sin k) 2.0) (cos k))
    (/ (/ (* (pow (* (sin k) t) 2.0) 2.0) (* (cos k) l)) l))
   t)))
double code(double t, double l, double k) {
	return 2.0 / (fma(pow((k / l), 2.0), (pow(sin(k), 2.0) / cos(k)), (((pow((sin(k) * t), 2.0) * 2.0) / (cos(k) * l)) / l)) * t);
}
function code(t, l, k)
	return Float64(2.0 / Float64(fma((Float64(k / l) ^ 2.0), Float64((sin(k) ^ 2.0) / cos(k)), Float64(Float64(Float64((Float64(sin(k) * t) ^ 2.0) * 2.0) / Float64(cos(k) * l)) / l)) * t))
end
code[t_, l_, k_] := N[(2.0 / N[(N[(N[Power[N[(k / l), $MachinePrecision], 2.0], $MachinePrecision] * N[(N[Power[N[Sin[k], $MachinePrecision], 2.0], $MachinePrecision] / N[Cos[k], $MachinePrecision]), $MachinePrecision] + N[(N[(N[(N[Power[N[(N[Sin[k], $MachinePrecision] * t), $MachinePrecision], 2.0], $MachinePrecision] * 2.0), $MachinePrecision] / N[(N[Cos[k], $MachinePrecision] * l), $MachinePrecision]), $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision] * t), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}

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

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

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

      \[\leadsto \frac{2}{\frac{\mathsf{fma}\left(2, {\left(\sin k \cdot t\right)}^{2}, {\left(\sin k \cdot k\right)}^{2}\right)}{\cos k \cdot {\ell}^{\left(\mathsf{neg}\left(-2\right)\right)}} \cdot t} \]
    4. pow-negN/A

      \[\leadsto \frac{2}{\frac{\mathsf{fma}\left(2, {\left(\sin k \cdot t\right)}^{2}, {\left(\sin k \cdot k\right)}^{2}\right)}{\cos k \cdot \frac{1}{{\ell}^{-2}}} \cdot t} \]
    5. metadata-evalN/A

      \[\leadsto \frac{2}{\frac{\mathsf{fma}\left(2, {\left(\sin k \cdot t\right)}^{2}, {\left(\sin k \cdot k\right)}^{2}\right)}{\cos k \cdot \frac{1}{{\ell}^{\left(\mathsf{neg}\left(2\right)\right)}}} \cdot t} \]
    6. pow-flipN/A

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

      \[\leadsto \frac{2}{\frac{\mathsf{fma}\left(2, {\left(\sin k \cdot t\right)}^{2}, {\left(\sin k \cdot k\right)}^{2}\right)}{\cos k \cdot \frac{1}{\frac{1}{{\ell}^{2}}}} \cdot t} \]
    8. pow-flipN/A

      \[\leadsto \frac{2}{\frac{\mathsf{fma}\left(2, {\left(\sin k \cdot t\right)}^{2}, {\left(\sin k \cdot k\right)}^{2}\right)}{\cos k \cdot \frac{1}{{\ell}^{\left(\mathsf{neg}\left(2\right)\right)}}} \cdot t} \]
    9. metadata-evalN/A

      \[\leadsto \frac{2}{\frac{\mathsf{fma}\left(2, {\left(\sin k \cdot t\right)}^{2}, {\left(\sin k \cdot k\right)}^{2}\right)}{\cos k \cdot \frac{1}{{\ell}^{-2}}} \cdot t} \]
    10. lower-pow.f6473.8

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

    \[\leadsto \frac{2}{\frac{\mathsf{fma}\left(2, {\left(\sin k \cdot t\right)}^{2}, {\left(\sin k \cdot k\right)}^{2}\right)}{\cos k \cdot \frac{1}{{\ell}^{-2}}} \cdot t} \]
  8. Applied rewrites79.5%

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 2: 68.6% accurate, 0.4× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_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)}\\ \mathbf{if}\;t\_1 \leq -5 \cdot 10^{-250}:\\ \;\;\;\;\frac{2}{\frac{\left(\left(t \cdot t\right) \cdot 2\right) \cdot \left(k \cdot k\right)}{\cos k \cdot \left(\ell \cdot \ell\right)} \cdot t}\\ \mathbf{elif}\;t\_1 \leq 2 \cdot 10^{+303}:\\ \;\;\;\;\frac{2}{\left(\frac{{\left(k \cdot t\right)}^{2}}{\ell \cdot \ell} \cdot 2\right) \cdot t}\\ \mathbf{else}:\\ \;\;\;\;\frac{2}{{\left(\frac{k}{\ell}\right)}^{2} \cdot \left(\left(k \cdot k\right) \cdot t\right)}\\ \end{array} \end{array} \]
(FPCore (t l k)
 :precision binary64
 (let* ((t_1
         (/
          2.0
          (*
           (* (* (/ (pow t 3.0) (* l l)) (sin k)) (tan k))
           (+ (+ 1.0 (pow (/ k t) 2.0)) 1.0)))))
   (if (<= t_1 -5e-250)
     (/ 2.0 (* (/ (* (* (* t t) 2.0) (* k k)) (* (cos k) (* l l))) t))
     (if (<= t_1 2e+303)
       (/ 2.0 (* (* (/ (pow (* k t) 2.0) (* l l)) 2.0) t))
       (/ 2.0 (* (pow (/ k l) 2.0) (* (* k k) t)))))))
double code(double t, double l, double k) {
	double t_1 = 2.0 / ((((pow(t, 3.0) / (l * l)) * sin(k)) * tan(k)) * ((1.0 + pow((k / t), 2.0)) + 1.0));
	double tmp;
	if (t_1 <= -5e-250) {
		tmp = 2.0 / (((((t * t) * 2.0) * (k * k)) / (cos(k) * (l * l))) * t);
	} else if (t_1 <= 2e+303) {
		tmp = 2.0 / (((pow((k * t), 2.0) / (l * l)) * 2.0) * t);
	} else {
		tmp = 2.0 / (pow((k / l), 2.0) * ((k * k) * t));
	}
	return tmp;
}
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
    real(8) :: t_1
    real(8) :: tmp
    t_1 = 2.0d0 / (((((t ** 3.0d0) / (l * l)) * sin(k)) * tan(k)) * ((1.0d0 + ((k / t) ** 2.0d0)) + 1.0d0))
    if (t_1 <= (-5d-250)) then
        tmp = 2.0d0 / (((((t * t) * 2.0d0) * (k * k)) / (cos(k) * (l * l))) * t)
    else if (t_1 <= 2d+303) then
        tmp = 2.0d0 / (((((k * t) ** 2.0d0) / (l * l)) * 2.0d0) * t)
    else
        tmp = 2.0d0 / (((k / l) ** 2.0d0) * ((k * k) * t))
    end if
    code = tmp
end function
public static double code(double t, double l, double k) {
	double t_1 = 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));
	double tmp;
	if (t_1 <= -5e-250) {
		tmp = 2.0 / (((((t * t) * 2.0) * (k * k)) / (Math.cos(k) * (l * l))) * t);
	} else if (t_1 <= 2e+303) {
		tmp = 2.0 / (((Math.pow((k * t), 2.0) / (l * l)) * 2.0) * t);
	} else {
		tmp = 2.0 / (Math.pow((k / l), 2.0) * ((k * k) * t));
	}
	return tmp;
}
def code(t, l, k):
	t_1 = 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))
	tmp = 0
	if t_1 <= -5e-250:
		tmp = 2.0 / (((((t * t) * 2.0) * (k * k)) / (math.cos(k) * (l * l))) * t)
	elif t_1 <= 2e+303:
		tmp = 2.0 / (((math.pow((k * t), 2.0) / (l * l)) * 2.0) * t)
	else:
		tmp = 2.0 / (math.pow((k / l), 2.0) * ((k * k) * t))
	return tmp
function code(t, l, k)
	t_1 = 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)))
	tmp = 0.0
	if (t_1 <= -5e-250)
		tmp = Float64(2.0 / Float64(Float64(Float64(Float64(Float64(t * t) * 2.0) * Float64(k * k)) / Float64(cos(k) * Float64(l * l))) * t));
	elseif (t_1 <= 2e+303)
		tmp = Float64(2.0 / Float64(Float64(Float64((Float64(k * t) ^ 2.0) / Float64(l * l)) * 2.0) * t));
	else
		tmp = Float64(2.0 / Float64((Float64(k / l) ^ 2.0) * Float64(Float64(k * k) * t)));
	end
	return tmp
end
function tmp_2 = code(t, l, k)
	t_1 = 2.0 / (((((t ^ 3.0) / (l * l)) * sin(k)) * tan(k)) * ((1.0 + ((k / t) ^ 2.0)) + 1.0));
	tmp = 0.0;
	if (t_1 <= -5e-250)
		tmp = 2.0 / (((((t * t) * 2.0) * (k * k)) / (cos(k) * (l * l))) * t);
	elseif (t_1 <= 2e+303)
		tmp = 2.0 / (((((k * t) ^ 2.0) / (l * l)) * 2.0) * t);
	else
		tmp = 2.0 / (((k / l) ^ 2.0) * ((k * k) * t));
	end
	tmp_2 = tmp;
end
code[t_, l_, k_] := Block[{t$95$1 = 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]}, If[LessEqual[t$95$1, -5e-250], N[(2.0 / N[(N[(N[(N[(N[(t * t), $MachinePrecision] * 2.0), $MachinePrecision] * N[(k * k), $MachinePrecision]), $MachinePrecision] / N[(N[Cos[k], $MachinePrecision] * N[(l * l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * t), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, 2e+303], N[(2.0 / N[(N[(N[(N[Power[N[(k * t), $MachinePrecision], 2.0], $MachinePrecision] / N[(l * l), $MachinePrecision]), $MachinePrecision] * 2.0), $MachinePrecision] * t), $MachinePrecision]), $MachinePrecision], N[(2.0 / N[(N[Power[N[(k / l), $MachinePrecision], 2.0], $MachinePrecision] * N[(N[(k * k), $MachinePrecision] * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_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)}\\
\mathbf{if}\;t\_1 \leq -5 \cdot 10^{-250}:\\
\;\;\;\;\frac{2}{\frac{\left(\left(t \cdot t\right) \cdot 2\right) \cdot \left(k \cdot k\right)}{\cos k \cdot \left(\ell \cdot \ell\right)} \cdot t}\\

\mathbf{elif}\;t\_1 \leq 2 \cdot 10^{+303}:\\
\;\;\;\;\frac{2}{\left(\frac{{\left(k \cdot t\right)}^{2}}{\ell \cdot \ell} \cdot 2\right) \cdot t}\\

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


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

    1. Initial program 89.6%

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

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

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

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

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

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

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

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

      \[\leadsto \frac{2}{\frac{\mathsf{fma}\left(\mathsf{fma}\left(\mathsf{fma}\left(\mathsf{fma}\left(-0.006349206349206349, t \cdot t, 0.044444444444444446\right), k \cdot k, 0.08888888888888889 \cdot \left(t \cdot t\right)\right) - 0.3333333333333333, k \cdot k, -0.6666666666666666 \cdot \left(t \cdot t\right)\right) + 1, k \cdot k, \left(t \cdot t\right) \cdot 2\right) \cdot \left(k \cdot k\right)}{\cos k \cdot \left(\ell \cdot \ell\right)} \cdot t} \]
    9. Taylor expanded in k around 0

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

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

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

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

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

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

    if -5.00000000000000027e-250 < (/.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)))) < 2e303

    1. Initial program 79.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 rewrites88.1%

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

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

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

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

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

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

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

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

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

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

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

    if 2e303 < (/.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 21.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \frac{2}{\frac{k \cdot k}{\ell \cdot \ell} \cdot \frac{{\sin k}^{2} \cdot t}{\cos k}} \]
      13. lower-cos.f6455.7

        \[\leadsto \frac{2}{\frac{k \cdot k}{\ell \cdot \ell} \cdot \frac{{\sin k}^{2} \cdot t}{\cos k}} \]
    5. Applied rewrites55.7%

      \[\leadsto \frac{2}{\color{blue}{\frac{k \cdot k}{\ell \cdot \ell} \cdot \frac{{\sin k}^{2} \cdot t}{\cos k}}} \]
    6. Taylor expanded in k around 0

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 3: 68.6% accurate, 0.4× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_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)}\\ \mathbf{if}\;t\_1 \leq -5 \cdot 10^{-250}:\\ \;\;\;\;\frac{2}{\frac{\mathsf{fma}\left(\mathsf{fma}\left(\left(t \cdot t\right) \cdot 0.08888888888888889 - 0.3333333333333333, k \cdot k, -0.6666666666666666 \cdot \left(t \cdot t\right)\right) + 1, k \cdot k, \left(t \cdot t\right) \cdot 2\right) \cdot \left(k \cdot k\right)}{\mathsf{fma}\left(0.041666666666666664 \cdot \left(k \cdot k\right) - 0.5, k \cdot k, 1\right) \cdot \left(\ell \cdot \ell\right)} \cdot t}\\ \mathbf{elif}\;t\_1 \leq 2 \cdot 10^{+303}:\\ \;\;\;\;\frac{2}{\left(\frac{{\left(k \cdot t\right)}^{2}}{\ell \cdot \ell} \cdot 2\right) \cdot t}\\ \mathbf{else}:\\ \;\;\;\;\frac{2}{{\left(\frac{k}{\ell}\right)}^{2} \cdot \left(\left(k \cdot k\right) \cdot t\right)}\\ \end{array} \end{array} \]
(FPCore (t l k)
 :precision binary64
 (let* ((t_1
         (/
          2.0
          (*
           (* (* (/ (pow t 3.0) (* l l)) (sin k)) (tan k))
           (+ (+ 1.0 (pow (/ k t) 2.0)) 1.0)))))
   (if (<= t_1 -5e-250)
     (/
      2.0
      (*
       (/
        (*
         (fma
          (+
           (fma
            (- (* (* t t) 0.08888888888888889) 0.3333333333333333)
            (* k k)
            (* -0.6666666666666666 (* t t)))
           1.0)
          (* k k)
          (* (* t t) 2.0))
         (* k k))
        (* (fma (- (* 0.041666666666666664 (* k k)) 0.5) (* k k) 1.0) (* l l)))
       t))
     (if (<= t_1 2e+303)
       (/ 2.0 (* (* (/ (pow (* k t) 2.0) (* l l)) 2.0) t))
       (/ 2.0 (* (pow (/ k l) 2.0) (* (* k k) t)))))))
double code(double t, double l, double k) {
	double t_1 = 2.0 / ((((pow(t, 3.0) / (l * l)) * sin(k)) * tan(k)) * ((1.0 + pow((k / t), 2.0)) + 1.0));
	double tmp;
	if (t_1 <= -5e-250) {
		tmp = 2.0 / (((fma((fma((((t * t) * 0.08888888888888889) - 0.3333333333333333), (k * k), (-0.6666666666666666 * (t * t))) + 1.0), (k * k), ((t * t) * 2.0)) * (k * k)) / (fma(((0.041666666666666664 * (k * k)) - 0.5), (k * k), 1.0) * (l * l))) * t);
	} else if (t_1 <= 2e+303) {
		tmp = 2.0 / (((pow((k * t), 2.0) / (l * l)) * 2.0) * t);
	} else {
		tmp = 2.0 / (pow((k / l), 2.0) * ((k * k) * t));
	}
	return tmp;
}
function code(t, l, k)
	t_1 = 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)))
	tmp = 0.0
	if (t_1 <= -5e-250)
		tmp = Float64(2.0 / Float64(Float64(Float64(fma(Float64(fma(Float64(Float64(Float64(t * t) * 0.08888888888888889) - 0.3333333333333333), Float64(k * k), Float64(-0.6666666666666666 * Float64(t * t))) + 1.0), Float64(k * k), Float64(Float64(t * t) * 2.0)) * Float64(k * k)) / Float64(fma(Float64(Float64(0.041666666666666664 * Float64(k * k)) - 0.5), Float64(k * k), 1.0) * Float64(l * l))) * t));
	elseif (t_1 <= 2e+303)
		tmp = Float64(2.0 / Float64(Float64(Float64((Float64(k * t) ^ 2.0) / Float64(l * l)) * 2.0) * t));
	else
		tmp = Float64(2.0 / Float64((Float64(k / l) ^ 2.0) * Float64(Float64(k * k) * t)));
	end
	return tmp
end
code[t_, l_, k_] := Block[{t$95$1 = 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]}, If[LessEqual[t$95$1, -5e-250], N[(2.0 / N[(N[(N[(N[(N[(N[(N[(N[(N[(t * t), $MachinePrecision] * 0.08888888888888889), $MachinePrecision] - 0.3333333333333333), $MachinePrecision] * N[(k * k), $MachinePrecision] + N[(-0.6666666666666666 * N[(t * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + 1.0), $MachinePrecision] * N[(k * k), $MachinePrecision] + N[(N[(t * t), $MachinePrecision] * 2.0), $MachinePrecision]), $MachinePrecision] * N[(k * k), $MachinePrecision]), $MachinePrecision] / N[(N[(N[(N[(0.041666666666666664 * N[(k * k), $MachinePrecision]), $MachinePrecision] - 0.5), $MachinePrecision] * N[(k * k), $MachinePrecision] + 1.0), $MachinePrecision] * N[(l * l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * t), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, 2e+303], N[(2.0 / N[(N[(N[(N[Power[N[(k * t), $MachinePrecision], 2.0], $MachinePrecision] / N[(l * l), $MachinePrecision]), $MachinePrecision] * 2.0), $MachinePrecision] * t), $MachinePrecision]), $MachinePrecision], N[(2.0 / N[(N[Power[N[(k / l), $MachinePrecision], 2.0], $MachinePrecision] * N[(N[(k * k), $MachinePrecision] * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_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)}\\
\mathbf{if}\;t\_1 \leq -5 \cdot 10^{-250}:\\
\;\;\;\;\frac{2}{\frac{\mathsf{fma}\left(\mathsf{fma}\left(\left(t \cdot t\right) \cdot 0.08888888888888889 - 0.3333333333333333, k \cdot k, -0.6666666666666666 \cdot \left(t \cdot t\right)\right) + 1, k \cdot k, \left(t \cdot t\right) \cdot 2\right) \cdot \left(k \cdot k\right)}{\mathsf{fma}\left(0.041666666666666664 \cdot \left(k \cdot k\right) - 0.5, k \cdot k, 1\right) \cdot \left(\ell \cdot \ell\right)} \cdot t}\\

\mathbf{elif}\;t\_1 \leq 2 \cdot 10^{+303}:\\
\;\;\;\;\frac{2}{\left(\frac{{\left(k \cdot t\right)}^{2}}{\ell \cdot \ell} \cdot 2\right) \cdot t}\\

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


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

    1. Initial program 89.6%

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

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

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

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

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

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

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

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

      \[\leadsto \frac{2}{\frac{\mathsf{fma}\left(\mathsf{fma}\left(\mathsf{fma}\left(\mathsf{fma}\left(-0.006349206349206349, t \cdot t, 0.044444444444444446\right), k \cdot k, 0.08888888888888889 \cdot \left(t \cdot t\right)\right) - 0.3333333333333333, k \cdot k, -0.6666666666666666 \cdot \left(t \cdot t\right)\right) + 1, k \cdot k, \left(t \cdot t\right) \cdot 2\right) \cdot \left(k \cdot k\right)}{\cos k \cdot \left(\ell \cdot \ell\right)} \cdot t} \]
    9. Taylor expanded in k around 0

      \[\leadsto \frac{2}{\frac{\mathsf{fma}\left(\mathsf{fma}\left(\mathsf{fma}\left(\mathsf{fma}\left(\frac{-2}{315}, t \cdot t, \frac{2}{45}\right), k \cdot k, \frac{4}{45} \cdot \left(t \cdot t\right)\right) - \frac{1}{3}, k \cdot k, \frac{-2}{3} \cdot \left(t \cdot t\right)\right) + 1, k \cdot k, \left(t \cdot t\right) \cdot 2\right) \cdot \left(k \cdot k\right)}{\left(1 + {k}^{2} \cdot \left(\frac{1}{24} \cdot {k}^{2} - \frac{1}{2}\right)\right) \cdot \left(\ell \cdot \ell\right)} \cdot t} \]
    10. Step-by-step derivation
      1. +-commutativeN/A

        \[\leadsto \frac{2}{\frac{\mathsf{fma}\left(\mathsf{fma}\left(\mathsf{fma}\left(\mathsf{fma}\left(\frac{-2}{315}, t \cdot t, \frac{2}{45}\right), k \cdot k, \frac{4}{45} \cdot \left(t \cdot t\right)\right) - \frac{1}{3}, k \cdot k, \frac{-2}{3} \cdot \left(t \cdot t\right)\right) + 1, k \cdot k, \left(t \cdot t\right) \cdot 2\right) \cdot \left(k \cdot k\right)}{\left({k}^{2} \cdot \left(\frac{1}{24} \cdot {k}^{2} - \frac{1}{2}\right) + 1\right) \cdot \left(\ell \cdot \ell\right)} \cdot t} \]
      2. *-commutativeN/A

        \[\leadsto \frac{2}{\frac{\mathsf{fma}\left(\mathsf{fma}\left(\mathsf{fma}\left(\mathsf{fma}\left(\frac{-2}{315}, t \cdot t, \frac{2}{45}\right), k \cdot k, \frac{4}{45} \cdot \left(t \cdot t\right)\right) - \frac{1}{3}, k \cdot k, \frac{-2}{3} \cdot \left(t \cdot t\right)\right) + 1, k \cdot k, \left(t \cdot t\right) \cdot 2\right) \cdot \left(k \cdot k\right)}{\left(\left(\frac{1}{24} \cdot {k}^{2} - \frac{1}{2}\right) \cdot {k}^{2} + 1\right) \cdot \left(\ell \cdot \ell\right)} \cdot t} \]
      3. lower-fma.f64N/A

        \[\leadsto \frac{2}{\frac{\mathsf{fma}\left(\mathsf{fma}\left(\mathsf{fma}\left(\mathsf{fma}\left(\frac{-2}{315}, t \cdot t, \frac{2}{45}\right), k \cdot k, \frac{4}{45} \cdot \left(t \cdot t\right)\right) - \frac{1}{3}, k \cdot k, \frac{-2}{3} \cdot \left(t \cdot t\right)\right) + 1, k \cdot k, \left(t \cdot t\right) \cdot 2\right) \cdot \left(k \cdot k\right)}{\mathsf{fma}\left(\frac{1}{24} \cdot {k}^{2} - \frac{1}{2}, {k}^{2}, 1\right) \cdot \left(\ell \cdot \ell\right)} \cdot t} \]
      4. lower--.f64N/A

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

        \[\leadsto \frac{2}{\frac{\mathsf{fma}\left(\mathsf{fma}\left(\mathsf{fma}\left(\mathsf{fma}\left(\frac{-2}{315}, t \cdot t, \frac{2}{45}\right), k \cdot k, \frac{4}{45} \cdot \left(t \cdot t\right)\right) - \frac{1}{3}, k \cdot k, \frac{-2}{3} \cdot \left(t \cdot t\right)\right) + 1, k \cdot k, \left(t \cdot t\right) \cdot 2\right) \cdot \left(k \cdot k\right)}{\mathsf{fma}\left(\frac{1}{24} \cdot {k}^{2} - \frac{1}{2}, {k}^{2}, 1\right) \cdot \left(\ell \cdot \ell\right)} \cdot t} \]
      6. pow2N/A

        \[\leadsto \frac{2}{\frac{\mathsf{fma}\left(\mathsf{fma}\left(\mathsf{fma}\left(\mathsf{fma}\left(\frac{-2}{315}, t \cdot t, \frac{2}{45}\right), k \cdot k, \frac{4}{45} \cdot \left(t \cdot t\right)\right) - \frac{1}{3}, k \cdot k, \frac{-2}{3} \cdot \left(t \cdot t\right)\right) + 1, k \cdot k, \left(t \cdot t\right) \cdot 2\right) \cdot \left(k \cdot k\right)}{\mathsf{fma}\left(\frac{1}{24} \cdot \left(k \cdot k\right) - \frac{1}{2}, {k}^{2}, 1\right) \cdot \left(\ell \cdot \ell\right)} \cdot t} \]
      7. lift-*.f64N/A

        \[\leadsto \frac{2}{\frac{\mathsf{fma}\left(\mathsf{fma}\left(\mathsf{fma}\left(\mathsf{fma}\left(\frac{-2}{315}, t \cdot t, \frac{2}{45}\right), k \cdot k, \frac{4}{45} \cdot \left(t \cdot t\right)\right) - \frac{1}{3}, k \cdot k, \frac{-2}{3} \cdot \left(t \cdot t\right)\right) + 1, k \cdot k, \left(t \cdot t\right) \cdot 2\right) \cdot \left(k \cdot k\right)}{\mathsf{fma}\left(\frac{1}{24} \cdot \left(k \cdot k\right) - \frac{1}{2}, {k}^{2}, 1\right) \cdot \left(\ell \cdot \ell\right)} \cdot t} \]
      8. pow2N/A

        \[\leadsto \frac{2}{\frac{\mathsf{fma}\left(\mathsf{fma}\left(\mathsf{fma}\left(\mathsf{fma}\left(\frac{-2}{315}, t \cdot t, \frac{2}{45}\right), k \cdot k, \frac{4}{45} \cdot \left(t \cdot t\right)\right) - \frac{1}{3}, k \cdot k, \frac{-2}{3} \cdot \left(t \cdot t\right)\right) + 1, k \cdot k, \left(t \cdot t\right) \cdot 2\right) \cdot \left(k \cdot k\right)}{\mathsf{fma}\left(\frac{1}{24} \cdot \left(k \cdot k\right) - \frac{1}{2}, k \cdot k, 1\right) \cdot \left(\ell \cdot \ell\right)} \cdot t} \]
      9. lift-*.f6477.0

        \[\leadsto \frac{2}{\frac{\mathsf{fma}\left(\mathsf{fma}\left(\mathsf{fma}\left(\mathsf{fma}\left(-0.006349206349206349, t \cdot t, 0.044444444444444446\right), k \cdot k, 0.08888888888888889 \cdot \left(t \cdot t\right)\right) - 0.3333333333333333, k \cdot k, -0.6666666666666666 \cdot \left(t \cdot t\right)\right) + 1, k \cdot k, \left(t \cdot t\right) \cdot 2\right) \cdot \left(k \cdot k\right)}{\mathsf{fma}\left(0.041666666666666664 \cdot \left(k \cdot k\right) - 0.5, k \cdot k, 1\right) \cdot \left(\ell \cdot \ell\right)} \cdot t} \]
    11. Applied rewrites77.0%

      \[\leadsto \frac{2}{\frac{\mathsf{fma}\left(\mathsf{fma}\left(\mathsf{fma}\left(\mathsf{fma}\left(-0.006349206349206349, t \cdot t, 0.044444444444444446\right), k \cdot k, 0.08888888888888889 \cdot \left(t \cdot t\right)\right) - 0.3333333333333333, k \cdot k, -0.6666666666666666 \cdot \left(t \cdot t\right)\right) + 1, k \cdot k, \left(t \cdot t\right) \cdot 2\right) \cdot \left(k \cdot k\right)}{\mathsf{fma}\left(0.041666666666666664 \cdot \left(k \cdot k\right) - 0.5, k \cdot k, 1\right) \cdot \left(\ell \cdot \ell\right)} \cdot t} \]
    12. Taylor expanded in k around 0

      \[\leadsto \frac{2}{\frac{\mathsf{fma}\left(\mathsf{fma}\left(\frac{4}{45} \cdot {t}^{2} - \frac{1}{3}, k \cdot k, \frac{-2}{3} \cdot \left(t \cdot t\right)\right) + 1, k \cdot k, \left(t \cdot t\right) \cdot 2\right) \cdot \left(k \cdot k\right)}{\mathsf{fma}\left(\frac{1}{24} \cdot \left(k \cdot k\right) - \frac{1}{2}, k \cdot k, 1\right) \cdot \left(\ell \cdot \ell\right)} \cdot t} \]
    13. Step-by-step derivation
      1. *-commutativeN/A

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

        \[\leadsto \frac{2}{\frac{\mathsf{fma}\left(\mathsf{fma}\left({t}^{2} \cdot \frac{4}{45} - \frac{1}{3}, k \cdot k, \frac{-2}{3} \cdot \left(t \cdot t\right)\right) + 1, k \cdot k, \left(t \cdot t\right) \cdot 2\right) \cdot \left(k \cdot k\right)}{\mathsf{fma}\left(\frac{1}{24} \cdot \left(k \cdot k\right) - \frac{1}{2}, k \cdot k, 1\right) \cdot \left(\ell \cdot \ell\right)} \cdot t} \]
      3. pow2N/A

        \[\leadsto \frac{2}{\frac{\mathsf{fma}\left(\mathsf{fma}\left(\left(t \cdot t\right) \cdot \frac{4}{45} - \frac{1}{3}, k \cdot k, \frac{-2}{3} \cdot \left(t \cdot t\right)\right) + 1, k \cdot k, \left(t \cdot t\right) \cdot 2\right) \cdot \left(k \cdot k\right)}{\mathsf{fma}\left(\frac{1}{24} \cdot \left(k \cdot k\right) - \frac{1}{2}, k \cdot k, 1\right) \cdot \left(\ell \cdot \ell\right)} \cdot t} \]
      4. lift-*.f6476.6

        \[\leadsto \frac{2}{\frac{\mathsf{fma}\left(\mathsf{fma}\left(\left(t \cdot t\right) \cdot 0.08888888888888889 - 0.3333333333333333, k \cdot k, -0.6666666666666666 \cdot \left(t \cdot t\right)\right) + 1, k \cdot k, \left(t \cdot t\right) \cdot 2\right) \cdot \left(k \cdot k\right)}{\mathsf{fma}\left(0.041666666666666664 \cdot \left(k \cdot k\right) - 0.5, k \cdot k, 1\right) \cdot \left(\ell \cdot \ell\right)} \cdot t} \]
    14. Applied rewrites76.6%

      \[\leadsto \frac{2}{\frac{\mathsf{fma}\left(\mathsf{fma}\left(\left(t \cdot t\right) \cdot 0.08888888888888889 - 0.3333333333333333, k \cdot k, -0.6666666666666666 \cdot \left(t \cdot t\right)\right) + 1, k \cdot k, \left(t \cdot t\right) \cdot 2\right) \cdot \left(k \cdot k\right)}{\mathsf{fma}\left(0.041666666666666664 \cdot \left(k \cdot k\right) - 0.5, k \cdot k, 1\right) \cdot \left(\ell \cdot \ell\right)} \cdot t} \]

    if -5.00000000000000027e-250 < (/.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)))) < 2e303

    1. Initial program 79.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 rewrites88.1%

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

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

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

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

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

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

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

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

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

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

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

    if 2e303 < (/.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 21.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \frac{2}{\frac{k \cdot k}{\ell \cdot \ell} \cdot \frac{{\sin k}^{2} \cdot t}{\cos k}} \]
      13. lower-cos.f6455.7

        \[\leadsto \frac{2}{\frac{k \cdot k}{\ell \cdot \ell} \cdot \frac{{\sin k}^{2} \cdot t}{\cos k}} \]
    5. Applied rewrites55.7%

      \[\leadsto \frac{2}{\color{blue}{\frac{k \cdot k}{\ell \cdot \ell} \cdot \frac{{\sin k}^{2} \cdot t}{\cos k}}} \]
    6. Taylor expanded in k around 0

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 4: 83.7% accurate, 0.5× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;\frac{2}{\left(\left(\frac{{t}^{3}}{\ell \cdot \ell} \cdot \sin k\right) \cdot \tan k\right) \cdot \left(\left(1 + {\left(\frac{k}{t}\right)}^{2}\right) + 1\right)} \leq 2 \cdot 10^{+303}:\\ \;\;\;\;\frac{2}{\frac{\mathsf{fma}\left(2, {\left(\sin k \cdot t\right)}^{2}, {\left(\sin k \cdot k\right)}^{2}\right)}{\cos k \cdot \left(\ell \cdot \ell\right)} \cdot t}\\ \mathbf{else}:\\ \;\;\;\;\frac{2}{\frac{{\left(\frac{k}{\ell}\right)}^{2} \cdot \left({\sin k}^{2} \cdot t\right)}{\cos k}}\\ \end{array} \end{array} \]
(FPCore (t l k)
 :precision binary64
 (if (<=
      (/
       2.0
       (*
        (* (* (/ (pow t 3.0) (* l l)) (sin k)) (tan k))
        (+ (+ 1.0 (pow (/ k t) 2.0)) 1.0)))
      2e+303)
   (/
    2.0
    (*
     (/
      (fma 2.0 (pow (* (sin k) t) 2.0) (pow (* (sin k) k) 2.0))
      (* (cos k) (* l l)))
     t))
   (/ 2.0 (/ (* (pow (/ k l) 2.0) (* (pow (sin k) 2.0) t)) (cos k)))))
double code(double t, double l, double k) {
	double tmp;
	if ((2.0 / ((((pow(t, 3.0) / (l * l)) * sin(k)) * tan(k)) * ((1.0 + pow((k / t), 2.0)) + 1.0))) <= 2e+303) {
		tmp = 2.0 / ((fma(2.0, pow((sin(k) * t), 2.0), pow((sin(k) * k), 2.0)) / (cos(k) * (l * l))) * t);
	} else {
		tmp = 2.0 / ((pow((k / l), 2.0) * (pow(sin(k), 2.0) * t)) / cos(k));
	}
	return tmp;
}
function code(t, l, k)
	tmp = 0.0
	if (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))) <= 2e+303)
		tmp = Float64(2.0 / Float64(Float64(fma(2.0, (Float64(sin(k) * t) ^ 2.0), (Float64(sin(k) * k) ^ 2.0)) / Float64(cos(k) * Float64(l * l))) * t));
	else
		tmp = Float64(2.0 / Float64(Float64((Float64(k / l) ^ 2.0) * Float64((sin(k) ^ 2.0) * t)) / cos(k)));
	end
	return tmp
end
code[t_, l_, k_] := If[LessEqual[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], 2e+303], N[(2.0 / N[(N[(N[(2.0 * N[Power[N[(N[Sin[k], $MachinePrecision] * t), $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), $MachinePrecision]), $MachinePrecision], N[(2.0 / N[(N[(N[Power[N[(k / l), $MachinePrecision], 2.0], $MachinePrecision] * N[(N[Power[N[Sin[k], $MachinePrecision], 2.0], $MachinePrecision] * t), $MachinePrecision]), $MachinePrecision] / N[Cos[k], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;\frac{2}{\left(\left(\frac{{t}^{3}}{\ell \cdot \ell} \cdot \sin k\right) \cdot \tan k\right) \cdot \left(\left(1 + {\left(\frac{k}{t}\right)}^{2}\right) + 1\right)} \leq 2 \cdot 10^{+303}:\\
\;\;\;\;\frac{2}{\frac{\mathsf{fma}\left(2, {\left(\sin k \cdot t\right)}^{2}, {\left(\sin k \cdot k\right)}^{2}\right)}{\cos k \cdot \left(\ell \cdot \ell\right)} \cdot t}\\

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


\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)))) < 2e303

    1. Initial program 81.6%

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

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

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

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

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

    if 2e303 < (/.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 21.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \frac{2}{\frac{k \cdot k}{\ell \cdot \ell} \cdot \frac{{\sin k}^{2} \cdot t}{\cos k}} \]
      13. lower-cos.f6455.7

        \[\leadsto \frac{2}{\frac{k \cdot k}{\ell \cdot \ell} \cdot \frac{{\sin k}^{2} \cdot t}{\cos k}} \]
    5. Applied rewrites55.7%

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

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

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

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

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

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

        \[\leadsto \frac{2}{\frac{k \cdot k}{\ell \cdot \ell} \cdot \frac{{\sin k}^{2} \cdot t}{\cos k}} \]
      7. associate-*r/N/A

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

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

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

Alternative 5: 74.6% accurate, 0.6× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := {\left(\frac{k}{\ell}\right)}^{2}\\ t_2 := {\sin k}^{2}\\ \mathbf{if}\;t \leq 7.6 \cdot 10^{-70}:\\ \;\;\;\;\frac{2}{t\_1 \cdot \left(t\_2 \cdot \frac{t}{\cos k}\right)}\\ \mathbf{elif}\;t \leq 3.6 \cdot 10^{+208}:\\ \;\;\;\;\frac{2}{\mathsf{fma}\left(t\_1, \frac{t\_2}{\cos k}, \frac{{\left(\sin k \cdot t\right)}^{2} \cdot 2}{\left(\cos k \cdot \ell\right) \cdot \ell}\right) \cdot t}\\ \mathbf{else}:\\ \;\;\;\;\frac{2}{\left(\left(e^{\log t \cdot 3 - \log \ell \cdot 2} \cdot \sin k\right) \cdot \tan k\right) \cdot 2}\\ \end{array} \end{array} \]
(FPCore (t l k)
 :precision binary64
 (let* ((t_1 (pow (/ k l) 2.0)) (t_2 (pow (sin k) 2.0)))
   (if (<= t 7.6e-70)
     (/ 2.0 (* t_1 (* t_2 (/ t (cos k)))))
     (if (<= t 3.6e+208)
       (/
        2.0
        (*
         (fma
          t_1
          (/ t_2 (cos k))
          (/ (* (pow (* (sin k) t) 2.0) 2.0) (* (* (cos k) l) l)))
         t))
       (/
        2.0
        (*
         (* (* (exp (- (* (log t) 3.0) (* (log l) 2.0))) (sin k)) (tan k))
         2.0))))))
double code(double t, double l, double k) {
	double t_1 = pow((k / l), 2.0);
	double t_2 = pow(sin(k), 2.0);
	double tmp;
	if (t <= 7.6e-70) {
		tmp = 2.0 / (t_1 * (t_2 * (t / cos(k))));
	} else if (t <= 3.6e+208) {
		tmp = 2.0 / (fma(t_1, (t_2 / cos(k)), ((pow((sin(k) * t), 2.0) * 2.0) / ((cos(k) * l) * l))) * t);
	} else {
		tmp = 2.0 / (((exp(((log(t) * 3.0) - (log(l) * 2.0))) * sin(k)) * tan(k)) * 2.0);
	}
	return tmp;
}
function code(t, l, k)
	t_1 = Float64(k / l) ^ 2.0
	t_2 = sin(k) ^ 2.0
	tmp = 0.0
	if (t <= 7.6e-70)
		tmp = Float64(2.0 / Float64(t_1 * Float64(t_2 * Float64(t / cos(k)))));
	elseif (t <= 3.6e+208)
		tmp = Float64(2.0 / Float64(fma(t_1, Float64(t_2 / cos(k)), Float64(Float64((Float64(sin(k) * t) ^ 2.0) * 2.0) / Float64(Float64(cos(k) * l) * l))) * t));
	else
		tmp = Float64(2.0 / Float64(Float64(Float64(exp(Float64(Float64(log(t) * 3.0) - Float64(log(l) * 2.0))) * sin(k)) * tan(k)) * 2.0));
	end
	return tmp
end
code[t_, l_, k_] := Block[{t$95$1 = N[Power[N[(k / l), $MachinePrecision], 2.0], $MachinePrecision]}, Block[{t$95$2 = N[Power[N[Sin[k], $MachinePrecision], 2.0], $MachinePrecision]}, If[LessEqual[t, 7.6e-70], N[(2.0 / N[(t$95$1 * N[(t$95$2 * N[(t / N[Cos[k], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 3.6e+208], N[(2.0 / N[(N[(t$95$1 * N[(t$95$2 / N[Cos[k], $MachinePrecision]), $MachinePrecision] + N[(N[(N[Power[N[(N[Sin[k], $MachinePrecision] * t), $MachinePrecision], 2.0], $MachinePrecision] * 2.0), $MachinePrecision] / N[(N[(N[Cos[k], $MachinePrecision] * l), $MachinePrecision] * l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * t), $MachinePrecision]), $MachinePrecision], N[(2.0 / N[(N[(N[(N[Exp[N[(N[(N[Log[t], $MachinePrecision] * 3.0), $MachinePrecision] - N[(N[Log[l], $MachinePrecision] * 2.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[Sin[k], $MachinePrecision]), $MachinePrecision] * N[Tan[k], $MachinePrecision]), $MachinePrecision] * 2.0), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_1 := {\left(\frac{k}{\ell}\right)}^{2}\\
t_2 := {\sin k}^{2}\\
\mathbf{if}\;t \leq 7.6 \cdot 10^{-70}:\\
\;\;\;\;\frac{2}{t\_1 \cdot \left(t\_2 \cdot \frac{t}{\cos k}\right)}\\

\mathbf{elif}\;t \leq 3.6 \cdot 10^{+208}:\\
\;\;\;\;\frac{2}{\mathsf{fma}\left(t\_1, \frac{t\_2}{\cos k}, \frac{{\left(\sin k \cdot t\right)}^{2} \cdot 2}{\left(\cos k \cdot \ell\right) \cdot \ell}\right) \cdot t}\\

\mathbf{else}:\\
\;\;\;\;\frac{2}{\left(\left(e^{\log t \cdot 3 - \log \ell \cdot 2} \cdot \sin k\right) \cdot \tan k\right) \cdot 2}\\


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if t < 7.5999999999999995e-70

    1. Initial program 49.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \frac{2}{\frac{k \cdot k}{\ell \cdot \ell} \cdot \frac{{\sin k}^{2} \cdot t}{\cos k}} \]
      13. lower-cos.f6463.0

        \[\leadsto \frac{2}{\frac{k \cdot k}{\ell \cdot \ell} \cdot \frac{{\sin k}^{2} \cdot t}{\cos k}} \]
    5. Applied rewrites63.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \frac{2}{{\left(\frac{k}{\ell}\right)}^{2} \cdot \left({\sin k}^{2} \cdot \frac{t}{\color{blue}{\cos k}}\right)} \]
      18. lift-cos.f6475.1

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

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

    if 7.5999999999999995e-70 < t < 3.60000000000000003e208

    1. Initial program 67.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 rewrites75.1%

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

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

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

        \[\leadsto \frac{2}{\frac{\mathsf{fma}\left(2, {\left(\sin k \cdot t\right)}^{2}, {\left(\sin k \cdot k\right)}^{2}\right)}{\cos k \cdot {\ell}^{\left(\mathsf{neg}\left(-2\right)\right)}} \cdot t} \]
      4. pow-negN/A

        \[\leadsto \frac{2}{\frac{\mathsf{fma}\left(2, {\left(\sin k \cdot t\right)}^{2}, {\left(\sin k \cdot k\right)}^{2}\right)}{\cos k \cdot \frac{1}{{\ell}^{-2}}} \cdot t} \]
      5. metadata-evalN/A

        \[\leadsto \frac{2}{\frac{\mathsf{fma}\left(2, {\left(\sin k \cdot t\right)}^{2}, {\left(\sin k \cdot k\right)}^{2}\right)}{\cos k \cdot \frac{1}{{\ell}^{\left(\mathsf{neg}\left(2\right)\right)}}} \cdot t} \]
      6. pow-flipN/A

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

        \[\leadsto \frac{2}{\frac{\mathsf{fma}\left(2, {\left(\sin k \cdot t\right)}^{2}, {\left(\sin k \cdot k\right)}^{2}\right)}{\cos k \cdot \frac{1}{\frac{1}{{\ell}^{2}}}} \cdot t} \]
      8. pow-flipN/A

        \[\leadsto \frac{2}{\frac{\mathsf{fma}\left(2, {\left(\sin k \cdot t\right)}^{2}, {\left(\sin k \cdot k\right)}^{2}\right)}{\cos k \cdot \frac{1}{{\ell}^{\left(\mathsf{neg}\left(2\right)\right)}}} \cdot t} \]
      9. metadata-evalN/A

        \[\leadsto \frac{2}{\frac{\mathsf{fma}\left(2, {\left(\sin k \cdot t\right)}^{2}, {\left(\sin k \cdot k\right)}^{2}\right)}{\cos k \cdot \frac{1}{{\ell}^{-2}}} \cdot t} \]
      10. lower-pow.f6475.0

        \[\leadsto \frac{2}{\frac{\mathsf{fma}\left(2, {\left(\sin k \cdot t\right)}^{2}, {\left(\sin k \cdot k\right)}^{2}\right)}{\cos k \cdot \frac{1}{{\ell}^{-2}}} \cdot t} \]
    7. Applied rewrites75.0%

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

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

    if 3.60000000000000003e208 < t

    1. Initial program 69.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 inf

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    Alternative 6: 68.7% accurate, 0.6× speedup?

    \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;\frac{2}{\left(\left(\frac{{t}^{3}}{\ell \cdot \ell} \cdot \sin k\right) \cdot \tan k\right) \cdot \left(\left(1 + {\left(\frac{k}{t}\right)}^{2}\right) + 1\right)} \leq 2 \cdot 10^{+303}:\\ \;\;\;\;\frac{2}{\frac{{\left(k \cdot t\right)}^{2} \cdot 2}{\cos k \cdot \left(\ell \cdot \ell\right)} \cdot t}\\ \mathbf{else}:\\ \;\;\;\;\frac{2}{{\left(\frac{k}{\ell}\right)}^{2} \cdot \left(\left(k \cdot k\right) \cdot t\right)}\\ \end{array} \end{array} \]
    (FPCore (t l k)
     :precision binary64
     (if (<=
          (/
           2.0
           (*
            (* (* (/ (pow t 3.0) (* l l)) (sin k)) (tan k))
            (+ (+ 1.0 (pow (/ k t) 2.0)) 1.0)))
          2e+303)
       (/ 2.0 (* (/ (* (pow (* k t) 2.0) 2.0) (* (cos k) (* l l))) t))
       (/ 2.0 (* (pow (/ k l) 2.0) (* (* k k) t)))))
    double code(double t, double l, double k) {
    	double tmp;
    	if ((2.0 / ((((pow(t, 3.0) / (l * l)) * sin(k)) * tan(k)) * ((1.0 + pow((k / t), 2.0)) + 1.0))) <= 2e+303) {
    		tmp = 2.0 / (((pow((k * t), 2.0) * 2.0) / (cos(k) * (l * l))) * t);
    	} else {
    		tmp = 2.0 / (pow((k / l), 2.0) * ((k * k) * t));
    	}
    	return tmp;
    }
    
    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
        real(8) :: tmp
        if ((2.0d0 / (((((t ** 3.0d0) / (l * l)) * sin(k)) * tan(k)) * ((1.0d0 + ((k / t) ** 2.0d0)) + 1.0d0))) <= 2d+303) then
            tmp = 2.0d0 / (((((k * t) ** 2.0d0) * 2.0d0) / (cos(k) * (l * l))) * t)
        else
            tmp = 2.0d0 / (((k / l) ** 2.0d0) * ((k * k) * t))
        end if
        code = tmp
    end function
    
    public static double code(double t, double l, double k) {
    	double tmp;
    	if ((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))) <= 2e+303) {
    		tmp = 2.0 / (((Math.pow((k * t), 2.0) * 2.0) / (Math.cos(k) * (l * l))) * t);
    	} else {
    		tmp = 2.0 / (Math.pow((k / l), 2.0) * ((k * k) * t));
    	}
    	return tmp;
    }
    
    def code(t, l, k):
    	tmp = 0
    	if (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))) <= 2e+303:
    		tmp = 2.0 / (((math.pow((k * t), 2.0) * 2.0) / (math.cos(k) * (l * l))) * t)
    	else:
    		tmp = 2.0 / (math.pow((k / l), 2.0) * ((k * k) * t))
    	return tmp
    
    function code(t, l, k)
    	tmp = 0.0
    	if (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))) <= 2e+303)
    		tmp = Float64(2.0 / Float64(Float64(Float64((Float64(k * t) ^ 2.0) * 2.0) / Float64(cos(k) * Float64(l * l))) * t));
    	else
    		tmp = Float64(2.0 / Float64((Float64(k / l) ^ 2.0) * Float64(Float64(k * k) * t)));
    	end
    	return tmp
    end
    
    function tmp_2 = code(t, l, k)
    	tmp = 0.0;
    	if ((2.0 / (((((t ^ 3.0) / (l * l)) * sin(k)) * tan(k)) * ((1.0 + ((k / t) ^ 2.0)) + 1.0))) <= 2e+303)
    		tmp = 2.0 / (((((k * t) ^ 2.0) * 2.0) / (cos(k) * (l * l))) * t);
    	else
    		tmp = 2.0 / (((k / l) ^ 2.0) * ((k * k) * t));
    	end
    	tmp_2 = tmp;
    end
    
    code[t_, l_, k_] := If[LessEqual[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], 2e+303], N[(2.0 / N[(N[(N[(N[Power[N[(k * t), $MachinePrecision], 2.0], $MachinePrecision] * 2.0), $MachinePrecision] / N[(N[Cos[k], $MachinePrecision] * N[(l * l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * t), $MachinePrecision]), $MachinePrecision], N[(2.0 / N[(N[Power[N[(k / l), $MachinePrecision], 2.0], $MachinePrecision] * N[(N[(k * k), $MachinePrecision] * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
    
    \begin{array}{l}
    
    \\
    \begin{array}{l}
    \mathbf{if}\;\frac{2}{\left(\left(\frac{{t}^{3}}{\ell \cdot \ell} \cdot \sin k\right) \cdot \tan k\right) \cdot \left(\left(1 + {\left(\frac{k}{t}\right)}^{2}\right) + 1\right)} \leq 2 \cdot 10^{+303}:\\
    \;\;\;\;\frac{2}{\frac{{\left(k \cdot t\right)}^{2} \cdot 2}{\cos k \cdot \left(\ell \cdot \ell\right)} \cdot t}\\
    
    \mathbf{else}:\\
    \;\;\;\;\frac{2}{{\left(\frac{k}{\ell}\right)}^{2} \cdot \left(\left(k \cdot k\right) \cdot t\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)))) < 2e303

      1. Initial program 81.6%

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

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

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

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

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

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

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

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

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

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

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

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

      if 2e303 < (/.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 21.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

          \[\leadsto \frac{2}{\frac{k \cdot k}{\ell \cdot \ell} \cdot \frac{{\sin k}^{2} \cdot t}{\cos k}} \]
        13. lower-cos.f6455.7

          \[\leadsto \frac{2}{\frac{k \cdot k}{\ell \cdot \ell} \cdot \frac{{\sin k}^{2} \cdot t}{\cos k}} \]
      5. Applied rewrites55.7%

        \[\leadsto \frac{2}{\color{blue}{\frac{k \cdot k}{\ell \cdot \ell} \cdot \frac{{\sin k}^{2} \cdot t}{\cos k}}} \]
      6. Taylor expanded in k around 0

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

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

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

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

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

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

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

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

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

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

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

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

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

    Alternative 7: 68.2% accurate, 0.7× speedup?

    \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;t \leq 5.5 \cdot 10^{+15}:\\ \;\;\;\;\frac{2}{\frac{{\left(\frac{k}{\ell}\right)}^{2} \cdot \left({\sin k}^{2} \cdot t\right)}{\cos k}}\\ \mathbf{else}:\\ \;\;\;\;\frac{2}{\left(\left(e^{\log t \cdot 3 - \log \ell \cdot 2} \cdot \sin k\right) \cdot \tan k\right) \cdot \left(\left(1 + {\left(\frac{k}{t}\right)}^{2}\right) + 1\right)}\\ \end{array} \end{array} \]
    (FPCore (t l k)
     :precision binary64
     (if (<= t 5.5e+15)
       (/ 2.0 (/ (* (pow (/ k l) 2.0) (* (pow (sin k) 2.0) t)) (cos k)))
       (/
        2.0
        (*
         (* (* (exp (- (* (log t) 3.0) (* (log l) 2.0))) (sin k)) (tan k))
         (+ (+ 1.0 (pow (/ k t) 2.0)) 1.0)))))
    double code(double t, double l, double k) {
    	double tmp;
    	if (t <= 5.5e+15) {
    		tmp = 2.0 / ((pow((k / l), 2.0) * (pow(sin(k), 2.0) * t)) / cos(k));
    	} else {
    		tmp = 2.0 / (((exp(((log(t) * 3.0) - (log(l) * 2.0))) * sin(k)) * tan(k)) * ((1.0 + pow((k / t), 2.0)) + 1.0));
    	}
    	return tmp;
    }
    
    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
        real(8) :: tmp
        if (t <= 5.5d+15) then
            tmp = 2.0d0 / ((((k / l) ** 2.0d0) * ((sin(k) ** 2.0d0) * t)) / cos(k))
        else
            tmp = 2.0d0 / (((exp(((log(t) * 3.0d0) - (log(l) * 2.0d0))) * sin(k)) * tan(k)) * ((1.0d0 + ((k / t) ** 2.0d0)) + 1.0d0))
        end if
        code = tmp
    end function
    
    public static double code(double t, double l, double k) {
    	double tmp;
    	if (t <= 5.5e+15) {
    		tmp = 2.0 / ((Math.pow((k / l), 2.0) * (Math.pow(Math.sin(k), 2.0) * t)) / Math.cos(k));
    	} else {
    		tmp = 2.0 / (((Math.exp(((Math.log(t) * 3.0) - (Math.log(l) * 2.0))) * Math.sin(k)) * Math.tan(k)) * ((1.0 + Math.pow((k / t), 2.0)) + 1.0));
    	}
    	return tmp;
    }
    
    def code(t, l, k):
    	tmp = 0
    	if t <= 5.5e+15:
    		tmp = 2.0 / ((math.pow((k / l), 2.0) * (math.pow(math.sin(k), 2.0) * t)) / math.cos(k))
    	else:
    		tmp = 2.0 / (((math.exp(((math.log(t) * 3.0) - (math.log(l) * 2.0))) * math.sin(k)) * math.tan(k)) * ((1.0 + math.pow((k / t), 2.0)) + 1.0))
    	return tmp
    
    function code(t, l, k)
    	tmp = 0.0
    	if (t <= 5.5e+15)
    		tmp = Float64(2.0 / Float64(Float64((Float64(k / l) ^ 2.0) * Float64((sin(k) ^ 2.0) * t)) / cos(k)));
    	else
    		tmp = Float64(2.0 / Float64(Float64(Float64(exp(Float64(Float64(log(t) * 3.0) - Float64(log(l) * 2.0))) * sin(k)) * tan(k)) * Float64(Float64(1.0 + (Float64(k / t) ^ 2.0)) + 1.0)));
    	end
    	return tmp
    end
    
    function tmp_2 = code(t, l, k)
    	tmp = 0.0;
    	if (t <= 5.5e+15)
    		tmp = 2.0 / ((((k / l) ^ 2.0) * ((sin(k) ^ 2.0) * t)) / cos(k));
    	else
    		tmp = 2.0 / (((exp(((log(t) * 3.0) - (log(l) * 2.0))) * sin(k)) * tan(k)) * ((1.0 + ((k / t) ^ 2.0)) + 1.0));
    	end
    	tmp_2 = tmp;
    end
    
    code[t_, l_, k_] := If[LessEqual[t, 5.5e+15], N[(2.0 / N[(N[(N[Power[N[(k / l), $MachinePrecision], 2.0], $MachinePrecision] * N[(N[Power[N[Sin[k], $MachinePrecision], 2.0], $MachinePrecision] * t), $MachinePrecision]), $MachinePrecision] / N[Cos[k], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(2.0 / N[(N[(N[(N[Exp[N[(N[(N[Log[t], $MachinePrecision] * 3.0), $MachinePrecision] - N[(N[Log[l], $MachinePrecision] * 2.0), $MachinePrecision]), $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}
    
    \\
    \begin{array}{l}
    \mathbf{if}\;t \leq 5.5 \cdot 10^{+15}:\\
    \;\;\;\;\frac{2}{\frac{{\left(\frac{k}{\ell}\right)}^{2} \cdot \left({\sin k}^{2} \cdot t\right)}{\cos k}}\\
    
    \mathbf{else}:\\
    \;\;\;\;\frac{2}{\left(\left(e^{\log t \cdot 3 - \log \ell \cdot 2} \cdot \sin k\right) \cdot \tan k\right) \cdot \left(\left(1 + {\left(\frac{k}{t}\right)}^{2}\right) + 1\right)}\\
    
    
    \end{array}
    \end{array}
    
    Derivation
    1. Split input into 2 regimes
    2. if t < 5.5e15

      1. Initial program 51.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

          \[\leadsto \frac{2}{\frac{k \cdot k}{\ell \cdot \ell} \cdot \frac{{\sin k}^{2} \cdot t}{\cos k}} \]
        13. lower-cos.f6463.9

          \[\leadsto \frac{2}{\frac{k \cdot k}{\ell \cdot \ell} \cdot \frac{{\sin k}^{2} \cdot t}{\cos k}} \]
      5. Applied rewrites63.9%

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

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

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

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

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

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

          \[\leadsto \frac{2}{\frac{k \cdot k}{\ell \cdot \ell} \cdot \frac{{\sin k}^{2} \cdot t}{\cos k}} \]
        7. associate-*r/N/A

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

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

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

      if 5.5e15 < t

      1. Initial program 65.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    Alternative 8: 58.3% accurate, 0.9× speedup?

    \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;\frac{2}{\left(\left(\frac{{t}^{3}}{\ell \cdot \ell} \cdot \sin k\right) \cdot \tan k\right) \cdot \left(\left(1 + {\left(\frac{k}{t}\right)}^{2}\right) + 1\right)} \leq 2 \cdot 10^{+303}:\\ \;\;\;\;\frac{\ell \cdot \ell}{\left(k \cdot k\right) \cdot \left(\left(t \cdot t\right) \cdot t\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{2}{\frac{k \cdot k}{\ell \cdot \ell} \cdot \left(k \cdot \left(k \cdot t\right)\right)}\\ \end{array} \end{array} \]
    (FPCore (t l k)
     :precision binary64
     (if (<=
          (/
           2.0
           (*
            (* (* (/ (pow t 3.0) (* l l)) (sin k)) (tan k))
            (+ (+ 1.0 (pow (/ k t) 2.0)) 1.0)))
          2e+303)
       (/ (* l l) (* (* k k) (* (* t t) t)))
       (/ 2.0 (* (/ (* k k) (* l l)) (* k (* k t))))))
    double code(double t, double l, double k) {
    	double tmp;
    	if ((2.0 / ((((pow(t, 3.0) / (l * l)) * sin(k)) * tan(k)) * ((1.0 + pow((k / t), 2.0)) + 1.0))) <= 2e+303) {
    		tmp = (l * l) / ((k * k) * ((t * t) * t));
    	} else {
    		tmp = 2.0 / (((k * k) / (l * l)) * (k * (k * t)));
    	}
    	return tmp;
    }
    
    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
        real(8) :: tmp
        if ((2.0d0 / (((((t ** 3.0d0) / (l * l)) * sin(k)) * tan(k)) * ((1.0d0 + ((k / t) ** 2.0d0)) + 1.0d0))) <= 2d+303) then
            tmp = (l * l) / ((k * k) * ((t * t) * t))
        else
            tmp = 2.0d0 / (((k * k) / (l * l)) * (k * (k * t)))
        end if
        code = tmp
    end function
    
    public static double code(double t, double l, double k) {
    	double tmp;
    	if ((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))) <= 2e+303) {
    		tmp = (l * l) / ((k * k) * ((t * t) * t));
    	} else {
    		tmp = 2.0 / (((k * k) / (l * l)) * (k * (k * t)));
    	}
    	return tmp;
    }
    
    def code(t, l, k):
    	tmp = 0
    	if (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))) <= 2e+303:
    		tmp = (l * l) / ((k * k) * ((t * t) * t))
    	else:
    		tmp = 2.0 / (((k * k) / (l * l)) * (k * (k * t)))
    	return tmp
    
    function code(t, l, k)
    	tmp = 0.0
    	if (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))) <= 2e+303)
    		tmp = Float64(Float64(l * l) / Float64(Float64(k * k) * Float64(Float64(t * t) * t)));
    	else
    		tmp = Float64(2.0 / Float64(Float64(Float64(k * k) / Float64(l * l)) * Float64(k * Float64(k * t))));
    	end
    	return tmp
    end
    
    function tmp_2 = code(t, l, k)
    	tmp = 0.0;
    	if ((2.0 / (((((t ^ 3.0) / (l * l)) * sin(k)) * tan(k)) * ((1.0 + ((k / t) ^ 2.0)) + 1.0))) <= 2e+303)
    		tmp = (l * l) / ((k * k) * ((t * t) * t));
    	else
    		tmp = 2.0 / (((k * k) / (l * l)) * (k * (k * t)));
    	end
    	tmp_2 = tmp;
    end
    
    code[t_, l_, k_] := If[LessEqual[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], 2e+303], N[(N[(l * l), $MachinePrecision] / N[(N[(k * k), $MachinePrecision] * N[(N[(t * t), $MachinePrecision] * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(2.0 / N[(N[(N[(k * k), $MachinePrecision] / N[(l * l), $MachinePrecision]), $MachinePrecision] * N[(k * N[(k * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
    
    \begin{array}{l}
    
    \\
    \begin{array}{l}
    \mathbf{if}\;\frac{2}{\left(\left(\frac{{t}^{3}}{\ell \cdot \ell} \cdot \sin k\right) \cdot \tan k\right) \cdot \left(\left(1 + {\left(\frac{k}{t}\right)}^{2}\right) + 1\right)} \leq 2 \cdot 10^{+303}:\\
    \;\;\;\;\frac{\ell \cdot \ell}{\left(k \cdot k\right) \cdot \left(\left(t \cdot t\right) \cdot t\right)}\\
    
    \mathbf{else}:\\
    \;\;\;\;\frac{2}{\frac{k \cdot k}{\ell \cdot \ell} \cdot \left(k \cdot \left(k \cdot t\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)))) < 2e303

      1. Initial program 81.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      if 2e303 < (/.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 21.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

          \[\leadsto \frac{2}{\frac{k \cdot k}{\ell \cdot \ell} \cdot \frac{{\sin k}^{2} \cdot t}{\cos k}} \]
        13. lower-cos.f6455.7

          \[\leadsto \frac{2}{\frac{k \cdot k}{\ell \cdot \ell} \cdot \frac{{\sin k}^{2} \cdot t}{\cos k}} \]
      5. Applied rewrites55.7%

        \[\leadsto \frac{2}{\color{blue}{\frac{k \cdot k}{\ell \cdot \ell} \cdot \frac{{\sin k}^{2} \cdot t}{\cos k}}} \]
      6. Taylor expanded in k around 0

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

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

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

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

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

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

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

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

          \[\leadsto \frac{2}{\frac{k \cdot k}{\ell \cdot \ell} \cdot \left(k \cdot \left(k \cdot \color{blue}{t}\right)\right)} \]
        5. lower-*.f6445.5

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

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

    Alternative 9: 74.8% accurate, 1.0× speedup?

    \[\begin{array}{l} \\ \begin{array}{l} t_1 := {\sin k}^{2}\\ \mathbf{if}\;k \leq 26500:\\ \;\;\;\;\frac{2}{\frac{\mathsf{fma}\left(2, {\left(\sin k \cdot t\right)}^{2}, {k}^{4}\right)}{\cos k \cdot \left(\ell \cdot \ell\right)} \cdot t}\\ \mathbf{elif}\;k \leq 9.2 \cdot 10^{+157}:\\ \;\;\;\;\frac{2}{\frac{\frac{\left(\left(k \cdot k\right) \cdot t\right) \cdot t\_1}{\cos k \cdot \ell}}{\ell}}\\ \mathbf{else}:\\ \;\;\;\;\frac{2}{\frac{{\left(\frac{k}{\ell}\right)}^{2} \cdot \left(t\_1 \cdot t\right)}{\cos k}}\\ \end{array} \end{array} \]
    (FPCore (t l k)
     :precision binary64
     (let* ((t_1 (pow (sin k) 2.0)))
       (if (<= k 26500.0)
         (/
          2.0
          (*
           (/ (fma 2.0 (pow (* (sin k) t) 2.0) (pow k 4.0)) (* (cos k) (* l l)))
           t))
         (if (<= k 9.2e+157)
           (/ 2.0 (/ (/ (* (* (* k k) t) t_1) (* (cos k) l)) l))
           (/ 2.0 (/ (* (pow (/ k l) 2.0) (* t_1 t)) (cos k)))))))
    double code(double t, double l, double k) {
    	double t_1 = pow(sin(k), 2.0);
    	double tmp;
    	if (k <= 26500.0) {
    		tmp = 2.0 / ((fma(2.0, pow((sin(k) * t), 2.0), pow(k, 4.0)) / (cos(k) * (l * l))) * t);
    	} else if (k <= 9.2e+157) {
    		tmp = 2.0 / (((((k * k) * t) * t_1) / (cos(k) * l)) / l);
    	} else {
    		tmp = 2.0 / ((pow((k / l), 2.0) * (t_1 * t)) / cos(k));
    	}
    	return tmp;
    }
    
    function code(t, l, k)
    	t_1 = sin(k) ^ 2.0
    	tmp = 0.0
    	if (k <= 26500.0)
    		tmp = Float64(2.0 / Float64(Float64(fma(2.0, (Float64(sin(k) * t) ^ 2.0), (k ^ 4.0)) / Float64(cos(k) * Float64(l * l))) * t));
    	elseif (k <= 9.2e+157)
    		tmp = Float64(2.0 / Float64(Float64(Float64(Float64(Float64(k * k) * t) * t_1) / Float64(cos(k) * l)) / l));
    	else
    		tmp = Float64(2.0 / Float64(Float64((Float64(k / l) ^ 2.0) * Float64(t_1 * t)) / cos(k)));
    	end
    	return tmp
    end
    
    code[t_, l_, k_] := Block[{t$95$1 = N[Power[N[Sin[k], $MachinePrecision], 2.0], $MachinePrecision]}, If[LessEqual[k, 26500.0], N[(2.0 / N[(N[(N[(2.0 * N[Power[N[(N[Sin[k], $MachinePrecision] * t), $MachinePrecision], 2.0], $MachinePrecision] + N[Power[k, 4.0], $MachinePrecision]), $MachinePrecision] / N[(N[Cos[k], $MachinePrecision] * N[(l * l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * t), $MachinePrecision]), $MachinePrecision], If[LessEqual[k, 9.2e+157], N[(2.0 / N[(N[(N[(N[(N[(k * k), $MachinePrecision] * t), $MachinePrecision] * t$95$1), $MachinePrecision] / N[(N[Cos[k], $MachinePrecision] * l), $MachinePrecision]), $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision], N[(2.0 / N[(N[(N[Power[N[(k / l), $MachinePrecision], 2.0], $MachinePrecision] * N[(t$95$1 * t), $MachinePrecision]), $MachinePrecision] / N[Cos[k], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
    
    \begin{array}{l}
    
    \\
    \begin{array}{l}
    t_1 := {\sin k}^{2}\\
    \mathbf{if}\;k \leq 26500:\\
    \;\;\;\;\frac{2}{\frac{\mathsf{fma}\left(2, {\left(\sin k \cdot t\right)}^{2}, {k}^{4}\right)}{\cos k \cdot \left(\ell \cdot \ell\right)} \cdot t}\\
    
    \mathbf{elif}\;k \leq 9.2 \cdot 10^{+157}:\\
    \;\;\;\;\frac{2}{\frac{\frac{\left(\left(k \cdot k\right) \cdot t\right) \cdot t\_1}{\cos k \cdot \ell}}{\ell}}\\
    
    \mathbf{else}:\\
    \;\;\;\;\frac{2}{\frac{{\left(\frac{k}{\ell}\right)}^{2} \cdot \left(t\_1 \cdot t\right)}{\cos k}}\\
    
    
    \end{array}
    \end{array}
    
    Derivation
    1. Split input into 3 regimes
    2. if k < 26500

      1. Initial program 57.3%

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

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

        \[\leadsto \frac{2}{\frac{\mathsf{fma}\left(2, {\left(\sin k \cdot t\right)}^{2}, {k}^{4}\right)}{\cos k \cdot \left(\ell \cdot \ell\right)} \cdot t} \]
      7. Step-by-step derivation
        1. lower-pow.f6470.4

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

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

      if 26500 < k < 9.20000000000000015e157

      1. Initial program 48.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

          \[\leadsto \frac{2}{\frac{k \cdot k}{\ell \cdot \ell} \cdot \frac{{\sin k}^{2} \cdot t}{\cos k}} \]
      5. Applied rewrites72.8%

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

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

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

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

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

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

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

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

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

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

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

          \[\leadsto \frac{2}{\frac{{k}^{2}}{{\ell}^{2}} \cdot \frac{{\sin k}^{2} \cdot t}{\cos k}} \]
        12. frac-timesN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

          \[\leadsto \frac{2}{\frac{k \cdot k}{\ell \cdot \ell} \cdot \frac{{\sin k}^{2} \cdot t}{\cos k}} \]
        13. lower-cos.f6462.4

          \[\leadsto \frac{2}{\frac{k \cdot k}{\ell \cdot \ell} \cdot \frac{{\sin k}^{2} \cdot t}{\cos k}} \]
      5. Applied rewrites62.4%

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

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

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

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

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

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

          \[\leadsto \frac{2}{\frac{k \cdot k}{\ell \cdot \ell} \cdot \frac{{\sin k}^{2} \cdot t}{\cos k}} \]
        7. associate-*r/N/A

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

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

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

    Alternative 10: 73.5% accurate, 1.0× speedup?

    \[\begin{array}{l} \\ \begin{array}{l} t_1 := {\sin k}^{2}\\ \mathbf{if}\;k \leq 12500:\\ \;\;\;\;\frac{2}{\frac{{\left(k \cdot t\right)}^{2} \cdot 2}{\cos k \cdot \left(\ell \cdot \ell\right)} \cdot t}\\ \mathbf{elif}\;k \leq 9.2 \cdot 10^{+157}:\\ \;\;\;\;\frac{2}{\frac{\frac{\left(\left(k \cdot k\right) \cdot t\right) \cdot t\_1}{\cos k \cdot \ell}}{\ell}}\\ \mathbf{else}:\\ \;\;\;\;\frac{2}{\frac{{\left(\frac{k}{\ell}\right)}^{2} \cdot \left(t\_1 \cdot t\right)}{\cos k}}\\ \end{array} \end{array} \]
    (FPCore (t l k)
     :precision binary64
     (let* ((t_1 (pow (sin k) 2.0)))
       (if (<= k 12500.0)
         (/ 2.0 (* (/ (* (pow (* k t) 2.0) 2.0) (* (cos k) (* l l))) t))
         (if (<= k 9.2e+157)
           (/ 2.0 (/ (/ (* (* (* k k) t) t_1) (* (cos k) l)) l))
           (/ 2.0 (/ (* (pow (/ k l) 2.0) (* t_1 t)) (cos k)))))))
    double code(double t, double l, double k) {
    	double t_1 = pow(sin(k), 2.0);
    	double tmp;
    	if (k <= 12500.0) {
    		tmp = 2.0 / (((pow((k * t), 2.0) * 2.0) / (cos(k) * (l * l))) * t);
    	} else if (k <= 9.2e+157) {
    		tmp = 2.0 / (((((k * k) * t) * t_1) / (cos(k) * l)) / l);
    	} else {
    		tmp = 2.0 / ((pow((k / l), 2.0) * (t_1 * t)) / cos(k));
    	}
    	return tmp;
    }
    
    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
        real(8) :: t_1
        real(8) :: tmp
        t_1 = sin(k) ** 2.0d0
        if (k <= 12500.0d0) then
            tmp = 2.0d0 / (((((k * t) ** 2.0d0) * 2.0d0) / (cos(k) * (l * l))) * t)
        else if (k <= 9.2d+157) then
            tmp = 2.0d0 / (((((k * k) * t) * t_1) / (cos(k) * l)) / l)
        else
            tmp = 2.0d0 / ((((k / l) ** 2.0d0) * (t_1 * t)) / cos(k))
        end if
        code = tmp
    end function
    
    public static double code(double t, double l, double k) {
    	double t_1 = Math.pow(Math.sin(k), 2.0);
    	double tmp;
    	if (k <= 12500.0) {
    		tmp = 2.0 / (((Math.pow((k * t), 2.0) * 2.0) / (Math.cos(k) * (l * l))) * t);
    	} else if (k <= 9.2e+157) {
    		tmp = 2.0 / (((((k * k) * t) * t_1) / (Math.cos(k) * l)) / l);
    	} else {
    		tmp = 2.0 / ((Math.pow((k / l), 2.0) * (t_1 * t)) / Math.cos(k));
    	}
    	return tmp;
    }
    
    def code(t, l, k):
    	t_1 = math.pow(math.sin(k), 2.0)
    	tmp = 0
    	if k <= 12500.0:
    		tmp = 2.0 / (((math.pow((k * t), 2.0) * 2.0) / (math.cos(k) * (l * l))) * t)
    	elif k <= 9.2e+157:
    		tmp = 2.0 / (((((k * k) * t) * t_1) / (math.cos(k) * l)) / l)
    	else:
    		tmp = 2.0 / ((math.pow((k / l), 2.0) * (t_1 * t)) / math.cos(k))
    	return tmp
    
    function code(t, l, k)
    	t_1 = sin(k) ^ 2.0
    	tmp = 0.0
    	if (k <= 12500.0)
    		tmp = Float64(2.0 / Float64(Float64(Float64((Float64(k * t) ^ 2.0) * 2.0) / Float64(cos(k) * Float64(l * l))) * t));
    	elseif (k <= 9.2e+157)
    		tmp = Float64(2.0 / Float64(Float64(Float64(Float64(Float64(k * k) * t) * t_1) / Float64(cos(k) * l)) / l));
    	else
    		tmp = Float64(2.0 / Float64(Float64((Float64(k / l) ^ 2.0) * Float64(t_1 * t)) / cos(k)));
    	end
    	return tmp
    end
    
    function tmp_2 = code(t, l, k)
    	t_1 = sin(k) ^ 2.0;
    	tmp = 0.0;
    	if (k <= 12500.0)
    		tmp = 2.0 / (((((k * t) ^ 2.0) * 2.0) / (cos(k) * (l * l))) * t);
    	elseif (k <= 9.2e+157)
    		tmp = 2.0 / (((((k * k) * t) * t_1) / (cos(k) * l)) / l);
    	else
    		tmp = 2.0 / ((((k / l) ^ 2.0) * (t_1 * t)) / cos(k));
    	end
    	tmp_2 = tmp;
    end
    
    code[t_, l_, k_] := Block[{t$95$1 = N[Power[N[Sin[k], $MachinePrecision], 2.0], $MachinePrecision]}, If[LessEqual[k, 12500.0], N[(2.0 / N[(N[(N[(N[Power[N[(k * t), $MachinePrecision], 2.0], $MachinePrecision] * 2.0), $MachinePrecision] / N[(N[Cos[k], $MachinePrecision] * N[(l * l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * t), $MachinePrecision]), $MachinePrecision], If[LessEqual[k, 9.2e+157], N[(2.0 / N[(N[(N[(N[(N[(k * k), $MachinePrecision] * t), $MachinePrecision] * t$95$1), $MachinePrecision] / N[(N[Cos[k], $MachinePrecision] * l), $MachinePrecision]), $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision], N[(2.0 / N[(N[(N[Power[N[(k / l), $MachinePrecision], 2.0], $MachinePrecision] * N[(t$95$1 * t), $MachinePrecision]), $MachinePrecision] / N[Cos[k], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
    
    \begin{array}{l}
    
    \\
    \begin{array}{l}
    t_1 := {\sin k}^{2}\\
    \mathbf{if}\;k \leq 12500:\\
    \;\;\;\;\frac{2}{\frac{{\left(k \cdot t\right)}^{2} \cdot 2}{\cos k \cdot \left(\ell \cdot \ell\right)} \cdot t}\\
    
    \mathbf{elif}\;k \leq 9.2 \cdot 10^{+157}:\\
    \;\;\;\;\frac{2}{\frac{\frac{\left(\left(k \cdot k\right) \cdot t\right) \cdot t\_1}{\cos k \cdot \ell}}{\ell}}\\
    
    \mathbf{else}:\\
    \;\;\;\;\frac{2}{\frac{{\left(\frac{k}{\ell}\right)}^{2} \cdot \left(t\_1 \cdot t\right)}{\cos k}}\\
    
    
    \end{array}
    \end{array}
    
    Derivation
    1. Split input into 3 regimes
    2. if k < 12500

      1. Initial program 57.4%

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

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

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

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

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

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

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

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

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

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

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

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

      if 12500 < k < 9.20000000000000015e157

      1. Initial program 48.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

          \[\leadsto \frac{2}{\frac{k \cdot k}{\ell \cdot \ell} \cdot \frac{{\sin k}^{2} \cdot t}{\cos k}} \]
      5. Applied rewrites72.8%

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

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

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

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

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

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

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

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

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

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

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

          \[\leadsto \frac{2}{\frac{{k}^{2}}{{\ell}^{2}} \cdot \frac{{\sin k}^{2} \cdot t}{\cos k}} \]
        12. frac-timesN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

          \[\leadsto \frac{2}{\frac{k \cdot k}{\ell \cdot \ell} \cdot \frac{{\sin k}^{2} \cdot t}{\cos k}} \]
        13. lower-cos.f6462.4

          \[\leadsto \frac{2}{\frac{k \cdot k}{\ell \cdot \ell} \cdot \frac{{\sin k}^{2} \cdot t}{\cos k}} \]
      5. Applied rewrites62.4%

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

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

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

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

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

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

          \[\leadsto \frac{2}{\frac{k \cdot k}{\ell \cdot \ell} \cdot \frac{{\sin k}^{2} \cdot t}{\cos k}} \]
        7. associate-*r/N/A

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

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

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

    Alternative 11: 73.5% accurate, 1.0× speedup?

    \[\begin{array}{l} \\ \begin{array}{l} t_1 := {\sin k}^{2}\\ \mathbf{if}\;k \leq 12500:\\ \;\;\;\;\frac{2}{\frac{{\left(k \cdot t\right)}^{2} \cdot 2}{\cos k \cdot \left(\ell \cdot \ell\right)} \cdot t}\\ \mathbf{elif}\;k \leq 9.2 \cdot 10^{+157}:\\ \;\;\;\;\frac{2}{\frac{\frac{\left(\left(k \cdot k\right) \cdot t\right) \cdot t\_1}{\cos k \cdot \ell}}{\ell}}\\ \mathbf{else}:\\ \;\;\;\;\frac{2}{{\left(\frac{k}{\ell}\right)}^{2} \cdot \left(t\_1 \cdot \frac{t}{\cos k}\right)}\\ \end{array} \end{array} \]
    (FPCore (t l k)
     :precision binary64
     (let* ((t_1 (pow (sin k) 2.0)))
       (if (<= k 12500.0)
         (/ 2.0 (* (/ (* (pow (* k t) 2.0) 2.0) (* (cos k) (* l l))) t))
         (if (<= k 9.2e+157)
           (/ 2.0 (/ (/ (* (* (* k k) t) t_1) (* (cos k) l)) l))
           (/ 2.0 (* (pow (/ k l) 2.0) (* t_1 (/ t (cos k)))))))))
    double code(double t, double l, double k) {
    	double t_1 = pow(sin(k), 2.0);
    	double tmp;
    	if (k <= 12500.0) {
    		tmp = 2.0 / (((pow((k * t), 2.0) * 2.0) / (cos(k) * (l * l))) * t);
    	} else if (k <= 9.2e+157) {
    		tmp = 2.0 / (((((k * k) * t) * t_1) / (cos(k) * l)) / l);
    	} else {
    		tmp = 2.0 / (pow((k / l), 2.0) * (t_1 * (t / cos(k))));
    	}
    	return tmp;
    }
    
    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
        real(8) :: t_1
        real(8) :: tmp
        t_1 = sin(k) ** 2.0d0
        if (k <= 12500.0d0) then
            tmp = 2.0d0 / (((((k * t) ** 2.0d0) * 2.0d0) / (cos(k) * (l * l))) * t)
        else if (k <= 9.2d+157) then
            tmp = 2.0d0 / (((((k * k) * t) * t_1) / (cos(k) * l)) / l)
        else
            tmp = 2.0d0 / (((k / l) ** 2.0d0) * (t_1 * (t / cos(k))))
        end if
        code = tmp
    end function
    
    public static double code(double t, double l, double k) {
    	double t_1 = Math.pow(Math.sin(k), 2.0);
    	double tmp;
    	if (k <= 12500.0) {
    		tmp = 2.0 / (((Math.pow((k * t), 2.0) * 2.0) / (Math.cos(k) * (l * l))) * t);
    	} else if (k <= 9.2e+157) {
    		tmp = 2.0 / (((((k * k) * t) * t_1) / (Math.cos(k) * l)) / l);
    	} else {
    		tmp = 2.0 / (Math.pow((k / l), 2.0) * (t_1 * (t / Math.cos(k))));
    	}
    	return tmp;
    }
    
    def code(t, l, k):
    	t_1 = math.pow(math.sin(k), 2.0)
    	tmp = 0
    	if k <= 12500.0:
    		tmp = 2.0 / (((math.pow((k * t), 2.0) * 2.0) / (math.cos(k) * (l * l))) * t)
    	elif k <= 9.2e+157:
    		tmp = 2.0 / (((((k * k) * t) * t_1) / (math.cos(k) * l)) / l)
    	else:
    		tmp = 2.0 / (math.pow((k / l), 2.0) * (t_1 * (t / math.cos(k))))
    	return tmp
    
    function code(t, l, k)
    	t_1 = sin(k) ^ 2.0
    	tmp = 0.0
    	if (k <= 12500.0)
    		tmp = Float64(2.0 / Float64(Float64(Float64((Float64(k * t) ^ 2.0) * 2.0) / Float64(cos(k) * Float64(l * l))) * t));
    	elseif (k <= 9.2e+157)
    		tmp = Float64(2.0 / Float64(Float64(Float64(Float64(Float64(k * k) * t) * t_1) / Float64(cos(k) * l)) / l));
    	else
    		tmp = Float64(2.0 / Float64((Float64(k / l) ^ 2.0) * Float64(t_1 * Float64(t / cos(k)))));
    	end
    	return tmp
    end
    
    function tmp_2 = code(t, l, k)
    	t_1 = sin(k) ^ 2.0;
    	tmp = 0.0;
    	if (k <= 12500.0)
    		tmp = 2.0 / (((((k * t) ^ 2.0) * 2.0) / (cos(k) * (l * l))) * t);
    	elseif (k <= 9.2e+157)
    		tmp = 2.0 / (((((k * k) * t) * t_1) / (cos(k) * l)) / l);
    	else
    		tmp = 2.0 / (((k / l) ^ 2.0) * (t_1 * (t / cos(k))));
    	end
    	tmp_2 = tmp;
    end
    
    code[t_, l_, k_] := Block[{t$95$1 = N[Power[N[Sin[k], $MachinePrecision], 2.0], $MachinePrecision]}, If[LessEqual[k, 12500.0], N[(2.0 / N[(N[(N[(N[Power[N[(k * t), $MachinePrecision], 2.0], $MachinePrecision] * 2.0), $MachinePrecision] / N[(N[Cos[k], $MachinePrecision] * N[(l * l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * t), $MachinePrecision]), $MachinePrecision], If[LessEqual[k, 9.2e+157], N[(2.0 / N[(N[(N[(N[(N[(k * k), $MachinePrecision] * t), $MachinePrecision] * t$95$1), $MachinePrecision] / N[(N[Cos[k], $MachinePrecision] * l), $MachinePrecision]), $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision], N[(2.0 / N[(N[Power[N[(k / l), $MachinePrecision], 2.0], $MachinePrecision] * N[(t$95$1 * N[(t / N[Cos[k], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
    
    \begin{array}{l}
    
    \\
    \begin{array}{l}
    t_1 := {\sin k}^{2}\\
    \mathbf{if}\;k \leq 12500:\\
    \;\;\;\;\frac{2}{\frac{{\left(k \cdot t\right)}^{2} \cdot 2}{\cos k \cdot \left(\ell \cdot \ell\right)} \cdot t}\\
    
    \mathbf{elif}\;k \leq 9.2 \cdot 10^{+157}:\\
    \;\;\;\;\frac{2}{\frac{\frac{\left(\left(k \cdot k\right) \cdot t\right) \cdot t\_1}{\cos k \cdot \ell}}{\ell}}\\
    
    \mathbf{else}:\\
    \;\;\;\;\frac{2}{{\left(\frac{k}{\ell}\right)}^{2} \cdot \left(t\_1 \cdot \frac{t}{\cos k}\right)}\\
    
    
    \end{array}
    \end{array}
    
    Derivation
    1. Split input into 3 regimes
    2. if k < 12500

      1. Initial program 57.4%

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

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

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

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

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

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

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

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

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

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

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

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

      if 12500 < k < 9.20000000000000015e157

      1. Initial program 48.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

          \[\leadsto \frac{2}{\frac{k \cdot k}{\ell \cdot \ell} \cdot \frac{{\sin k}^{2} \cdot t}{\cos k}} \]
      5. Applied rewrites72.8%

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

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

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

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

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

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

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

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

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

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

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

          \[\leadsto \frac{2}{\frac{{k}^{2}}{{\ell}^{2}} \cdot \frac{{\sin k}^{2} \cdot t}{\cos k}} \]
        12. frac-timesN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

          \[\leadsto \frac{2}{\frac{k \cdot k}{\ell \cdot \ell} \cdot \frac{{\sin k}^{2} \cdot t}{\cos k}} \]
        13. lower-cos.f6462.4

          \[\leadsto \frac{2}{\frac{k \cdot k}{\ell \cdot \ell} \cdot \frac{{\sin k}^{2} \cdot t}{\cos k}} \]
      5. Applied rewrites62.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

          \[\leadsto \frac{2}{{\left(\frac{k}{\ell}\right)}^{2} \cdot \left({\sin k}^{2} \cdot \frac{t}{\color{blue}{\cos k}}\right)} \]
        18. lift-cos.f6492.1

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

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

    Alternative 12: 73.5% accurate, 1.2× speedup?

    \[\begin{array}{l} \\ \begin{array}{l} t_1 := {\sin k}^{2}\\ \mathbf{if}\;k \leq 12500:\\ \;\;\;\;\frac{2}{\frac{{\left(k \cdot t\right)}^{2} \cdot 2}{\cos k \cdot \left(\ell \cdot \ell\right)} \cdot t}\\ \mathbf{elif}\;k \leq 9.2 \cdot 10^{+157}:\\ \;\;\;\;\frac{2}{\frac{\frac{\left(\left(k \cdot k\right) \cdot t\right) \cdot t\_1}{\cos k \cdot \ell}}{\ell}}\\ \mathbf{else}:\\ \;\;\;\;\frac{2}{\left(\frac{k}{\ell} \cdot \frac{k}{\ell}\right) \cdot \frac{t\_1 \cdot t}{\cos k}}\\ \end{array} \end{array} \]
    (FPCore (t l k)
     :precision binary64
     (let* ((t_1 (pow (sin k) 2.0)))
       (if (<= k 12500.0)
         (/ 2.0 (* (/ (* (pow (* k t) 2.0) 2.0) (* (cos k) (* l l))) t))
         (if (<= k 9.2e+157)
           (/ 2.0 (/ (/ (* (* (* k k) t) t_1) (* (cos k) l)) l))
           (/ 2.0 (* (* (/ k l) (/ k l)) (/ (* t_1 t) (cos k))))))))
    double code(double t, double l, double k) {
    	double t_1 = pow(sin(k), 2.0);
    	double tmp;
    	if (k <= 12500.0) {
    		tmp = 2.0 / (((pow((k * t), 2.0) * 2.0) / (cos(k) * (l * l))) * t);
    	} else if (k <= 9.2e+157) {
    		tmp = 2.0 / (((((k * k) * t) * t_1) / (cos(k) * l)) / l);
    	} else {
    		tmp = 2.0 / (((k / l) * (k / l)) * ((t_1 * t) / cos(k)));
    	}
    	return tmp;
    }
    
    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
        real(8) :: t_1
        real(8) :: tmp
        t_1 = sin(k) ** 2.0d0
        if (k <= 12500.0d0) then
            tmp = 2.0d0 / (((((k * t) ** 2.0d0) * 2.0d0) / (cos(k) * (l * l))) * t)
        else if (k <= 9.2d+157) then
            tmp = 2.0d0 / (((((k * k) * t) * t_1) / (cos(k) * l)) / l)
        else
            tmp = 2.0d0 / (((k / l) * (k / l)) * ((t_1 * t) / cos(k)))
        end if
        code = tmp
    end function
    
    public static double code(double t, double l, double k) {
    	double t_1 = Math.pow(Math.sin(k), 2.0);
    	double tmp;
    	if (k <= 12500.0) {
    		tmp = 2.0 / (((Math.pow((k * t), 2.0) * 2.0) / (Math.cos(k) * (l * l))) * t);
    	} else if (k <= 9.2e+157) {
    		tmp = 2.0 / (((((k * k) * t) * t_1) / (Math.cos(k) * l)) / l);
    	} else {
    		tmp = 2.0 / (((k / l) * (k / l)) * ((t_1 * t) / Math.cos(k)));
    	}
    	return tmp;
    }
    
    def code(t, l, k):
    	t_1 = math.pow(math.sin(k), 2.0)
    	tmp = 0
    	if k <= 12500.0:
    		tmp = 2.0 / (((math.pow((k * t), 2.0) * 2.0) / (math.cos(k) * (l * l))) * t)
    	elif k <= 9.2e+157:
    		tmp = 2.0 / (((((k * k) * t) * t_1) / (math.cos(k) * l)) / l)
    	else:
    		tmp = 2.0 / (((k / l) * (k / l)) * ((t_1 * t) / math.cos(k)))
    	return tmp
    
    function code(t, l, k)
    	t_1 = sin(k) ^ 2.0
    	tmp = 0.0
    	if (k <= 12500.0)
    		tmp = Float64(2.0 / Float64(Float64(Float64((Float64(k * t) ^ 2.0) * 2.0) / Float64(cos(k) * Float64(l * l))) * t));
    	elseif (k <= 9.2e+157)
    		tmp = Float64(2.0 / Float64(Float64(Float64(Float64(Float64(k * k) * t) * t_1) / Float64(cos(k) * l)) / l));
    	else
    		tmp = Float64(2.0 / Float64(Float64(Float64(k / l) * Float64(k / l)) * Float64(Float64(t_1 * t) / cos(k))));
    	end
    	return tmp
    end
    
    function tmp_2 = code(t, l, k)
    	t_1 = sin(k) ^ 2.0;
    	tmp = 0.0;
    	if (k <= 12500.0)
    		tmp = 2.0 / (((((k * t) ^ 2.0) * 2.0) / (cos(k) * (l * l))) * t);
    	elseif (k <= 9.2e+157)
    		tmp = 2.0 / (((((k * k) * t) * t_1) / (cos(k) * l)) / l);
    	else
    		tmp = 2.0 / (((k / l) * (k / l)) * ((t_1 * t) / cos(k)));
    	end
    	tmp_2 = tmp;
    end
    
    code[t_, l_, k_] := Block[{t$95$1 = N[Power[N[Sin[k], $MachinePrecision], 2.0], $MachinePrecision]}, If[LessEqual[k, 12500.0], N[(2.0 / N[(N[(N[(N[Power[N[(k * t), $MachinePrecision], 2.0], $MachinePrecision] * 2.0), $MachinePrecision] / N[(N[Cos[k], $MachinePrecision] * N[(l * l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * t), $MachinePrecision]), $MachinePrecision], If[LessEqual[k, 9.2e+157], N[(2.0 / N[(N[(N[(N[(N[(k * k), $MachinePrecision] * t), $MachinePrecision] * t$95$1), $MachinePrecision] / N[(N[Cos[k], $MachinePrecision] * l), $MachinePrecision]), $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision], N[(2.0 / N[(N[(N[(k / l), $MachinePrecision] * N[(k / l), $MachinePrecision]), $MachinePrecision] * N[(N[(t$95$1 * t), $MachinePrecision] / N[Cos[k], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
    
    \begin{array}{l}
    
    \\
    \begin{array}{l}
    t_1 := {\sin k}^{2}\\
    \mathbf{if}\;k \leq 12500:\\
    \;\;\;\;\frac{2}{\frac{{\left(k \cdot t\right)}^{2} \cdot 2}{\cos k \cdot \left(\ell \cdot \ell\right)} \cdot t}\\
    
    \mathbf{elif}\;k \leq 9.2 \cdot 10^{+157}:\\
    \;\;\;\;\frac{2}{\frac{\frac{\left(\left(k \cdot k\right) \cdot t\right) \cdot t\_1}{\cos k \cdot \ell}}{\ell}}\\
    
    \mathbf{else}:\\
    \;\;\;\;\frac{2}{\left(\frac{k}{\ell} \cdot \frac{k}{\ell}\right) \cdot \frac{t\_1 \cdot t}{\cos k}}\\
    
    
    \end{array}
    \end{array}
    
    Derivation
    1. Split input into 3 regimes
    2. if k < 12500

      1. Initial program 57.4%

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

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

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

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

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

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

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

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

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

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

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

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

      if 12500 < k < 9.20000000000000015e157

      1. Initial program 48.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

          \[\leadsto \frac{2}{\frac{k \cdot k}{\ell \cdot \ell} \cdot \frac{{\sin k}^{2} \cdot t}{\cos k}} \]
      5. Applied rewrites72.8%

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

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

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

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

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

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

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

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

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

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

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

          \[\leadsto \frac{2}{\frac{{k}^{2}}{{\ell}^{2}} \cdot \frac{{\sin k}^{2} \cdot t}{\cos k}} \]
        12. frac-timesN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

          \[\leadsto \frac{2}{\frac{k \cdot k}{\ell \cdot \ell} \cdot \frac{{\sin k}^{2} \cdot t}{\cos k}} \]
        13. lower-cos.f6462.4

          \[\leadsto \frac{2}{\frac{k \cdot k}{\ell \cdot \ell} \cdot \frac{{\sin k}^{2} \cdot t}{\cos k}} \]
      5. Applied rewrites62.4%

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

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

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

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

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

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

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

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

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

    Alternative 13: 71.1% accurate, 1.3× speedup?

    \[\begin{array}{l} \\ \begin{array}{l} t_1 := {\sin k}^{2}\\ \mathbf{if}\;k \leq 12500:\\ \;\;\;\;\frac{2}{\frac{{\left(k \cdot t\right)}^{2} \cdot 2}{\cos k \cdot \left(\ell \cdot \ell\right)} \cdot t}\\ \mathbf{elif}\;k \leq 2.15 \cdot 10^{+160}:\\ \;\;\;\;\frac{2}{\frac{\frac{\left(\left(k \cdot k\right) \cdot t\right) \cdot t\_1}{\cos k \cdot \ell}}{\ell}}\\ \mathbf{else}:\\ \;\;\;\;\frac{2}{\left(k \cdot \frac{k}{\ell \cdot \ell}\right) \cdot \frac{t\_1 \cdot t}{\cos k}}\\ \end{array} \end{array} \]
    (FPCore (t l k)
     :precision binary64
     (let* ((t_1 (pow (sin k) 2.0)))
       (if (<= k 12500.0)
         (/ 2.0 (* (/ (* (pow (* k t) 2.0) 2.0) (* (cos k) (* l l))) t))
         (if (<= k 2.15e+160)
           (/ 2.0 (/ (/ (* (* (* k k) t) t_1) (* (cos k) l)) l))
           (/ 2.0 (* (* k (/ k (* l l))) (/ (* t_1 t) (cos k))))))))
    double code(double t, double l, double k) {
    	double t_1 = pow(sin(k), 2.0);
    	double tmp;
    	if (k <= 12500.0) {
    		tmp = 2.0 / (((pow((k * t), 2.0) * 2.0) / (cos(k) * (l * l))) * t);
    	} else if (k <= 2.15e+160) {
    		tmp = 2.0 / (((((k * k) * t) * t_1) / (cos(k) * l)) / l);
    	} else {
    		tmp = 2.0 / ((k * (k / (l * l))) * ((t_1 * t) / cos(k)));
    	}
    	return tmp;
    }
    
    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
        real(8) :: t_1
        real(8) :: tmp
        t_1 = sin(k) ** 2.0d0
        if (k <= 12500.0d0) then
            tmp = 2.0d0 / (((((k * t) ** 2.0d0) * 2.0d0) / (cos(k) * (l * l))) * t)
        else if (k <= 2.15d+160) then
            tmp = 2.0d0 / (((((k * k) * t) * t_1) / (cos(k) * l)) / l)
        else
            tmp = 2.0d0 / ((k * (k / (l * l))) * ((t_1 * t) / cos(k)))
        end if
        code = tmp
    end function
    
    public static double code(double t, double l, double k) {
    	double t_1 = Math.pow(Math.sin(k), 2.0);
    	double tmp;
    	if (k <= 12500.0) {
    		tmp = 2.0 / (((Math.pow((k * t), 2.0) * 2.0) / (Math.cos(k) * (l * l))) * t);
    	} else if (k <= 2.15e+160) {
    		tmp = 2.0 / (((((k * k) * t) * t_1) / (Math.cos(k) * l)) / l);
    	} else {
    		tmp = 2.0 / ((k * (k / (l * l))) * ((t_1 * t) / Math.cos(k)));
    	}
    	return tmp;
    }
    
    def code(t, l, k):
    	t_1 = math.pow(math.sin(k), 2.0)
    	tmp = 0
    	if k <= 12500.0:
    		tmp = 2.0 / (((math.pow((k * t), 2.0) * 2.0) / (math.cos(k) * (l * l))) * t)
    	elif k <= 2.15e+160:
    		tmp = 2.0 / (((((k * k) * t) * t_1) / (math.cos(k) * l)) / l)
    	else:
    		tmp = 2.0 / ((k * (k / (l * l))) * ((t_1 * t) / math.cos(k)))
    	return tmp
    
    function code(t, l, k)
    	t_1 = sin(k) ^ 2.0
    	tmp = 0.0
    	if (k <= 12500.0)
    		tmp = Float64(2.0 / Float64(Float64(Float64((Float64(k * t) ^ 2.0) * 2.0) / Float64(cos(k) * Float64(l * l))) * t));
    	elseif (k <= 2.15e+160)
    		tmp = Float64(2.0 / Float64(Float64(Float64(Float64(Float64(k * k) * t) * t_1) / Float64(cos(k) * l)) / l));
    	else
    		tmp = Float64(2.0 / Float64(Float64(k * Float64(k / Float64(l * l))) * Float64(Float64(t_1 * t) / cos(k))));
    	end
    	return tmp
    end
    
    function tmp_2 = code(t, l, k)
    	t_1 = sin(k) ^ 2.0;
    	tmp = 0.0;
    	if (k <= 12500.0)
    		tmp = 2.0 / (((((k * t) ^ 2.0) * 2.0) / (cos(k) * (l * l))) * t);
    	elseif (k <= 2.15e+160)
    		tmp = 2.0 / (((((k * k) * t) * t_1) / (cos(k) * l)) / l);
    	else
    		tmp = 2.0 / ((k * (k / (l * l))) * ((t_1 * t) / cos(k)));
    	end
    	tmp_2 = tmp;
    end
    
    code[t_, l_, k_] := Block[{t$95$1 = N[Power[N[Sin[k], $MachinePrecision], 2.0], $MachinePrecision]}, If[LessEqual[k, 12500.0], N[(2.0 / N[(N[(N[(N[Power[N[(k * t), $MachinePrecision], 2.0], $MachinePrecision] * 2.0), $MachinePrecision] / N[(N[Cos[k], $MachinePrecision] * N[(l * l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * t), $MachinePrecision]), $MachinePrecision], If[LessEqual[k, 2.15e+160], N[(2.0 / N[(N[(N[(N[(N[(k * k), $MachinePrecision] * t), $MachinePrecision] * t$95$1), $MachinePrecision] / N[(N[Cos[k], $MachinePrecision] * l), $MachinePrecision]), $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision], N[(2.0 / N[(N[(k * N[(k / N[(l * l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(N[(t$95$1 * t), $MachinePrecision] / N[Cos[k], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
    
    \begin{array}{l}
    
    \\
    \begin{array}{l}
    t_1 := {\sin k}^{2}\\
    \mathbf{if}\;k \leq 12500:\\
    \;\;\;\;\frac{2}{\frac{{\left(k \cdot t\right)}^{2} \cdot 2}{\cos k \cdot \left(\ell \cdot \ell\right)} \cdot t}\\
    
    \mathbf{elif}\;k \leq 2.15 \cdot 10^{+160}:\\
    \;\;\;\;\frac{2}{\frac{\frac{\left(\left(k \cdot k\right) \cdot t\right) \cdot t\_1}{\cos k \cdot \ell}}{\ell}}\\
    
    \mathbf{else}:\\
    \;\;\;\;\frac{2}{\left(k \cdot \frac{k}{\ell \cdot \ell}\right) \cdot \frac{t\_1 \cdot t}{\cos k}}\\
    
    
    \end{array}
    \end{array}
    
    Derivation
    1. Split input into 3 regimes
    2. if k < 12500

      1. Initial program 57.4%

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

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

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

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

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

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

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

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

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

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

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

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

      if 12500 < k < 2.14999999999999994e160

      1. Initial program 48.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

          \[\leadsto \frac{2}{\frac{k \cdot k}{\ell \cdot \ell} \cdot \frac{{\sin k}^{2} \cdot t}{\cos k}} \]
        13. lower-cos.f6472.4

          \[\leadsto \frac{2}{\frac{k \cdot k}{\ell \cdot \ell} \cdot \frac{{\sin k}^{2} \cdot t}{\cos k}} \]
      5. Applied rewrites72.4%

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

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

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

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

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

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

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

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

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

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

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

          \[\leadsto \frac{2}{\frac{{k}^{2}}{{\ell}^{2}} \cdot \frac{{\sin k}^{2} \cdot t}{\cos k}} \]
        12. frac-timesN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      if 2.14999999999999994e160 < k

      1. Initial program 49.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

          \[\leadsto \frac{2}{\frac{k \cdot k}{\ell \cdot \ell} \cdot \frac{{\sin k}^{2} \cdot t}{\cos k}} \]
        13. lower-cos.f6462.5

          \[\leadsto \frac{2}{\frac{k \cdot k}{\ell \cdot \ell} \cdot \frac{{\sin k}^{2} \cdot t}{\cos k}} \]
      5. Applied rewrites62.5%

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

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

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

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

          \[\leadsto \frac{2}{\frac{k \cdot k}{{\ell}^{2}} \cdot \frac{{\sin k}^{2} \cdot \color{blue}{t}}{\cos k}} \]
        5. associate-/l*N/A

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

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

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

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

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

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

    Alternative 14: 70.5% accurate, 1.3× speedup?

    \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;k \leq 13500:\\ \;\;\;\;\frac{2}{\frac{{\left(k \cdot t\right)}^{2} \cdot 2}{\cos k \cdot \left(\ell \cdot \ell\right)} \cdot t}\\ \mathbf{else}:\\ \;\;\;\;\frac{2}{\frac{\left(k \cdot \left(k \cdot t\right)\right) \cdot {\sin k}^{2}}{\left(\cos k \cdot \ell\right) \cdot \ell}}\\ \end{array} \end{array} \]
    (FPCore (t l k)
     :precision binary64
     (if (<= k 13500.0)
       (/ 2.0 (* (/ (* (pow (* k t) 2.0) 2.0) (* (cos k) (* l l))) t))
       (/ 2.0 (/ (* (* k (* k t)) (pow (sin k) 2.0)) (* (* (cos k) l) l)))))
    double code(double t, double l, double k) {
    	double tmp;
    	if (k <= 13500.0) {
    		tmp = 2.0 / (((pow((k * t), 2.0) * 2.0) / (cos(k) * (l * l))) * t);
    	} else {
    		tmp = 2.0 / (((k * (k * t)) * pow(sin(k), 2.0)) / ((cos(k) * l) * l));
    	}
    	return tmp;
    }
    
    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
        real(8) :: tmp
        if (k <= 13500.0d0) then
            tmp = 2.0d0 / (((((k * t) ** 2.0d0) * 2.0d0) / (cos(k) * (l * l))) * t)
        else
            tmp = 2.0d0 / (((k * (k * t)) * (sin(k) ** 2.0d0)) / ((cos(k) * l) * l))
        end if
        code = tmp
    end function
    
    public static double code(double t, double l, double k) {
    	double tmp;
    	if (k <= 13500.0) {
    		tmp = 2.0 / (((Math.pow((k * t), 2.0) * 2.0) / (Math.cos(k) * (l * l))) * t);
    	} else {
    		tmp = 2.0 / (((k * (k * t)) * Math.pow(Math.sin(k), 2.0)) / ((Math.cos(k) * l) * l));
    	}
    	return tmp;
    }
    
    def code(t, l, k):
    	tmp = 0
    	if k <= 13500.0:
    		tmp = 2.0 / (((math.pow((k * t), 2.0) * 2.0) / (math.cos(k) * (l * l))) * t)
    	else:
    		tmp = 2.0 / (((k * (k * t)) * math.pow(math.sin(k), 2.0)) / ((math.cos(k) * l) * l))
    	return tmp
    
    function code(t, l, k)
    	tmp = 0.0
    	if (k <= 13500.0)
    		tmp = Float64(2.0 / Float64(Float64(Float64((Float64(k * t) ^ 2.0) * 2.0) / Float64(cos(k) * Float64(l * l))) * t));
    	else
    		tmp = Float64(2.0 / Float64(Float64(Float64(k * Float64(k * t)) * (sin(k) ^ 2.0)) / Float64(Float64(cos(k) * l) * l)));
    	end
    	return tmp
    end
    
    function tmp_2 = code(t, l, k)
    	tmp = 0.0;
    	if (k <= 13500.0)
    		tmp = 2.0 / (((((k * t) ^ 2.0) * 2.0) / (cos(k) * (l * l))) * t);
    	else
    		tmp = 2.0 / (((k * (k * t)) * (sin(k) ^ 2.0)) / ((cos(k) * l) * l));
    	end
    	tmp_2 = tmp;
    end
    
    code[t_, l_, k_] := If[LessEqual[k, 13500.0], N[(2.0 / N[(N[(N[(N[Power[N[(k * t), $MachinePrecision], 2.0], $MachinePrecision] * 2.0), $MachinePrecision] / N[(N[Cos[k], $MachinePrecision] * N[(l * l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * t), $MachinePrecision]), $MachinePrecision], N[(2.0 / N[(N[(N[(k * N[(k * t), $MachinePrecision]), $MachinePrecision] * N[Power[N[Sin[k], $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision] / N[(N[(N[Cos[k], $MachinePrecision] * l), $MachinePrecision] * l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
    
    \begin{array}{l}
    
    \\
    \begin{array}{l}
    \mathbf{if}\;k \leq 13500:\\
    \;\;\;\;\frac{2}{\frac{{\left(k \cdot t\right)}^{2} \cdot 2}{\cos k \cdot \left(\ell \cdot \ell\right)} \cdot t}\\
    
    \mathbf{else}:\\
    \;\;\;\;\frac{2}{\frac{\left(k \cdot \left(k \cdot t\right)\right) \cdot {\sin k}^{2}}{\left(\cos k \cdot \ell\right) \cdot \ell}}\\
    
    
    \end{array}
    \end{array}
    
    Derivation
    1. Split input into 2 regimes
    2. if k < 13500

      1. Initial program 57.4%

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

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

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

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

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

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

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

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

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

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

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

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

      if 13500 < k

      1. Initial program 48.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

          \[\leadsto \frac{2}{\frac{k \cdot k}{\ell \cdot \ell} \cdot \frac{{\sin k}^{2} \cdot t}{\cos k}} \]
        13. lower-cos.f6467.6

          \[\leadsto \frac{2}{\frac{k \cdot k}{\ell \cdot \ell} \cdot \frac{{\sin k}^{2} \cdot t}{\cos k}} \]
      5. Applied rewrites67.6%

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

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

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

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

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

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

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

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

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

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

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

          \[\leadsto \frac{2}{\frac{{k}^{2}}{{\ell}^{2}} \cdot \frac{{\sin k}^{2} \cdot t}{\cos k}} \]
        12. frac-timesN/A

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

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

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

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

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

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

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

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

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

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

    Alternative 15: 68.1% accurate, 1.7× speedup?

    \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;\ell \cdot \ell \leq 10^{+297}:\\ \;\;\;\;\frac{2}{\frac{{\left(k \cdot t\right)}^{2} \cdot 2}{\cos k \cdot \left(\ell \cdot \ell\right)} \cdot t}\\ \mathbf{else}:\\ \;\;\;\;\frac{2}{\left(\left(\left(\frac{t \cdot t}{\ell} \cdot \frac{t}{\ell}\right) \cdot \sin k\right) \cdot \tan k\right) \cdot 2}\\ \end{array} \end{array} \]
    (FPCore (t l k)
     :precision binary64
     (if (<= (* l l) 1e+297)
       (/ 2.0 (* (/ (* (pow (* k t) 2.0) 2.0) (* (cos k) (* l l))) t))
       (/ 2.0 (* (* (* (* (/ (* t t) l) (/ t l)) (sin k)) (tan k)) 2.0))))
    double code(double t, double l, double k) {
    	double tmp;
    	if ((l * l) <= 1e+297) {
    		tmp = 2.0 / (((pow((k * t), 2.0) * 2.0) / (cos(k) * (l * l))) * t);
    	} else {
    		tmp = 2.0 / ((((((t * t) / l) * (t / l)) * sin(k)) * tan(k)) * 2.0);
    	}
    	return tmp;
    }
    
    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
        real(8) :: tmp
        if ((l * l) <= 1d+297) then
            tmp = 2.0d0 / (((((k * t) ** 2.0d0) * 2.0d0) / (cos(k) * (l * l))) * t)
        else
            tmp = 2.0d0 / ((((((t * t) / l) * (t / l)) * sin(k)) * tan(k)) * 2.0d0)
        end if
        code = tmp
    end function
    
    public static double code(double t, double l, double k) {
    	double tmp;
    	if ((l * l) <= 1e+297) {
    		tmp = 2.0 / (((Math.pow((k * t), 2.0) * 2.0) / (Math.cos(k) * (l * l))) * t);
    	} else {
    		tmp = 2.0 / ((((((t * t) / l) * (t / l)) * Math.sin(k)) * Math.tan(k)) * 2.0);
    	}
    	return tmp;
    }
    
    def code(t, l, k):
    	tmp = 0
    	if (l * l) <= 1e+297:
    		tmp = 2.0 / (((math.pow((k * t), 2.0) * 2.0) / (math.cos(k) * (l * l))) * t)
    	else:
    		tmp = 2.0 / ((((((t * t) / l) * (t / l)) * math.sin(k)) * math.tan(k)) * 2.0)
    	return tmp
    
    function code(t, l, k)
    	tmp = 0.0
    	if (Float64(l * l) <= 1e+297)
    		tmp = Float64(2.0 / Float64(Float64(Float64((Float64(k * t) ^ 2.0) * 2.0) / Float64(cos(k) * Float64(l * l))) * t));
    	else
    		tmp = Float64(2.0 / Float64(Float64(Float64(Float64(Float64(Float64(t * t) / l) * Float64(t / l)) * sin(k)) * tan(k)) * 2.0));
    	end
    	return tmp
    end
    
    function tmp_2 = code(t, l, k)
    	tmp = 0.0;
    	if ((l * l) <= 1e+297)
    		tmp = 2.0 / (((((k * t) ^ 2.0) * 2.0) / (cos(k) * (l * l))) * t);
    	else
    		tmp = 2.0 / ((((((t * t) / l) * (t / l)) * sin(k)) * tan(k)) * 2.0);
    	end
    	tmp_2 = tmp;
    end
    
    code[t_, l_, k_] := If[LessEqual[N[(l * l), $MachinePrecision], 1e+297], N[(2.0 / N[(N[(N[(N[Power[N[(k * t), $MachinePrecision], 2.0], $MachinePrecision] * 2.0), $MachinePrecision] / N[(N[Cos[k], $MachinePrecision] * N[(l * l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * t), $MachinePrecision]), $MachinePrecision], N[(2.0 / N[(N[(N[(N[(N[(N[(t * t), $MachinePrecision] / l), $MachinePrecision] * N[(t / l), $MachinePrecision]), $MachinePrecision] * N[Sin[k], $MachinePrecision]), $MachinePrecision] * N[Tan[k], $MachinePrecision]), $MachinePrecision] * 2.0), $MachinePrecision]), $MachinePrecision]]
    
    \begin{array}{l}
    
    \\
    \begin{array}{l}
    \mathbf{if}\;\ell \cdot \ell \leq 10^{+297}:\\
    \;\;\;\;\frac{2}{\frac{{\left(k \cdot t\right)}^{2} \cdot 2}{\cos k \cdot \left(\ell \cdot \ell\right)} \cdot t}\\
    
    \mathbf{else}:\\
    \;\;\;\;\frac{2}{\left(\left(\left(\frac{t \cdot t}{\ell} \cdot \frac{t}{\ell}\right) \cdot \sin k\right) \cdot \tan k\right) \cdot 2}\\
    
    
    \end{array}
    \end{array}
    
    Derivation
    1. Split input into 2 regimes
    2. if (*.f64 l l) < 1e297

      1. Initial program 62.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 rewrites82.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. Taylor expanded in k around 0

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

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

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

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

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

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

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

      if 1e297 < (*.f64 l l)

      1. Initial program 33.6%

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

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

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

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

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

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

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

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

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

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

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

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

            \[\leadsto \frac{2}{\left(\left(\left(\frac{\color{blue}{t \cdot t}}{\ell} \cdot \frac{t}{\ell}\right) \cdot \sin k\right) \cdot \tan k\right) \cdot 2} \]
          11. lower-/.f6461.0

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

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

      Alternative 16: 68.9% accurate, 1.7× speedup?

      \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;k \leq 13500:\\ \;\;\;\;\frac{2}{\frac{{\left(k \cdot t\right)}^{2} \cdot 2}{\cos k \cdot \left(\ell \cdot \ell\right)} \cdot t}\\ \mathbf{else}:\\ \;\;\;\;\frac{2}{\frac{\left(\left(k \cdot k\right) \cdot t\right) \cdot \left(0.5 - 0.5 \cdot \cos \left(2 \cdot k\right)\right)}{\left(\cos k \cdot \ell\right) \cdot \ell}}\\ \end{array} \end{array} \]
      (FPCore (t l k)
       :precision binary64
       (if (<= k 13500.0)
         (/ 2.0 (* (/ (* (pow (* k t) 2.0) 2.0) (* (cos k) (* l l))) t))
         (/
          2.0
          (/
           (* (* (* k k) t) (- 0.5 (* 0.5 (cos (* 2.0 k)))))
           (* (* (cos k) l) l)))))
      double code(double t, double l, double k) {
      	double tmp;
      	if (k <= 13500.0) {
      		tmp = 2.0 / (((pow((k * t), 2.0) * 2.0) / (cos(k) * (l * l))) * t);
      	} else {
      		tmp = 2.0 / ((((k * k) * t) * (0.5 - (0.5 * cos((2.0 * k))))) / ((cos(k) * l) * l));
      	}
      	return tmp;
      }
      
      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
          real(8) :: tmp
          if (k <= 13500.0d0) then
              tmp = 2.0d0 / (((((k * t) ** 2.0d0) * 2.0d0) / (cos(k) * (l * l))) * t)
          else
              tmp = 2.0d0 / ((((k * k) * t) * (0.5d0 - (0.5d0 * cos((2.0d0 * k))))) / ((cos(k) * l) * l))
          end if
          code = tmp
      end function
      
      public static double code(double t, double l, double k) {
      	double tmp;
      	if (k <= 13500.0) {
      		tmp = 2.0 / (((Math.pow((k * t), 2.0) * 2.0) / (Math.cos(k) * (l * l))) * t);
      	} else {
      		tmp = 2.0 / ((((k * k) * t) * (0.5 - (0.5 * Math.cos((2.0 * k))))) / ((Math.cos(k) * l) * l));
      	}
      	return tmp;
      }
      
      def code(t, l, k):
      	tmp = 0
      	if k <= 13500.0:
      		tmp = 2.0 / (((math.pow((k * t), 2.0) * 2.0) / (math.cos(k) * (l * l))) * t)
      	else:
      		tmp = 2.0 / ((((k * k) * t) * (0.5 - (0.5 * math.cos((2.0 * k))))) / ((math.cos(k) * l) * l))
      	return tmp
      
      function code(t, l, k)
      	tmp = 0.0
      	if (k <= 13500.0)
      		tmp = Float64(2.0 / Float64(Float64(Float64((Float64(k * t) ^ 2.0) * 2.0) / Float64(cos(k) * Float64(l * l))) * t));
      	else
      		tmp = Float64(2.0 / Float64(Float64(Float64(Float64(k * k) * t) * Float64(0.5 - Float64(0.5 * cos(Float64(2.0 * k))))) / Float64(Float64(cos(k) * l) * l)));
      	end
      	return tmp
      end
      
      function tmp_2 = code(t, l, k)
      	tmp = 0.0;
      	if (k <= 13500.0)
      		tmp = 2.0 / (((((k * t) ^ 2.0) * 2.0) / (cos(k) * (l * l))) * t);
      	else
      		tmp = 2.0 / ((((k * k) * t) * (0.5 - (0.5 * cos((2.0 * k))))) / ((cos(k) * l) * l));
      	end
      	tmp_2 = tmp;
      end
      
      code[t_, l_, k_] := If[LessEqual[k, 13500.0], N[(2.0 / N[(N[(N[(N[Power[N[(k * t), $MachinePrecision], 2.0], $MachinePrecision] * 2.0), $MachinePrecision] / N[(N[Cos[k], $MachinePrecision] * N[(l * l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * t), $MachinePrecision]), $MachinePrecision], N[(2.0 / N[(N[(N[(N[(k * k), $MachinePrecision] * t), $MachinePrecision] * N[(0.5 - N[(0.5 * N[Cos[N[(2.0 * k), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(N[(N[Cos[k], $MachinePrecision] * l), $MachinePrecision] * l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
      
      \begin{array}{l}
      
      \\
      \begin{array}{l}
      \mathbf{if}\;k \leq 13500:\\
      \;\;\;\;\frac{2}{\frac{{\left(k \cdot t\right)}^{2} \cdot 2}{\cos k \cdot \left(\ell \cdot \ell\right)} \cdot t}\\
      
      \mathbf{else}:\\
      \;\;\;\;\frac{2}{\frac{\left(\left(k \cdot k\right) \cdot t\right) \cdot \left(0.5 - 0.5 \cdot \cos \left(2 \cdot k\right)\right)}{\left(\cos k \cdot \ell\right) \cdot \ell}}\\
      
      
      \end{array}
      \end{array}
      
      Derivation
      1. Split input into 2 regimes
      2. if k < 13500

        1. Initial program 57.4%

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

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

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

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

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

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

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

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

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

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

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

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

        if 13500 < k

        1. Initial program 48.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

            \[\leadsto \frac{2}{\frac{k \cdot k}{\ell \cdot \ell} \cdot \frac{{\sin k}^{2} \cdot t}{\cos k}} \]
          13. lower-cos.f6467.6

            \[\leadsto \frac{2}{\frac{k \cdot k}{\ell \cdot \ell} \cdot \frac{{\sin k}^{2} \cdot t}{\cos k}} \]
        5. Applied rewrites67.6%

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

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

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

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

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

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

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

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

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

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

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

            \[\leadsto \frac{2}{\frac{{k}^{2}}{{\ell}^{2}} \cdot \frac{{\sin k}^{2} \cdot t}{\cos k}} \]
          12. frac-timesN/A

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

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

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

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

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

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

            \[\leadsto \frac{2}{\frac{\left(\left(k \cdot k\right) \cdot t\right) \cdot \left(\sin k \cdot \sin k\right)}{\left(\cos k \cdot \color{blue}{\ell}\right) \cdot \ell}} \]
          4. sqr-sin-aN/A

            \[\leadsto \frac{2}{\frac{\left(\left(k \cdot k\right) \cdot t\right) \cdot \left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot k\right)\right)}{\left(\cos k \cdot \color{blue}{\ell}\right) \cdot \ell}} \]
          5. lower--.f64N/A

            \[\leadsto \frac{2}{\frac{\left(\left(k \cdot k\right) \cdot t\right) \cdot \left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot k\right)\right)}{\left(\cos k \cdot \color{blue}{\ell}\right) \cdot \ell}} \]
          6. lower-*.f64N/A

            \[\leadsto \frac{2}{\frac{\left(\left(k \cdot k\right) \cdot t\right) \cdot \left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot k\right)\right)}{\left(\cos k \cdot \ell\right) \cdot \ell}} \]
          7. lower-cos.f64N/A

            \[\leadsto \frac{2}{\frac{\left(\left(k \cdot k\right) \cdot t\right) \cdot \left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot k\right)\right)}{\left(\cos k \cdot \ell\right) \cdot \ell}} \]
          8. lower-*.f6470.0

            \[\leadsto \frac{2}{\frac{\left(\left(k \cdot k\right) \cdot t\right) \cdot \left(0.5 - 0.5 \cdot \cos \left(2 \cdot k\right)\right)}{\left(\cos k \cdot \ell\right) \cdot \ell}} \]
        9. Applied rewrites70.0%

          \[\leadsto \frac{2}{\frac{\left(\left(k \cdot k\right) \cdot t\right) \cdot \left(0.5 - 0.5 \cdot \cos \left(2 \cdot k\right)\right)}{\left(\cos k \cdot \color{blue}{\ell}\right) \cdot \ell}} \]
      3. Recombined 2 regimes into one program.
      4. Add Preprocessing

      Alternative 17: 61.7% accurate, 2.8× speedup?

      \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;t \leq 3.4 \cdot 10^{-21}:\\ \;\;\;\;\frac{2}{\frac{k \cdot k}{\ell \cdot \ell} \cdot \frac{\left(k \cdot k\right) \cdot t}{\cos k}}\\ \mathbf{else}:\\ \;\;\;\;\frac{2}{\left(\frac{{\left(k \cdot t\right)}^{2}}{\ell \cdot \ell} \cdot 2\right) \cdot t}\\ \end{array} \end{array} \]
      (FPCore (t l k)
       :precision binary64
       (if (<= t 3.4e-21)
         (/ 2.0 (* (/ (* k k) (* l l)) (/ (* (* k k) t) (cos k))))
         (/ 2.0 (* (* (/ (pow (* k t) 2.0) (* l l)) 2.0) t))))
      double code(double t, double l, double k) {
      	double tmp;
      	if (t <= 3.4e-21) {
      		tmp = 2.0 / (((k * k) / (l * l)) * (((k * k) * t) / cos(k)));
      	} else {
      		tmp = 2.0 / (((pow((k * t), 2.0) / (l * l)) * 2.0) * t);
      	}
      	return tmp;
      }
      
      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
          real(8) :: tmp
          if (t <= 3.4d-21) then
              tmp = 2.0d0 / (((k * k) / (l * l)) * (((k * k) * t) / cos(k)))
          else
              tmp = 2.0d0 / (((((k * t) ** 2.0d0) / (l * l)) * 2.0d0) * t)
          end if
          code = tmp
      end function
      
      public static double code(double t, double l, double k) {
      	double tmp;
      	if (t <= 3.4e-21) {
      		tmp = 2.0 / (((k * k) / (l * l)) * (((k * k) * t) / Math.cos(k)));
      	} else {
      		tmp = 2.0 / (((Math.pow((k * t), 2.0) / (l * l)) * 2.0) * t);
      	}
      	return tmp;
      }
      
      def code(t, l, k):
      	tmp = 0
      	if t <= 3.4e-21:
      		tmp = 2.0 / (((k * k) / (l * l)) * (((k * k) * t) / math.cos(k)))
      	else:
      		tmp = 2.0 / (((math.pow((k * t), 2.0) / (l * l)) * 2.0) * t)
      	return tmp
      
      function code(t, l, k)
      	tmp = 0.0
      	if (t <= 3.4e-21)
      		tmp = Float64(2.0 / Float64(Float64(Float64(k * k) / Float64(l * l)) * Float64(Float64(Float64(k * k) * t) / cos(k))));
      	else
      		tmp = Float64(2.0 / Float64(Float64(Float64((Float64(k * t) ^ 2.0) / Float64(l * l)) * 2.0) * t));
      	end
      	return tmp
      end
      
      function tmp_2 = code(t, l, k)
      	tmp = 0.0;
      	if (t <= 3.4e-21)
      		tmp = 2.0 / (((k * k) / (l * l)) * (((k * k) * t) / cos(k)));
      	else
      		tmp = 2.0 / (((((k * t) ^ 2.0) / (l * l)) * 2.0) * t);
      	end
      	tmp_2 = tmp;
      end
      
      code[t_, l_, k_] := If[LessEqual[t, 3.4e-21], N[(2.0 / N[(N[(N[(k * k), $MachinePrecision] / N[(l * l), $MachinePrecision]), $MachinePrecision] * N[(N[(N[(k * k), $MachinePrecision] * t), $MachinePrecision] / N[Cos[k], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(2.0 / N[(N[(N[(N[Power[N[(k * t), $MachinePrecision], 2.0], $MachinePrecision] / N[(l * l), $MachinePrecision]), $MachinePrecision] * 2.0), $MachinePrecision] * t), $MachinePrecision]), $MachinePrecision]]
      
      \begin{array}{l}
      
      \\
      \begin{array}{l}
      \mathbf{if}\;t \leq 3.4 \cdot 10^{-21}:\\
      \;\;\;\;\frac{2}{\frac{k \cdot k}{\ell \cdot \ell} \cdot \frac{\left(k \cdot k\right) \cdot t}{\cos k}}\\
      
      \mathbf{else}:\\
      \;\;\;\;\frac{2}{\left(\frac{{\left(k \cdot t\right)}^{2}}{\ell \cdot \ell} \cdot 2\right) \cdot t}\\
      
      
      \end{array}
      \end{array}
      
      Derivation
      1. Split input into 2 regimes
      2. if t < 3.4e-21

        1. Initial program 50.7%

          \[\frac{2}{\left(\left(\frac{{t}^{3}}{\ell \cdot \ell} \cdot \sin k\right) \cdot \tan k\right) \cdot \left(\left(1 + {\left(\frac{k}{t}\right)}^{2}\right) + 1\right)} \]
        2. Add Preprocessing
        3. Taylor expanded in t around 0

          \[\leadsto \frac{2}{\color{blue}{\frac{{k}^{2} \cdot \left(t \cdot {\sin k}^{2}\right)}{{\ell}^{2} \cdot \cos k}}} \]
        4. Step-by-step derivation
          1. times-fracN/A

            \[\leadsto \frac{2}{\frac{{k}^{2}}{{\ell}^{2}} \cdot \color{blue}{\frac{t \cdot {\sin k}^{2}}{\cos k}}} \]
          2. lower-*.f64N/A

            \[\leadsto \frac{2}{\frac{{k}^{2}}{{\ell}^{2}} \cdot \color{blue}{\frac{t \cdot {\sin k}^{2}}{\cos k}}} \]
          3. lower-/.f64N/A

            \[\leadsto \frac{2}{\frac{{k}^{2}}{{\ell}^{2}} \cdot \frac{\color{blue}{t \cdot {\sin k}^{2}}}{\cos k}} \]
          4. unpow2N/A

            \[\leadsto \frac{2}{\frac{k \cdot k}{{\ell}^{2}} \cdot \frac{\color{blue}{t} \cdot {\sin k}^{2}}{\cos k}} \]
          5. lower-*.f64N/A

            \[\leadsto \frac{2}{\frac{k \cdot k}{{\ell}^{2}} \cdot \frac{\color{blue}{t} \cdot {\sin k}^{2}}{\cos k}} \]
          6. pow2N/A

            \[\leadsto \frac{2}{\frac{k \cdot k}{\ell \cdot \ell} \cdot \frac{t \cdot \color{blue}{{\sin k}^{2}}}{\cos k}} \]
          7. lift-*.f64N/A

            \[\leadsto \frac{2}{\frac{k \cdot k}{\ell \cdot \ell} \cdot \frac{t \cdot \color{blue}{{\sin k}^{2}}}{\cos k}} \]
          8. lower-/.f64N/A

            \[\leadsto \frac{2}{\frac{k \cdot k}{\ell \cdot \ell} \cdot \frac{t \cdot {\sin k}^{2}}{\color{blue}{\cos k}}} \]
          9. *-commutativeN/A

            \[\leadsto \frac{2}{\frac{k \cdot k}{\ell \cdot \ell} \cdot \frac{{\sin k}^{2} \cdot t}{\cos \color{blue}{k}}} \]
          10. lower-*.f64N/A

            \[\leadsto \frac{2}{\frac{k \cdot k}{\ell \cdot \ell} \cdot \frac{{\sin k}^{2} \cdot t}{\cos \color{blue}{k}}} \]
          11. lower-pow.f64N/A

            \[\leadsto \frac{2}{\frac{k \cdot k}{\ell \cdot \ell} \cdot \frac{{\sin k}^{2} \cdot t}{\cos k}} \]
          12. lift-sin.f64N/A

            \[\leadsto \frac{2}{\frac{k \cdot k}{\ell \cdot \ell} \cdot \frac{{\sin k}^{2} \cdot t}{\cos k}} \]
          13. lower-cos.f6463.7

            \[\leadsto \frac{2}{\frac{k \cdot k}{\ell \cdot \ell} \cdot \frac{{\sin k}^{2} \cdot t}{\cos k}} \]
        5. Applied rewrites63.7%

          \[\leadsto \frac{2}{\color{blue}{\frac{k \cdot k}{\ell \cdot \ell} \cdot \frac{{\sin k}^{2} \cdot t}{\cos k}}} \]
        6. Taylor expanded in k around 0

          \[\leadsto \frac{2}{\frac{k \cdot k}{\ell \cdot \ell} \cdot \frac{{k}^{2} \cdot t}{\cos k}} \]
        7. Step-by-step derivation
          1. pow2N/A

            \[\leadsto \frac{2}{\frac{k \cdot k}{\ell \cdot \ell} \cdot \frac{\left(k \cdot k\right) \cdot t}{\cos k}} \]
          2. lift-*.f6458.1

            \[\leadsto \frac{2}{\frac{k \cdot k}{\ell \cdot \ell} \cdot \frac{\left(k \cdot k\right) \cdot t}{\cos k}} \]
        8. Applied rewrites58.1%

          \[\leadsto \frac{2}{\frac{k \cdot k}{\ell \cdot \ell} \cdot \frac{\left(k \cdot k\right) \cdot t}{\cos k}} \]

        if 3.4e-21 < t

        1. Initial program 66.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 rewrites75.3%

          \[\leadsto \frac{2}{\color{blue}{\frac{\mathsf{fma}\left(2, {\left(\sin k \cdot t\right)}^{2}, {\left(\sin k \cdot k\right)}^{2}\right)}{\cos k \cdot \left(\ell \cdot \ell\right)} \cdot t}} \]
        6. Taylor expanded in k around 0

          \[\leadsto \frac{2}{\left(2 \cdot \frac{{k}^{2} \cdot {t}^{2}}{{\ell}^{2}}\right) \cdot t} \]
        7. Step-by-step derivation
          1. *-commutativeN/A

            \[\leadsto \frac{2}{\left(\frac{{k}^{2} \cdot {t}^{2}}{{\ell}^{2}} \cdot 2\right) \cdot t} \]
          2. lower-*.f64N/A

            \[\leadsto \frac{2}{\left(\frac{{k}^{2} \cdot {t}^{2}}{{\ell}^{2}} \cdot 2\right) \cdot t} \]
          3. lower-/.f64N/A

            \[\leadsto \frac{2}{\left(\frac{{k}^{2} \cdot {t}^{2}}{{\ell}^{2}} \cdot 2\right) \cdot t} \]
          4. pow-prod-downN/A

            \[\leadsto \frac{2}{\left(\frac{{\left(k \cdot t\right)}^{2}}{{\ell}^{2}} \cdot 2\right) \cdot t} \]
          5. lower-pow.f64N/A

            \[\leadsto \frac{2}{\left(\frac{{\left(k \cdot t\right)}^{2}}{{\ell}^{2}} \cdot 2\right) \cdot t} \]
          6. lower-*.f64N/A

            \[\leadsto \frac{2}{\left(\frac{{\left(k \cdot t\right)}^{2}}{{\ell}^{2}} \cdot 2\right) \cdot t} \]
          7. pow2N/A

            \[\leadsto \frac{2}{\left(\frac{{\left(k \cdot t\right)}^{2}}{\ell \cdot \ell} \cdot 2\right) \cdot t} \]
          8. lift-*.f6471.4

            \[\leadsto \frac{2}{\left(\frac{{\left(k \cdot t\right)}^{2}}{\ell \cdot \ell} \cdot 2\right) \cdot t} \]
        8. Applied rewrites71.4%

          \[\leadsto \frac{2}{\left(\frac{{\left(k \cdot t\right)}^{2}}{\ell \cdot \ell} \cdot 2\right) \cdot t} \]
      3. Recombined 2 regimes into one program.
      4. Add Preprocessing

      Alternative 18: 60.7% accurate, 2.9× speedup?

      \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;t \leq 1.55 \cdot 10^{-29}:\\ \;\;\;\;\frac{2}{\frac{\left(\left(k \cdot k\right) \cdot t\right) \cdot \left(k \cdot k\right)}{\left(\cos k \cdot \ell\right) \cdot \ell}}\\ \mathbf{else}:\\ \;\;\;\;\frac{2}{\left(\frac{{\left(k \cdot t\right)}^{2}}{\ell \cdot \ell} \cdot 2\right) \cdot t}\\ \end{array} \end{array} \]
      (FPCore (t l k)
       :precision binary64
       (if (<= t 1.55e-29)
         (/ 2.0 (/ (* (* (* k k) t) (* k k)) (* (* (cos k) l) l)))
         (/ 2.0 (* (* (/ (pow (* k t) 2.0) (* l l)) 2.0) t))))
      double code(double t, double l, double k) {
      	double tmp;
      	if (t <= 1.55e-29) {
      		tmp = 2.0 / ((((k * k) * t) * (k * k)) / ((cos(k) * l) * l));
      	} else {
      		tmp = 2.0 / (((pow((k * t), 2.0) / (l * l)) * 2.0) * t);
      	}
      	return tmp;
      }
      
      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
          real(8) :: tmp
          if (t <= 1.55d-29) then
              tmp = 2.0d0 / ((((k * k) * t) * (k * k)) / ((cos(k) * l) * l))
          else
              tmp = 2.0d0 / (((((k * t) ** 2.0d0) / (l * l)) * 2.0d0) * t)
          end if
          code = tmp
      end function
      
      public static double code(double t, double l, double k) {
      	double tmp;
      	if (t <= 1.55e-29) {
      		tmp = 2.0 / ((((k * k) * t) * (k * k)) / ((Math.cos(k) * l) * l));
      	} else {
      		tmp = 2.0 / (((Math.pow((k * t), 2.0) / (l * l)) * 2.0) * t);
      	}
      	return tmp;
      }
      
      def code(t, l, k):
      	tmp = 0
      	if t <= 1.55e-29:
      		tmp = 2.0 / ((((k * k) * t) * (k * k)) / ((math.cos(k) * l) * l))
      	else:
      		tmp = 2.0 / (((math.pow((k * t), 2.0) / (l * l)) * 2.0) * t)
      	return tmp
      
      function code(t, l, k)
      	tmp = 0.0
      	if (t <= 1.55e-29)
      		tmp = Float64(2.0 / Float64(Float64(Float64(Float64(k * k) * t) * Float64(k * k)) / Float64(Float64(cos(k) * l) * l)));
      	else
      		tmp = Float64(2.0 / Float64(Float64(Float64((Float64(k * t) ^ 2.0) / Float64(l * l)) * 2.0) * t));
      	end
      	return tmp
      end
      
      function tmp_2 = code(t, l, k)
      	tmp = 0.0;
      	if (t <= 1.55e-29)
      		tmp = 2.0 / ((((k * k) * t) * (k * k)) / ((cos(k) * l) * l));
      	else
      		tmp = 2.0 / (((((k * t) ^ 2.0) / (l * l)) * 2.0) * t);
      	end
      	tmp_2 = tmp;
      end
      
      code[t_, l_, k_] := If[LessEqual[t, 1.55e-29], N[(2.0 / N[(N[(N[(N[(k * k), $MachinePrecision] * t), $MachinePrecision] * N[(k * k), $MachinePrecision]), $MachinePrecision] / N[(N[(N[Cos[k], $MachinePrecision] * l), $MachinePrecision] * l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(2.0 / N[(N[(N[(N[Power[N[(k * t), $MachinePrecision], 2.0], $MachinePrecision] / N[(l * l), $MachinePrecision]), $MachinePrecision] * 2.0), $MachinePrecision] * t), $MachinePrecision]), $MachinePrecision]]
      
      \begin{array}{l}
      
      \\
      \begin{array}{l}
      \mathbf{if}\;t \leq 1.55 \cdot 10^{-29}:\\
      \;\;\;\;\frac{2}{\frac{\left(\left(k \cdot k\right) \cdot t\right) \cdot \left(k \cdot k\right)}{\left(\cos k \cdot \ell\right) \cdot \ell}}\\
      
      \mathbf{else}:\\
      \;\;\;\;\frac{2}{\left(\frac{{\left(k \cdot t\right)}^{2}}{\ell \cdot \ell} \cdot 2\right) \cdot t}\\
      
      
      \end{array}
      \end{array}
      
      Derivation
      1. Split input into 2 regimes
      2. if t < 1.55000000000000013e-29

        1. Initial program 50.5%

          \[\frac{2}{\left(\left(\frac{{t}^{3}}{\ell \cdot \ell} \cdot \sin k\right) \cdot \tan k\right) \cdot \left(\left(1 + {\left(\frac{k}{t}\right)}^{2}\right) + 1\right)} \]
        2. Add Preprocessing
        3. Taylor expanded in t around 0

          \[\leadsto \frac{2}{\color{blue}{\frac{{k}^{2} \cdot \left(t \cdot {\sin k}^{2}\right)}{{\ell}^{2} \cdot \cos k}}} \]
        4. Step-by-step derivation
          1. times-fracN/A

            \[\leadsto \frac{2}{\frac{{k}^{2}}{{\ell}^{2}} \cdot \color{blue}{\frac{t \cdot {\sin k}^{2}}{\cos k}}} \]
          2. lower-*.f64N/A

            \[\leadsto \frac{2}{\frac{{k}^{2}}{{\ell}^{2}} \cdot \color{blue}{\frac{t \cdot {\sin k}^{2}}{\cos k}}} \]
          3. lower-/.f64N/A

            \[\leadsto \frac{2}{\frac{{k}^{2}}{{\ell}^{2}} \cdot \frac{\color{blue}{t \cdot {\sin k}^{2}}}{\cos k}} \]
          4. unpow2N/A

            \[\leadsto \frac{2}{\frac{k \cdot k}{{\ell}^{2}} \cdot \frac{\color{blue}{t} \cdot {\sin k}^{2}}{\cos k}} \]
          5. lower-*.f64N/A

            \[\leadsto \frac{2}{\frac{k \cdot k}{{\ell}^{2}} \cdot \frac{\color{blue}{t} \cdot {\sin k}^{2}}{\cos k}} \]
          6. pow2N/A

            \[\leadsto \frac{2}{\frac{k \cdot k}{\ell \cdot \ell} \cdot \frac{t \cdot \color{blue}{{\sin k}^{2}}}{\cos k}} \]
          7. lift-*.f64N/A

            \[\leadsto \frac{2}{\frac{k \cdot k}{\ell \cdot \ell} \cdot \frac{t \cdot \color{blue}{{\sin k}^{2}}}{\cos k}} \]
          8. lower-/.f64N/A

            \[\leadsto \frac{2}{\frac{k \cdot k}{\ell \cdot \ell} \cdot \frac{t \cdot {\sin k}^{2}}{\color{blue}{\cos k}}} \]
          9. *-commutativeN/A

            \[\leadsto \frac{2}{\frac{k \cdot k}{\ell \cdot \ell} \cdot \frac{{\sin k}^{2} \cdot t}{\cos \color{blue}{k}}} \]
          10. lower-*.f64N/A

            \[\leadsto \frac{2}{\frac{k \cdot k}{\ell \cdot \ell} \cdot \frac{{\sin k}^{2} \cdot t}{\cos \color{blue}{k}}} \]
          11. lower-pow.f64N/A

            \[\leadsto \frac{2}{\frac{k \cdot k}{\ell \cdot \ell} \cdot \frac{{\sin k}^{2} \cdot t}{\cos k}} \]
          12. lift-sin.f64N/A

            \[\leadsto \frac{2}{\frac{k \cdot k}{\ell \cdot \ell} \cdot \frac{{\sin k}^{2} \cdot t}{\cos k}} \]
          13. lower-cos.f6463.6

            \[\leadsto \frac{2}{\frac{k \cdot k}{\ell \cdot \ell} \cdot \frac{{\sin k}^{2} \cdot t}{\cos k}} \]
        5. Applied rewrites63.6%

          \[\leadsto \frac{2}{\color{blue}{\frac{k \cdot k}{\ell \cdot \ell} \cdot \frac{{\sin k}^{2} \cdot t}{\cos k}}} \]
        6. Step-by-step derivation
          1. lift-*.f64N/A

            \[\leadsto \frac{2}{\frac{k \cdot k}{\ell \cdot \ell} \cdot \color{blue}{\frac{{\sin k}^{2} \cdot t}{\cos k}}} \]
          2. lift-*.f64N/A

            \[\leadsto \frac{2}{\frac{k \cdot k}{\ell \cdot \ell} \cdot \frac{{\sin k}^{2} \cdot \color{blue}{t}}{\cos k}} \]
          3. lift-/.f64N/A

            \[\leadsto \frac{2}{\frac{k \cdot k}{\ell \cdot \ell} \cdot \frac{\color{blue}{{\sin k}^{2} \cdot t}}{\cos k}} \]
          4. lift-*.f64N/A

            \[\leadsto \frac{2}{\frac{k \cdot k}{\ell \cdot \ell} \cdot \frac{\color{blue}{{\sin k}^{2}} \cdot t}{\cos k}} \]
          5. pow2N/A

            \[\leadsto \frac{2}{\frac{{k}^{2}}{\ell \cdot \ell} \cdot \frac{\color{blue}{{\sin k}^{2}} \cdot t}{\cos k}} \]
          6. pow2N/A

            \[\leadsto \frac{2}{\frac{{k}^{2}}{{\ell}^{2}} \cdot \frac{{\sin k}^{2} \cdot \color{blue}{t}}{\cos k}} \]
          7. lift-/.f64N/A

            \[\leadsto \frac{2}{\frac{{k}^{2}}{{\ell}^{2}} \cdot \frac{{\sin k}^{2} \cdot t}{\color{blue}{\cos k}}} \]
          8. lift-*.f64N/A

            \[\leadsto \frac{2}{\frac{{k}^{2}}{{\ell}^{2}} \cdot \frac{{\sin k}^{2} \cdot t}{\cos \color{blue}{k}}} \]
          9. lift-pow.f64N/A

            \[\leadsto \frac{2}{\frac{{k}^{2}}{{\ell}^{2}} \cdot \frac{{\sin k}^{2} \cdot t}{\cos k}} \]
          10. lift-sin.f64N/A

            \[\leadsto \frac{2}{\frac{{k}^{2}}{{\ell}^{2}} \cdot \frac{{\sin k}^{2} \cdot t}{\cos k}} \]
          11. lift-cos.f64N/A

            \[\leadsto \frac{2}{\frac{{k}^{2}}{{\ell}^{2}} \cdot \frac{{\sin k}^{2} \cdot t}{\cos k}} \]
          12. frac-timesN/A

            \[\leadsto \frac{2}{\frac{{k}^{2} \cdot \left({\sin k}^{2} \cdot t\right)}{\color{blue}{{\ell}^{2} \cdot \cos k}}} \]
          13. *-commutativeN/A

            \[\leadsto \frac{2}{\frac{{k}^{2} \cdot \left(t \cdot {\sin k}^{2}\right)}{{\ell}^{\color{blue}{2}} \cdot \cos k}} \]
          14. lower-/.f64N/A

            \[\leadsto \frac{2}{\frac{{k}^{2} \cdot \left(t \cdot {\sin k}^{2}\right)}{\color{blue}{{\ell}^{2} \cdot \cos k}}} \]
        7. Applied rewrites64.6%

          \[\leadsto \frac{2}{\frac{\left(\left(k \cdot k\right) \cdot t\right) \cdot {\sin k}^{2}}{\color{blue}{\left(\cos k \cdot \ell\right) \cdot \ell}}} \]
        8. Taylor expanded in k around 0

          \[\leadsto \frac{2}{\frac{\left(\left(k \cdot k\right) \cdot t\right) \cdot {k}^{2}}{\left(\cos k \cdot \color{blue}{\ell}\right) \cdot \ell}} \]
        9. Step-by-step derivation
          1. pow2N/A

            \[\leadsto \frac{2}{\frac{\left(\left(k \cdot k\right) \cdot t\right) \cdot \left(k \cdot k\right)}{\left(\cos k \cdot \ell\right) \cdot \ell}} \]
          2. lift-*.f6456.7

            \[\leadsto \frac{2}{\frac{\left(\left(k \cdot k\right) \cdot t\right) \cdot \left(k \cdot k\right)}{\left(\cos k \cdot \ell\right) \cdot \ell}} \]
        10. Applied rewrites56.7%

          \[\leadsto \frac{2}{\frac{\left(\left(k \cdot k\right) \cdot t\right) \cdot \left(k \cdot k\right)}{\left(\cos k \cdot \color{blue}{\ell}\right) \cdot \ell}} \]

        if 1.55000000000000013e-29 < t

        1. Initial program 67.1%

          \[\frac{2}{\left(\left(\frac{{t}^{3}}{\ell \cdot \ell} \cdot \sin k\right) \cdot \tan k\right) \cdot \left(\left(1 + {\left(\frac{k}{t}\right)}^{2}\right) + 1\right)} \]
        2. Add Preprocessing
        3. Taylor expanded in t around 0

          \[\leadsto \frac{2}{\color{blue}{t \cdot \left(2 \cdot \frac{{t}^{2} \cdot {\sin k}^{2}}{{\ell}^{2} \cdot \cos k} + \frac{{k}^{2} \cdot {\sin k}^{2}}{{\ell}^{2} \cdot \cos k}\right)}} \]
        4. Step-by-step derivation
          1. *-commutativeN/A

            \[\leadsto \frac{2}{\left(2 \cdot \frac{{t}^{2} \cdot {\sin k}^{2}}{{\ell}^{2} \cdot \cos k} + \frac{{k}^{2} \cdot {\sin k}^{2}}{{\ell}^{2} \cdot \cos k}\right) \cdot \color{blue}{t}} \]
          2. lower-*.f64N/A

            \[\leadsto \frac{2}{\left(2 \cdot \frac{{t}^{2} \cdot {\sin k}^{2}}{{\ell}^{2} \cdot \cos k} + \frac{{k}^{2} \cdot {\sin k}^{2}}{{\ell}^{2} \cdot \cos k}\right) \cdot \color{blue}{t}} \]
        5. Applied rewrites75.3%

          \[\leadsto \frac{2}{\color{blue}{\frac{\mathsf{fma}\left(2, {\left(\sin k \cdot t\right)}^{2}, {\left(\sin k \cdot k\right)}^{2}\right)}{\cos k \cdot \left(\ell \cdot \ell\right)} \cdot t}} \]
        6. Taylor expanded in k around 0

          \[\leadsto \frac{2}{\left(2 \cdot \frac{{k}^{2} \cdot {t}^{2}}{{\ell}^{2}}\right) \cdot t} \]
        7. Step-by-step derivation
          1. *-commutativeN/A

            \[\leadsto \frac{2}{\left(\frac{{k}^{2} \cdot {t}^{2}}{{\ell}^{2}} \cdot 2\right) \cdot t} \]
          2. lower-*.f64N/A

            \[\leadsto \frac{2}{\left(\frac{{k}^{2} \cdot {t}^{2}}{{\ell}^{2}} \cdot 2\right) \cdot t} \]
          3. lower-/.f64N/A

            \[\leadsto \frac{2}{\left(\frac{{k}^{2} \cdot {t}^{2}}{{\ell}^{2}} \cdot 2\right) \cdot t} \]
          4. pow-prod-downN/A

            \[\leadsto \frac{2}{\left(\frac{{\left(k \cdot t\right)}^{2}}{{\ell}^{2}} \cdot 2\right) \cdot t} \]
          5. lower-pow.f64N/A

            \[\leadsto \frac{2}{\left(\frac{{\left(k \cdot t\right)}^{2}}{{\ell}^{2}} \cdot 2\right) \cdot t} \]
          6. lower-*.f64N/A

            \[\leadsto \frac{2}{\left(\frac{{\left(k \cdot t\right)}^{2}}{{\ell}^{2}} \cdot 2\right) \cdot t} \]
          7. pow2N/A

            \[\leadsto \frac{2}{\left(\frac{{\left(k \cdot t\right)}^{2}}{\ell \cdot \ell} \cdot 2\right) \cdot t} \]
          8. lift-*.f6471.2

            \[\leadsto \frac{2}{\left(\frac{{\left(k \cdot t\right)}^{2}}{\ell \cdot \ell} \cdot 2\right) \cdot t} \]
        8. Applied rewrites71.2%

          \[\leadsto \frac{2}{\left(\frac{{\left(k \cdot t\right)}^{2}}{\ell \cdot \ell} \cdot 2\right) \cdot t} \]
      3. Recombined 2 regimes into one program.
      4. Add Preprocessing

      Alternative 19: 62.4% accurate, 3.2× speedup?

      \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;t \leq 1.45 \cdot 10^{-22}:\\ \;\;\;\;\frac{2}{{\left(\frac{k}{\ell}\right)}^{2} \cdot \left(\left(k \cdot k\right) \cdot t\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{\ell \cdot \ell}{{\left(k \cdot t\right)}^{2} \cdot t}\\ \end{array} \end{array} \]
      (FPCore (t l k)
       :precision binary64
       (if (<= t 1.45e-22)
         (/ 2.0 (* (pow (/ k l) 2.0) (* (* k k) t)))
         (/ (* l l) (* (pow (* k t) 2.0) t))))
      double code(double t, double l, double k) {
      	double tmp;
      	if (t <= 1.45e-22) {
      		tmp = 2.0 / (pow((k / l), 2.0) * ((k * k) * t));
      	} else {
      		tmp = (l * l) / (pow((k * t), 2.0) * t);
      	}
      	return tmp;
      }
      
      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
          real(8) :: tmp
          if (t <= 1.45d-22) then
              tmp = 2.0d0 / (((k / l) ** 2.0d0) * ((k * k) * t))
          else
              tmp = (l * l) / (((k * t) ** 2.0d0) * t)
          end if
          code = tmp
      end function
      
      public static double code(double t, double l, double k) {
      	double tmp;
      	if (t <= 1.45e-22) {
      		tmp = 2.0 / (Math.pow((k / l), 2.0) * ((k * k) * t));
      	} else {
      		tmp = (l * l) / (Math.pow((k * t), 2.0) * t);
      	}
      	return tmp;
      }
      
      def code(t, l, k):
      	tmp = 0
      	if t <= 1.45e-22:
      		tmp = 2.0 / (math.pow((k / l), 2.0) * ((k * k) * t))
      	else:
      		tmp = (l * l) / (math.pow((k * t), 2.0) * t)
      	return tmp
      
      function code(t, l, k)
      	tmp = 0.0
      	if (t <= 1.45e-22)
      		tmp = Float64(2.0 / Float64((Float64(k / l) ^ 2.0) * Float64(Float64(k * k) * t)));
      	else
      		tmp = Float64(Float64(l * l) / Float64((Float64(k * t) ^ 2.0) * t));
      	end
      	return tmp
      end
      
      function tmp_2 = code(t, l, k)
      	tmp = 0.0;
      	if (t <= 1.45e-22)
      		tmp = 2.0 / (((k / l) ^ 2.0) * ((k * k) * t));
      	else
      		tmp = (l * l) / (((k * t) ^ 2.0) * t);
      	end
      	tmp_2 = tmp;
      end
      
      code[t_, l_, k_] := If[LessEqual[t, 1.45e-22], N[(2.0 / N[(N[Power[N[(k / l), $MachinePrecision], 2.0], $MachinePrecision] * N[(N[(k * k), $MachinePrecision] * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(l * l), $MachinePrecision] / N[(N[Power[N[(k * t), $MachinePrecision], 2.0], $MachinePrecision] * t), $MachinePrecision]), $MachinePrecision]]
      
      \begin{array}{l}
      
      \\
      \begin{array}{l}
      \mathbf{if}\;t \leq 1.45 \cdot 10^{-22}:\\
      \;\;\;\;\frac{2}{{\left(\frac{k}{\ell}\right)}^{2} \cdot \left(\left(k \cdot k\right) \cdot t\right)}\\
      
      \mathbf{else}:\\
      \;\;\;\;\frac{\ell \cdot \ell}{{\left(k \cdot t\right)}^{2} \cdot t}\\
      
      
      \end{array}
      \end{array}
      
      Derivation
      1. Split input into 2 regimes
      2. if t < 1.4500000000000001e-22

        1. Initial program 50.7%

          \[\frac{2}{\left(\left(\frac{{t}^{3}}{\ell \cdot \ell} \cdot \sin k\right) \cdot \tan k\right) \cdot \left(\left(1 + {\left(\frac{k}{t}\right)}^{2}\right) + 1\right)} \]
        2. Add Preprocessing
        3. Taylor expanded in t around 0

          \[\leadsto \frac{2}{\color{blue}{\frac{{k}^{2} \cdot \left(t \cdot {\sin k}^{2}\right)}{{\ell}^{2} \cdot \cos k}}} \]
        4. Step-by-step derivation
          1. times-fracN/A

            \[\leadsto \frac{2}{\frac{{k}^{2}}{{\ell}^{2}} \cdot \color{blue}{\frac{t \cdot {\sin k}^{2}}{\cos k}}} \]
          2. lower-*.f64N/A

            \[\leadsto \frac{2}{\frac{{k}^{2}}{{\ell}^{2}} \cdot \color{blue}{\frac{t \cdot {\sin k}^{2}}{\cos k}}} \]
          3. lower-/.f64N/A

            \[\leadsto \frac{2}{\frac{{k}^{2}}{{\ell}^{2}} \cdot \frac{\color{blue}{t \cdot {\sin k}^{2}}}{\cos k}} \]
          4. unpow2N/A

            \[\leadsto \frac{2}{\frac{k \cdot k}{{\ell}^{2}} \cdot \frac{\color{blue}{t} \cdot {\sin k}^{2}}{\cos k}} \]
          5. lower-*.f64N/A

            \[\leadsto \frac{2}{\frac{k \cdot k}{{\ell}^{2}} \cdot \frac{\color{blue}{t} \cdot {\sin k}^{2}}{\cos k}} \]
          6. pow2N/A

            \[\leadsto \frac{2}{\frac{k \cdot k}{\ell \cdot \ell} \cdot \frac{t \cdot \color{blue}{{\sin k}^{2}}}{\cos k}} \]
          7. lift-*.f64N/A

            \[\leadsto \frac{2}{\frac{k \cdot k}{\ell \cdot \ell} \cdot \frac{t \cdot \color{blue}{{\sin k}^{2}}}{\cos k}} \]
          8. lower-/.f64N/A

            \[\leadsto \frac{2}{\frac{k \cdot k}{\ell \cdot \ell} \cdot \frac{t \cdot {\sin k}^{2}}{\color{blue}{\cos k}}} \]
          9. *-commutativeN/A

            \[\leadsto \frac{2}{\frac{k \cdot k}{\ell \cdot \ell} \cdot \frac{{\sin k}^{2} \cdot t}{\cos \color{blue}{k}}} \]
          10. lower-*.f64N/A

            \[\leadsto \frac{2}{\frac{k \cdot k}{\ell \cdot \ell} \cdot \frac{{\sin k}^{2} \cdot t}{\cos \color{blue}{k}}} \]
          11. lower-pow.f64N/A

            \[\leadsto \frac{2}{\frac{k \cdot k}{\ell \cdot \ell} \cdot \frac{{\sin k}^{2} \cdot t}{\cos k}} \]
          12. lift-sin.f64N/A

            \[\leadsto \frac{2}{\frac{k \cdot k}{\ell \cdot \ell} \cdot \frac{{\sin k}^{2} \cdot t}{\cos k}} \]
          13. lower-cos.f6463.7

            \[\leadsto \frac{2}{\frac{k \cdot k}{\ell \cdot \ell} \cdot \frac{{\sin k}^{2} \cdot t}{\cos k}} \]
        5. Applied rewrites63.7%

          \[\leadsto \frac{2}{\color{blue}{\frac{k \cdot k}{\ell \cdot \ell} \cdot \frac{{\sin k}^{2} \cdot t}{\cos k}}} \]
        6. Taylor expanded in k around 0

          \[\leadsto \frac{2}{\frac{k \cdot k}{\ell \cdot \ell} \cdot \left({k}^{2} \cdot \color{blue}{t}\right)} \]
        7. Step-by-step derivation
          1. lower-*.f64N/A

            \[\leadsto \frac{2}{\frac{k \cdot k}{\ell \cdot \ell} \cdot \left({k}^{2} \cdot t\right)} \]
          2. pow2N/A

            \[\leadsto \frac{2}{\frac{k \cdot k}{\ell \cdot \ell} \cdot \left(\left(k \cdot k\right) \cdot t\right)} \]
          3. lift-*.f6455.6

            \[\leadsto \frac{2}{\frac{k \cdot k}{\ell \cdot \ell} \cdot \left(\left(k \cdot k\right) \cdot t\right)} \]
        8. Applied rewrites55.6%

          \[\leadsto \frac{2}{\frac{k \cdot k}{\ell \cdot \ell} \cdot \left(\left(k \cdot k\right) \cdot \color{blue}{t}\right)} \]
        9. Step-by-step derivation
          1. lift-*.f64N/A

            \[\leadsto \frac{2}{\frac{k \cdot k}{\ell \cdot \ell} \cdot \left(\left(k \cdot \color{blue}{k}\right) \cdot t\right)} \]
          2. lift-/.f64N/A

            \[\leadsto \frac{2}{\frac{k \cdot k}{\ell \cdot \ell} \cdot \left(\color{blue}{\left(k \cdot k\right)} \cdot t\right)} \]
          3. lift-*.f64N/A

            \[\leadsto \frac{2}{\frac{k \cdot k}{\ell \cdot \ell} \cdot \left(\left(\color{blue}{k} \cdot k\right) \cdot t\right)} \]
          4. times-fracN/A

            \[\leadsto \frac{2}{\left(\frac{k}{\ell} \cdot \frac{k}{\ell}\right) \cdot \left(\color{blue}{\left(k \cdot k\right)} \cdot t\right)} \]
          5. unpow2N/A

            \[\leadsto \frac{2}{{\left(\frac{k}{\ell}\right)}^{2} \cdot \left(\color{blue}{\left(k \cdot k\right)} \cdot t\right)} \]
          6. lift-pow.f64N/A

            \[\leadsto \frac{2}{{\left(\frac{k}{\ell}\right)}^{2} \cdot \left(\color{blue}{\left(k \cdot k\right)} \cdot t\right)} \]
          7. lift-/.f6458.8

            \[\leadsto \frac{2}{{\left(\frac{k}{\ell}\right)}^{2} \cdot \left(\left(\color{blue}{k} \cdot k\right) \cdot t\right)} \]
        10. Applied rewrites58.8%

          \[\leadsto \color{blue}{\frac{2}{{\left(\frac{k}{\ell}\right)}^{2} \cdot \left(\left(k \cdot k\right) \cdot t\right)}} \]

        if 1.4500000000000001e-22 < t

        1. Initial program 67.0%

          \[\frac{2}{\left(\left(\frac{{t}^{3}}{\ell \cdot \ell} \cdot \sin k\right) \cdot \tan k\right) \cdot \left(\left(1 + {\left(\frac{k}{t}\right)}^{2}\right) + 1\right)} \]
        2. Add Preprocessing
        3. Taylor expanded in k around 0

          \[\leadsto \color{blue}{\frac{{\ell}^{2}}{{k}^{2} \cdot {t}^{3}}} \]
        4. Step-by-step derivation
          1. lower-/.f64N/A

            \[\leadsto \frac{{\ell}^{2}}{\color{blue}{{k}^{2} \cdot {t}^{3}}} \]
          2. pow2N/A

            \[\leadsto \frac{\ell \cdot \ell}{\color{blue}{{k}^{2}} \cdot {t}^{3}} \]
          3. lift-*.f64N/A

            \[\leadsto \frac{\ell \cdot \ell}{\color{blue}{{k}^{2}} \cdot {t}^{3}} \]
          4. lower-*.f64N/A

            \[\leadsto \frac{\ell \cdot \ell}{{k}^{2} \cdot \color{blue}{{t}^{3}}} \]
          5. unpow2N/A

            \[\leadsto \frac{\ell \cdot \ell}{\left(k \cdot k\right) \cdot {\color{blue}{t}}^{3}} \]
          6. lower-*.f64N/A

            \[\leadsto \frac{\ell \cdot \ell}{\left(k \cdot k\right) \cdot {\color{blue}{t}}^{3}} \]
          7. lift-pow.f6456.3

            \[\leadsto \frac{\ell \cdot \ell}{\left(k \cdot k\right) \cdot {t}^{\color{blue}{3}}} \]
        5. Applied rewrites56.3%

          \[\leadsto \color{blue}{\frac{\ell \cdot \ell}{\left(k \cdot k\right) \cdot {t}^{3}}} \]
        6. Step-by-step derivation
          1. lift-pow.f64N/A

            \[\leadsto \frac{\ell \cdot \ell}{\left(k \cdot k\right) \cdot {t}^{\color{blue}{3}}} \]
          2. pow3N/A

            \[\leadsto \frac{\ell \cdot \ell}{\left(k \cdot k\right) \cdot \left(\left(t \cdot t\right) \cdot \color{blue}{t}\right)} \]
          3. lift-*.f64N/A

            \[\leadsto \frac{\ell \cdot \ell}{\left(k \cdot k\right) \cdot \left(\left(t \cdot t\right) \cdot t\right)} \]
          4. lift-*.f6456.3

            \[\leadsto \frac{\ell \cdot \ell}{\left(k \cdot k\right) \cdot \left(\left(t \cdot t\right) \cdot \color{blue}{t}\right)} \]
        7. Applied rewrites56.3%

          \[\leadsto \frac{\ell \cdot \ell}{\left(k \cdot k\right) \cdot \left(\left(t \cdot t\right) \cdot \color{blue}{t}\right)} \]
        8. Step-by-step derivation
          1. lift-*.f64N/A

            \[\leadsto \frac{\ell \cdot \ell}{\left(k \cdot k\right) \cdot \color{blue}{\left(\left(t \cdot t\right) \cdot t\right)}} \]
          2. lift-*.f64N/A

            \[\leadsto \frac{\ell \cdot \ell}{\left(k \cdot k\right) \cdot \left(\color{blue}{\left(t \cdot t\right)} \cdot t\right)} \]
          3. pow2N/A

            \[\leadsto \frac{\ell \cdot \ell}{{k}^{2} \cdot \left(\color{blue}{\left(t \cdot t\right)} \cdot t\right)} \]
          4. lift-*.f64N/A

            \[\leadsto \frac{\ell \cdot \ell}{{k}^{2} \cdot \left(\left(t \cdot t\right) \cdot \color{blue}{t}\right)} \]
          5. lift-*.f64N/A

            \[\leadsto \frac{\ell \cdot \ell}{{k}^{2} \cdot \left(\left(t \cdot t\right) \cdot t\right)} \]
          6. pow2N/A

            \[\leadsto \frac{\ell \cdot \ell}{{k}^{2} \cdot \left({t}^{2} \cdot t\right)} \]
          7. associate-*r*N/A

            \[\leadsto \frac{\ell \cdot \ell}{\left({k}^{2} \cdot {t}^{2}\right) \cdot \color{blue}{t}} \]
          8. lower-*.f64N/A

            \[\leadsto \frac{\ell \cdot \ell}{\left({k}^{2} \cdot {t}^{2}\right) \cdot \color{blue}{t}} \]
          9. pow-prod-downN/A

            \[\leadsto \frac{\ell \cdot \ell}{{\left(k \cdot t\right)}^{2} \cdot t} \]
          10. lower-pow.f64N/A

            \[\leadsto \frac{\ell \cdot \ell}{{\left(k \cdot t\right)}^{2} \cdot t} \]
          11. lower-*.f6471.9

            \[\leadsto \frac{\ell \cdot \ell}{{\left(k \cdot t\right)}^{2} \cdot t} \]
        9. Applied rewrites71.9%

          \[\leadsto \frac{\ell \cdot \ell}{{\left(k \cdot t\right)}^{2} \cdot \color{blue}{t}} \]
      3. Recombined 2 regimes into one program.
      4. Add Preprocessing

      Alternative 20: 55.2% accurate, 3.4× speedup?

      \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;t \leq 1.55 \cdot 10^{-29}:\\ \;\;\;\;\frac{2}{\frac{\mathsf{fma}\left(\mathsf{fma}\left(\mathsf{fma}\left(\mathsf{fma}\left(-0.006349206349206349, t \cdot t, 0.044444444444444446\right), k \cdot k, 0.08888888888888889 \cdot \left(t \cdot t\right)\right) - 0.3333333333333333, k \cdot k, -0.6666666666666666 \cdot \left(t \cdot t\right)\right) + 1, k \cdot k, \left(t \cdot t\right) \cdot 2\right) \cdot \left(k \cdot k\right)}{1 \cdot \left(\ell \cdot \ell\right)} \cdot t}\\ \mathbf{else}:\\ \;\;\;\;\frac{\ell \cdot \ell}{{\left(k \cdot t\right)}^{2} \cdot t}\\ \end{array} \end{array} \]
      (FPCore (t l k)
       :precision binary64
       (if (<= t 1.55e-29)
         (/
          2.0
          (*
           (/
            (*
             (fma
              (+
               (fma
                (-
                 (fma
                  (fma -0.006349206349206349 (* t t) 0.044444444444444446)
                  (* k k)
                  (* 0.08888888888888889 (* t t)))
                 0.3333333333333333)
                (* k k)
                (* -0.6666666666666666 (* t t)))
               1.0)
              (* k k)
              (* (* t t) 2.0))
             (* k k))
            (* 1.0 (* l l)))
           t))
         (/ (* l l) (* (pow (* k t) 2.0) t))))
      double code(double t, double l, double k) {
      	double tmp;
      	if (t <= 1.55e-29) {
      		tmp = 2.0 / (((fma((fma((fma(fma(-0.006349206349206349, (t * t), 0.044444444444444446), (k * k), (0.08888888888888889 * (t * t))) - 0.3333333333333333), (k * k), (-0.6666666666666666 * (t * t))) + 1.0), (k * k), ((t * t) * 2.0)) * (k * k)) / (1.0 * (l * l))) * t);
      	} else {
      		tmp = (l * l) / (pow((k * t), 2.0) * t);
      	}
      	return tmp;
      }
      
      function code(t, l, k)
      	tmp = 0.0
      	if (t <= 1.55e-29)
      		tmp = Float64(2.0 / Float64(Float64(Float64(fma(Float64(fma(Float64(fma(fma(-0.006349206349206349, Float64(t * t), 0.044444444444444446), Float64(k * k), Float64(0.08888888888888889 * Float64(t * t))) - 0.3333333333333333), Float64(k * k), Float64(-0.6666666666666666 * Float64(t * t))) + 1.0), Float64(k * k), Float64(Float64(t * t) * 2.0)) * Float64(k * k)) / Float64(1.0 * Float64(l * l))) * t));
      	else
      		tmp = Float64(Float64(l * l) / Float64((Float64(k * t) ^ 2.0) * t));
      	end
      	return tmp
      end
      
      code[t_, l_, k_] := If[LessEqual[t, 1.55e-29], N[(2.0 / N[(N[(N[(N[(N[(N[(N[(N[(N[(-0.006349206349206349 * N[(t * t), $MachinePrecision] + 0.044444444444444446), $MachinePrecision] * N[(k * k), $MachinePrecision] + N[(0.08888888888888889 * N[(t * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - 0.3333333333333333), $MachinePrecision] * N[(k * k), $MachinePrecision] + N[(-0.6666666666666666 * N[(t * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + 1.0), $MachinePrecision] * N[(k * k), $MachinePrecision] + N[(N[(t * t), $MachinePrecision] * 2.0), $MachinePrecision]), $MachinePrecision] * N[(k * k), $MachinePrecision]), $MachinePrecision] / N[(1.0 * N[(l * l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * t), $MachinePrecision]), $MachinePrecision], N[(N[(l * l), $MachinePrecision] / N[(N[Power[N[(k * t), $MachinePrecision], 2.0], $MachinePrecision] * t), $MachinePrecision]), $MachinePrecision]]
      
      \begin{array}{l}
      
      \\
      \begin{array}{l}
      \mathbf{if}\;t \leq 1.55 \cdot 10^{-29}:\\
      \;\;\;\;\frac{2}{\frac{\mathsf{fma}\left(\mathsf{fma}\left(\mathsf{fma}\left(\mathsf{fma}\left(-0.006349206349206349, t \cdot t, 0.044444444444444446\right), k \cdot k, 0.08888888888888889 \cdot \left(t \cdot t\right)\right) - 0.3333333333333333, k \cdot k, -0.6666666666666666 \cdot \left(t \cdot t\right)\right) + 1, k \cdot k, \left(t \cdot t\right) \cdot 2\right) \cdot \left(k \cdot k\right)}{1 \cdot \left(\ell \cdot \ell\right)} \cdot t}\\
      
      \mathbf{else}:\\
      \;\;\;\;\frac{\ell \cdot \ell}{{\left(k \cdot t\right)}^{2} \cdot t}\\
      
      
      \end{array}
      \end{array}
      
      Derivation
      1. Split input into 2 regimes
      2. if t < 1.55000000000000013e-29

        1. Initial program 50.5%

          \[\frac{2}{\left(\left(\frac{{t}^{3}}{\ell \cdot \ell} \cdot \sin k\right) \cdot \tan k\right) \cdot \left(\left(1 + {\left(\frac{k}{t}\right)}^{2}\right) + 1\right)} \]
        2. Add Preprocessing
        3. Taylor expanded in t around 0

          \[\leadsto \frac{2}{\color{blue}{t \cdot \left(2 \cdot \frac{{t}^{2} \cdot {\sin k}^{2}}{{\ell}^{2} \cdot \cos k} + \frac{{k}^{2} \cdot {\sin k}^{2}}{{\ell}^{2} \cdot \cos k}\right)}} \]
        4. Step-by-step derivation
          1. *-commutativeN/A

            \[\leadsto \frac{2}{\left(2 \cdot \frac{{t}^{2} \cdot {\sin k}^{2}}{{\ell}^{2} \cdot \cos k} + \frac{{k}^{2} \cdot {\sin k}^{2}}{{\ell}^{2} \cdot \cos k}\right) \cdot \color{blue}{t}} \]
          2. lower-*.f64N/A

            \[\leadsto \frac{2}{\left(2 \cdot \frac{{t}^{2} \cdot {\sin k}^{2}}{{\ell}^{2} \cdot \cos k} + \frac{{k}^{2} \cdot {\sin k}^{2}}{{\ell}^{2} \cdot \cos k}\right) \cdot \color{blue}{t}} \]
        5. Applied 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. Taylor expanded in k around 0

          \[\leadsto \frac{2}{\frac{{k}^{2} \cdot \left(2 \cdot {t}^{2} + {k}^{2} \cdot \left(1 + \left(\frac{-2}{3} \cdot {t}^{2} + {k}^{2} \cdot \left(\left(\frac{4}{45} \cdot {t}^{2} + {k}^{2} \cdot \left(\frac{2}{45} + \frac{-2}{315} \cdot {t}^{2}\right)\right) - \frac{1}{3}\right)\right)\right)\right)}{\cos k \cdot \left(\ell \cdot \ell\right)} \cdot t} \]
        7. Step-by-step derivation
          1. *-commutativeN/A

            \[\leadsto \frac{2}{\frac{\left(2 \cdot {t}^{2} + {k}^{2} \cdot \left(1 + \left(\frac{-2}{3} \cdot {t}^{2} + {k}^{2} \cdot \left(\left(\frac{4}{45} \cdot {t}^{2} + {k}^{2} \cdot \left(\frac{2}{45} + \frac{-2}{315} \cdot {t}^{2}\right)\right) - \frac{1}{3}\right)\right)\right)\right) \cdot {k}^{2}}{\cos k \cdot \left(\ell \cdot \ell\right)} \cdot t} \]
          2. lower-*.f64N/A

            \[\leadsto \frac{2}{\frac{\left(2 \cdot {t}^{2} + {k}^{2} \cdot \left(1 + \left(\frac{-2}{3} \cdot {t}^{2} + {k}^{2} \cdot \left(\left(\frac{4}{45} \cdot {t}^{2} + {k}^{2} \cdot \left(\frac{2}{45} + \frac{-2}{315} \cdot {t}^{2}\right)\right) - \frac{1}{3}\right)\right)\right)\right) \cdot {k}^{2}}{\cos k \cdot \left(\ell \cdot \ell\right)} \cdot t} \]
        8. Applied rewrites49.5%

          \[\leadsto \frac{2}{\frac{\mathsf{fma}\left(\mathsf{fma}\left(\mathsf{fma}\left(\mathsf{fma}\left(-0.006349206349206349, t \cdot t, 0.044444444444444446\right), k \cdot k, 0.08888888888888889 \cdot \left(t \cdot t\right)\right) - 0.3333333333333333, k \cdot k, -0.6666666666666666 \cdot \left(t \cdot t\right)\right) + 1, k \cdot k, \left(t \cdot t\right) \cdot 2\right) \cdot \left(k \cdot k\right)}{\cos k \cdot \left(\ell \cdot \ell\right)} \cdot t} \]
        9. Taylor expanded in k around 0

          \[\leadsto \frac{2}{\frac{\mathsf{fma}\left(\mathsf{fma}\left(\mathsf{fma}\left(\mathsf{fma}\left(\frac{-2}{315}, t \cdot t, \frac{2}{45}\right), k \cdot k, \frac{4}{45} \cdot \left(t \cdot t\right)\right) - \frac{1}{3}, k \cdot k, \frac{-2}{3} \cdot \left(t \cdot t\right)\right) + 1, k \cdot k, \left(t \cdot t\right) \cdot 2\right) \cdot \left(k \cdot k\right)}{1 \cdot \left(\ell \cdot \ell\right)} \cdot t} \]
        10. Step-by-step derivation
          1. Applied rewrites48.8%

            \[\leadsto \frac{2}{\frac{\mathsf{fma}\left(\mathsf{fma}\left(\mathsf{fma}\left(\mathsf{fma}\left(-0.006349206349206349, t \cdot t, 0.044444444444444446\right), k \cdot k, 0.08888888888888889 \cdot \left(t \cdot t\right)\right) - 0.3333333333333333, k \cdot k, -0.6666666666666666 \cdot \left(t \cdot t\right)\right) + 1, k \cdot k, \left(t \cdot t\right) \cdot 2\right) \cdot \left(k \cdot k\right)}{1 \cdot \left(\ell \cdot \ell\right)} \cdot t} \]

          if 1.55000000000000013e-29 < t

          1. Initial program 67.1%

            \[\frac{2}{\left(\left(\frac{{t}^{3}}{\ell \cdot \ell} \cdot \sin k\right) \cdot \tan k\right) \cdot \left(\left(1 + {\left(\frac{k}{t}\right)}^{2}\right) + 1\right)} \]
          2. Add Preprocessing
          3. Taylor expanded in k around 0

            \[\leadsto \color{blue}{\frac{{\ell}^{2}}{{k}^{2} \cdot {t}^{3}}} \]
          4. Step-by-step derivation
            1. lower-/.f64N/A

              \[\leadsto \frac{{\ell}^{2}}{\color{blue}{{k}^{2} \cdot {t}^{3}}} \]
            2. pow2N/A

              \[\leadsto \frac{\ell \cdot \ell}{\color{blue}{{k}^{2}} \cdot {t}^{3}} \]
            3. lift-*.f64N/A

              \[\leadsto \frac{\ell \cdot \ell}{\color{blue}{{k}^{2}} \cdot {t}^{3}} \]
            4. lower-*.f64N/A

              \[\leadsto \frac{\ell \cdot \ell}{{k}^{2} \cdot \color{blue}{{t}^{3}}} \]
            5. unpow2N/A

              \[\leadsto \frac{\ell \cdot \ell}{\left(k \cdot k\right) \cdot {\color{blue}{t}}^{3}} \]
            6. lower-*.f64N/A

              \[\leadsto \frac{\ell \cdot \ell}{\left(k \cdot k\right) \cdot {\color{blue}{t}}^{3}} \]
            7. lift-pow.f6456.4

              \[\leadsto \frac{\ell \cdot \ell}{\left(k \cdot k\right) \cdot {t}^{\color{blue}{3}}} \]
          5. Applied rewrites56.4%

            \[\leadsto \color{blue}{\frac{\ell \cdot \ell}{\left(k \cdot k\right) \cdot {t}^{3}}} \]
          6. Step-by-step derivation
            1. lift-pow.f64N/A

              \[\leadsto \frac{\ell \cdot \ell}{\left(k \cdot k\right) \cdot {t}^{\color{blue}{3}}} \]
            2. pow3N/A

              \[\leadsto \frac{\ell \cdot \ell}{\left(k \cdot k\right) \cdot \left(\left(t \cdot t\right) \cdot \color{blue}{t}\right)} \]
            3. lift-*.f64N/A

              \[\leadsto \frac{\ell \cdot \ell}{\left(k \cdot k\right) \cdot \left(\left(t \cdot t\right) \cdot t\right)} \]
            4. lift-*.f6456.4

              \[\leadsto \frac{\ell \cdot \ell}{\left(k \cdot k\right) \cdot \left(\left(t \cdot t\right) \cdot \color{blue}{t}\right)} \]
          7. Applied rewrites56.4%

            \[\leadsto \frac{\ell \cdot \ell}{\left(k \cdot k\right) \cdot \left(\left(t \cdot t\right) \cdot \color{blue}{t}\right)} \]
          8. Step-by-step derivation
            1. lift-*.f64N/A

              \[\leadsto \frac{\ell \cdot \ell}{\left(k \cdot k\right) \cdot \color{blue}{\left(\left(t \cdot t\right) \cdot t\right)}} \]
            2. lift-*.f64N/A

              \[\leadsto \frac{\ell \cdot \ell}{\left(k \cdot k\right) \cdot \left(\color{blue}{\left(t \cdot t\right)} \cdot t\right)} \]
            3. pow2N/A

              \[\leadsto \frac{\ell \cdot \ell}{{k}^{2} \cdot \left(\color{blue}{\left(t \cdot t\right)} \cdot t\right)} \]
            4. lift-*.f64N/A

              \[\leadsto \frac{\ell \cdot \ell}{{k}^{2} \cdot \left(\left(t \cdot t\right) \cdot \color{blue}{t}\right)} \]
            5. lift-*.f64N/A

              \[\leadsto \frac{\ell \cdot \ell}{{k}^{2} \cdot \left(\left(t \cdot t\right) \cdot t\right)} \]
            6. pow2N/A

              \[\leadsto \frac{\ell \cdot \ell}{{k}^{2} \cdot \left({t}^{2} \cdot t\right)} \]
            7. associate-*r*N/A

              \[\leadsto \frac{\ell \cdot \ell}{\left({k}^{2} \cdot {t}^{2}\right) \cdot \color{blue}{t}} \]
            8. lower-*.f64N/A

              \[\leadsto \frac{\ell \cdot \ell}{\left({k}^{2} \cdot {t}^{2}\right) \cdot \color{blue}{t}} \]
            9. pow-prod-downN/A

              \[\leadsto \frac{\ell \cdot \ell}{{\left(k \cdot t\right)}^{2} \cdot t} \]
            10. lower-pow.f64N/A

              \[\leadsto \frac{\ell \cdot \ell}{{\left(k \cdot t\right)}^{2} \cdot t} \]
            11. lower-*.f6471.6

              \[\leadsto \frac{\ell \cdot \ell}{{\left(k \cdot t\right)}^{2} \cdot t} \]
          9. Applied rewrites71.6%

            \[\leadsto \frac{\ell \cdot \ell}{{\left(k \cdot t\right)}^{2} \cdot \color{blue}{t}} \]
        11. Recombined 2 regimes into one program.
        12. Add Preprocessing

        Alternative 21: 63.1% accurate, 3.4× speedup?

        \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;k \leq 6.6 \cdot 10^{-153}:\\ \;\;\;\;\frac{\ell \cdot \ell}{{\left(k \cdot t\right)}^{2} \cdot t}\\ \mathbf{elif}\;k \leq 2.55 \cdot 10^{+33}:\\ \;\;\;\;\frac{2}{\frac{\left(\mathsf{fma}\left(\mathsf{fma}\left(k \cdot k, -0.006349206349206349, 0.08888888888888889\right) \cdot \left(k \cdot k\right) - 0.6666666666666666, k \cdot k, 2\right) \cdot \left(t \cdot t\right)\right) \cdot \left(k \cdot k\right)}{\mathsf{fma}\left(0.041666666666666664 \cdot \left(k \cdot k\right) - 0.5, k \cdot k, 1\right) \cdot \left(\ell \cdot \ell\right)} \cdot t}\\ \mathbf{else}:\\ \;\;\;\;\frac{2}{\frac{k \cdot k}{\ell \cdot \ell} \cdot \left(k \cdot \left(k \cdot t\right)\right)}\\ \end{array} \end{array} \]
        (FPCore (t l k)
         :precision binary64
         (if (<= k 6.6e-153)
           (/ (* l l) (* (pow (* k t) 2.0) t))
           (if (<= k 2.55e+33)
             (/
              2.0
              (*
               (/
                (*
                 (*
                  (fma
                   (-
                    (* (fma (* k k) -0.006349206349206349 0.08888888888888889) (* k k))
                    0.6666666666666666)
                   (* k k)
                   2.0)
                  (* t t))
                 (* k k))
                (* (fma (- (* 0.041666666666666664 (* k k)) 0.5) (* k k) 1.0) (* l l)))
               t))
             (/ 2.0 (* (/ (* k k) (* l l)) (* k (* k t)))))))
        double code(double t, double l, double k) {
        	double tmp;
        	if (k <= 6.6e-153) {
        		tmp = (l * l) / (pow((k * t), 2.0) * t);
        	} else if (k <= 2.55e+33) {
        		tmp = 2.0 / ((((fma(((fma((k * k), -0.006349206349206349, 0.08888888888888889) * (k * k)) - 0.6666666666666666), (k * k), 2.0) * (t * t)) * (k * k)) / (fma(((0.041666666666666664 * (k * k)) - 0.5), (k * k), 1.0) * (l * l))) * t);
        	} else {
        		tmp = 2.0 / (((k * k) / (l * l)) * (k * (k * t)));
        	}
        	return tmp;
        }
        
        function code(t, l, k)
        	tmp = 0.0
        	if (k <= 6.6e-153)
        		tmp = Float64(Float64(l * l) / Float64((Float64(k * t) ^ 2.0) * t));
        	elseif (k <= 2.55e+33)
        		tmp = Float64(2.0 / Float64(Float64(Float64(Float64(fma(Float64(Float64(fma(Float64(k * k), -0.006349206349206349, 0.08888888888888889) * Float64(k * k)) - 0.6666666666666666), Float64(k * k), 2.0) * Float64(t * t)) * Float64(k * k)) / Float64(fma(Float64(Float64(0.041666666666666664 * Float64(k * k)) - 0.5), Float64(k * k), 1.0) * Float64(l * l))) * t));
        	else
        		tmp = Float64(2.0 / Float64(Float64(Float64(k * k) / Float64(l * l)) * Float64(k * Float64(k * t))));
        	end
        	return tmp
        end
        
        code[t_, l_, k_] := If[LessEqual[k, 6.6e-153], N[(N[(l * l), $MachinePrecision] / N[(N[Power[N[(k * t), $MachinePrecision], 2.0], $MachinePrecision] * t), $MachinePrecision]), $MachinePrecision], If[LessEqual[k, 2.55e+33], N[(2.0 / N[(N[(N[(N[(N[(N[(N[(N[(N[(k * k), $MachinePrecision] * -0.006349206349206349 + 0.08888888888888889), $MachinePrecision] * N[(k * k), $MachinePrecision]), $MachinePrecision] - 0.6666666666666666), $MachinePrecision] * N[(k * k), $MachinePrecision] + 2.0), $MachinePrecision] * N[(t * t), $MachinePrecision]), $MachinePrecision] * N[(k * k), $MachinePrecision]), $MachinePrecision] / N[(N[(N[(N[(0.041666666666666664 * N[(k * k), $MachinePrecision]), $MachinePrecision] - 0.5), $MachinePrecision] * N[(k * k), $MachinePrecision] + 1.0), $MachinePrecision] * N[(l * l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * t), $MachinePrecision]), $MachinePrecision], N[(2.0 / N[(N[(N[(k * k), $MachinePrecision] / N[(l * l), $MachinePrecision]), $MachinePrecision] * N[(k * N[(k * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
        
        \begin{array}{l}
        
        \\
        \begin{array}{l}
        \mathbf{if}\;k \leq 6.6 \cdot 10^{-153}:\\
        \;\;\;\;\frac{\ell \cdot \ell}{{\left(k \cdot t\right)}^{2} \cdot t}\\
        
        \mathbf{elif}\;k \leq 2.55 \cdot 10^{+33}:\\
        \;\;\;\;\frac{2}{\frac{\left(\mathsf{fma}\left(\mathsf{fma}\left(k \cdot k, -0.006349206349206349, 0.08888888888888889\right) \cdot \left(k \cdot k\right) - 0.6666666666666666, k \cdot k, 2\right) \cdot \left(t \cdot t\right)\right) \cdot \left(k \cdot k\right)}{\mathsf{fma}\left(0.041666666666666664 \cdot \left(k \cdot k\right) - 0.5, k \cdot k, 1\right) \cdot \left(\ell \cdot \ell\right)} \cdot t}\\
        
        \mathbf{else}:\\
        \;\;\;\;\frac{2}{\frac{k \cdot k}{\ell \cdot \ell} \cdot \left(k \cdot \left(k \cdot t\right)\right)}\\
        
        
        \end{array}
        \end{array}
        
        Derivation
        1. Split input into 3 regimes
        2. if k < 6.59999999999999975e-153

          1. Initial program 56.1%

            \[\frac{2}{\left(\left(\frac{{t}^{3}}{\ell \cdot \ell} \cdot \sin k\right) \cdot \tan k\right) \cdot \left(\left(1 + {\left(\frac{k}{t}\right)}^{2}\right) + 1\right)} \]
          2. Add Preprocessing
          3. Taylor expanded in k around 0

            \[\leadsto \color{blue}{\frac{{\ell}^{2}}{{k}^{2} \cdot {t}^{3}}} \]
          4. Step-by-step derivation
            1. lower-/.f64N/A

              \[\leadsto \frac{{\ell}^{2}}{\color{blue}{{k}^{2} \cdot {t}^{3}}} \]
            2. pow2N/A

              \[\leadsto \frac{\ell \cdot \ell}{\color{blue}{{k}^{2}} \cdot {t}^{3}} \]
            3. lift-*.f64N/A

              \[\leadsto \frac{\ell \cdot \ell}{\color{blue}{{k}^{2}} \cdot {t}^{3}} \]
            4. lower-*.f64N/A

              \[\leadsto \frac{\ell \cdot \ell}{{k}^{2} \cdot \color{blue}{{t}^{3}}} \]
            5. unpow2N/A

              \[\leadsto \frac{\ell \cdot \ell}{\left(k \cdot k\right) \cdot {\color{blue}{t}}^{3}} \]
            6. lower-*.f64N/A

              \[\leadsto \frac{\ell \cdot \ell}{\left(k \cdot k\right) \cdot {\color{blue}{t}}^{3}} \]
            7. lift-pow.f6450.2

              \[\leadsto \frac{\ell \cdot \ell}{\left(k \cdot k\right) \cdot {t}^{\color{blue}{3}}} \]
          5. Applied rewrites50.2%

            \[\leadsto \color{blue}{\frac{\ell \cdot \ell}{\left(k \cdot k\right) \cdot {t}^{3}}} \]
          6. Step-by-step derivation
            1. lift-pow.f64N/A

              \[\leadsto \frac{\ell \cdot \ell}{\left(k \cdot k\right) \cdot {t}^{\color{blue}{3}}} \]
            2. pow3N/A

              \[\leadsto \frac{\ell \cdot \ell}{\left(k \cdot k\right) \cdot \left(\left(t \cdot t\right) \cdot \color{blue}{t}\right)} \]
            3. lift-*.f64N/A

              \[\leadsto \frac{\ell \cdot \ell}{\left(k \cdot k\right) \cdot \left(\left(t \cdot t\right) \cdot t\right)} \]
            4. lift-*.f6450.2

              \[\leadsto \frac{\ell \cdot \ell}{\left(k \cdot k\right) \cdot \left(\left(t \cdot t\right) \cdot \color{blue}{t}\right)} \]
          7. Applied rewrites50.2%

            \[\leadsto \frac{\ell \cdot \ell}{\left(k \cdot k\right) \cdot \left(\left(t \cdot t\right) \cdot \color{blue}{t}\right)} \]
          8. Step-by-step derivation
            1. lift-*.f64N/A

              \[\leadsto \frac{\ell \cdot \ell}{\left(k \cdot k\right) \cdot \color{blue}{\left(\left(t \cdot t\right) \cdot t\right)}} \]
            2. lift-*.f64N/A

              \[\leadsto \frac{\ell \cdot \ell}{\left(k \cdot k\right) \cdot \left(\color{blue}{\left(t \cdot t\right)} \cdot t\right)} \]
            3. pow2N/A

              \[\leadsto \frac{\ell \cdot \ell}{{k}^{2} \cdot \left(\color{blue}{\left(t \cdot t\right)} \cdot t\right)} \]
            4. lift-*.f64N/A

              \[\leadsto \frac{\ell \cdot \ell}{{k}^{2} \cdot \left(\left(t \cdot t\right) \cdot \color{blue}{t}\right)} \]
            5. lift-*.f64N/A

              \[\leadsto \frac{\ell \cdot \ell}{{k}^{2} \cdot \left(\left(t \cdot t\right) \cdot t\right)} \]
            6. pow2N/A

              \[\leadsto \frac{\ell \cdot \ell}{{k}^{2} \cdot \left({t}^{2} \cdot t\right)} \]
            7. associate-*r*N/A

              \[\leadsto \frac{\ell \cdot \ell}{\left({k}^{2} \cdot {t}^{2}\right) \cdot \color{blue}{t}} \]
            8. lower-*.f64N/A

              \[\leadsto \frac{\ell \cdot \ell}{\left({k}^{2} \cdot {t}^{2}\right) \cdot \color{blue}{t}} \]
            9. pow-prod-downN/A

              \[\leadsto \frac{\ell \cdot \ell}{{\left(k \cdot t\right)}^{2} \cdot t} \]
            10. lower-pow.f64N/A

              \[\leadsto \frac{\ell \cdot \ell}{{\left(k \cdot t\right)}^{2} \cdot t} \]
            11. lower-*.f6464.5

              \[\leadsto \frac{\ell \cdot \ell}{{\left(k \cdot t\right)}^{2} \cdot t} \]
          9. Applied rewrites64.5%

            \[\leadsto \frac{\ell \cdot \ell}{{\left(k \cdot t\right)}^{2} \cdot \color{blue}{t}} \]

          if 6.59999999999999975e-153 < k < 2.5499999999999999e33

          1. Initial program 62.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 rewrites80.3%

            \[\leadsto \frac{2}{\color{blue}{\frac{\mathsf{fma}\left(2, {\left(\sin k \cdot t\right)}^{2}, {\left(\sin k \cdot k\right)}^{2}\right)}{\cos k \cdot \left(\ell \cdot \ell\right)} \cdot t}} \]
          6. Taylor expanded in k around 0

            \[\leadsto \frac{2}{\frac{{k}^{2} \cdot \left(2 \cdot {t}^{2} + {k}^{2} \cdot \left(1 + \left(\frac{-2}{3} \cdot {t}^{2} + {k}^{2} \cdot \left(\left(\frac{4}{45} \cdot {t}^{2} + {k}^{2} \cdot \left(\frac{2}{45} + \frac{-2}{315} \cdot {t}^{2}\right)\right) - \frac{1}{3}\right)\right)\right)\right)}{\cos k \cdot \left(\ell \cdot \ell\right)} \cdot t} \]
          7. Step-by-step derivation
            1. *-commutativeN/A

              \[\leadsto \frac{2}{\frac{\left(2 \cdot {t}^{2} + {k}^{2} \cdot \left(1 + \left(\frac{-2}{3} \cdot {t}^{2} + {k}^{2} \cdot \left(\left(\frac{4}{45} \cdot {t}^{2} + {k}^{2} \cdot \left(\frac{2}{45} + \frac{-2}{315} \cdot {t}^{2}\right)\right) - \frac{1}{3}\right)\right)\right)\right) \cdot {k}^{2}}{\cos k \cdot \left(\ell \cdot \ell\right)} \cdot t} \]
            2. lower-*.f64N/A

              \[\leadsto \frac{2}{\frac{\left(2 \cdot {t}^{2} + {k}^{2} \cdot \left(1 + \left(\frac{-2}{3} \cdot {t}^{2} + {k}^{2} \cdot \left(\left(\frac{4}{45} \cdot {t}^{2} + {k}^{2} \cdot \left(\frac{2}{45} + \frac{-2}{315} \cdot {t}^{2}\right)\right) - \frac{1}{3}\right)\right)\right)\right) \cdot {k}^{2}}{\cos k \cdot \left(\ell \cdot \ell\right)} \cdot t} \]
          8. Applied rewrites56.1%

            \[\leadsto \frac{2}{\frac{\mathsf{fma}\left(\mathsf{fma}\left(\mathsf{fma}\left(\mathsf{fma}\left(-0.006349206349206349, t \cdot t, 0.044444444444444446\right), k \cdot k, 0.08888888888888889 \cdot \left(t \cdot t\right)\right) - 0.3333333333333333, k \cdot k, -0.6666666666666666 \cdot \left(t \cdot t\right)\right) + 1, k \cdot k, \left(t \cdot t\right) \cdot 2\right) \cdot \left(k \cdot k\right)}{\cos k \cdot \left(\ell \cdot \ell\right)} \cdot t} \]
          9. Taylor expanded in k around 0

            \[\leadsto \frac{2}{\frac{\mathsf{fma}\left(\mathsf{fma}\left(\mathsf{fma}\left(\mathsf{fma}\left(\frac{-2}{315}, t \cdot t, \frac{2}{45}\right), k \cdot k, \frac{4}{45} \cdot \left(t \cdot t\right)\right) - \frac{1}{3}, k \cdot k, \frac{-2}{3} \cdot \left(t \cdot t\right)\right) + 1, k \cdot k, \left(t \cdot t\right) \cdot 2\right) \cdot \left(k \cdot k\right)}{\left(1 + {k}^{2} \cdot \left(\frac{1}{24} \cdot {k}^{2} - \frac{1}{2}\right)\right) \cdot \left(\ell \cdot \ell\right)} \cdot t} \]
          10. Step-by-step derivation
            1. +-commutativeN/A

              \[\leadsto \frac{2}{\frac{\mathsf{fma}\left(\mathsf{fma}\left(\mathsf{fma}\left(\mathsf{fma}\left(\frac{-2}{315}, t \cdot t, \frac{2}{45}\right), k \cdot k, \frac{4}{45} \cdot \left(t \cdot t\right)\right) - \frac{1}{3}, k \cdot k, \frac{-2}{3} \cdot \left(t \cdot t\right)\right) + 1, k \cdot k, \left(t \cdot t\right) \cdot 2\right) \cdot \left(k \cdot k\right)}{\left({k}^{2} \cdot \left(\frac{1}{24} \cdot {k}^{2} - \frac{1}{2}\right) + 1\right) \cdot \left(\ell \cdot \ell\right)} \cdot t} \]
            2. *-commutativeN/A

              \[\leadsto \frac{2}{\frac{\mathsf{fma}\left(\mathsf{fma}\left(\mathsf{fma}\left(\mathsf{fma}\left(\frac{-2}{315}, t \cdot t, \frac{2}{45}\right), k \cdot k, \frac{4}{45} \cdot \left(t \cdot t\right)\right) - \frac{1}{3}, k \cdot k, \frac{-2}{3} \cdot \left(t \cdot t\right)\right) + 1, k \cdot k, \left(t \cdot t\right) \cdot 2\right) \cdot \left(k \cdot k\right)}{\left(\left(\frac{1}{24} \cdot {k}^{2} - \frac{1}{2}\right) \cdot {k}^{2} + 1\right) \cdot \left(\ell \cdot \ell\right)} \cdot t} \]
            3. lower-fma.f64N/A

              \[\leadsto \frac{2}{\frac{\mathsf{fma}\left(\mathsf{fma}\left(\mathsf{fma}\left(\mathsf{fma}\left(\frac{-2}{315}, t \cdot t, \frac{2}{45}\right), k \cdot k, \frac{4}{45} \cdot \left(t \cdot t\right)\right) - \frac{1}{3}, k \cdot k, \frac{-2}{3} \cdot \left(t \cdot t\right)\right) + 1, k \cdot k, \left(t \cdot t\right) \cdot 2\right) \cdot \left(k \cdot k\right)}{\mathsf{fma}\left(\frac{1}{24} \cdot {k}^{2} - \frac{1}{2}, {k}^{2}, 1\right) \cdot \left(\ell \cdot \ell\right)} \cdot t} \]
            4. lower--.f64N/A

              \[\leadsto \frac{2}{\frac{\mathsf{fma}\left(\mathsf{fma}\left(\mathsf{fma}\left(\mathsf{fma}\left(\frac{-2}{315}, t \cdot t, \frac{2}{45}\right), k \cdot k, \frac{4}{45} \cdot \left(t \cdot t\right)\right) - \frac{1}{3}, k \cdot k, \frac{-2}{3} \cdot \left(t \cdot t\right)\right) + 1, k \cdot k, \left(t \cdot t\right) \cdot 2\right) \cdot \left(k \cdot k\right)}{\mathsf{fma}\left(\frac{1}{24} \cdot {k}^{2} - \frac{1}{2}, {k}^{2}, 1\right) \cdot \left(\ell \cdot \ell\right)} \cdot t} \]
            5. lower-*.f64N/A

              \[\leadsto \frac{2}{\frac{\mathsf{fma}\left(\mathsf{fma}\left(\mathsf{fma}\left(\mathsf{fma}\left(\frac{-2}{315}, t \cdot t, \frac{2}{45}\right), k \cdot k, \frac{4}{45} \cdot \left(t \cdot t\right)\right) - \frac{1}{3}, k \cdot k, \frac{-2}{3} \cdot \left(t \cdot t\right)\right) + 1, k \cdot k, \left(t \cdot t\right) \cdot 2\right) \cdot \left(k \cdot k\right)}{\mathsf{fma}\left(\frac{1}{24} \cdot {k}^{2} - \frac{1}{2}, {k}^{2}, 1\right) \cdot \left(\ell \cdot \ell\right)} \cdot t} \]
            6. pow2N/A

              \[\leadsto \frac{2}{\frac{\mathsf{fma}\left(\mathsf{fma}\left(\mathsf{fma}\left(\mathsf{fma}\left(\frac{-2}{315}, t \cdot t, \frac{2}{45}\right), k \cdot k, \frac{4}{45} \cdot \left(t \cdot t\right)\right) - \frac{1}{3}, k \cdot k, \frac{-2}{3} \cdot \left(t \cdot t\right)\right) + 1, k \cdot k, \left(t \cdot t\right) \cdot 2\right) \cdot \left(k \cdot k\right)}{\mathsf{fma}\left(\frac{1}{24} \cdot \left(k \cdot k\right) - \frac{1}{2}, {k}^{2}, 1\right) \cdot \left(\ell \cdot \ell\right)} \cdot t} \]
            7. lift-*.f64N/A

              \[\leadsto \frac{2}{\frac{\mathsf{fma}\left(\mathsf{fma}\left(\mathsf{fma}\left(\mathsf{fma}\left(\frac{-2}{315}, t \cdot t, \frac{2}{45}\right), k \cdot k, \frac{4}{45} \cdot \left(t \cdot t\right)\right) - \frac{1}{3}, k \cdot k, \frac{-2}{3} \cdot \left(t \cdot t\right)\right) + 1, k \cdot k, \left(t \cdot t\right) \cdot 2\right) \cdot \left(k \cdot k\right)}{\mathsf{fma}\left(\frac{1}{24} \cdot \left(k \cdot k\right) - \frac{1}{2}, {k}^{2}, 1\right) \cdot \left(\ell \cdot \ell\right)} \cdot t} \]
            8. pow2N/A

              \[\leadsto \frac{2}{\frac{\mathsf{fma}\left(\mathsf{fma}\left(\mathsf{fma}\left(\mathsf{fma}\left(\frac{-2}{315}, t \cdot t, \frac{2}{45}\right), k \cdot k, \frac{4}{45} \cdot \left(t \cdot t\right)\right) - \frac{1}{3}, k \cdot k, \frac{-2}{3} \cdot \left(t \cdot t\right)\right) + 1, k \cdot k, \left(t \cdot t\right) \cdot 2\right) \cdot \left(k \cdot k\right)}{\mathsf{fma}\left(\frac{1}{24} \cdot \left(k \cdot k\right) - \frac{1}{2}, k \cdot k, 1\right) \cdot \left(\ell \cdot \ell\right)} \cdot t} \]
            9. lift-*.f6455.0

              \[\leadsto \frac{2}{\frac{\mathsf{fma}\left(\mathsf{fma}\left(\mathsf{fma}\left(\mathsf{fma}\left(-0.006349206349206349, t \cdot t, 0.044444444444444446\right), k \cdot k, 0.08888888888888889 \cdot \left(t \cdot t\right)\right) - 0.3333333333333333, k \cdot k, -0.6666666666666666 \cdot \left(t \cdot t\right)\right) + 1, k \cdot k, \left(t \cdot t\right) \cdot 2\right) \cdot \left(k \cdot k\right)}{\mathsf{fma}\left(0.041666666666666664 \cdot \left(k \cdot k\right) - 0.5, k \cdot k, 1\right) \cdot \left(\ell \cdot \ell\right)} \cdot t} \]
          11. Applied rewrites55.0%

            \[\leadsto \frac{2}{\frac{\mathsf{fma}\left(\mathsf{fma}\left(\mathsf{fma}\left(\mathsf{fma}\left(-0.006349206349206349, t \cdot t, 0.044444444444444446\right), k \cdot k, 0.08888888888888889 \cdot \left(t \cdot t\right)\right) - 0.3333333333333333, k \cdot k, -0.6666666666666666 \cdot \left(t \cdot t\right)\right) + 1, k \cdot k, \left(t \cdot t\right) \cdot 2\right) \cdot \left(k \cdot k\right)}{\mathsf{fma}\left(0.041666666666666664 \cdot \left(k \cdot k\right) - 0.5, k \cdot k, 1\right) \cdot \left(\ell \cdot \ell\right)} \cdot t} \]
          12. Taylor expanded in t around inf

            \[\leadsto \frac{2}{\frac{\left({t}^{2} \cdot \left(2 + {k}^{2} \cdot \left({k}^{2} \cdot \left(\frac{4}{45} + \frac{-2}{315} \cdot {k}^{2}\right) - \frac{2}{3}\right)\right)\right) \cdot \left(k \cdot k\right)}{\mathsf{fma}\left(\frac{1}{24} \cdot \left(k \cdot k\right) - \frac{1}{2}, k \cdot k, 1\right) \cdot \left(\ell \cdot \ell\right)} \cdot t} \]
          13. Step-by-step derivation
            1. *-commutativeN/A

              \[\leadsto \frac{2}{\frac{\left(\left(2 + {k}^{2} \cdot \left({k}^{2} \cdot \left(\frac{4}{45} + \frac{-2}{315} \cdot {k}^{2}\right) - \frac{2}{3}\right)\right) \cdot {t}^{2}\right) \cdot \left(k \cdot k\right)}{\mathsf{fma}\left(\frac{1}{24} \cdot \left(k \cdot k\right) - \frac{1}{2}, k \cdot k, 1\right) \cdot \left(\ell \cdot \ell\right)} \cdot t} \]
            2. lower-*.f64N/A

              \[\leadsto \frac{2}{\frac{\left(\left(2 + {k}^{2} \cdot \left({k}^{2} \cdot \left(\frac{4}{45} + \frac{-2}{315} \cdot {k}^{2}\right) - \frac{2}{3}\right)\right) \cdot {t}^{2}\right) \cdot \left(k \cdot k\right)}{\mathsf{fma}\left(\frac{1}{24} \cdot \left(k \cdot k\right) - \frac{1}{2}, k \cdot k, 1\right) \cdot \left(\ell \cdot \ell\right)} \cdot t} \]
          14. Applied rewrites67.2%

            \[\leadsto \frac{2}{\frac{\left(\mathsf{fma}\left(\mathsf{fma}\left(k \cdot k, -0.006349206349206349, 0.08888888888888889\right) \cdot \left(k \cdot k\right) - 0.6666666666666666, k \cdot k, 2\right) \cdot \left(t \cdot t\right)\right) \cdot \left(k \cdot k\right)}{\mathsf{fma}\left(0.041666666666666664 \cdot \left(k \cdot k\right) - 0.5, k \cdot k, 1\right) \cdot \left(\ell \cdot \ell\right)} \cdot t} \]

          if 2.5499999999999999e33 < k

          1. Initial program 47.8%

            \[\frac{2}{\left(\left(\frac{{t}^{3}}{\ell \cdot \ell} \cdot \sin k\right) \cdot \tan k\right) \cdot \left(\left(1 + {\left(\frac{k}{t}\right)}^{2}\right) + 1\right)} \]
          2. Add Preprocessing
          3. Taylor expanded in t around 0

            \[\leadsto \frac{2}{\color{blue}{\frac{{k}^{2} \cdot \left(t \cdot {\sin k}^{2}\right)}{{\ell}^{2} \cdot \cos k}}} \]
          4. Step-by-step derivation
            1. times-fracN/A

              \[\leadsto \frac{2}{\frac{{k}^{2}}{{\ell}^{2}} \cdot \color{blue}{\frac{t \cdot {\sin k}^{2}}{\cos k}}} \]
            2. lower-*.f64N/A

              \[\leadsto \frac{2}{\frac{{k}^{2}}{{\ell}^{2}} \cdot \color{blue}{\frac{t \cdot {\sin k}^{2}}{\cos k}}} \]
            3. lower-/.f64N/A

              \[\leadsto \frac{2}{\frac{{k}^{2}}{{\ell}^{2}} \cdot \frac{\color{blue}{t \cdot {\sin k}^{2}}}{\cos k}} \]
            4. unpow2N/A

              \[\leadsto \frac{2}{\frac{k \cdot k}{{\ell}^{2}} \cdot \frac{\color{blue}{t} \cdot {\sin k}^{2}}{\cos k}} \]
            5. lower-*.f64N/A

              \[\leadsto \frac{2}{\frac{k \cdot k}{{\ell}^{2}} \cdot \frac{\color{blue}{t} \cdot {\sin k}^{2}}{\cos k}} \]
            6. pow2N/A

              \[\leadsto \frac{2}{\frac{k \cdot k}{\ell \cdot \ell} \cdot \frac{t \cdot \color{blue}{{\sin k}^{2}}}{\cos k}} \]
            7. lift-*.f64N/A

              \[\leadsto \frac{2}{\frac{k \cdot k}{\ell \cdot \ell} \cdot \frac{t \cdot \color{blue}{{\sin k}^{2}}}{\cos k}} \]
            8. lower-/.f64N/A

              \[\leadsto \frac{2}{\frac{k \cdot k}{\ell \cdot \ell} \cdot \frac{t \cdot {\sin k}^{2}}{\color{blue}{\cos k}}} \]
            9. *-commutativeN/A

              \[\leadsto \frac{2}{\frac{k \cdot k}{\ell \cdot \ell} \cdot \frac{{\sin k}^{2} \cdot t}{\cos \color{blue}{k}}} \]
            10. lower-*.f64N/A

              \[\leadsto \frac{2}{\frac{k \cdot k}{\ell \cdot \ell} \cdot \frac{{\sin k}^{2} \cdot t}{\cos \color{blue}{k}}} \]
            11. lower-pow.f64N/A

              \[\leadsto \frac{2}{\frac{k \cdot k}{\ell \cdot \ell} \cdot \frac{{\sin k}^{2} \cdot t}{\cos k}} \]
            12. lift-sin.f64N/A

              \[\leadsto \frac{2}{\frac{k \cdot k}{\ell \cdot \ell} \cdot \frac{{\sin k}^{2} \cdot t}{\cos k}} \]
            13. lower-cos.f6467.3

              \[\leadsto \frac{2}{\frac{k \cdot k}{\ell \cdot \ell} \cdot \frac{{\sin k}^{2} \cdot t}{\cos k}} \]
          5. Applied rewrites67.3%

            \[\leadsto \frac{2}{\color{blue}{\frac{k \cdot k}{\ell \cdot \ell} \cdot \frac{{\sin k}^{2} \cdot t}{\cos k}}} \]
          6. Taylor expanded in k around 0

            \[\leadsto \frac{2}{\frac{k \cdot k}{\ell \cdot \ell} \cdot \left({k}^{2} \cdot \color{blue}{t}\right)} \]
          7. Step-by-step derivation
            1. lower-*.f64N/A

              \[\leadsto \frac{2}{\frac{k \cdot k}{\ell \cdot \ell} \cdot \left({k}^{2} \cdot t\right)} \]
            2. pow2N/A

              \[\leadsto \frac{2}{\frac{k \cdot k}{\ell \cdot \ell} \cdot \left(\left(k \cdot k\right) \cdot t\right)} \]
            3. lift-*.f6456.4

              \[\leadsto \frac{2}{\frac{k \cdot k}{\ell \cdot \ell} \cdot \left(\left(k \cdot k\right) \cdot t\right)} \]
          8. Applied rewrites56.4%

            \[\leadsto \frac{2}{\frac{k \cdot k}{\ell \cdot \ell} \cdot \left(\left(k \cdot k\right) \cdot \color{blue}{t}\right)} \]
          9. Step-by-step derivation
            1. lift-*.f64N/A

              \[\leadsto \frac{2}{\frac{k \cdot k}{\ell \cdot \ell} \cdot \left(\left(k \cdot k\right) \cdot t\right)} \]
            2. lift-*.f64N/A

              \[\leadsto \frac{2}{\frac{k \cdot k}{\ell \cdot \ell} \cdot \left(\left(k \cdot k\right) \cdot t\right)} \]
            3. associate-*l*N/A

              \[\leadsto \frac{2}{\frac{k \cdot k}{\ell \cdot \ell} \cdot \left(k \cdot \left(k \cdot \color{blue}{t}\right)\right)} \]
            4. lower-*.f64N/A

              \[\leadsto \frac{2}{\frac{k \cdot k}{\ell \cdot \ell} \cdot \left(k \cdot \left(k \cdot \color{blue}{t}\right)\right)} \]
            5. lower-*.f6456.4

              \[\leadsto \frac{2}{\frac{k \cdot k}{\ell \cdot \ell} \cdot \left(k \cdot \left(k \cdot t\right)\right)} \]
          10. Applied rewrites56.4%

            \[\leadsto \frac{2}{\frac{k \cdot k}{\ell \cdot \ell} \cdot \left(k \cdot \left(k \cdot \color{blue}{t}\right)\right)} \]
        3. Recombined 3 regimes into one program.
        4. Add Preprocessing

        Alternative 22: 58.5% accurate, 3.4× speedup?

        \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;k \leq 4.5 \cdot 10^{-165}:\\ \;\;\;\;\frac{\ell \cdot \ell}{k \cdot \left(k \cdot {t}^{3}\right)}\\ \mathbf{elif}\;k \leq 2.55 \cdot 10^{+33}:\\ \;\;\;\;\frac{2}{\frac{\left(\mathsf{fma}\left(\mathsf{fma}\left(k \cdot k, -0.006349206349206349, 0.08888888888888889\right) \cdot \left(k \cdot k\right) - 0.6666666666666666, k \cdot k, 2\right) \cdot \left(t \cdot t\right)\right) \cdot \left(k \cdot k\right)}{\mathsf{fma}\left(0.041666666666666664 \cdot \left(k \cdot k\right) - 0.5, k \cdot k, 1\right) \cdot \left(\ell \cdot \ell\right)} \cdot t}\\ \mathbf{else}:\\ \;\;\;\;\frac{2}{\frac{k \cdot k}{\ell \cdot \ell} \cdot \left(k \cdot \left(k \cdot t\right)\right)}\\ \end{array} \end{array} \]
        (FPCore (t l k)
         :precision binary64
         (if (<= k 4.5e-165)
           (/ (* l l) (* k (* k (pow t 3.0))))
           (if (<= k 2.55e+33)
             (/
              2.0
              (*
               (/
                (*
                 (*
                  (fma
                   (-
                    (* (fma (* k k) -0.006349206349206349 0.08888888888888889) (* k k))
                    0.6666666666666666)
                   (* k k)
                   2.0)
                  (* t t))
                 (* k k))
                (* (fma (- (* 0.041666666666666664 (* k k)) 0.5) (* k k) 1.0) (* l l)))
               t))
             (/ 2.0 (* (/ (* k k) (* l l)) (* k (* k t)))))))
        double code(double t, double l, double k) {
        	double tmp;
        	if (k <= 4.5e-165) {
        		tmp = (l * l) / (k * (k * pow(t, 3.0)));
        	} else if (k <= 2.55e+33) {
        		tmp = 2.0 / ((((fma(((fma((k * k), -0.006349206349206349, 0.08888888888888889) * (k * k)) - 0.6666666666666666), (k * k), 2.0) * (t * t)) * (k * k)) / (fma(((0.041666666666666664 * (k * k)) - 0.5), (k * k), 1.0) * (l * l))) * t);
        	} else {
        		tmp = 2.0 / (((k * k) / (l * l)) * (k * (k * t)));
        	}
        	return tmp;
        }
        
        function code(t, l, k)
        	tmp = 0.0
        	if (k <= 4.5e-165)
        		tmp = Float64(Float64(l * l) / Float64(k * Float64(k * (t ^ 3.0))));
        	elseif (k <= 2.55e+33)
        		tmp = Float64(2.0 / Float64(Float64(Float64(Float64(fma(Float64(Float64(fma(Float64(k * k), -0.006349206349206349, 0.08888888888888889) * Float64(k * k)) - 0.6666666666666666), Float64(k * k), 2.0) * Float64(t * t)) * Float64(k * k)) / Float64(fma(Float64(Float64(0.041666666666666664 * Float64(k * k)) - 0.5), Float64(k * k), 1.0) * Float64(l * l))) * t));
        	else
        		tmp = Float64(2.0 / Float64(Float64(Float64(k * k) / Float64(l * l)) * Float64(k * Float64(k * t))));
        	end
        	return tmp
        end
        
        code[t_, l_, k_] := If[LessEqual[k, 4.5e-165], N[(N[(l * l), $MachinePrecision] / N[(k * N[(k * N[Power[t, 3.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[k, 2.55e+33], N[(2.0 / N[(N[(N[(N[(N[(N[(N[(N[(N[(k * k), $MachinePrecision] * -0.006349206349206349 + 0.08888888888888889), $MachinePrecision] * N[(k * k), $MachinePrecision]), $MachinePrecision] - 0.6666666666666666), $MachinePrecision] * N[(k * k), $MachinePrecision] + 2.0), $MachinePrecision] * N[(t * t), $MachinePrecision]), $MachinePrecision] * N[(k * k), $MachinePrecision]), $MachinePrecision] / N[(N[(N[(N[(0.041666666666666664 * N[(k * k), $MachinePrecision]), $MachinePrecision] - 0.5), $MachinePrecision] * N[(k * k), $MachinePrecision] + 1.0), $MachinePrecision] * N[(l * l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * t), $MachinePrecision]), $MachinePrecision], N[(2.0 / N[(N[(N[(k * k), $MachinePrecision] / N[(l * l), $MachinePrecision]), $MachinePrecision] * N[(k * N[(k * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
        
        \begin{array}{l}
        
        \\
        \begin{array}{l}
        \mathbf{if}\;k \leq 4.5 \cdot 10^{-165}:\\
        \;\;\;\;\frac{\ell \cdot \ell}{k \cdot \left(k \cdot {t}^{3}\right)}\\
        
        \mathbf{elif}\;k \leq 2.55 \cdot 10^{+33}:\\
        \;\;\;\;\frac{2}{\frac{\left(\mathsf{fma}\left(\mathsf{fma}\left(k \cdot k, -0.006349206349206349, 0.08888888888888889\right) \cdot \left(k \cdot k\right) - 0.6666666666666666, k \cdot k, 2\right) \cdot \left(t \cdot t\right)\right) \cdot \left(k \cdot k\right)}{\mathsf{fma}\left(0.041666666666666664 \cdot \left(k \cdot k\right) - 0.5, k \cdot k, 1\right) \cdot \left(\ell \cdot \ell\right)} \cdot t}\\
        
        \mathbf{else}:\\
        \;\;\;\;\frac{2}{\frac{k \cdot k}{\ell \cdot \ell} \cdot \left(k \cdot \left(k \cdot t\right)\right)}\\
        
        
        \end{array}
        \end{array}
        
        Derivation
        1. Split input into 3 regimes
        2. if k < 4.49999999999999992e-165

          1. Initial program 55.9%

            \[\frac{2}{\left(\left(\frac{{t}^{3}}{\ell \cdot \ell} \cdot \sin k\right) \cdot \tan k\right) \cdot \left(\left(1 + {\left(\frac{k}{t}\right)}^{2}\right) + 1\right)} \]
          2. Add Preprocessing
          3. Taylor expanded in k around 0

            \[\leadsto \color{blue}{\frac{{\ell}^{2}}{{k}^{2} \cdot {t}^{3}}} \]
          4. Step-by-step derivation
            1. lower-/.f64N/A

              \[\leadsto \frac{{\ell}^{2}}{\color{blue}{{k}^{2} \cdot {t}^{3}}} \]
            2. pow2N/A

              \[\leadsto \frac{\ell \cdot \ell}{\color{blue}{{k}^{2}} \cdot {t}^{3}} \]
            3. lift-*.f64N/A

              \[\leadsto \frac{\ell \cdot \ell}{\color{blue}{{k}^{2}} \cdot {t}^{3}} \]
            4. lower-*.f64N/A

              \[\leadsto \frac{\ell \cdot \ell}{{k}^{2} \cdot \color{blue}{{t}^{3}}} \]
            5. unpow2N/A

              \[\leadsto \frac{\ell \cdot \ell}{\left(k \cdot k\right) \cdot {\color{blue}{t}}^{3}} \]
            6. lower-*.f64N/A

              \[\leadsto \frac{\ell \cdot \ell}{\left(k \cdot k\right) \cdot {\color{blue}{t}}^{3}} \]
            7. lift-pow.f6450.0

              \[\leadsto \frac{\ell \cdot \ell}{\left(k \cdot k\right) \cdot {t}^{\color{blue}{3}}} \]
          5. Applied rewrites50.0%

            \[\leadsto \color{blue}{\frac{\ell \cdot \ell}{\left(k \cdot k\right) \cdot {t}^{3}}} \]
          6. Step-by-step derivation
            1. lift-*.f64N/A

              \[\leadsto \frac{\ell \cdot \ell}{\left(k \cdot k\right) \cdot {\color{blue}{t}}^{3}} \]
            2. lift-*.f64N/A

              \[\leadsto \frac{\ell \cdot \ell}{\left(k \cdot k\right) \cdot \color{blue}{{t}^{3}}} \]
            3. lift-pow.f64N/A

              \[\leadsto \frac{\ell \cdot \ell}{\left(k \cdot k\right) \cdot {t}^{\color{blue}{3}}} \]
            4. associate-*l*N/A

              \[\leadsto \frac{\ell \cdot \ell}{k \cdot \color{blue}{\left(k \cdot {t}^{3}\right)}} \]
            5. lower-*.f64N/A

              \[\leadsto \frac{\ell \cdot \ell}{k \cdot \color{blue}{\left(k \cdot {t}^{3}\right)}} \]
            6. lower-*.f64N/A

              \[\leadsto \frac{\ell \cdot \ell}{k \cdot \left(k \cdot \color{blue}{{t}^{3}}\right)} \]
            7. lift-pow.f6456.8

              \[\leadsto \frac{\ell \cdot \ell}{k \cdot \left(k \cdot {t}^{\color{blue}{3}}\right)} \]
          7. Applied rewrites56.8%

            \[\leadsto \frac{\ell \cdot \ell}{k \cdot \color{blue}{\left(k \cdot {t}^{3}\right)}} \]

          if 4.49999999999999992e-165 < k < 2.5499999999999999e33

          1. Initial program 62.5%

            \[\frac{2}{\left(\left(\frac{{t}^{3}}{\ell \cdot \ell} \cdot \sin k\right) \cdot \tan k\right) \cdot \left(\left(1 + {\left(\frac{k}{t}\right)}^{2}\right) + 1\right)} \]
          2. Add Preprocessing
          3. Taylor expanded in t around 0

            \[\leadsto \frac{2}{\color{blue}{t \cdot \left(2 \cdot \frac{{t}^{2} \cdot {\sin k}^{2}}{{\ell}^{2} \cdot \cos k} + \frac{{k}^{2} \cdot {\sin k}^{2}}{{\ell}^{2} \cdot \cos k}\right)}} \]
          4. Step-by-step derivation
            1. *-commutativeN/A

              \[\leadsto \frac{2}{\left(2 \cdot \frac{{t}^{2} \cdot {\sin k}^{2}}{{\ell}^{2} \cdot \cos k} + \frac{{k}^{2} \cdot {\sin k}^{2}}{{\ell}^{2} \cdot \cos k}\right) \cdot \color{blue}{t}} \]
            2. lower-*.f64N/A

              \[\leadsto \frac{2}{\left(2 \cdot \frac{{t}^{2} \cdot {\sin k}^{2}}{{\ell}^{2} \cdot \cos k} + \frac{{k}^{2} \cdot {\sin k}^{2}}{{\ell}^{2} \cdot \cos k}\right) \cdot \color{blue}{t}} \]
          5. Applied rewrites80.4%

            \[\leadsto \frac{2}{\color{blue}{\frac{\mathsf{fma}\left(2, {\left(\sin k \cdot t\right)}^{2}, {\left(\sin k \cdot k\right)}^{2}\right)}{\cos k \cdot \left(\ell \cdot \ell\right)} \cdot t}} \]
          6. Taylor expanded in k around 0

            \[\leadsto \frac{2}{\frac{{k}^{2} \cdot \left(2 \cdot {t}^{2} + {k}^{2} \cdot \left(1 + \left(\frac{-2}{3} \cdot {t}^{2} + {k}^{2} \cdot \left(\left(\frac{4}{45} \cdot {t}^{2} + {k}^{2} \cdot \left(\frac{2}{45} + \frac{-2}{315} \cdot {t}^{2}\right)\right) - \frac{1}{3}\right)\right)\right)\right)}{\cos k \cdot \left(\ell \cdot \ell\right)} \cdot t} \]
          7. Step-by-step derivation
            1. *-commutativeN/A

              \[\leadsto \frac{2}{\frac{\left(2 \cdot {t}^{2} + {k}^{2} \cdot \left(1 + \left(\frac{-2}{3} \cdot {t}^{2} + {k}^{2} \cdot \left(\left(\frac{4}{45} \cdot {t}^{2} + {k}^{2} \cdot \left(\frac{2}{45} + \frac{-2}{315} \cdot {t}^{2}\right)\right) - \frac{1}{3}\right)\right)\right)\right) \cdot {k}^{2}}{\cos k \cdot \left(\ell \cdot \ell\right)} \cdot t} \]
            2. lower-*.f64N/A

              \[\leadsto \frac{2}{\frac{\left(2 \cdot {t}^{2} + {k}^{2} \cdot \left(1 + \left(\frac{-2}{3} \cdot {t}^{2} + {k}^{2} \cdot \left(\left(\frac{4}{45} \cdot {t}^{2} + {k}^{2} \cdot \left(\frac{2}{45} + \frac{-2}{315} \cdot {t}^{2}\right)\right) - \frac{1}{3}\right)\right)\right)\right) \cdot {k}^{2}}{\cos k \cdot \left(\ell \cdot \ell\right)} \cdot t} \]
          8. Applied rewrites56.3%

            \[\leadsto \frac{2}{\frac{\mathsf{fma}\left(\mathsf{fma}\left(\mathsf{fma}\left(\mathsf{fma}\left(-0.006349206349206349, t \cdot t, 0.044444444444444446\right), k \cdot k, 0.08888888888888889 \cdot \left(t \cdot t\right)\right) - 0.3333333333333333, k \cdot k, -0.6666666666666666 \cdot \left(t \cdot t\right)\right) + 1, k \cdot k, \left(t \cdot t\right) \cdot 2\right) \cdot \left(k \cdot k\right)}{\cos k \cdot \left(\ell \cdot \ell\right)} \cdot t} \]
          9. Taylor expanded in k around 0

            \[\leadsto \frac{2}{\frac{\mathsf{fma}\left(\mathsf{fma}\left(\mathsf{fma}\left(\mathsf{fma}\left(\frac{-2}{315}, t \cdot t, \frac{2}{45}\right), k \cdot k, \frac{4}{45} \cdot \left(t \cdot t\right)\right) - \frac{1}{3}, k \cdot k, \frac{-2}{3} \cdot \left(t \cdot t\right)\right) + 1, k \cdot k, \left(t \cdot t\right) \cdot 2\right) \cdot \left(k \cdot k\right)}{\left(1 + {k}^{2} \cdot \left(\frac{1}{24} \cdot {k}^{2} - \frac{1}{2}\right)\right) \cdot \left(\ell \cdot \ell\right)} \cdot t} \]
          10. Step-by-step derivation
            1. +-commutativeN/A

              \[\leadsto \frac{2}{\frac{\mathsf{fma}\left(\mathsf{fma}\left(\mathsf{fma}\left(\mathsf{fma}\left(\frac{-2}{315}, t \cdot t, \frac{2}{45}\right), k \cdot k, \frac{4}{45} \cdot \left(t \cdot t\right)\right) - \frac{1}{3}, k \cdot k, \frac{-2}{3} \cdot \left(t \cdot t\right)\right) + 1, k \cdot k, \left(t \cdot t\right) \cdot 2\right) \cdot \left(k \cdot k\right)}{\left({k}^{2} \cdot \left(\frac{1}{24} \cdot {k}^{2} - \frac{1}{2}\right) + 1\right) \cdot \left(\ell \cdot \ell\right)} \cdot t} \]
            2. *-commutativeN/A

              \[\leadsto \frac{2}{\frac{\mathsf{fma}\left(\mathsf{fma}\left(\mathsf{fma}\left(\mathsf{fma}\left(\frac{-2}{315}, t \cdot t, \frac{2}{45}\right), k \cdot k, \frac{4}{45} \cdot \left(t \cdot t\right)\right) - \frac{1}{3}, k \cdot k, \frac{-2}{3} \cdot \left(t \cdot t\right)\right) + 1, k \cdot k, \left(t \cdot t\right) \cdot 2\right) \cdot \left(k \cdot k\right)}{\left(\left(\frac{1}{24} \cdot {k}^{2} - \frac{1}{2}\right) \cdot {k}^{2} + 1\right) \cdot \left(\ell \cdot \ell\right)} \cdot t} \]
            3. lower-fma.f64N/A

              \[\leadsto \frac{2}{\frac{\mathsf{fma}\left(\mathsf{fma}\left(\mathsf{fma}\left(\mathsf{fma}\left(\frac{-2}{315}, t \cdot t, \frac{2}{45}\right), k \cdot k, \frac{4}{45} \cdot \left(t \cdot t\right)\right) - \frac{1}{3}, k \cdot k, \frac{-2}{3} \cdot \left(t \cdot t\right)\right) + 1, k \cdot k, \left(t \cdot t\right) \cdot 2\right) \cdot \left(k \cdot k\right)}{\mathsf{fma}\left(\frac{1}{24} \cdot {k}^{2} - \frac{1}{2}, {k}^{2}, 1\right) \cdot \left(\ell \cdot \ell\right)} \cdot t} \]
            4. lower--.f64N/A

              \[\leadsto \frac{2}{\frac{\mathsf{fma}\left(\mathsf{fma}\left(\mathsf{fma}\left(\mathsf{fma}\left(\frac{-2}{315}, t \cdot t, \frac{2}{45}\right), k \cdot k, \frac{4}{45} \cdot \left(t \cdot t\right)\right) - \frac{1}{3}, k \cdot k, \frac{-2}{3} \cdot \left(t \cdot t\right)\right) + 1, k \cdot k, \left(t \cdot t\right) \cdot 2\right) \cdot \left(k \cdot k\right)}{\mathsf{fma}\left(\frac{1}{24} \cdot {k}^{2} - \frac{1}{2}, {k}^{2}, 1\right) \cdot \left(\ell \cdot \ell\right)} \cdot t} \]
            5. lower-*.f64N/A

              \[\leadsto \frac{2}{\frac{\mathsf{fma}\left(\mathsf{fma}\left(\mathsf{fma}\left(\mathsf{fma}\left(\frac{-2}{315}, t \cdot t, \frac{2}{45}\right), k \cdot k, \frac{4}{45} \cdot \left(t \cdot t\right)\right) - \frac{1}{3}, k \cdot k, \frac{-2}{3} \cdot \left(t \cdot t\right)\right) + 1, k \cdot k, \left(t \cdot t\right) \cdot 2\right) \cdot \left(k \cdot k\right)}{\mathsf{fma}\left(\frac{1}{24} \cdot {k}^{2} - \frac{1}{2}, {k}^{2}, 1\right) \cdot \left(\ell \cdot \ell\right)} \cdot t} \]
            6. pow2N/A

              \[\leadsto \frac{2}{\frac{\mathsf{fma}\left(\mathsf{fma}\left(\mathsf{fma}\left(\mathsf{fma}\left(\frac{-2}{315}, t \cdot t, \frac{2}{45}\right), k \cdot k, \frac{4}{45} \cdot \left(t \cdot t\right)\right) - \frac{1}{3}, k \cdot k, \frac{-2}{3} \cdot \left(t \cdot t\right)\right) + 1, k \cdot k, \left(t \cdot t\right) \cdot 2\right) \cdot \left(k \cdot k\right)}{\mathsf{fma}\left(\frac{1}{24} \cdot \left(k \cdot k\right) - \frac{1}{2}, {k}^{2}, 1\right) \cdot \left(\ell \cdot \ell\right)} \cdot t} \]
            7. lift-*.f64N/A

              \[\leadsto \frac{2}{\frac{\mathsf{fma}\left(\mathsf{fma}\left(\mathsf{fma}\left(\mathsf{fma}\left(\frac{-2}{315}, t \cdot t, \frac{2}{45}\right), k \cdot k, \frac{4}{45} \cdot \left(t \cdot t\right)\right) - \frac{1}{3}, k \cdot k, \frac{-2}{3} \cdot \left(t \cdot t\right)\right) + 1, k \cdot k, \left(t \cdot t\right) \cdot 2\right) \cdot \left(k \cdot k\right)}{\mathsf{fma}\left(\frac{1}{24} \cdot \left(k \cdot k\right) - \frac{1}{2}, {k}^{2}, 1\right) \cdot \left(\ell \cdot \ell\right)} \cdot t} \]
            8. pow2N/A

              \[\leadsto \frac{2}{\frac{\mathsf{fma}\left(\mathsf{fma}\left(\mathsf{fma}\left(\mathsf{fma}\left(\frac{-2}{315}, t \cdot t, \frac{2}{45}\right), k \cdot k, \frac{4}{45} \cdot \left(t \cdot t\right)\right) - \frac{1}{3}, k \cdot k, \frac{-2}{3} \cdot \left(t \cdot t\right)\right) + 1, k \cdot k, \left(t \cdot t\right) \cdot 2\right) \cdot \left(k \cdot k\right)}{\mathsf{fma}\left(\frac{1}{24} \cdot \left(k \cdot k\right) - \frac{1}{2}, k \cdot k, 1\right) \cdot \left(\ell \cdot \ell\right)} \cdot t} \]
            9. lift-*.f6455.3

              \[\leadsto \frac{2}{\frac{\mathsf{fma}\left(\mathsf{fma}\left(\mathsf{fma}\left(\mathsf{fma}\left(-0.006349206349206349, t \cdot t, 0.044444444444444446\right), k \cdot k, 0.08888888888888889 \cdot \left(t \cdot t\right)\right) - 0.3333333333333333, k \cdot k, -0.6666666666666666 \cdot \left(t \cdot t\right)\right) + 1, k \cdot k, \left(t \cdot t\right) \cdot 2\right) \cdot \left(k \cdot k\right)}{\mathsf{fma}\left(0.041666666666666664 \cdot \left(k \cdot k\right) - 0.5, k \cdot k, 1\right) \cdot \left(\ell \cdot \ell\right)} \cdot t} \]
          11. Applied rewrites55.3%

            \[\leadsto \frac{2}{\frac{\mathsf{fma}\left(\mathsf{fma}\left(\mathsf{fma}\left(\mathsf{fma}\left(-0.006349206349206349, t \cdot t, 0.044444444444444446\right), k \cdot k, 0.08888888888888889 \cdot \left(t \cdot t\right)\right) - 0.3333333333333333, k \cdot k, -0.6666666666666666 \cdot \left(t \cdot t\right)\right) + 1, k \cdot k, \left(t \cdot t\right) \cdot 2\right) \cdot \left(k \cdot k\right)}{\mathsf{fma}\left(0.041666666666666664 \cdot \left(k \cdot k\right) - 0.5, k \cdot k, 1\right) \cdot \left(\ell \cdot \ell\right)} \cdot t} \]
          12. Taylor expanded in t around inf

            \[\leadsto \frac{2}{\frac{\left({t}^{2} \cdot \left(2 + {k}^{2} \cdot \left({k}^{2} \cdot \left(\frac{4}{45} + \frac{-2}{315} \cdot {k}^{2}\right) - \frac{2}{3}\right)\right)\right) \cdot \left(k \cdot k\right)}{\mathsf{fma}\left(\frac{1}{24} \cdot \left(k \cdot k\right) - \frac{1}{2}, k \cdot k, 1\right) \cdot \left(\ell \cdot \ell\right)} \cdot t} \]
          13. Step-by-step derivation
            1. *-commutativeN/A

              \[\leadsto \frac{2}{\frac{\left(\left(2 + {k}^{2} \cdot \left({k}^{2} \cdot \left(\frac{4}{45} + \frac{-2}{315} \cdot {k}^{2}\right) - \frac{2}{3}\right)\right) \cdot {t}^{2}\right) \cdot \left(k \cdot k\right)}{\mathsf{fma}\left(\frac{1}{24} \cdot \left(k \cdot k\right) - \frac{1}{2}, k \cdot k, 1\right) \cdot \left(\ell \cdot \ell\right)} \cdot t} \]
            2. lower-*.f64N/A

              \[\leadsto \frac{2}{\frac{\left(\left(2 + {k}^{2} \cdot \left({k}^{2} \cdot \left(\frac{4}{45} + \frac{-2}{315} \cdot {k}^{2}\right) - \frac{2}{3}\right)\right) \cdot {t}^{2}\right) \cdot \left(k \cdot k\right)}{\mathsf{fma}\left(\frac{1}{24} \cdot \left(k \cdot k\right) - \frac{1}{2}, k \cdot k, 1\right) \cdot \left(\ell \cdot \ell\right)} \cdot t} \]
          14. Applied rewrites67.6%

            \[\leadsto \frac{2}{\frac{\left(\mathsf{fma}\left(\mathsf{fma}\left(k \cdot k, -0.006349206349206349, 0.08888888888888889\right) \cdot \left(k \cdot k\right) - 0.6666666666666666, k \cdot k, 2\right) \cdot \left(t \cdot t\right)\right) \cdot \left(k \cdot k\right)}{\mathsf{fma}\left(0.041666666666666664 \cdot \left(k \cdot k\right) - 0.5, k \cdot k, 1\right) \cdot \left(\ell \cdot \ell\right)} \cdot t} \]

          if 2.5499999999999999e33 < k

          1. Initial program 47.8%

            \[\frac{2}{\left(\left(\frac{{t}^{3}}{\ell \cdot \ell} \cdot \sin k\right) \cdot \tan k\right) \cdot \left(\left(1 + {\left(\frac{k}{t}\right)}^{2}\right) + 1\right)} \]
          2. Add Preprocessing
          3. Taylor expanded in t around 0

            \[\leadsto \frac{2}{\color{blue}{\frac{{k}^{2} \cdot \left(t \cdot {\sin k}^{2}\right)}{{\ell}^{2} \cdot \cos k}}} \]
          4. Step-by-step derivation
            1. times-fracN/A

              \[\leadsto \frac{2}{\frac{{k}^{2}}{{\ell}^{2}} \cdot \color{blue}{\frac{t \cdot {\sin k}^{2}}{\cos k}}} \]
            2. lower-*.f64N/A

              \[\leadsto \frac{2}{\frac{{k}^{2}}{{\ell}^{2}} \cdot \color{blue}{\frac{t \cdot {\sin k}^{2}}{\cos k}}} \]
            3. lower-/.f64N/A

              \[\leadsto \frac{2}{\frac{{k}^{2}}{{\ell}^{2}} \cdot \frac{\color{blue}{t \cdot {\sin k}^{2}}}{\cos k}} \]
            4. unpow2N/A

              \[\leadsto \frac{2}{\frac{k \cdot k}{{\ell}^{2}} \cdot \frac{\color{blue}{t} \cdot {\sin k}^{2}}{\cos k}} \]
            5. lower-*.f64N/A

              \[\leadsto \frac{2}{\frac{k \cdot k}{{\ell}^{2}} \cdot \frac{\color{blue}{t} \cdot {\sin k}^{2}}{\cos k}} \]
            6. pow2N/A

              \[\leadsto \frac{2}{\frac{k \cdot k}{\ell \cdot \ell} \cdot \frac{t \cdot \color{blue}{{\sin k}^{2}}}{\cos k}} \]
            7. lift-*.f64N/A

              \[\leadsto \frac{2}{\frac{k \cdot k}{\ell \cdot \ell} \cdot \frac{t \cdot \color{blue}{{\sin k}^{2}}}{\cos k}} \]
            8. lower-/.f64N/A

              \[\leadsto \frac{2}{\frac{k \cdot k}{\ell \cdot \ell} \cdot \frac{t \cdot {\sin k}^{2}}{\color{blue}{\cos k}}} \]
            9. *-commutativeN/A

              \[\leadsto \frac{2}{\frac{k \cdot k}{\ell \cdot \ell} \cdot \frac{{\sin k}^{2} \cdot t}{\cos \color{blue}{k}}} \]
            10. lower-*.f64N/A

              \[\leadsto \frac{2}{\frac{k \cdot k}{\ell \cdot \ell} \cdot \frac{{\sin k}^{2} \cdot t}{\cos \color{blue}{k}}} \]
            11. lower-pow.f64N/A

              \[\leadsto \frac{2}{\frac{k \cdot k}{\ell \cdot \ell} \cdot \frac{{\sin k}^{2} \cdot t}{\cos k}} \]
            12. lift-sin.f64N/A

              \[\leadsto \frac{2}{\frac{k \cdot k}{\ell \cdot \ell} \cdot \frac{{\sin k}^{2} \cdot t}{\cos k}} \]
            13. lower-cos.f6467.3

              \[\leadsto \frac{2}{\frac{k \cdot k}{\ell \cdot \ell} \cdot \frac{{\sin k}^{2} \cdot t}{\cos k}} \]
          5. Applied rewrites67.3%

            \[\leadsto \frac{2}{\color{blue}{\frac{k \cdot k}{\ell \cdot \ell} \cdot \frac{{\sin k}^{2} \cdot t}{\cos k}}} \]
          6. Taylor expanded in k around 0

            \[\leadsto \frac{2}{\frac{k \cdot k}{\ell \cdot \ell} \cdot \left({k}^{2} \cdot \color{blue}{t}\right)} \]
          7. Step-by-step derivation
            1. lower-*.f64N/A

              \[\leadsto \frac{2}{\frac{k \cdot k}{\ell \cdot \ell} \cdot \left({k}^{2} \cdot t\right)} \]
            2. pow2N/A

              \[\leadsto \frac{2}{\frac{k \cdot k}{\ell \cdot \ell} \cdot \left(\left(k \cdot k\right) \cdot t\right)} \]
            3. lift-*.f6456.4

              \[\leadsto \frac{2}{\frac{k \cdot k}{\ell \cdot \ell} \cdot \left(\left(k \cdot k\right) \cdot t\right)} \]
          8. Applied rewrites56.4%

            \[\leadsto \frac{2}{\frac{k \cdot k}{\ell \cdot \ell} \cdot \left(\left(k \cdot k\right) \cdot \color{blue}{t}\right)} \]
          9. Step-by-step derivation
            1. lift-*.f64N/A

              \[\leadsto \frac{2}{\frac{k \cdot k}{\ell \cdot \ell} \cdot \left(\left(k \cdot k\right) \cdot t\right)} \]
            2. lift-*.f64N/A

              \[\leadsto \frac{2}{\frac{k \cdot k}{\ell \cdot \ell} \cdot \left(\left(k \cdot k\right) \cdot t\right)} \]
            3. associate-*l*N/A

              \[\leadsto \frac{2}{\frac{k \cdot k}{\ell \cdot \ell} \cdot \left(k \cdot \left(k \cdot \color{blue}{t}\right)\right)} \]
            4. lower-*.f64N/A

              \[\leadsto \frac{2}{\frac{k \cdot k}{\ell \cdot \ell} \cdot \left(k \cdot \left(k \cdot \color{blue}{t}\right)\right)} \]
            5. lower-*.f6456.4

              \[\leadsto \frac{2}{\frac{k \cdot k}{\ell \cdot \ell} \cdot \left(k \cdot \left(k \cdot t\right)\right)} \]
          10. Applied rewrites56.4%

            \[\leadsto \frac{2}{\frac{k \cdot k}{\ell \cdot \ell} \cdot \left(k \cdot \left(k \cdot \color{blue}{t}\right)\right)} \]
        3. Recombined 3 regimes into one program.
        4. Add Preprocessing

        Alternative 23: 46.5% accurate, 3.8× speedup?

        \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;k \leq 2.55 \cdot 10^{+33}:\\ \;\;\;\;\frac{2}{\frac{\left(\mathsf{fma}\left(\mathsf{fma}\left(k \cdot k, -0.006349206349206349, 0.08888888888888889\right) \cdot \left(k \cdot k\right) - 0.6666666666666666, k \cdot k, 2\right) \cdot \left(t \cdot t\right)\right) \cdot \left(k \cdot k\right)}{\mathsf{fma}\left(0.041666666666666664 \cdot \left(k \cdot k\right) - 0.5, k \cdot k, 1\right) \cdot \left(\ell \cdot \ell\right)} \cdot t}\\ \mathbf{else}:\\ \;\;\;\;\frac{2}{\frac{k \cdot k}{\ell \cdot \ell} \cdot \left(k \cdot \left(k \cdot t\right)\right)}\\ \end{array} \end{array} \]
        (FPCore (t l k)
         :precision binary64
         (if (<= k 2.55e+33)
           (/
            2.0
            (*
             (/
              (*
               (*
                (fma
                 (-
                  (* (fma (* k k) -0.006349206349206349 0.08888888888888889) (* k k))
                  0.6666666666666666)
                 (* k k)
                 2.0)
                (* t t))
               (* k k))
              (* (fma (- (* 0.041666666666666664 (* k k)) 0.5) (* k k) 1.0) (* l l)))
             t))
           (/ 2.0 (* (/ (* k k) (* l l)) (* k (* k t))))))
        double code(double t, double l, double k) {
        	double tmp;
        	if (k <= 2.55e+33) {
        		tmp = 2.0 / ((((fma(((fma((k * k), -0.006349206349206349, 0.08888888888888889) * (k * k)) - 0.6666666666666666), (k * k), 2.0) * (t * t)) * (k * k)) / (fma(((0.041666666666666664 * (k * k)) - 0.5), (k * k), 1.0) * (l * l))) * t);
        	} else {
        		tmp = 2.0 / (((k * k) / (l * l)) * (k * (k * t)));
        	}
        	return tmp;
        }
        
        function code(t, l, k)
        	tmp = 0.0
        	if (k <= 2.55e+33)
        		tmp = Float64(2.0 / Float64(Float64(Float64(Float64(fma(Float64(Float64(fma(Float64(k * k), -0.006349206349206349, 0.08888888888888889) * Float64(k * k)) - 0.6666666666666666), Float64(k * k), 2.0) * Float64(t * t)) * Float64(k * k)) / Float64(fma(Float64(Float64(0.041666666666666664 * Float64(k * k)) - 0.5), Float64(k * k), 1.0) * Float64(l * l))) * t));
        	else
        		tmp = Float64(2.0 / Float64(Float64(Float64(k * k) / Float64(l * l)) * Float64(k * Float64(k * t))));
        	end
        	return tmp
        end
        
        code[t_, l_, k_] := If[LessEqual[k, 2.55e+33], N[(2.0 / N[(N[(N[(N[(N[(N[(N[(N[(N[(k * k), $MachinePrecision] * -0.006349206349206349 + 0.08888888888888889), $MachinePrecision] * N[(k * k), $MachinePrecision]), $MachinePrecision] - 0.6666666666666666), $MachinePrecision] * N[(k * k), $MachinePrecision] + 2.0), $MachinePrecision] * N[(t * t), $MachinePrecision]), $MachinePrecision] * N[(k * k), $MachinePrecision]), $MachinePrecision] / N[(N[(N[(N[(0.041666666666666664 * N[(k * k), $MachinePrecision]), $MachinePrecision] - 0.5), $MachinePrecision] * N[(k * k), $MachinePrecision] + 1.0), $MachinePrecision] * N[(l * l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * t), $MachinePrecision]), $MachinePrecision], N[(2.0 / N[(N[(N[(k * k), $MachinePrecision] / N[(l * l), $MachinePrecision]), $MachinePrecision] * N[(k * N[(k * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
        
        \begin{array}{l}
        
        \\
        \begin{array}{l}
        \mathbf{if}\;k \leq 2.55 \cdot 10^{+33}:\\
        \;\;\;\;\frac{2}{\frac{\left(\mathsf{fma}\left(\mathsf{fma}\left(k \cdot k, -0.006349206349206349, 0.08888888888888889\right) \cdot \left(k \cdot k\right) - 0.6666666666666666, k \cdot k, 2\right) \cdot \left(t \cdot t\right)\right) \cdot \left(k \cdot k\right)}{\mathsf{fma}\left(0.041666666666666664 \cdot \left(k \cdot k\right) - 0.5, k \cdot k, 1\right) \cdot \left(\ell \cdot \ell\right)} \cdot t}\\
        
        \mathbf{else}:\\
        \;\;\;\;\frac{2}{\frac{k \cdot k}{\ell \cdot \ell} \cdot \left(k \cdot \left(k \cdot t\right)\right)}\\
        
        
        \end{array}
        \end{array}
        
        Derivation
        1. Split input into 2 regimes
        2. if k < 2.5499999999999999e33

          1. Initial program 57.3%

            \[\frac{2}{\left(\left(\frac{{t}^{3}}{\ell \cdot \ell} \cdot \sin k\right) \cdot \tan k\right) \cdot \left(\left(1 + {\left(\frac{k}{t}\right)}^{2}\right) + 1\right)} \]
          2. Add Preprocessing
          3. Taylor expanded in t around 0

            \[\leadsto \frac{2}{\color{blue}{t \cdot \left(2 \cdot \frac{{t}^{2} \cdot {\sin k}^{2}}{{\ell}^{2} \cdot \cos k} + \frac{{k}^{2} \cdot {\sin k}^{2}}{{\ell}^{2} \cdot \cos k}\right)}} \]
          4. Step-by-step derivation
            1. *-commutativeN/A

              \[\leadsto \frac{2}{\left(2 \cdot \frac{{t}^{2} \cdot {\sin k}^{2}}{{\ell}^{2} \cdot \cos k} + \frac{{k}^{2} \cdot {\sin k}^{2}}{{\ell}^{2} \cdot \cos k}\right) \cdot \color{blue}{t}} \]
            2. lower-*.f64N/A

              \[\leadsto \frac{2}{\left(2 \cdot \frac{{t}^{2} \cdot {\sin k}^{2}}{{\ell}^{2} \cdot \cos k} + \frac{{k}^{2} \cdot {\sin k}^{2}}{{\ell}^{2} \cdot \cos k}\right) \cdot \color{blue}{t}} \]
          5. Applied rewrites75.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. Taylor expanded in k around 0

            \[\leadsto \frac{2}{\frac{{k}^{2} \cdot \left(2 \cdot {t}^{2} + {k}^{2} \cdot \left(1 + \left(\frac{-2}{3} \cdot {t}^{2} + {k}^{2} \cdot \left(\left(\frac{4}{45} \cdot {t}^{2} + {k}^{2} \cdot \left(\frac{2}{45} + \frac{-2}{315} \cdot {t}^{2}\right)\right) - \frac{1}{3}\right)\right)\right)\right)}{\cos k \cdot \left(\ell \cdot \ell\right)} \cdot t} \]
          7. Step-by-step derivation
            1. *-commutativeN/A

              \[\leadsto \frac{2}{\frac{\left(2 \cdot {t}^{2} + {k}^{2} \cdot \left(1 + \left(\frac{-2}{3} \cdot {t}^{2} + {k}^{2} \cdot \left(\left(\frac{4}{45} \cdot {t}^{2} + {k}^{2} \cdot \left(\frac{2}{45} + \frac{-2}{315} \cdot {t}^{2}\right)\right) - \frac{1}{3}\right)\right)\right)\right) \cdot {k}^{2}}{\cos k \cdot \left(\ell \cdot \ell\right)} \cdot t} \]
            2. lower-*.f64N/A

              \[\leadsto \frac{2}{\frac{\left(2 \cdot {t}^{2} + {k}^{2} \cdot \left(1 + \left(\frac{-2}{3} \cdot {t}^{2} + {k}^{2} \cdot \left(\left(\frac{4}{45} \cdot {t}^{2} + {k}^{2} \cdot \left(\frac{2}{45} + \frac{-2}{315} \cdot {t}^{2}\right)\right) - \frac{1}{3}\right)\right)\right)\right) \cdot {k}^{2}}{\cos k \cdot \left(\ell \cdot \ell\right)} \cdot t} \]
          8. Applied rewrites48.0%

            \[\leadsto \frac{2}{\frac{\mathsf{fma}\left(\mathsf{fma}\left(\mathsf{fma}\left(\mathsf{fma}\left(-0.006349206349206349, t \cdot t, 0.044444444444444446\right), k \cdot k, 0.08888888888888889 \cdot \left(t \cdot t\right)\right) - 0.3333333333333333, k \cdot k, -0.6666666666666666 \cdot \left(t \cdot t\right)\right) + 1, k \cdot k, \left(t \cdot t\right) \cdot 2\right) \cdot \left(k \cdot k\right)}{\cos k \cdot \left(\ell \cdot \ell\right)} \cdot t} \]
          9. Taylor expanded in k around 0

            \[\leadsto \frac{2}{\frac{\mathsf{fma}\left(\mathsf{fma}\left(\mathsf{fma}\left(\mathsf{fma}\left(\frac{-2}{315}, t \cdot t, \frac{2}{45}\right), k \cdot k, \frac{4}{45} \cdot \left(t \cdot t\right)\right) - \frac{1}{3}, k \cdot k, \frac{-2}{3} \cdot \left(t \cdot t\right)\right) + 1, k \cdot k, \left(t \cdot t\right) \cdot 2\right) \cdot \left(k \cdot k\right)}{\left(1 + {k}^{2} \cdot \left(\frac{1}{24} \cdot {k}^{2} - \frac{1}{2}\right)\right) \cdot \left(\ell \cdot \ell\right)} \cdot t} \]
          10. Step-by-step derivation
            1. +-commutativeN/A

              \[\leadsto \frac{2}{\frac{\mathsf{fma}\left(\mathsf{fma}\left(\mathsf{fma}\left(\mathsf{fma}\left(\frac{-2}{315}, t \cdot t, \frac{2}{45}\right), k \cdot k, \frac{4}{45} \cdot \left(t \cdot t\right)\right) - \frac{1}{3}, k \cdot k, \frac{-2}{3} \cdot \left(t \cdot t\right)\right) + 1, k \cdot k, \left(t \cdot t\right) \cdot 2\right) \cdot \left(k \cdot k\right)}{\left({k}^{2} \cdot \left(\frac{1}{24} \cdot {k}^{2} - \frac{1}{2}\right) + 1\right) \cdot \left(\ell \cdot \ell\right)} \cdot t} \]
            2. *-commutativeN/A

              \[\leadsto \frac{2}{\frac{\mathsf{fma}\left(\mathsf{fma}\left(\mathsf{fma}\left(\mathsf{fma}\left(\frac{-2}{315}, t \cdot t, \frac{2}{45}\right), k \cdot k, \frac{4}{45} \cdot \left(t \cdot t\right)\right) - \frac{1}{3}, k \cdot k, \frac{-2}{3} \cdot \left(t \cdot t\right)\right) + 1, k \cdot k, \left(t \cdot t\right) \cdot 2\right) \cdot \left(k \cdot k\right)}{\left(\left(\frac{1}{24} \cdot {k}^{2} - \frac{1}{2}\right) \cdot {k}^{2} + 1\right) \cdot \left(\ell \cdot \ell\right)} \cdot t} \]
            3. lower-fma.f64N/A

              \[\leadsto \frac{2}{\frac{\mathsf{fma}\left(\mathsf{fma}\left(\mathsf{fma}\left(\mathsf{fma}\left(\frac{-2}{315}, t \cdot t, \frac{2}{45}\right), k \cdot k, \frac{4}{45} \cdot \left(t \cdot t\right)\right) - \frac{1}{3}, k \cdot k, \frac{-2}{3} \cdot \left(t \cdot t\right)\right) + 1, k \cdot k, \left(t \cdot t\right) \cdot 2\right) \cdot \left(k \cdot k\right)}{\mathsf{fma}\left(\frac{1}{24} \cdot {k}^{2} - \frac{1}{2}, {k}^{2}, 1\right) \cdot \left(\ell \cdot \ell\right)} \cdot t} \]
            4. lower--.f64N/A

              \[\leadsto \frac{2}{\frac{\mathsf{fma}\left(\mathsf{fma}\left(\mathsf{fma}\left(\mathsf{fma}\left(\frac{-2}{315}, t \cdot t, \frac{2}{45}\right), k \cdot k, \frac{4}{45} \cdot \left(t \cdot t\right)\right) - \frac{1}{3}, k \cdot k, \frac{-2}{3} \cdot \left(t \cdot t\right)\right) + 1, k \cdot k, \left(t \cdot t\right) \cdot 2\right) \cdot \left(k \cdot k\right)}{\mathsf{fma}\left(\frac{1}{24} \cdot {k}^{2} - \frac{1}{2}, {k}^{2}, 1\right) \cdot \left(\ell \cdot \ell\right)} \cdot t} \]
            5. lower-*.f64N/A

              \[\leadsto \frac{2}{\frac{\mathsf{fma}\left(\mathsf{fma}\left(\mathsf{fma}\left(\mathsf{fma}\left(\frac{-2}{315}, t \cdot t, \frac{2}{45}\right), k \cdot k, \frac{4}{45} \cdot \left(t \cdot t\right)\right) - \frac{1}{3}, k \cdot k, \frac{-2}{3} \cdot \left(t \cdot t\right)\right) + 1, k \cdot k, \left(t \cdot t\right) \cdot 2\right) \cdot \left(k \cdot k\right)}{\mathsf{fma}\left(\frac{1}{24} \cdot {k}^{2} - \frac{1}{2}, {k}^{2}, 1\right) \cdot \left(\ell \cdot \ell\right)} \cdot t} \]
            6. pow2N/A

              \[\leadsto \frac{2}{\frac{\mathsf{fma}\left(\mathsf{fma}\left(\mathsf{fma}\left(\mathsf{fma}\left(\frac{-2}{315}, t \cdot t, \frac{2}{45}\right), k \cdot k, \frac{4}{45} \cdot \left(t \cdot t\right)\right) - \frac{1}{3}, k \cdot k, \frac{-2}{3} \cdot \left(t \cdot t\right)\right) + 1, k \cdot k, \left(t \cdot t\right) \cdot 2\right) \cdot \left(k \cdot k\right)}{\mathsf{fma}\left(\frac{1}{24} \cdot \left(k \cdot k\right) - \frac{1}{2}, {k}^{2}, 1\right) \cdot \left(\ell \cdot \ell\right)} \cdot t} \]
            7. lift-*.f64N/A

              \[\leadsto \frac{2}{\frac{\mathsf{fma}\left(\mathsf{fma}\left(\mathsf{fma}\left(\mathsf{fma}\left(\frac{-2}{315}, t \cdot t, \frac{2}{45}\right), k \cdot k, \frac{4}{45} \cdot \left(t \cdot t\right)\right) - \frac{1}{3}, k \cdot k, \frac{-2}{3} \cdot \left(t \cdot t\right)\right) + 1, k \cdot k, \left(t \cdot t\right) \cdot 2\right) \cdot \left(k \cdot k\right)}{\mathsf{fma}\left(\frac{1}{24} \cdot \left(k \cdot k\right) - \frac{1}{2}, {k}^{2}, 1\right) \cdot \left(\ell \cdot \ell\right)} \cdot t} \]
            8. pow2N/A

              \[\leadsto \frac{2}{\frac{\mathsf{fma}\left(\mathsf{fma}\left(\mathsf{fma}\left(\mathsf{fma}\left(\frac{-2}{315}, t \cdot t, \frac{2}{45}\right), k \cdot k, \frac{4}{45} \cdot \left(t \cdot t\right)\right) - \frac{1}{3}, k \cdot k, \frac{-2}{3} \cdot \left(t \cdot t\right)\right) + 1, k \cdot k, \left(t \cdot t\right) \cdot 2\right) \cdot \left(k \cdot k\right)}{\mathsf{fma}\left(\frac{1}{24} \cdot \left(k \cdot k\right) - \frac{1}{2}, k \cdot k, 1\right) \cdot \left(\ell \cdot \ell\right)} \cdot t} \]
            9. lift-*.f6438.2

              \[\leadsto \frac{2}{\frac{\mathsf{fma}\left(\mathsf{fma}\left(\mathsf{fma}\left(\mathsf{fma}\left(-0.006349206349206349, t \cdot t, 0.044444444444444446\right), k \cdot k, 0.08888888888888889 \cdot \left(t \cdot t\right)\right) - 0.3333333333333333, k \cdot k, -0.6666666666666666 \cdot \left(t \cdot t\right)\right) + 1, k \cdot k, \left(t \cdot t\right) \cdot 2\right) \cdot \left(k \cdot k\right)}{\mathsf{fma}\left(0.041666666666666664 \cdot \left(k \cdot k\right) - 0.5, k \cdot k, 1\right) \cdot \left(\ell \cdot \ell\right)} \cdot t} \]
          11. Applied rewrites38.2%

            \[\leadsto \frac{2}{\frac{\mathsf{fma}\left(\mathsf{fma}\left(\mathsf{fma}\left(\mathsf{fma}\left(-0.006349206349206349, t \cdot t, 0.044444444444444446\right), k \cdot k, 0.08888888888888889 \cdot \left(t \cdot t\right)\right) - 0.3333333333333333, k \cdot k, -0.6666666666666666 \cdot \left(t \cdot t\right)\right) + 1, k \cdot k, \left(t \cdot t\right) \cdot 2\right) \cdot \left(k \cdot k\right)}{\mathsf{fma}\left(0.041666666666666664 \cdot \left(k \cdot k\right) - 0.5, k \cdot k, 1\right) \cdot \left(\ell \cdot \ell\right)} \cdot t} \]
          12. Taylor expanded in t around inf

            \[\leadsto \frac{2}{\frac{\left({t}^{2} \cdot \left(2 + {k}^{2} \cdot \left({k}^{2} \cdot \left(\frac{4}{45} + \frac{-2}{315} \cdot {k}^{2}\right) - \frac{2}{3}\right)\right)\right) \cdot \left(k \cdot k\right)}{\mathsf{fma}\left(\frac{1}{24} \cdot \left(k \cdot k\right) - \frac{1}{2}, k \cdot k, 1\right) \cdot \left(\ell \cdot \ell\right)} \cdot t} \]
          13. Step-by-step derivation
            1. *-commutativeN/A

              \[\leadsto \frac{2}{\frac{\left(\left(2 + {k}^{2} \cdot \left({k}^{2} \cdot \left(\frac{4}{45} + \frac{-2}{315} \cdot {k}^{2}\right) - \frac{2}{3}\right)\right) \cdot {t}^{2}\right) \cdot \left(k \cdot k\right)}{\mathsf{fma}\left(\frac{1}{24} \cdot \left(k \cdot k\right) - \frac{1}{2}, k \cdot k, 1\right) \cdot \left(\ell \cdot \ell\right)} \cdot t} \]
            2. lower-*.f64N/A

              \[\leadsto \frac{2}{\frac{\left(\left(2 + {k}^{2} \cdot \left({k}^{2} \cdot \left(\frac{4}{45} + \frac{-2}{315} \cdot {k}^{2}\right) - \frac{2}{3}\right)\right) \cdot {t}^{2}\right) \cdot \left(k \cdot k\right)}{\mathsf{fma}\left(\frac{1}{24} \cdot \left(k \cdot k\right) - \frac{1}{2}, k \cdot k, 1\right) \cdot \left(\ell \cdot \ell\right)} \cdot t} \]
          14. Applied rewrites43.7%

            \[\leadsto \frac{2}{\frac{\left(\mathsf{fma}\left(\mathsf{fma}\left(k \cdot k, -0.006349206349206349, 0.08888888888888889\right) \cdot \left(k \cdot k\right) - 0.6666666666666666, k \cdot k, 2\right) \cdot \left(t \cdot t\right)\right) \cdot \left(k \cdot k\right)}{\mathsf{fma}\left(0.041666666666666664 \cdot \left(k \cdot k\right) - 0.5, k \cdot k, 1\right) \cdot \left(\ell \cdot \ell\right)} \cdot t} \]

          if 2.5499999999999999e33 < k

          1. Initial program 47.8%

            \[\frac{2}{\left(\left(\frac{{t}^{3}}{\ell \cdot \ell} \cdot \sin k\right) \cdot \tan k\right) \cdot \left(\left(1 + {\left(\frac{k}{t}\right)}^{2}\right) + 1\right)} \]
          2. Add Preprocessing
          3. Taylor expanded in t around 0

            \[\leadsto \frac{2}{\color{blue}{\frac{{k}^{2} \cdot \left(t \cdot {\sin k}^{2}\right)}{{\ell}^{2} \cdot \cos k}}} \]
          4. Step-by-step derivation
            1. times-fracN/A

              \[\leadsto \frac{2}{\frac{{k}^{2}}{{\ell}^{2}} \cdot \color{blue}{\frac{t \cdot {\sin k}^{2}}{\cos k}}} \]
            2. lower-*.f64N/A

              \[\leadsto \frac{2}{\frac{{k}^{2}}{{\ell}^{2}} \cdot \color{blue}{\frac{t \cdot {\sin k}^{2}}{\cos k}}} \]
            3. lower-/.f64N/A

              \[\leadsto \frac{2}{\frac{{k}^{2}}{{\ell}^{2}} \cdot \frac{\color{blue}{t \cdot {\sin k}^{2}}}{\cos k}} \]
            4. unpow2N/A

              \[\leadsto \frac{2}{\frac{k \cdot k}{{\ell}^{2}} \cdot \frac{\color{blue}{t} \cdot {\sin k}^{2}}{\cos k}} \]
            5. lower-*.f64N/A

              \[\leadsto \frac{2}{\frac{k \cdot k}{{\ell}^{2}} \cdot \frac{\color{blue}{t} \cdot {\sin k}^{2}}{\cos k}} \]
            6. pow2N/A

              \[\leadsto \frac{2}{\frac{k \cdot k}{\ell \cdot \ell} \cdot \frac{t \cdot \color{blue}{{\sin k}^{2}}}{\cos k}} \]
            7. lift-*.f64N/A

              \[\leadsto \frac{2}{\frac{k \cdot k}{\ell \cdot \ell} \cdot \frac{t \cdot \color{blue}{{\sin k}^{2}}}{\cos k}} \]
            8. lower-/.f64N/A

              \[\leadsto \frac{2}{\frac{k \cdot k}{\ell \cdot \ell} \cdot \frac{t \cdot {\sin k}^{2}}{\color{blue}{\cos k}}} \]
            9. *-commutativeN/A

              \[\leadsto \frac{2}{\frac{k \cdot k}{\ell \cdot \ell} \cdot \frac{{\sin k}^{2} \cdot t}{\cos \color{blue}{k}}} \]
            10. lower-*.f64N/A

              \[\leadsto \frac{2}{\frac{k \cdot k}{\ell \cdot \ell} \cdot \frac{{\sin k}^{2} \cdot t}{\cos \color{blue}{k}}} \]
            11. lower-pow.f64N/A

              \[\leadsto \frac{2}{\frac{k \cdot k}{\ell \cdot \ell} \cdot \frac{{\sin k}^{2} \cdot t}{\cos k}} \]
            12. lift-sin.f64N/A

              \[\leadsto \frac{2}{\frac{k \cdot k}{\ell \cdot \ell} \cdot \frac{{\sin k}^{2} \cdot t}{\cos k}} \]
            13. lower-cos.f6467.3

              \[\leadsto \frac{2}{\frac{k \cdot k}{\ell \cdot \ell} \cdot \frac{{\sin k}^{2} \cdot t}{\cos k}} \]
          5. Applied rewrites67.3%

            \[\leadsto \frac{2}{\color{blue}{\frac{k \cdot k}{\ell \cdot \ell} \cdot \frac{{\sin k}^{2} \cdot t}{\cos k}}} \]
          6. Taylor expanded in k around 0

            \[\leadsto \frac{2}{\frac{k \cdot k}{\ell \cdot \ell} \cdot \left({k}^{2} \cdot \color{blue}{t}\right)} \]
          7. Step-by-step derivation
            1. lower-*.f64N/A

              \[\leadsto \frac{2}{\frac{k \cdot k}{\ell \cdot \ell} \cdot \left({k}^{2} \cdot t\right)} \]
            2. pow2N/A

              \[\leadsto \frac{2}{\frac{k \cdot k}{\ell \cdot \ell} \cdot \left(\left(k \cdot k\right) \cdot t\right)} \]
            3. lift-*.f6456.4

              \[\leadsto \frac{2}{\frac{k \cdot k}{\ell \cdot \ell} \cdot \left(\left(k \cdot k\right) \cdot t\right)} \]
          8. Applied rewrites56.4%

            \[\leadsto \frac{2}{\frac{k \cdot k}{\ell \cdot \ell} \cdot \left(\left(k \cdot k\right) \cdot \color{blue}{t}\right)} \]
          9. Step-by-step derivation
            1. lift-*.f64N/A

              \[\leadsto \frac{2}{\frac{k \cdot k}{\ell \cdot \ell} \cdot \left(\left(k \cdot k\right) \cdot t\right)} \]
            2. lift-*.f64N/A

              \[\leadsto \frac{2}{\frac{k \cdot k}{\ell \cdot \ell} \cdot \left(\left(k \cdot k\right) \cdot t\right)} \]
            3. associate-*l*N/A

              \[\leadsto \frac{2}{\frac{k \cdot k}{\ell \cdot \ell} \cdot \left(k \cdot \left(k \cdot \color{blue}{t}\right)\right)} \]
            4. lower-*.f64N/A

              \[\leadsto \frac{2}{\frac{k \cdot k}{\ell \cdot \ell} \cdot \left(k \cdot \left(k \cdot \color{blue}{t}\right)\right)} \]
            5. lower-*.f6456.4

              \[\leadsto \frac{2}{\frac{k \cdot k}{\ell \cdot \ell} \cdot \left(k \cdot \left(k \cdot t\right)\right)} \]
          10. Applied rewrites56.4%

            \[\leadsto \frac{2}{\frac{k \cdot k}{\ell \cdot \ell} \cdot \left(k \cdot \left(k \cdot \color{blue}{t}\right)\right)} \]
        3. Recombined 2 regimes into one program.
        4. Add Preprocessing

        Alternative 24: 47.2% accurate, 5.2× speedup?

        \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;k \leq 26500:\\ \;\;\;\;\frac{2}{\frac{\left(\left(t \cdot t\right) \cdot 2\right) \cdot \left(k \cdot k\right)}{\mathsf{fma}\left(0.041666666666666664 \cdot \left(k \cdot k\right) - 0.5, k \cdot k, 1\right) \cdot \left(\ell \cdot \ell\right)} \cdot t}\\ \mathbf{else}:\\ \;\;\;\;\frac{2}{\frac{k \cdot k}{\ell \cdot \ell} \cdot \left(k \cdot \left(k \cdot t\right)\right)}\\ \end{array} \end{array} \]
        (FPCore (t l k)
         :precision binary64
         (if (<= k 26500.0)
           (/
            2.0
            (*
             (/
              (* (* (* t t) 2.0) (* k k))
              (* (fma (- (* 0.041666666666666664 (* k k)) 0.5) (* k k) 1.0) (* l l)))
             t))
           (/ 2.0 (* (/ (* k k) (* l l)) (* k (* k t))))))
        double code(double t, double l, double k) {
        	double tmp;
        	if (k <= 26500.0) {
        		tmp = 2.0 / (((((t * t) * 2.0) * (k * k)) / (fma(((0.041666666666666664 * (k * k)) - 0.5), (k * k), 1.0) * (l * l))) * t);
        	} else {
        		tmp = 2.0 / (((k * k) / (l * l)) * (k * (k * t)));
        	}
        	return tmp;
        }
        
        function code(t, l, k)
        	tmp = 0.0
        	if (k <= 26500.0)
        		tmp = Float64(2.0 / Float64(Float64(Float64(Float64(Float64(t * t) * 2.0) * Float64(k * k)) / Float64(fma(Float64(Float64(0.041666666666666664 * Float64(k * k)) - 0.5), Float64(k * k), 1.0) * Float64(l * l))) * t));
        	else
        		tmp = Float64(2.0 / Float64(Float64(Float64(k * k) / Float64(l * l)) * Float64(k * Float64(k * t))));
        	end
        	return tmp
        end
        
        code[t_, l_, k_] := If[LessEqual[k, 26500.0], N[(2.0 / N[(N[(N[(N[(N[(t * t), $MachinePrecision] * 2.0), $MachinePrecision] * N[(k * k), $MachinePrecision]), $MachinePrecision] / N[(N[(N[(N[(0.041666666666666664 * N[(k * k), $MachinePrecision]), $MachinePrecision] - 0.5), $MachinePrecision] * N[(k * k), $MachinePrecision] + 1.0), $MachinePrecision] * N[(l * l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * t), $MachinePrecision]), $MachinePrecision], N[(2.0 / N[(N[(N[(k * k), $MachinePrecision] / N[(l * l), $MachinePrecision]), $MachinePrecision] * N[(k * N[(k * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
        
        \begin{array}{l}
        
        \\
        \begin{array}{l}
        \mathbf{if}\;k \leq 26500:\\
        \;\;\;\;\frac{2}{\frac{\left(\left(t \cdot t\right) \cdot 2\right) \cdot \left(k \cdot k\right)}{\mathsf{fma}\left(0.041666666666666664 \cdot \left(k \cdot k\right) - 0.5, k \cdot k, 1\right) \cdot \left(\ell \cdot \ell\right)} \cdot t}\\
        
        \mathbf{else}:\\
        \;\;\;\;\frac{2}{\frac{k \cdot k}{\ell \cdot \ell} \cdot \left(k \cdot \left(k \cdot t\right)\right)}\\
        
        
        \end{array}
        \end{array}
        
        Derivation
        1. Split input into 2 regimes
        2. if k < 26500

          1. Initial program 57.3%

            \[\frac{2}{\left(\left(\frac{{t}^{3}}{\ell \cdot \ell} \cdot \sin k\right) \cdot \tan k\right) \cdot \left(\left(1 + {\left(\frac{k}{t}\right)}^{2}\right) + 1\right)} \]
          2. Add Preprocessing
          3. Taylor expanded in 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 rewrites74.9%

            \[\leadsto \frac{2}{\color{blue}{\frac{\mathsf{fma}\left(2, {\left(\sin k \cdot t\right)}^{2}, {\left(\sin k \cdot k\right)}^{2}\right)}{\cos k \cdot \left(\ell \cdot \ell\right)} \cdot t}} \]
          6. Taylor expanded in k around 0

            \[\leadsto \frac{2}{\frac{{k}^{2} \cdot \left(2 \cdot {t}^{2} + {k}^{2} \cdot \left(1 + \left(\frac{-2}{3} \cdot {t}^{2} + {k}^{2} \cdot \left(\left(\frac{4}{45} \cdot {t}^{2} + {k}^{2} \cdot \left(\frac{2}{45} + \frac{-2}{315} \cdot {t}^{2}\right)\right) - \frac{1}{3}\right)\right)\right)\right)}{\cos k \cdot \left(\ell \cdot \ell\right)} \cdot t} \]
          7. Step-by-step derivation
            1. *-commutativeN/A

              \[\leadsto \frac{2}{\frac{\left(2 \cdot {t}^{2} + {k}^{2} \cdot \left(1 + \left(\frac{-2}{3} \cdot {t}^{2} + {k}^{2} \cdot \left(\left(\frac{4}{45} \cdot {t}^{2} + {k}^{2} \cdot \left(\frac{2}{45} + \frac{-2}{315} \cdot {t}^{2}\right)\right) - \frac{1}{3}\right)\right)\right)\right) \cdot {k}^{2}}{\cos k \cdot \left(\ell \cdot \ell\right)} \cdot t} \]
            2. lower-*.f64N/A

              \[\leadsto \frac{2}{\frac{\left(2 \cdot {t}^{2} + {k}^{2} \cdot \left(1 + \left(\frac{-2}{3} \cdot {t}^{2} + {k}^{2} \cdot \left(\left(\frac{4}{45} \cdot {t}^{2} + {k}^{2} \cdot \left(\frac{2}{45} + \frac{-2}{315} \cdot {t}^{2}\right)\right) - \frac{1}{3}\right)\right)\right)\right) \cdot {k}^{2}}{\cos k \cdot \left(\ell \cdot \ell\right)} \cdot t} \]
          8. Applied rewrites48.6%

            \[\leadsto \frac{2}{\frac{\mathsf{fma}\left(\mathsf{fma}\left(\mathsf{fma}\left(\mathsf{fma}\left(-0.006349206349206349, t \cdot t, 0.044444444444444446\right), k \cdot k, 0.08888888888888889 \cdot \left(t \cdot t\right)\right) - 0.3333333333333333, k \cdot k, -0.6666666666666666 \cdot \left(t \cdot t\right)\right) + 1, k \cdot k, \left(t \cdot t\right) \cdot 2\right) \cdot \left(k \cdot k\right)}{\cos k \cdot \left(\ell \cdot \ell\right)} \cdot t} \]
          9. Taylor expanded in k around 0

            \[\leadsto \frac{2}{\frac{\mathsf{fma}\left(\mathsf{fma}\left(\mathsf{fma}\left(\mathsf{fma}\left(\frac{-2}{315}, t \cdot t, \frac{2}{45}\right), k \cdot k, \frac{4}{45} \cdot \left(t \cdot t\right)\right) - \frac{1}{3}, k \cdot k, \frac{-2}{3} \cdot \left(t \cdot t\right)\right) + 1, k \cdot k, \left(t \cdot t\right) \cdot 2\right) \cdot \left(k \cdot k\right)}{\left(1 + {k}^{2} \cdot \left(\frac{1}{24} \cdot {k}^{2} - \frac{1}{2}\right)\right) \cdot \left(\ell \cdot \ell\right)} \cdot t} \]
          10. Step-by-step derivation
            1. +-commutativeN/A

              \[\leadsto \frac{2}{\frac{\mathsf{fma}\left(\mathsf{fma}\left(\mathsf{fma}\left(\mathsf{fma}\left(\frac{-2}{315}, t \cdot t, \frac{2}{45}\right), k \cdot k, \frac{4}{45} \cdot \left(t \cdot t\right)\right) - \frac{1}{3}, k \cdot k, \frac{-2}{3} \cdot \left(t \cdot t\right)\right) + 1, k \cdot k, \left(t \cdot t\right) \cdot 2\right) \cdot \left(k \cdot k\right)}{\left({k}^{2} \cdot \left(\frac{1}{24} \cdot {k}^{2} - \frac{1}{2}\right) + 1\right) \cdot \left(\ell \cdot \ell\right)} \cdot t} \]
            2. *-commutativeN/A

              \[\leadsto \frac{2}{\frac{\mathsf{fma}\left(\mathsf{fma}\left(\mathsf{fma}\left(\mathsf{fma}\left(\frac{-2}{315}, t \cdot t, \frac{2}{45}\right), k \cdot k, \frac{4}{45} \cdot \left(t \cdot t\right)\right) - \frac{1}{3}, k \cdot k, \frac{-2}{3} \cdot \left(t \cdot t\right)\right) + 1, k \cdot k, \left(t \cdot t\right) \cdot 2\right) \cdot \left(k \cdot k\right)}{\left(\left(\frac{1}{24} \cdot {k}^{2} - \frac{1}{2}\right) \cdot {k}^{2} + 1\right) \cdot \left(\ell \cdot \ell\right)} \cdot t} \]
            3. lower-fma.f64N/A

              \[\leadsto \frac{2}{\frac{\mathsf{fma}\left(\mathsf{fma}\left(\mathsf{fma}\left(\mathsf{fma}\left(\frac{-2}{315}, t \cdot t, \frac{2}{45}\right), k \cdot k, \frac{4}{45} \cdot \left(t \cdot t\right)\right) - \frac{1}{3}, k \cdot k, \frac{-2}{3} \cdot \left(t \cdot t\right)\right) + 1, k \cdot k, \left(t \cdot t\right) \cdot 2\right) \cdot \left(k \cdot k\right)}{\mathsf{fma}\left(\frac{1}{24} \cdot {k}^{2} - \frac{1}{2}, {k}^{2}, 1\right) \cdot \left(\ell \cdot \ell\right)} \cdot t} \]
            4. lower--.f64N/A

              \[\leadsto \frac{2}{\frac{\mathsf{fma}\left(\mathsf{fma}\left(\mathsf{fma}\left(\mathsf{fma}\left(\frac{-2}{315}, t \cdot t, \frac{2}{45}\right), k \cdot k, \frac{4}{45} \cdot \left(t \cdot t\right)\right) - \frac{1}{3}, k \cdot k, \frac{-2}{3} \cdot \left(t \cdot t\right)\right) + 1, k \cdot k, \left(t \cdot t\right) \cdot 2\right) \cdot \left(k \cdot k\right)}{\mathsf{fma}\left(\frac{1}{24} \cdot {k}^{2} - \frac{1}{2}, {k}^{2}, 1\right) \cdot \left(\ell \cdot \ell\right)} \cdot t} \]
            5. lower-*.f64N/A

              \[\leadsto \frac{2}{\frac{\mathsf{fma}\left(\mathsf{fma}\left(\mathsf{fma}\left(\mathsf{fma}\left(\frac{-2}{315}, t \cdot t, \frac{2}{45}\right), k \cdot k, \frac{4}{45} \cdot \left(t \cdot t\right)\right) - \frac{1}{3}, k \cdot k, \frac{-2}{3} \cdot \left(t \cdot t\right)\right) + 1, k \cdot k, \left(t \cdot t\right) \cdot 2\right) \cdot \left(k \cdot k\right)}{\mathsf{fma}\left(\frac{1}{24} \cdot {k}^{2} - \frac{1}{2}, {k}^{2}, 1\right) \cdot \left(\ell \cdot \ell\right)} \cdot t} \]
            6. pow2N/A

              \[\leadsto \frac{2}{\frac{\mathsf{fma}\left(\mathsf{fma}\left(\mathsf{fma}\left(\mathsf{fma}\left(\frac{-2}{315}, t \cdot t, \frac{2}{45}\right), k \cdot k, \frac{4}{45} \cdot \left(t \cdot t\right)\right) - \frac{1}{3}, k \cdot k, \frac{-2}{3} \cdot \left(t \cdot t\right)\right) + 1, k \cdot k, \left(t \cdot t\right) \cdot 2\right) \cdot \left(k \cdot k\right)}{\mathsf{fma}\left(\frac{1}{24} \cdot \left(k \cdot k\right) - \frac{1}{2}, {k}^{2}, 1\right) \cdot \left(\ell \cdot \ell\right)} \cdot t} \]
            7. lift-*.f64N/A

              \[\leadsto \frac{2}{\frac{\mathsf{fma}\left(\mathsf{fma}\left(\mathsf{fma}\left(\mathsf{fma}\left(\frac{-2}{315}, t \cdot t, \frac{2}{45}\right), k \cdot k, \frac{4}{45} \cdot \left(t \cdot t\right)\right) - \frac{1}{3}, k \cdot k, \frac{-2}{3} \cdot \left(t \cdot t\right)\right) + 1, k \cdot k, \left(t \cdot t\right) \cdot 2\right) \cdot \left(k \cdot k\right)}{\mathsf{fma}\left(\frac{1}{24} \cdot \left(k \cdot k\right) - \frac{1}{2}, {k}^{2}, 1\right) \cdot \left(\ell \cdot \ell\right)} \cdot t} \]
            8. pow2N/A

              \[\leadsto \frac{2}{\frac{\mathsf{fma}\left(\mathsf{fma}\left(\mathsf{fma}\left(\mathsf{fma}\left(\frac{-2}{315}, t \cdot t, \frac{2}{45}\right), k \cdot k, \frac{4}{45} \cdot \left(t \cdot t\right)\right) - \frac{1}{3}, k \cdot k, \frac{-2}{3} \cdot \left(t \cdot t\right)\right) + 1, k \cdot k, \left(t \cdot t\right) \cdot 2\right) \cdot \left(k \cdot k\right)}{\mathsf{fma}\left(\frac{1}{24} \cdot \left(k \cdot k\right) - \frac{1}{2}, k \cdot k, 1\right) \cdot \left(\ell \cdot \ell\right)} \cdot t} \]
            9. lift-*.f6438.6

              \[\leadsto \frac{2}{\frac{\mathsf{fma}\left(\mathsf{fma}\left(\mathsf{fma}\left(\mathsf{fma}\left(-0.006349206349206349, t \cdot t, 0.044444444444444446\right), k \cdot k, 0.08888888888888889 \cdot \left(t \cdot t\right)\right) - 0.3333333333333333, k \cdot k, -0.6666666666666666 \cdot \left(t \cdot t\right)\right) + 1, k \cdot k, \left(t \cdot t\right) \cdot 2\right) \cdot \left(k \cdot k\right)}{\mathsf{fma}\left(0.041666666666666664 \cdot \left(k \cdot k\right) - 0.5, k \cdot k, 1\right) \cdot \left(\ell \cdot \ell\right)} \cdot t} \]
          11. Applied rewrites38.6%

            \[\leadsto \frac{2}{\frac{\mathsf{fma}\left(\mathsf{fma}\left(\mathsf{fma}\left(\mathsf{fma}\left(-0.006349206349206349, t \cdot t, 0.044444444444444446\right), k \cdot k, 0.08888888888888889 \cdot \left(t \cdot t\right)\right) - 0.3333333333333333, k \cdot k, -0.6666666666666666 \cdot \left(t \cdot t\right)\right) + 1, k \cdot k, \left(t \cdot t\right) \cdot 2\right) \cdot \left(k \cdot k\right)}{\mathsf{fma}\left(0.041666666666666664 \cdot \left(k \cdot k\right) - 0.5, k \cdot k, 1\right) \cdot \left(\ell \cdot \ell\right)} \cdot t} \]
          12. Taylor expanded in k around 0

            \[\leadsto \frac{2}{\frac{\left(2 \cdot {t}^{2}\right) \cdot \left(k \cdot k\right)}{\mathsf{fma}\left(\frac{1}{24} \cdot \left(k \cdot k\right) - \frac{1}{2}, k \cdot k, 1\right) \cdot \left(\ell \cdot \ell\right)} \cdot t} \]
          13. Step-by-step derivation
            1. *-commutativeN/A

              \[\leadsto \frac{2}{\frac{\left({t}^{2} \cdot 2\right) \cdot \left(k \cdot k\right)}{\mathsf{fma}\left(\frac{1}{24} \cdot \left(k \cdot k\right) - \frac{1}{2}, k \cdot k, 1\right) \cdot \left(\ell \cdot \ell\right)} \cdot t} \]
            2. pow2N/A

              \[\leadsto \frac{2}{\frac{\left(\left(t \cdot t\right) \cdot 2\right) \cdot \left(k \cdot k\right)}{\mathsf{fma}\left(\frac{1}{24} \cdot \left(k \cdot k\right) - \frac{1}{2}, k \cdot k, 1\right) \cdot \left(\ell \cdot \ell\right)} \cdot t} \]
            3. lift-*.f64N/A

              \[\leadsto \frac{2}{\frac{\left(\left(t \cdot t\right) \cdot 2\right) \cdot \left(k \cdot k\right)}{\mathsf{fma}\left(\frac{1}{24} \cdot \left(k \cdot k\right) - \frac{1}{2}, k \cdot k, 1\right) \cdot \left(\ell \cdot \ell\right)} \cdot t} \]
            4. lift-*.f6444.6

              \[\leadsto \frac{2}{\frac{\left(\left(t \cdot t\right) \cdot 2\right) \cdot \left(k \cdot k\right)}{\mathsf{fma}\left(0.041666666666666664 \cdot \left(k \cdot k\right) - 0.5, k \cdot k, 1\right) \cdot \left(\ell \cdot \ell\right)} \cdot t} \]
          14. Applied rewrites44.6%

            \[\leadsto \frac{2}{\frac{\left(\left(t \cdot t\right) \cdot 2\right) \cdot \left(k \cdot k\right)}{\mathsf{fma}\left(0.041666666666666664 \cdot \left(k \cdot k\right) - 0.5, k \cdot k, 1\right) \cdot \left(\ell \cdot \ell\right)} \cdot t} \]

          if 26500 < k

          1. Initial program 48.7%

            \[\frac{2}{\left(\left(\frac{{t}^{3}}{\ell \cdot \ell} \cdot \sin k\right) \cdot \tan k\right) \cdot \left(\left(1 + {\left(\frac{k}{t}\right)}^{2}\right) + 1\right)} \]
          2. Add Preprocessing
          3. Taylor expanded in t around 0

            \[\leadsto \frac{2}{\color{blue}{\frac{{k}^{2} \cdot \left(t \cdot {\sin k}^{2}\right)}{{\ell}^{2} \cdot \cos k}}} \]
          4. Step-by-step derivation
            1. times-fracN/A

              \[\leadsto \frac{2}{\frac{{k}^{2}}{{\ell}^{2}} \cdot \color{blue}{\frac{t \cdot {\sin k}^{2}}{\cos k}}} \]
            2. lower-*.f64N/A

              \[\leadsto \frac{2}{\frac{{k}^{2}}{{\ell}^{2}} \cdot \color{blue}{\frac{t \cdot {\sin k}^{2}}{\cos k}}} \]
            3. lower-/.f64N/A

              \[\leadsto \frac{2}{\frac{{k}^{2}}{{\ell}^{2}} \cdot \frac{\color{blue}{t \cdot {\sin k}^{2}}}{\cos k}} \]
            4. unpow2N/A

              \[\leadsto \frac{2}{\frac{k \cdot k}{{\ell}^{2}} \cdot \frac{\color{blue}{t} \cdot {\sin k}^{2}}{\cos k}} \]
            5. lower-*.f64N/A

              \[\leadsto \frac{2}{\frac{k \cdot k}{{\ell}^{2}} \cdot \frac{\color{blue}{t} \cdot {\sin k}^{2}}{\cos k}} \]
            6. pow2N/A

              \[\leadsto \frac{2}{\frac{k \cdot k}{\ell \cdot \ell} \cdot \frac{t \cdot \color{blue}{{\sin k}^{2}}}{\cos k}} \]
            7. lift-*.f64N/A

              \[\leadsto \frac{2}{\frac{k \cdot k}{\ell \cdot \ell} \cdot \frac{t \cdot \color{blue}{{\sin k}^{2}}}{\cos k}} \]
            8. lower-/.f64N/A

              \[\leadsto \frac{2}{\frac{k \cdot k}{\ell \cdot \ell} \cdot \frac{t \cdot {\sin k}^{2}}{\color{blue}{\cos k}}} \]
            9. *-commutativeN/A

              \[\leadsto \frac{2}{\frac{k \cdot k}{\ell \cdot \ell} \cdot \frac{{\sin k}^{2} \cdot t}{\cos \color{blue}{k}}} \]
            10. lower-*.f64N/A

              \[\leadsto \frac{2}{\frac{k \cdot k}{\ell \cdot \ell} \cdot \frac{{\sin k}^{2} \cdot t}{\cos \color{blue}{k}}} \]
            11. lower-pow.f64N/A

              \[\leadsto \frac{2}{\frac{k \cdot k}{\ell \cdot \ell} \cdot \frac{{\sin k}^{2} \cdot t}{\cos k}} \]
            12. lift-sin.f64N/A

              \[\leadsto \frac{2}{\frac{k \cdot k}{\ell \cdot \ell} \cdot \frac{{\sin k}^{2} \cdot t}{\cos k}} \]
            13. lower-cos.f6467.6

              \[\leadsto \frac{2}{\frac{k \cdot k}{\ell \cdot \ell} \cdot \frac{{\sin k}^{2} \cdot t}{\cos k}} \]
          5. Applied rewrites67.6%

            \[\leadsto \frac{2}{\color{blue}{\frac{k \cdot k}{\ell \cdot \ell} \cdot \frac{{\sin k}^{2} \cdot t}{\cos k}}} \]
          6. Taylor expanded in k around 0

            \[\leadsto \frac{2}{\frac{k \cdot k}{\ell \cdot \ell} \cdot \left({k}^{2} \cdot \color{blue}{t}\right)} \]
          7. Step-by-step derivation
            1. lower-*.f64N/A

              \[\leadsto \frac{2}{\frac{k \cdot k}{\ell \cdot \ell} \cdot \left({k}^{2} \cdot t\right)} \]
            2. pow2N/A

              \[\leadsto \frac{2}{\frac{k \cdot k}{\ell \cdot \ell} \cdot \left(\left(k \cdot k\right) \cdot t\right)} \]
            3. lift-*.f6454.9

              \[\leadsto \frac{2}{\frac{k \cdot k}{\ell \cdot \ell} \cdot \left(\left(k \cdot k\right) \cdot t\right)} \]
          8. Applied rewrites54.9%

            \[\leadsto \frac{2}{\frac{k \cdot k}{\ell \cdot \ell} \cdot \left(\left(k \cdot k\right) \cdot \color{blue}{t}\right)} \]
          9. Step-by-step derivation
            1. lift-*.f64N/A

              \[\leadsto \frac{2}{\frac{k \cdot k}{\ell \cdot \ell} \cdot \left(\left(k \cdot k\right) \cdot t\right)} \]
            2. lift-*.f64N/A

              \[\leadsto \frac{2}{\frac{k \cdot k}{\ell \cdot \ell} \cdot \left(\left(k \cdot k\right) \cdot t\right)} \]
            3. associate-*l*N/A

              \[\leadsto \frac{2}{\frac{k \cdot k}{\ell \cdot \ell} \cdot \left(k \cdot \left(k \cdot \color{blue}{t}\right)\right)} \]
            4. lower-*.f64N/A

              \[\leadsto \frac{2}{\frac{k \cdot k}{\ell \cdot \ell} \cdot \left(k \cdot \left(k \cdot \color{blue}{t}\right)\right)} \]
            5. lower-*.f6454.9

              \[\leadsto \frac{2}{\frac{k \cdot k}{\ell \cdot \ell} \cdot \left(k \cdot \left(k \cdot t\right)\right)} \]
          10. Applied rewrites54.9%

            \[\leadsto \frac{2}{\frac{k \cdot k}{\ell \cdot \ell} \cdot \left(k \cdot \left(k \cdot \color{blue}{t}\right)\right)} \]
        3. Recombined 2 regimes into one program.
        4. Add Preprocessing

        Alternative 25: 51.2% accurate, 12.5× speedup?

        \[\begin{array}{l} \\ \frac{\ell \cdot \ell}{\left(k \cdot k\right) \cdot \left(\left(t \cdot t\right) \cdot t\right)} \end{array} \]
        (FPCore (t l k) :precision binary64 (/ (* l l) (* (* k k) (* (* t t) t))))
        double code(double t, double l, double k) {
        	return (l * l) / ((k * k) * ((t * t) * t));
        }
        
        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 = (l * l) / ((k * k) * ((t * t) * t))
        end function
        
        public static double code(double t, double l, double k) {
        	return (l * l) / ((k * k) * ((t * t) * t));
        }
        
        def code(t, l, k):
        	return (l * l) / ((k * k) * ((t * t) * t))
        
        function code(t, l, k)
        	return Float64(Float64(l * l) / Float64(Float64(k * k) * Float64(Float64(t * t) * t)))
        end
        
        function tmp = code(t, l, k)
        	tmp = (l * l) / ((k * k) * ((t * t) * t));
        end
        
        code[t_, l_, k_] := N[(N[(l * l), $MachinePrecision] / N[(N[(k * k), $MachinePrecision] * N[(N[(t * t), $MachinePrecision] * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
        
        \begin{array}{l}
        
        \\
        \frac{\ell \cdot \ell}{\left(k \cdot k\right) \cdot \left(\left(t \cdot t\right) \cdot t\right)}
        \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 k around 0

          \[\leadsto \color{blue}{\frac{{\ell}^{2}}{{k}^{2} \cdot {t}^{3}}} \]
        4. Step-by-step derivation
          1. lower-/.f64N/A

            \[\leadsto \frac{{\ell}^{2}}{\color{blue}{{k}^{2} \cdot {t}^{3}}} \]
          2. pow2N/A

            \[\leadsto \frac{\ell \cdot \ell}{\color{blue}{{k}^{2}} \cdot {t}^{3}} \]
          3. lift-*.f64N/A

            \[\leadsto \frac{\ell \cdot \ell}{\color{blue}{{k}^{2}} \cdot {t}^{3}} \]
          4. lower-*.f64N/A

            \[\leadsto \frac{\ell \cdot \ell}{{k}^{2} \cdot \color{blue}{{t}^{3}}} \]
          5. unpow2N/A

            \[\leadsto \frac{\ell \cdot \ell}{\left(k \cdot k\right) \cdot {\color{blue}{t}}^{3}} \]
          6. lower-*.f64N/A

            \[\leadsto \frac{\ell \cdot \ell}{\left(k \cdot k\right) \cdot {\color{blue}{t}}^{3}} \]
          7. lift-pow.f6451.2

            \[\leadsto \frac{\ell \cdot \ell}{\left(k \cdot k\right) \cdot {t}^{\color{blue}{3}}} \]
        5. Applied rewrites51.2%

          \[\leadsto \color{blue}{\frac{\ell \cdot \ell}{\left(k \cdot k\right) \cdot {t}^{3}}} \]
        6. Step-by-step derivation
          1. lift-pow.f64N/A

            \[\leadsto \frac{\ell \cdot \ell}{\left(k \cdot k\right) \cdot {t}^{\color{blue}{3}}} \]
          2. pow3N/A

            \[\leadsto \frac{\ell \cdot \ell}{\left(k \cdot k\right) \cdot \left(\left(t \cdot t\right) \cdot \color{blue}{t}\right)} \]
          3. lift-*.f64N/A

            \[\leadsto \frac{\ell \cdot \ell}{\left(k \cdot k\right) \cdot \left(\left(t \cdot t\right) \cdot t\right)} \]
          4. lift-*.f6451.2

            \[\leadsto \frac{\ell \cdot \ell}{\left(k \cdot k\right) \cdot \left(\left(t \cdot t\right) \cdot \color{blue}{t}\right)} \]
        7. Applied rewrites51.2%

          \[\leadsto \frac{\ell \cdot \ell}{\left(k \cdot k\right) \cdot \left(\left(t \cdot t\right) \cdot \color{blue}{t}\right)} \]
        8. Add Preprocessing

        Reproduce

        ?
        herbie shell --seed 2025093 
        (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))))