Toniolo and Linder, Equation (10+)

Percentage Accurate: 54.6% → 82.0%
Time: 12.7s
Alternatives: 12
Speedup: 6.6×

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

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

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

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

\\
\frac{2}{\frac{\frac{\mathsf{fma}\left(2, \frac{{\left(\sin k \cdot t\right)}^{2}}{\cos k}, \frac{{\left(\sin k \cdot k\right)}^{2}}{\cos k}\right)}{\ell}}{\ell} \cdot t}
\end{array}
Derivation
  1. Initial program 54.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. Taylor expanded in t around 0

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

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

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

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

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

Alternative 2: 76.2% accurate, 0.4× speedup?

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

\\
\begin{array}{l}
t_1 := \left(1 + {\left(\frac{k}{t}\right)}^{2}\right) + 1\\
\mathbf{if}\;\left(\left(\frac{{t}^{3}}{\ell \cdot \ell} \cdot \sin k\right) \cdot \tan k\right) \cdot t\_1 \leq 4 \cdot 10^{+27}:\\
\;\;\;\;\frac{2}{\left(\left(\frac{\frac{\left(t \cdot t\right) \cdot t}{\ell}}{\ell} \cdot \sin k\right) \cdot \tan k\right) \cdot t\_1}\\

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


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

    1. Initial program 84.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. Applied rewrites87.0%

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

    if 4.0000000000000001e27 < (*.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 30.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. Taylor expanded in t around 0

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

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

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

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

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

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

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

Alternative 3: 71.1% accurate, 1.0× speedup?

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

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

\mathbf{elif}\;t \leq 2.1 \cdot 10^{+139}:\\
\;\;\;\;\frac{2}{\left(\left(\frac{\frac{\left(t \cdot t\right) \cdot t}{\ell}}{\ell} \cdot \sin k\right) \cdot \tan k\right) \cdot \left(\left(1 + {\left(\frac{k}{t}\right)}^{2}\right) + 1\right)}\\

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


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

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

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

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

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

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

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

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

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

    if 3.6000000000000001e-39 < t < 2.0999999999999999e139

    1. Initial program 70.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. Applied rewrites73.9%

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

    if 2.0999999999999999e139 < t

    1. Initial program 61.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. Taylor expanded in t around 0

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

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

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

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

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

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

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

Alternative 4: 70.9% accurate, 1.0× speedup?

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

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

\mathbf{elif}\;t \leq 2.1 \cdot 10^{+139}:\\
\;\;\;\;\frac{2}{\left(\frac{\left(\left(t \cdot t\right) \cdot t\right) \cdot \sin k}{\ell \cdot \ell} \cdot \tan k\right) \cdot \left(\left(1 + {\left(\frac{k}{t}\right)}^{2}\right) + 1\right)}\\

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


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

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

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

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

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

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

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

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

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

    if 3.6000000000000001e-39 < t < 2.0999999999999999e139

    1. Initial program 70.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. Applied rewrites72.3%

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

    if 2.0999999999999999e139 < t

    1. Initial program 61.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. Taylor expanded in t around 0

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

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

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

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

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

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

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

Alternative 5: 70.2% accurate, 1.2× speedup?

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

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

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

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


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

    1. Initial program 50.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. Taylor expanded in t around 0

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

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

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

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

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

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

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

    if 1.59999999999999991e-28 < t < 2.0999999999999999e139

    1. Initial program 70.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. Taylor expanded in t around 0

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

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

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

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

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

      \[\leadsto \frac{2}{\left(\frac{\frac{\left(\left(t \cdot t\right) \cdot t\right) \cdot k}{\ell}}{\ell} \cdot \tan k\right) \cdot \color{blue}{2}} \]
    8. Applied rewrites67.0%

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

    if 2.0999999999999999e139 < t

    1. Initial program 61.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. Taylor expanded in t around 0

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

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

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

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

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

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

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

Alternative 6: 69.3% accurate, 1.2× speedup?

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

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

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

\mathbf{elif}\;t \leq 1.16 \cdot 10^{+240}:\\
\;\;\;\;\frac{\left(\ell \cdot \ell\right) \cdot \cos k}{{\left(\sin k \cdot t\right)}^{2} \cdot t}\\

\mathbf{else}:\\
\;\;\;\;\frac{\ell}{k \cdot t\_1} \cdot \ell\\


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if t < 1.59999999999999991e-28

    1. Initial program 50.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. Taylor expanded in t around 0

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

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

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

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

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

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

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

    if 1.59999999999999991e-28 < t < 8.99999999999999968e54

    1. Initial program 75.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. Taylor expanded in t around 0

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

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

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

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

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

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

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

    if 8.99999999999999968e54 < t < 1.1600000000000001e240

    1. Initial program 60.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. Taylor expanded in t around inf

      \[\leadsto \color{blue}{\frac{{\ell}^{2} \cdot \cos k}{{t}^{3} \cdot {\sin k}^{2}}} \]
    3. Applied rewrites52.5%

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

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

    if 1.1600000000000001e240 < t

    1. Initial program 68.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. Taylor expanded in k around 0

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

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

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

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

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

Alternative 7: 65.4% accurate, 1.2× speedup?

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

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

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

\mathbf{elif}\;t \leq 1.16 \cdot 10^{+240}:\\
\;\;\;\;\frac{t\_2}{{\left(\sin k \cdot t\right)}^{2} \cdot t}\\

\mathbf{else}:\\
\;\;\;\;\frac{\ell}{k \cdot t\_1} \cdot \ell\\


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if t < 1.59999999999999991e-28

    1. Initial program 50.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. Taylor expanded in t around 0

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

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

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

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

    if 1.59999999999999991e-28 < t < 8.99999999999999968e54

    1. Initial program 75.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. Taylor expanded in t around 0

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

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

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

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

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

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

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

    if 8.99999999999999968e54 < t < 1.1600000000000001e240

    1. Initial program 60.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. Taylor expanded in t around inf

      \[\leadsto \color{blue}{\frac{{\ell}^{2} \cdot \cos k}{{t}^{3} \cdot {\sin k}^{2}}} \]
    3. Applied rewrites52.5%

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

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

    if 1.1600000000000001e240 < t

    1. Initial program 68.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. Taylor expanded in k around 0

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

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

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

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

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

Alternative 8: 63.1% accurate, 1.3× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;k \leq 8 \cdot 10^{+134}:\\ \;\;\;\;\frac{2}{\left(\frac{\frac{\left(\left(t \cdot t\right) \cdot t\right) \cdot \sin k}{\ell}}{\ell} \cdot \tan k\right) \cdot 2}\\ \mathbf{else}:\\ \;\;\;\;\frac{2}{\frac{\frac{\mathsf{fma}\left(\mathsf{fma}\left(\left(t \cdot t\right) \cdot \left(-0.3333333333333333 - -0.5\right), 2, 1\right), k \cdot k, \left(t \cdot t\right) \cdot 2\right) \cdot \left(k \cdot k\right)}{\ell}}{\ell} \cdot t}\\ \end{array} \end{array} \]
(FPCore (t l k)
 :precision binary64
 (if (<= k 8e+134)
   (/ 2.0 (* (* (/ (/ (* (* (* t t) t) (sin k)) l) l) (tan k)) 2.0))
   (/
    2.0
    (*
     (/
      (/
       (*
        (fma
         (fma (* (* t t) (- -0.3333333333333333 -0.5)) 2.0 1.0)
         (* k k)
         (* (* t t) 2.0))
        (* k k))
       l)
      l)
     t))))
double code(double t, double l, double k) {
	double tmp;
	if (k <= 8e+134) {
		tmp = 2.0 / (((((((t * t) * t) * sin(k)) / l) / l) * tan(k)) * 2.0);
	} else {
		tmp = 2.0 / ((((fma(fma(((t * t) * (-0.3333333333333333 - -0.5)), 2.0, 1.0), (k * k), ((t * t) * 2.0)) * (k * k)) / l) / l) * t);
	}
	return tmp;
}
function code(t, l, k)
	tmp = 0.0
	if (k <= 8e+134)
		tmp = Float64(2.0 / Float64(Float64(Float64(Float64(Float64(Float64(Float64(t * t) * t) * sin(k)) / l) / l) * tan(k)) * 2.0));
	else
		tmp = Float64(2.0 / Float64(Float64(Float64(Float64(fma(fma(Float64(Float64(t * t) * Float64(-0.3333333333333333 - -0.5)), 2.0, 1.0), Float64(k * k), Float64(Float64(t * t) * 2.0)) * Float64(k * k)) / l) / l) * t));
	end
	return tmp
end
code[t_, l_, k_] := If[LessEqual[k, 8e+134], N[(2.0 / N[(N[(N[(N[(N[(N[(N[(t * t), $MachinePrecision] * t), $MachinePrecision] * N[Sin[k], $MachinePrecision]), $MachinePrecision] / l), $MachinePrecision] / l), $MachinePrecision] * N[Tan[k], $MachinePrecision]), $MachinePrecision] * 2.0), $MachinePrecision]), $MachinePrecision], N[(2.0 / N[(N[(N[(N[(N[(N[(N[(N[(t * t), $MachinePrecision] * N[(-0.3333333333333333 - -0.5), $MachinePrecision]), $MachinePrecision] * 2.0 + 1.0), $MachinePrecision] * N[(k * k), $MachinePrecision] + N[(N[(t * t), $MachinePrecision] * 2.0), $MachinePrecision]), $MachinePrecision] * N[(k * k), $MachinePrecision]), $MachinePrecision] / l), $MachinePrecision] / l), $MachinePrecision] * t), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;k \leq 8 \cdot 10^{+134}:\\
\;\;\;\;\frac{2}{\left(\frac{\frac{\left(\left(t \cdot t\right) \cdot t\right) \cdot \sin k}{\ell}}{\ell} \cdot \tan k\right) \cdot 2}\\

\mathbf{else}:\\
\;\;\;\;\frac{2}{\frac{\frac{\mathsf{fma}\left(\mathsf{fma}\left(\left(t \cdot t\right) \cdot \left(-0.3333333333333333 - -0.5\right), 2, 1\right), k \cdot k, \left(t \cdot t\right) \cdot 2\right) \cdot \left(k \cdot k\right)}{\ell}}{\ell} \cdot t}\\


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

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

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

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

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

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

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

    if 7.99999999999999937e134 < k

    1. Initial program 46.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. Taylor expanded in t around 0

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

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

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

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

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

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

      \[\leadsto \frac{2}{\frac{\frac{\mathsf{fma}\left(\mathsf{fma}\left(\left(t \cdot t\right) \cdot \left(-0.3333333333333333 - -0.5\right), 2, 1\right), k \cdot k, \left(t \cdot t\right) \cdot 2\right) \cdot \left(k \cdot k\right)}{\ell}}{\ell} \cdot t} \]
  3. Recombined 2 regimes into one program.
  4. Add Preprocessing

Alternative 9: 62.9% accurate, 2.0× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;k \leq 3 \cdot 10^{-118}:\\ \;\;\;\;\frac{2}{\left(\frac{\frac{\left(\left(t \cdot t\right) \cdot t\right) \cdot k}{\ell}}{\ell} \cdot \tan k\right) \cdot 2}\\ \mathbf{else}:\\ \;\;\;\;\frac{2}{\frac{\frac{\mathsf{fma}\left(\mathsf{fma}\left(\left(t \cdot t\right) \cdot \left(-0.3333333333333333 - -0.5\right), 2, 1\right), k \cdot k, \left(t \cdot t\right) \cdot 2\right) \cdot \left(k \cdot k\right)}{\ell}}{\ell} \cdot t}\\ \end{array} \end{array} \]
(FPCore (t l k)
 :precision binary64
 (if (<= k 3e-118)
   (/ 2.0 (* (* (/ (/ (* (* (* t t) t) k) l) l) (tan k)) 2.0))
   (/
    2.0
    (*
     (/
      (/
       (*
        (fma
         (fma (* (* t t) (- -0.3333333333333333 -0.5)) 2.0 1.0)
         (* k k)
         (* (* t t) 2.0))
        (* k k))
       l)
      l)
     t))))
double code(double t, double l, double k) {
	double tmp;
	if (k <= 3e-118) {
		tmp = 2.0 / (((((((t * t) * t) * k) / l) / l) * tan(k)) * 2.0);
	} else {
		tmp = 2.0 / ((((fma(fma(((t * t) * (-0.3333333333333333 - -0.5)), 2.0, 1.0), (k * k), ((t * t) * 2.0)) * (k * k)) / l) / l) * t);
	}
	return tmp;
}
function code(t, l, k)
	tmp = 0.0
	if (k <= 3e-118)
		tmp = Float64(2.0 / Float64(Float64(Float64(Float64(Float64(Float64(Float64(t * t) * t) * k) / l) / l) * tan(k)) * 2.0));
	else
		tmp = Float64(2.0 / Float64(Float64(Float64(Float64(fma(fma(Float64(Float64(t * t) * Float64(-0.3333333333333333 - -0.5)), 2.0, 1.0), Float64(k * k), Float64(Float64(t * t) * 2.0)) * Float64(k * k)) / l) / l) * t));
	end
	return tmp
end
code[t_, l_, k_] := If[LessEqual[k, 3e-118], N[(2.0 / N[(N[(N[(N[(N[(N[(N[(t * t), $MachinePrecision] * t), $MachinePrecision] * k), $MachinePrecision] / l), $MachinePrecision] / l), $MachinePrecision] * N[Tan[k], $MachinePrecision]), $MachinePrecision] * 2.0), $MachinePrecision]), $MachinePrecision], N[(2.0 / N[(N[(N[(N[(N[(N[(N[(N[(t * t), $MachinePrecision] * N[(-0.3333333333333333 - -0.5), $MachinePrecision]), $MachinePrecision] * 2.0 + 1.0), $MachinePrecision] * N[(k * k), $MachinePrecision] + N[(N[(t * t), $MachinePrecision] * 2.0), $MachinePrecision]), $MachinePrecision] * N[(k * k), $MachinePrecision]), $MachinePrecision] / l), $MachinePrecision] / l), $MachinePrecision] * t), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;k \leq 3 \cdot 10^{-118}:\\
\;\;\;\;\frac{2}{\left(\frac{\frac{\left(\left(t \cdot t\right) \cdot t\right) \cdot k}{\ell}}{\ell} \cdot \tan k\right) \cdot 2}\\

\mathbf{else}:\\
\;\;\;\;\frac{2}{\frac{\frac{\mathsf{fma}\left(\mathsf{fma}\left(\left(t \cdot t\right) \cdot \left(-0.3333333333333333 - -0.5\right), 2, 1\right), k \cdot k, \left(t \cdot t\right) \cdot 2\right) \cdot \left(k \cdot k\right)}{\ell}}{\ell} \cdot t}\\


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

    1. Initial program 56.0%

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

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

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

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

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

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

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

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

    if 3.00000000000000018e-118 < k

    1. Initial program 52.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. Taylor expanded in t around 0

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

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

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

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

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

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

      \[\leadsto \frac{2}{\frac{\frac{\mathsf{fma}\left(\mathsf{fma}\left(\left(t \cdot t\right) \cdot \left(-0.3333333333333333 - -0.5\right), 2, 1\right), k \cdot k, \left(t \cdot t\right) \cdot 2\right) \cdot \left(k \cdot k\right)}{\ell}}{\ell} \cdot t} \]
  3. Recombined 2 regimes into one program.
  4. Add Preprocessing

Alternative 10: 62.1% accurate, 2.5× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;k \leq 2.5 \cdot 10^{-143}:\\ \;\;\;\;\frac{\ell}{k \cdot \left(\left(\left(t \cdot t\right) \cdot t\right) \cdot k\right)} \cdot \ell\\ \mathbf{else}:\\ \;\;\;\;\frac{2}{\frac{\frac{\mathsf{fma}\left(\mathsf{fma}\left(\left(t \cdot t\right) \cdot \left(-0.3333333333333333 - -0.5\right), 2, 1\right), k \cdot k, \left(t \cdot t\right) \cdot 2\right) \cdot \left(k \cdot k\right)}{\ell}}{\ell} \cdot t}\\ \end{array} \end{array} \]
(FPCore (t l k)
 :precision binary64
 (if (<= k 2.5e-143)
   (* (/ l (* k (* (* (* t t) t) k))) l)
   (/
    2.0
    (*
     (/
      (/
       (*
        (fma
         (fma (* (* t t) (- -0.3333333333333333 -0.5)) 2.0 1.0)
         (* k k)
         (* (* t t) 2.0))
        (* k k))
       l)
      l)
     t))))
double code(double t, double l, double k) {
	double tmp;
	if (k <= 2.5e-143) {
		tmp = (l / (k * (((t * t) * t) * k))) * l;
	} else {
		tmp = 2.0 / ((((fma(fma(((t * t) * (-0.3333333333333333 - -0.5)), 2.0, 1.0), (k * k), ((t * t) * 2.0)) * (k * k)) / l) / l) * t);
	}
	return tmp;
}
function code(t, l, k)
	tmp = 0.0
	if (k <= 2.5e-143)
		tmp = Float64(Float64(l / Float64(k * Float64(Float64(Float64(t * t) * t) * k))) * l);
	else
		tmp = Float64(2.0 / Float64(Float64(Float64(Float64(fma(fma(Float64(Float64(t * t) * Float64(-0.3333333333333333 - -0.5)), 2.0, 1.0), Float64(k * k), Float64(Float64(t * t) * 2.0)) * Float64(k * k)) / l) / l) * t));
	end
	return tmp
end
code[t_, l_, k_] := If[LessEqual[k, 2.5e-143], N[(N[(l / N[(k * N[(N[(N[(t * t), $MachinePrecision] * t), $MachinePrecision] * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * l), $MachinePrecision], N[(2.0 / N[(N[(N[(N[(N[(N[(N[(N[(t * t), $MachinePrecision] * N[(-0.3333333333333333 - -0.5), $MachinePrecision]), $MachinePrecision] * 2.0 + 1.0), $MachinePrecision] * N[(k * k), $MachinePrecision] + N[(N[(t * t), $MachinePrecision] * 2.0), $MachinePrecision]), $MachinePrecision] * N[(k * k), $MachinePrecision]), $MachinePrecision] / l), $MachinePrecision] / l), $MachinePrecision] * t), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;k \leq 2.5 \cdot 10^{-143}:\\
\;\;\;\;\frac{\ell}{k \cdot \left(\left(\left(t \cdot t\right) \cdot t\right) \cdot k\right)} \cdot \ell\\

\mathbf{else}:\\
\;\;\;\;\frac{2}{\frac{\frac{\mathsf{fma}\left(\mathsf{fma}\left(\left(t \cdot t\right) \cdot \left(-0.3333333333333333 - -0.5\right), 2, 1\right), k \cdot k, \left(t \cdot t\right) \cdot 2\right) \cdot \left(k \cdot k\right)}{\ell}}{\ell} \cdot t}\\


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

    1. Initial program 55.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. Taylor expanded in k around 0

      \[\leadsto \color{blue}{\frac{{\ell}^{2}}{{k}^{2} \cdot {t}^{3}}} \]
    3. Applied rewrites49.6%

      \[\leadsto \color{blue}{\frac{\ell \cdot \ell}{\left(k \cdot k\right) \cdot \left(\left(t \cdot t\right) \cdot t\right)}} \]
    4. Applied rewrites54.6%

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

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

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

    if 2.5000000000000001e-143 < k

    1. Initial program 52.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. Taylor expanded in t around 0

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

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

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

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

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

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

      \[\leadsto \frac{2}{\frac{\frac{\mathsf{fma}\left(\mathsf{fma}\left(\left(t \cdot t\right) \cdot \left(-0.3333333333333333 - -0.5\right), 2, 1\right), k \cdot k, \left(t \cdot t\right) \cdot 2\right) \cdot \left(k \cdot k\right)}{\ell}}{\ell} \cdot t} \]
  3. Recombined 2 regimes into one program.
  4. Add Preprocessing

Alternative 11: 60.7% accurate, 4.8× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;k \leq 2.2 \cdot 10^{+126}:\\
\;\;\;\;\frac{\ell}{k \cdot \left(\left(\left(t \cdot t\right) \cdot t\right) \cdot k\right)} \cdot \ell\\

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


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

    1. Initial program 56.0%

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

      \[\leadsto \color{blue}{\frac{{\ell}^{2}}{{k}^{2} \cdot {t}^{3}}} \]
    3. Applied rewrites51.6%

      \[\leadsto \color{blue}{\frac{\ell \cdot \ell}{\left(k \cdot k\right) \cdot \left(\left(t \cdot t\right) \cdot t\right)}} \]
    4. Applied rewrites55.9%

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

      \[\leadsto \frac{\ell}{\left(k \cdot k\right) \cdot \left(\left(t \cdot t\right) \cdot t\right)} \cdot \color{blue}{\ell} \]
    6. Applied rewrites60.9%

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

    if 2.19999999999999999e126 < k

    1. Initial program 46.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. Taylor expanded in k around 0

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

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

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

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

Alternative 12: 59.1% accurate, 6.6× speedup?

\[\begin{array}{l} \\ \frac{\ell}{k \cdot \left(\left(\left(t \cdot t\right) \cdot t\right) \cdot k\right)} \cdot \ell \end{array} \]
(FPCore (t l k) :precision binary64 (* (/ l (* k (* (* (* t t) t) k))) l))
double code(double t, double l, double k) {
	return (l / (k * (((t * t) * t) * k))) * l;
}
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 / (k * (((t * t) * t) * k))) * l
end function
public static double code(double t, double l, double k) {
	return (l / (k * (((t * t) * t) * k))) * l;
}
def code(t, l, k):
	return (l / (k * (((t * t) * t) * k))) * l
function code(t, l, k)
	return Float64(Float64(l / Float64(k * Float64(Float64(Float64(t * t) * t) * k))) * l)
end
function tmp = code(t, l, k)
	tmp = (l / (k * (((t * t) * t) * k))) * l;
end
code[t_, l_, k_] := N[(N[(l / N[(k * N[(N[(N[(t * t), $MachinePrecision] * t), $MachinePrecision] * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * l), $MachinePrecision]
\begin{array}{l}

\\
\frac{\ell}{k \cdot \left(\left(\left(t \cdot t\right) \cdot t\right) \cdot k\right)} \cdot \ell
\end{array}
Derivation
  1. Initial program 54.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. Taylor expanded in k around 0

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

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

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

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

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

Reproduce

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