Toniolo and Linder, Equation (10-)

Percentage Accurate: 35.5% → 94.1%
Time: 8.7s
Alternatives: 20
Speedup: 4.4×

Specification

?
\[\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)} \]
(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]
\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)}

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

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

Initial Program: 35.5% accurate, 1.0× speedup?

\[\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)} \]
(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]
\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)}

Alternative 1: 94.1% accurate, 1.2× speedup?

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

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

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


\end{array}
Derivation
  1. Split input into 3 regimes
  2. if l < 2.0000000000000001e-101

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \frac{2}{k \cdot \left(k \cdot \left(\frac{\tan k \cdot t}{\ell} \cdot \frac{\sin \color{blue}{k}}{\ell}\right)\right)} \]
      13. lower-/.f6489.7

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

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

    if 2.0000000000000001e-101 < l < 1.99999999999999987e146

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \frac{2}{\frac{k}{\ell \cdot \ell} \cdot \left(\left(\tan k \cdot t\right) \cdot \left(\color{blue}{\sin k} \cdot k\right)\right)} \]
      13. lower-*.f6478.3

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

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

    if 1.99999999999999987e146 < l

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 2: 93.7% accurate, 1.4× speedup?

\[\begin{array}{l} \mathbf{if}\;t \leq 1.7 \cdot 10^{+100}:\\ \;\;\;\;\frac{2}{\frac{\left(\frac{k}{\ell} \cdot \tan k\right) \cdot \left(\left(\sin k \cdot k\right) \cdot t\right)}{\ell}}\\ \mathbf{else}:\\ \;\;\;\;\frac{2}{\left(t \cdot \left(\tan k \cdot \sin k\right)\right) \cdot \frac{\frac{k}{\ell} \cdot k}{\ell}}\\ \end{array} \]
(FPCore (t l k)
 :precision binary64
 (if (<= t 1.7e+100)
   (/ 2.0 (/ (* (* (/ k l) (tan k)) (* (* (sin k) k) t)) l))
   (/ 2.0 (* (* t (* (tan k) (sin k))) (/ (* (/ k l) k) l)))))
double code(double t, double l, double k) {
	double tmp;
	if (t <= 1.7e+100) {
		tmp = 2.0 / ((((k / l) * tan(k)) * ((sin(k) * k) * t)) / l);
	} else {
		tmp = 2.0 / ((t * (tan(k) * sin(k))) * (((k / l) * k) / l));
	}
	return tmp;
}
module fmin_fmax_functions
    implicit none
    private
    public fmax
    public fmin

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

real(8) function code(t, l, k)
use fmin_fmax_functions
    real(8), intent (in) :: t
    real(8), intent (in) :: l
    real(8), intent (in) :: k
    real(8) :: tmp
    if (t <= 1.7d+100) then
        tmp = 2.0d0 / ((((k / l) * tan(k)) * ((sin(k) * k) * t)) / l)
    else
        tmp = 2.0d0 / ((t * (tan(k) * sin(k))) * (((k / l) * k) / l))
    end if
    code = tmp
end function
public static double code(double t, double l, double k) {
	double tmp;
	if (t <= 1.7e+100) {
		tmp = 2.0 / ((((k / l) * Math.tan(k)) * ((Math.sin(k) * k) * t)) / l);
	} else {
		tmp = 2.0 / ((t * (Math.tan(k) * Math.sin(k))) * (((k / l) * k) / l));
	}
	return tmp;
}
def code(t, l, k):
	tmp = 0
	if t <= 1.7e+100:
		tmp = 2.0 / ((((k / l) * math.tan(k)) * ((math.sin(k) * k) * t)) / l)
	else:
		tmp = 2.0 / ((t * (math.tan(k) * math.sin(k))) * (((k / l) * k) / l))
	return tmp
function code(t, l, k)
	tmp = 0.0
	if (t <= 1.7e+100)
		tmp = Float64(2.0 / Float64(Float64(Float64(Float64(k / l) * tan(k)) * Float64(Float64(sin(k) * k) * t)) / l));
	else
		tmp = Float64(2.0 / Float64(Float64(t * Float64(tan(k) * sin(k))) * Float64(Float64(Float64(k / l) * k) / l)));
	end
	return tmp
end
function tmp_2 = code(t, l, k)
	tmp = 0.0;
	if (t <= 1.7e+100)
		tmp = 2.0 / ((((k / l) * tan(k)) * ((sin(k) * k) * t)) / l);
	else
		tmp = 2.0 / ((t * (tan(k) * sin(k))) * (((k / l) * k) / l));
	end
	tmp_2 = tmp;
end
code[t_, l_, k_] := If[LessEqual[t, 1.7e+100], N[(2.0 / N[(N[(N[(N[(k / l), $MachinePrecision] * N[Tan[k], $MachinePrecision]), $MachinePrecision] * N[(N[(N[Sin[k], $MachinePrecision] * k), $MachinePrecision] * t), $MachinePrecision]), $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision], N[(2.0 / N[(N[(t * N[(N[Tan[k], $MachinePrecision] * N[Sin[k], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(N[(N[(k / l), $MachinePrecision] * k), $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\mathbf{if}\;t \leq 1.7 \cdot 10^{+100}:\\
\;\;\;\;\frac{2}{\frac{\left(\frac{k}{\ell} \cdot \tan k\right) \cdot \left(\left(\sin k \cdot k\right) \cdot t\right)}{\ell}}\\

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


\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t < 1.69999999999999997e100

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \frac{2}{\frac{\left(\left(t \cdot \tan k\right) \cdot \left(\sin k \cdot k\right)\right) \cdot \frac{k}{\ell}}{\ell}} \]
      15. *-commutativeN/A

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

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

        \[\leadsto \frac{2}{\frac{\left(\left(\tan k \cdot t\right) \cdot \left(\sin k \cdot k\right)\right) \cdot \frac{k}{\ell}}{\ell}} \]
      18. lower-/.f6491.0

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

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

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

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

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

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

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

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

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

        \[\leadsto \frac{2}{\frac{\left(\frac{k}{\ell} \cdot \tan k\right) \cdot \left(t \cdot \left(\sin k \cdot k\right)\right)}{\ell}} \]
      9. *-commutativeN/A

        \[\leadsto \frac{2}{\frac{\left(\frac{k}{\ell} \cdot \tan k\right) \cdot \left(\left(\sin k \cdot k\right) \cdot t\right)}{\ell}} \]
      10. lower-*.f6491.6

        \[\leadsto \frac{2}{\frac{\left(\frac{k}{\ell} \cdot \tan k\right) \cdot \left(\left(\sin k \cdot k\right) \cdot t\right)}{\ell}} \]
    10. Applied rewrites91.6%

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

    if 1.69999999999999997e100 < t

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 3: 93.7% accurate, 1.2× speedup?

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

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

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


\end{array}
Derivation
  1. Split input into 3 regimes
  2. if l < 2.0000000000000001e-101

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \frac{2}{k \cdot \left(k \cdot \left(\frac{\tan k \cdot t}{\ell} \cdot \frac{\sin \color{blue}{k}}{\ell}\right)\right)} \]
      13. lower-/.f6489.7

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

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

    if 2.0000000000000001e-101 < l < 1.60000000000000003e142

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \frac{2}{\frac{k}{\ell \cdot \ell} \cdot \left(\left(\tan k \cdot t\right) \cdot \left(\color{blue}{\sin k} \cdot k\right)\right)} \]
      13. lower-*.f6478.3

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

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

    if 1.60000000000000003e142 < l

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \frac{2}{k \cdot \frac{\left(k \cdot \left(\tan k \cdot \sin k\right)\right) \cdot \frac{t}{\ell}}{\ell}} \]
      11. *-commutativeN/A

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

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

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

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

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

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

Alternative 4: 93.3% accurate, 1.2× speedup?

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

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

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


\end{array}
Derivation
  1. Split input into 3 regimes
  2. if l < 2.0000000000000001e-101

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \frac{2}{k \cdot \left(k \cdot \left(\frac{\tan k \cdot t}{\ell} \cdot \frac{\sin \color{blue}{k}}{\ell}\right)\right)} \]
      13. lower-/.f6489.7

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

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

    if 2.0000000000000001e-101 < l < 1.60000000000000003e142

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \frac{2}{\frac{k}{\ell \cdot \ell} \cdot \left(\left(\tan k \cdot t\right) \cdot \left(\color{blue}{\sin k} \cdot k\right)\right)} \]
      13. lower-*.f6478.3

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

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

    if 1.60000000000000003e142 < l

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \frac{2}{k \cdot \left(k \cdot \frac{\frac{t}{\ell} \cdot \left(\tan k \cdot \sin k\right)}{\ell}\right)} \]
      9. lower-/.f6486.5

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

        \[\leadsto \frac{2}{k \cdot \left(k \cdot \frac{\frac{t}{\ell} \cdot \left(\tan k \cdot \sin k\right)}{\ell}\right)} \]
      11. *-commutativeN/A

        \[\leadsto \frac{2}{k \cdot \left(k \cdot \frac{\frac{t}{\ell} \cdot \left(\sin k \cdot \tan k\right)}{\ell}\right)} \]
      12. lower-*.f6486.5

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

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

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

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

        \[\leadsto \frac{2}{k \cdot \left(\frac{\frac{t}{\ell} \cdot \left(\sin k \cdot \tan k\right)}{\ell} \cdot k\right)} \]
      4. mult-flipN/A

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

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

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

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

        \[\leadsto \frac{2}{k \cdot \left(\left(\frac{t}{\ell} \cdot \left(\sin k \cdot \tan k\right)\right) \cdot \frac{k}{\color{blue}{\ell}}\right)} \]
      9. lower-*.f6490.6

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

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

        \[\leadsto \frac{2}{k \cdot \left(\left(\left(\sin k \cdot \tan k\right) \cdot \frac{t}{\ell}\right) \cdot \frac{\color{blue}{k}}{\ell}\right)} \]
      12. lower-*.f6490.6

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

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

Alternative 5: 92.5% accurate, 1.4× speedup?

\[\begin{array}{l} \mathbf{if}\;t \leq 100:\\ \;\;\;\;\frac{2}{\frac{\left(\left(\tan k \cdot t\right) \cdot \left(\sin k \cdot k\right)\right) \cdot \frac{k}{\ell}}{\ell}}\\ \mathbf{else}:\\ \;\;\;\;\frac{2}{\left(t \cdot \left(\tan k \cdot \sin k\right)\right) \cdot \frac{\frac{k}{\ell} \cdot k}{\ell}}\\ \end{array} \]
(FPCore (t l k)
 :precision binary64
 (if (<= t 100.0)
   (/ 2.0 (/ (* (* (* (tan k) t) (* (sin k) k)) (/ k l)) l))
   (/ 2.0 (* (* t (* (tan k) (sin k))) (/ (* (/ k l) k) l)))))
double code(double t, double l, double k) {
	double tmp;
	if (t <= 100.0) {
		tmp = 2.0 / ((((tan(k) * t) * (sin(k) * k)) * (k / l)) / l);
	} else {
		tmp = 2.0 / ((t * (tan(k) * sin(k))) * (((k / l) * k) / l));
	}
	return tmp;
}
module fmin_fmax_functions
    implicit none
    private
    public fmax
    public fmin

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

real(8) function code(t, l, k)
use fmin_fmax_functions
    real(8), intent (in) :: t
    real(8), intent (in) :: l
    real(8), intent (in) :: k
    real(8) :: tmp
    if (t <= 100.0d0) then
        tmp = 2.0d0 / ((((tan(k) * t) * (sin(k) * k)) * (k / l)) / l)
    else
        tmp = 2.0d0 / ((t * (tan(k) * sin(k))) * (((k / l) * k) / l))
    end if
    code = tmp
end function
public static double code(double t, double l, double k) {
	double tmp;
	if (t <= 100.0) {
		tmp = 2.0 / ((((Math.tan(k) * t) * (Math.sin(k) * k)) * (k / l)) / l);
	} else {
		tmp = 2.0 / ((t * (Math.tan(k) * Math.sin(k))) * (((k / l) * k) / l));
	}
	return tmp;
}
def code(t, l, k):
	tmp = 0
	if t <= 100.0:
		tmp = 2.0 / ((((math.tan(k) * t) * (math.sin(k) * k)) * (k / l)) / l)
	else:
		tmp = 2.0 / ((t * (math.tan(k) * math.sin(k))) * (((k / l) * k) / l))
	return tmp
function code(t, l, k)
	tmp = 0.0
	if (t <= 100.0)
		tmp = Float64(2.0 / Float64(Float64(Float64(Float64(tan(k) * t) * Float64(sin(k) * k)) * Float64(k / l)) / l));
	else
		tmp = Float64(2.0 / Float64(Float64(t * Float64(tan(k) * sin(k))) * Float64(Float64(Float64(k / l) * k) / l)));
	end
	return tmp
end
function tmp_2 = code(t, l, k)
	tmp = 0.0;
	if (t <= 100.0)
		tmp = 2.0 / ((((tan(k) * t) * (sin(k) * k)) * (k / l)) / l);
	else
		tmp = 2.0 / ((t * (tan(k) * sin(k))) * (((k / l) * k) / l));
	end
	tmp_2 = tmp;
end
code[t_, l_, k_] := If[LessEqual[t, 100.0], N[(2.0 / N[(N[(N[(N[(N[Tan[k], $MachinePrecision] * t), $MachinePrecision] * N[(N[Sin[k], $MachinePrecision] * k), $MachinePrecision]), $MachinePrecision] * N[(k / l), $MachinePrecision]), $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision], N[(2.0 / N[(N[(t * N[(N[Tan[k], $MachinePrecision] * N[Sin[k], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(N[(N[(k / l), $MachinePrecision] * k), $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\mathbf{if}\;t \leq 100:\\
\;\;\;\;\frac{2}{\frac{\left(\left(\tan k \cdot t\right) \cdot \left(\sin k \cdot k\right)\right) \cdot \frac{k}{\ell}}{\ell}}\\

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


\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t < 100

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \frac{2}{\frac{\left(\left(t \cdot \tan k\right) \cdot \left(\sin k \cdot k\right)\right) \cdot \frac{k}{\ell}}{\ell}} \]
      15. *-commutativeN/A

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

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

        \[\leadsto \frac{2}{\frac{\left(\left(\tan k \cdot t\right) \cdot \left(\sin k \cdot k\right)\right) \cdot \frac{k}{\ell}}{\ell}} \]
      18. lower-/.f6491.0

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

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

    if 100 < t

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 6: 92.3% accurate, 1.4× speedup?

\[\frac{2}{\frac{\left(\frac{k}{\ell} \cdot \left(\left(t \cdot \sin k\right) \cdot \tan k\right)\right) \cdot k}{\ell}} \]
(FPCore (t l k)
 :precision binary64
 (/ 2.0 (/ (* (* (/ k l) (* (* t (sin k)) (tan k))) k) l)))
double code(double t, double l, double k) {
	return 2.0 / ((((k / l) * ((t * sin(k)) * tan(k))) * 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 = 2.0d0 / ((((k / l) * ((t * sin(k)) * tan(k))) * k) / l)
end function
public static double code(double t, double l, double k) {
	return 2.0 / ((((k / l) * ((t * Math.sin(k)) * Math.tan(k))) * k) / l);
}
def code(t, l, k):
	return 2.0 / ((((k / l) * ((t * math.sin(k)) * math.tan(k))) * k) / l)
function code(t, l, k)
	return Float64(2.0 / Float64(Float64(Float64(Float64(k / l) * Float64(Float64(t * sin(k)) * tan(k))) * k) / l))
end
function tmp = code(t, l, k)
	tmp = 2.0 / ((((k / l) * ((t * sin(k)) * tan(k))) * k) / l);
end
code[t_, l_, k_] := N[(2.0 / N[(N[(N[(N[(k / l), $MachinePrecision] * N[(N[(t * N[Sin[k], $MachinePrecision]), $MachinePrecision] * N[Tan[k], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * k), $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision]
\frac{2}{\frac{\left(\frac{k}{\ell} \cdot \left(\left(t \cdot \sin k\right) \cdot \tan k\right)\right) \cdot k}{\ell}}
Derivation
  1. Initial program 35.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}{\frac{{k}^{2} \cdot \left(t \cdot {\sin k}^{2}\right)}{{\ell}^{2} \cdot \cos k}}} \]
  3. Step-by-step derivation
    1. lower-/.f64N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \frac{2}{\frac{\left(\left(t \cdot \tan k\right) \cdot \left(\sin k \cdot k\right)\right) \cdot \frac{k}{\ell}}{\ell}} \]
    15. *-commutativeN/A

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

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

      \[\leadsto \frac{2}{\frac{\left(\left(\tan k \cdot t\right) \cdot \left(\sin k \cdot k\right)\right) \cdot \frac{k}{\ell}}{\ell}} \]
    18. lower-/.f6491.0

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

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

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

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

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

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

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

      \[\leadsto \frac{2}{\frac{\frac{k}{\ell} \cdot \left(\left(\left(\tan k \cdot t\right) \cdot \sin k\right) \cdot k\right)}{\ell}} \]
    7. *-commutativeN/A

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

      \[\leadsto \frac{2}{\frac{\frac{k}{\ell} \cdot \left(\left(t \cdot \left(\tan k \cdot \sin k\right)\right) \cdot k\right)}{\ell}} \]
    9. *-commutativeN/A

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

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

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

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

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

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

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

      \[\leadsto \frac{2}{\frac{\left(\frac{k}{\ell} \cdot \left(\left(t \cdot \sin k\right) \cdot \tan k\right)\right) \cdot k}{\ell}} \]
    17. lower-*.f6493.3

      \[\leadsto \frac{2}{\frac{\left(\frac{k}{\ell} \cdot \left(\left(t \cdot \sin k\right) \cdot \tan k\right)\right) \cdot k}{\ell}} \]
  10. Applied rewrites93.3%

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

Alternative 7: 92.0% accurate, 1.3× speedup?

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

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


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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \frac{2}{\frac{\left(\left(t \cdot \tan k\right) \cdot \left(\sin k \cdot k\right)\right) \cdot \frac{k}{\ell}}{\ell}} \]
      15. *-commutativeN/A

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

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

        \[\leadsto \frac{2}{\frac{\left(\left(\tan k \cdot t\right) \cdot \left(\sin k \cdot k\right)\right) \cdot \frac{k}{\ell}}{\ell}} \]
      18. lower-/.f6491.0

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

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

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

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

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

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

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

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

        \[\leadsto \frac{2}{\frac{\tan k \cdot \left(t \cdot \left(\left(\sin k \cdot k\right) \cdot \frac{k}{\ell}\right)\right)}{\ell}} \]
      8. lower-*.f6490.0

        \[\leadsto \frac{2}{\frac{\tan k \cdot \left(t \cdot \left(\left(\sin k \cdot k\right) \cdot \frac{k}{\ell}\right)\right)}{\ell}} \]
    10. Applied rewrites90.0%

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

    if 3.20000000000000002e156 < k

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \frac{2}{k \cdot \left(k \cdot \frac{\frac{t}{\ell} \cdot \left(\tan k \cdot \sin k\right)}{\ell}\right)} \]
      9. lower-/.f6486.5

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

        \[\leadsto \frac{2}{k \cdot \left(k \cdot \frac{\frac{t}{\ell} \cdot \left(\tan k \cdot \sin k\right)}{\ell}\right)} \]
      11. *-commutativeN/A

        \[\leadsto \frac{2}{k \cdot \left(k \cdot \frac{\frac{t}{\ell} \cdot \left(\sin k \cdot \tan k\right)}{\ell}\right)} \]
      12. lower-*.f6486.5

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

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

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

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

        \[\leadsto \frac{2}{k \cdot \left(\frac{\frac{t}{\ell} \cdot \left(\sin k \cdot \tan k\right)}{\ell} \cdot k\right)} \]
      4. mult-flipN/A

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

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

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

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

        \[\leadsto \frac{2}{k \cdot \left(\left(\frac{t}{\ell} \cdot \left(\sin k \cdot \tan k\right)\right) \cdot \frac{k}{\color{blue}{\ell}}\right)} \]
      9. lower-*.f6490.6

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

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

        \[\leadsto \frac{2}{k \cdot \left(\left(\left(\sin k \cdot \tan k\right) \cdot \frac{t}{\ell}\right) \cdot \frac{\color{blue}{k}}{\ell}\right)} \]
      12. lower-*.f6490.6

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

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

Alternative 8: 90.9% accurate, 1.2× speedup?

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

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

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


\end{array}
Derivation
  1. Split input into 3 regimes
  2. if l < 2.0000000000000001e-101

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \frac{2}{k \cdot \left(k \cdot \frac{{\sin k}^{2} \cdot t}{\color{blue}{{\ell}^{2}} \cdot \cos k}\right)} \]
      11. lift-*.f64N/A

        \[\leadsto \frac{2}{k \cdot \left(k \cdot \frac{{\sin k}^{2} \cdot t}{{\ell}^{2} \cdot \color{blue}{\cos k}}\right)} \]
      12. *-commutativeN/A

        \[\leadsto \frac{2}{k \cdot \left(k \cdot \frac{{\sin k}^{2} \cdot t}{\cos k \cdot \color{blue}{{\ell}^{2}}}\right)} \]
      13. times-fracN/A

        \[\leadsto \frac{2}{k \cdot \left(k \cdot \left(\frac{{\sin k}^{2}}{\cos k} \cdot \color{blue}{\frac{t}{{\ell}^{2}}}\right)\right)} \]
      14. lift-pow.f64N/A

        \[\leadsto \frac{2}{k \cdot \left(k \cdot \left(\frac{{\sin k}^{2}}{\cos k} \cdot \frac{t}{{\ell}^{\color{blue}{2}}}\right)\right)} \]
      15. pow2N/A

        \[\leadsto \frac{2}{k \cdot \left(k \cdot \left(\frac{{\sin k}^{2}}{\cos k} \cdot \frac{t}{\ell \cdot \color{blue}{\ell}}\right)\right)} \]
      16. lift-*.f64N/A

        \[\leadsto \frac{2}{k \cdot \left(k \cdot \left(\frac{{\sin k}^{2}}{\cos k} \cdot \frac{t}{\ell \cdot \color{blue}{\ell}}\right)\right)} \]
      17. lift-/.f64N/A

        \[\leadsto \frac{2}{k \cdot \left(k \cdot \left(\frac{{\sin k}^{2}}{\cos k} \cdot \frac{t}{\color{blue}{\ell \cdot \ell}}\right)\right)} \]
      18. lower-*.f64N/A

        \[\leadsto \frac{2}{k \cdot \left(k \cdot \left(\frac{{\sin k}^{2}}{\cos k} \cdot \color{blue}{\frac{t}{\ell \cdot \ell}}\right)\right)} \]
    6. Applied rewrites75.4%

      \[\leadsto \frac{2}{k \cdot \color{blue}{\left(k \cdot \left(\left(\tan k \cdot \sin k\right) \cdot \frac{t}{\ell \cdot \ell}\right)\right)}} \]
    7. Step-by-step derivation
      1. lift-*.f64N/A

        \[\leadsto \frac{2}{k \cdot \left(k \cdot \left(\left(\tan k \cdot \sin k\right) \cdot \color{blue}{\frac{t}{\ell \cdot \ell}}\right)\right)} \]
      2. lift-/.f64N/A

        \[\leadsto \frac{2}{k \cdot \left(k \cdot \left(\left(\tan k \cdot \sin k\right) \cdot \frac{t}{\color{blue}{\ell \cdot \ell}}\right)\right)} \]
      3. associate-*r/N/A

        \[\leadsto \frac{2}{k \cdot \left(k \cdot \frac{\left(\tan k \cdot \sin k\right) \cdot t}{\color{blue}{\ell \cdot \ell}}\right)} \]
      4. *-commutativeN/A

        \[\leadsto \frac{2}{k \cdot \left(k \cdot \frac{t \cdot \left(\tan k \cdot \sin k\right)}{\color{blue}{\ell} \cdot \ell}\right)} \]
      5. lift-*.f64N/A

        \[\leadsto \frac{2}{k \cdot \left(k \cdot \frac{t \cdot \left(\tan k \cdot \sin k\right)}{\ell \cdot \ell}\right)} \]
      6. associate-*r*N/A

        \[\leadsto \frac{2}{k \cdot \left(k \cdot \frac{\left(t \cdot \tan k\right) \cdot \sin k}{\color{blue}{\ell} \cdot \ell}\right)} \]
      7. lift-*.f64N/A

        \[\leadsto \frac{2}{k \cdot \left(k \cdot \frac{\left(t \cdot \tan k\right) \cdot \sin k}{\ell \cdot \color{blue}{\ell}}\right)} \]
      8. times-fracN/A

        \[\leadsto \frac{2}{k \cdot \left(k \cdot \left(\frac{t \cdot \tan k}{\ell} \cdot \color{blue}{\frac{\sin k}{\ell}}\right)\right)} \]
      9. lower-*.f64N/A

        \[\leadsto \frac{2}{k \cdot \left(k \cdot \left(\frac{t \cdot \tan k}{\ell} \cdot \color{blue}{\frac{\sin k}{\ell}}\right)\right)} \]
      10. lower-/.f64N/A

        \[\leadsto \frac{2}{k \cdot \left(k \cdot \left(\frac{t \cdot \tan k}{\ell} \cdot \frac{\color{blue}{\sin k}}{\ell}\right)\right)} \]
      11. *-commutativeN/A

        \[\leadsto \frac{2}{k \cdot \left(k \cdot \left(\frac{\tan k \cdot t}{\ell} \cdot \frac{\sin \color{blue}{k}}{\ell}\right)\right)} \]
      12. lower-*.f64N/A

        \[\leadsto \frac{2}{k \cdot \left(k \cdot \left(\frac{\tan k \cdot t}{\ell} \cdot \frac{\sin \color{blue}{k}}{\ell}\right)\right)} \]
      13. lower-/.f6489.7

        \[\leadsto \frac{2}{k \cdot \left(k \cdot \left(\frac{\tan k \cdot t}{\ell} \cdot \frac{\sin k}{\color{blue}{\ell}}\right)\right)} \]
    8. Applied rewrites89.7%

      \[\leadsto \frac{2}{k \cdot \left(k \cdot \left(\frac{\tan k \cdot t}{\ell} \cdot \color{blue}{\frac{\sin k}{\ell}}\right)\right)} \]

    if 2.0000000000000001e-101 < l < 6.50000000000000015e149

    1. Initial program 35.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}{\frac{{k}^{2} \cdot \left(t \cdot {\sin k}^{2}\right)}{{\ell}^{2} \cdot \cos k}}} \]
    3. Step-by-step derivation
      1. lower-/.f64N/A

        \[\leadsto \frac{2}{\frac{{k}^{2} \cdot \left(t \cdot {\sin k}^{2}\right)}{\color{blue}{{\ell}^{2} \cdot \cos k}}} \]
      2. lower-*.f64N/A

        \[\leadsto \frac{2}{\frac{{k}^{2} \cdot \left(t \cdot {\sin k}^{2}\right)}{\color{blue}{{\ell}^{2}} \cdot \cos k}} \]
      3. lower-pow.f64N/A

        \[\leadsto \frac{2}{\frac{{k}^{2} \cdot \left(t \cdot {\sin k}^{2}\right)}{{\color{blue}{\ell}}^{2} \cdot \cos k}} \]
      4. lower-*.f64N/A

        \[\leadsto \frac{2}{\frac{{k}^{2} \cdot \left(t \cdot {\sin k}^{2}\right)}{{\ell}^{\color{blue}{2}} \cdot \cos k}} \]
      5. lower-pow.f64N/A

        \[\leadsto \frac{2}{\frac{{k}^{2} \cdot \left(t \cdot {\sin k}^{2}\right)}{{\ell}^{2} \cdot \cos k}} \]
      6. lower-sin.f64N/A

        \[\leadsto \frac{2}{\frac{{k}^{2} \cdot \left(t \cdot {\sin k}^{2}\right)}{{\ell}^{2} \cdot \cos k}} \]
      7. lower-*.f64N/A

        \[\leadsto \frac{2}{\frac{{k}^{2} \cdot \left(t \cdot {\sin k}^{2}\right)}{{\ell}^{2} \cdot \color{blue}{\cos k}}} \]
      8. lower-pow.f64N/A

        \[\leadsto \frac{2}{\frac{{k}^{2} \cdot \left(t \cdot {\sin k}^{2}\right)}{{\ell}^{2} \cdot \cos \color{blue}{k}}} \]
      9. lower-cos.f6473.8

        \[\leadsto \frac{2}{\frac{{k}^{2} \cdot \left(t \cdot {\sin k}^{2}\right)}{{\ell}^{2} \cdot \cos k}} \]
    4. Applied rewrites73.8%

      \[\leadsto \frac{2}{\color{blue}{\frac{{k}^{2} \cdot \left(t \cdot {\sin k}^{2}\right)}{{\ell}^{2} \cdot \cos k}}} \]
    5. Step-by-step derivation
      1. lift-/.f64N/A

        \[\leadsto \frac{2}{\frac{{k}^{2} \cdot \left(t \cdot {\sin k}^{2}\right)}{\color{blue}{{\ell}^{2} \cdot \cos k}}} \]
      2. lift-*.f64N/A

        \[\leadsto \frac{2}{\frac{{k}^{2} \cdot \left(t \cdot {\sin k}^{2}\right)}{\color{blue}{{\ell}^{2}} \cdot \cos k}} \]
      3. lift-*.f64N/A

        \[\leadsto \frac{2}{\frac{{k}^{2} \cdot \left(t \cdot {\sin k}^{2}\right)}{{\ell}^{2} \cdot \color{blue}{\cos k}}} \]
      4. times-fracN/A

        \[\leadsto \frac{2}{\frac{{k}^{2}}{{\ell}^{2}} \cdot \color{blue}{\frac{t \cdot {\sin k}^{2}}{\cos k}}} \]
      5. *-commutativeN/A

        \[\leadsto \frac{2}{\frac{t \cdot {\sin k}^{2}}{\cos k} \cdot \color{blue}{\frac{{k}^{2}}{{\ell}^{2}}}} \]
      6. lower-*.f64N/A

        \[\leadsto \frac{2}{\frac{t \cdot {\sin k}^{2}}{\cos k} \cdot \color{blue}{\frac{{k}^{2}}{{\ell}^{2}}}} \]
      7. lift-*.f64N/A

        \[\leadsto \frac{2}{\frac{t \cdot {\sin k}^{2}}{\cos k} \cdot \frac{{\color{blue}{k}}^{2}}{{\ell}^{2}}} \]
      8. associate-/l*N/A

        \[\leadsto \frac{2}{\left(t \cdot \frac{{\sin k}^{2}}{\cos k}\right) \cdot \frac{\color{blue}{{k}^{2}}}{{\ell}^{2}}} \]
      9. lower-*.f64N/A

        \[\leadsto \frac{2}{\left(t \cdot \frac{{\sin k}^{2}}{\cos k}\right) \cdot \frac{\color{blue}{{k}^{2}}}{{\ell}^{2}}} \]
      10. lift-pow.f64N/A

        \[\leadsto \frac{2}{\left(t \cdot \frac{{\sin k}^{2}}{\cos k}\right) \cdot \frac{{k}^{2}}{{\ell}^{2}}} \]
      11. unpow2N/A

        \[\leadsto \frac{2}{\left(t \cdot \frac{\sin k \cdot \sin k}{\cos k}\right) \cdot \frac{{k}^{2}}{{\ell}^{2}}} \]
      12. associate-*l/N/A

        \[\leadsto \frac{2}{\left(t \cdot \left(\frac{\sin k}{\cos k} \cdot \sin k\right)\right) \cdot \frac{{k}^{\color{blue}{2}}}{{\ell}^{2}}} \]
      13. lift-sin.f64N/A

        \[\leadsto \frac{2}{\left(t \cdot \left(\frac{\sin k}{\cos k} \cdot \sin k\right)\right) \cdot \frac{{k}^{2}}{{\ell}^{2}}} \]
      14. lift-cos.f64N/A

        \[\leadsto \frac{2}{\left(t \cdot \left(\frac{\sin k}{\cos k} \cdot \sin k\right)\right) \cdot \frac{{k}^{2}}{{\ell}^{2}}} \]
      15. tan-quotN/A

        \[\leadsto \frac{2}{\left(t \cdot \left(\tan k \cdot \sin k\right)\right) \cdot \frac{{k}^{2}}{{\ell}^{2}}} \]
      16. lift-tan.f64N/A

        \[\leadsto \frac{2}{\left(t \cdot \left(\tan k \cdot \sin k\right)\right) \cdot \frac{{k}^{2}}{{\ell}^{2}}} \]
      17. lower-*.f64N/A

        \[\leadsto \frac{2}{\left(t \cdot \left(\tan k \cdot \sin k\right)\right) \cdot \frac{{k}^{\color{blue}{2}}}{{\ell}^{2}}} \]
      18. lift-pow.f64N/A

        \[\leadsto \frac{2}{\left(t \cdot \left(\tan k \cdot \sin k\right)\right) \cdot \frac{{k}^{2}}{{\color{blue}{\ell}}^{2}}} \]
      19. unpow2N/A

        \[\leadsto \frac{2}{\left(t \cdot \left(\tan k \cdot \sin k\right)\right) \cdot \frac{k \cdot k}{{\color{blue}{\ell}}^{2}}} \]
      20. associate-/l*N/A

        \[\leadsto \frac{2}{\left(t \cdot \left(\tan k \cdot \sin k\right)\right) \cdot \left(k \cdot \color{blue}{\frac{k}{{\ell}^{2}}}\right)} \]
    6. Applied rewrites77.4%

      \[\leadsto \frac{2}{\left(t \cdot \left(\tan k \cdot \sin k\right)\right) \cdot \color{blue}{\left(k \cdot \frac{k}{\ell \cdot \ell}\right)}} \]
    7. Step-by-step derivation
      1. lift-*.f64N/A

        \[\leadsto \frac{2}{\left(t \cdot \left(\tan k \cdot \sin k\right)\right) \cdot \color{blue}{\left(k \cdot \frac{k}{\ell \cdot \ell}\right)}} \]
      2. lift-*.f64N/A

        \[\leadsto \frac{2}{\left(t \cdot \left(\tan k \cdot \sin k\right)\right) \cdot \left(k \cdot \color{blue}{\frac{k}{\ell \cdot \ell}}\right)} \]
      3. associate-*r*N/A

        \[\leadsto \frac{2}{\left(\left(t \cdot \left(\tan k \cdot \sin k\right)\right) \cdot k\right) \cdot \color{blue}{\frac{k}{\ell \cdot \ell}}} \]
      4. *-commutativeN/A

        \[\leadsto \frac{2}{\frac{k}{\ell \cdot \ell} \cdot \color{blue}{\left(\left(t \cdot \left(\tan k \cdot \sin k\right)\right) \cdot k\right)}} \]
      5. lower-*.f64N/A

        \[\leadsto \frac{2}{\frac{k}{\ell \cdot \ell} \cdot \color{blue}{\left(\left(t \cdot \left(\tan k \cdot \sin k\right)\right) \cdot k\right)}} \]
      6. lift-*.f64N/A

        \[\leadsto \frac{2}{\frac{k}{\ell \cdot \ell} \cdot \left(\left(t \cdot \left(\tan k \cdot \sin k\right)\right) \cdot k\right)} \]
      7. lift-*.f64N/A

        \[\leadsto \frac{2}{\frac{k}{\ell \cdot \ell} \cdot \left(\left(t \cdot \left(\tan k \cdot \sin k\right)\right) \cdot k\right)} \]
      8. associate-*r*N/A

        \[\leadsto \frac{2}{\frac{k}{\ell \cdot \ell} \cdot \left(\left(\left(t \cdot \tan k\right) \cdot \sin k\right) \cdot k\right)} \]
      9. associate-*l*N/A

        \[\leadsto \frac{2}{\frac{k}{\ell \cdot \ell} \cdot \left(\left(t \cdot \tan k\right) \cdot \color{blue}{\left(\sin k \cdot k\right)}\right)} \]
      10. lower-*.f64N/A

        \[\leadsto \frac{2}{\frac{k}{\ell \cdot \ell} \cdot \left(\left(t \cdot \tan k\right) \cdot \color{blue}{\left(\sin k \cdot k\right)}\right)} \]
      11. *-commutativeN/A

        \[\leadsto \frac{2}{\frac{k}{\ell \cdot \ell} \cdot \left(\left(\tan k \cdot t\right) \cdot \left(\color{blue}{\sin k} \cdot k\right)\right)} \]
      12. lower-*.f64N/A

        \[\leadsto \frac{2}{\frac{k}{\ell \cdot \ell} \cdot \left(\left(\tan k \cdot t\right) \cdot \left(\color{blue}{\sin k} \cdot k\right)\right)} \]
      13. lower-*.f6478.3

        \[\leadsto \frac{2}{\frac{k}{\ell \cdot \ell} \cdot \left(\left(\tan k \cdot t\right) \cdot \left(\sin k \cdot \color{blue}{k}\right)\right)} \]
    8. Applied rewrites78.3%

      \[\leadsto \frac{2}{\frac{k}{\ell \cdot \ell} \cdot \color{blue}{\left(\left(\tan k \cdot t\right) \cdot \left(\sin k \cdot k\right)\right)}} \]

    if 6.50000000000000015e149 < l

    1. Initial program 35.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}{\frac{{k}^{2} \cdot \left(t \cdot {\sin k}^{2}\right)}{{\ell}^{2} \cdot \cos k}}} \]
    3. Step-by-step derivation
      1. lower-/.f64N/A

        \[\leadsto \frac{2}{\frac{{k}^{2} \cdot \left(t \cdot {\sin k}^{2}\right)}{\color{blue}{{\ell}^{2} \cdot \cos k}}} \]
      2. lower-*.f64N/A

        \[\leadsto \frac{2}{\frac{{k}^{2} \cdot \left(t \cdot {\sin k}^{2}\right)}{\color{blue}{{\ell}^{2}} \cdot \cos k}} \]
      3. lower-pow.f64N/A

        \[\leadsto \frac{2}{\frac{{k}^{2} \cdot \left(t \cdot {\sin k}^{2}\right)}{{\color{blue}{\ell}}^{2} \cdot \cos k}} \]
      4. lower-*.f64N/A

        \[\leadsto \frac{2}{\frac{{k}^{2} \cdot \left(t \cdot {\sin k}^{2}\right)}{{\ell}^{\color{blue}{2}} \cdot \cos k}} \]
      5. lower-pow.f64N/A

        \[\leadsto \frac{2}{\frac{{k}^{2} \cdot \left(t \cdot {\sin k}^{2}\right)}{{\ell}^{2} \cdot \cos k}} \]
      6. lower-sin.f64N/A

        \[\leadsto \frac{2}{\frac{{k}^{2} \cdot \left(t \cdot {\sin k}^{2}\right)}{{\ell}^{2} \cdot \cos k}} \]
      7. lower-*.f64N/A

        \[\leadsto \frac{2}{\frac{{k}^{2} \cdot \left(t \cdot {\sin k}^{2}\right)}{{\ell}^{2} \cdot \color{blue}{\cos k}}} \]
      8. lower-pow.f64N/A

        \[\leadsto \frac{2}{\frac{{k}^{2} \cdot \left(t \cdot {\sin k}^{2}\right)}{{\ell}^{2} \cdot \cos \color{blue}{k}}} \]
      9. lower-cos.f6473.8

        \[\leadsto \frac{2}{\frac{{k}^{2} \cdot \left(t \cdot {\sin k}^{2}\right)}{{\ell}^{2} \cdot \cos k}} \]
    4. Applied rewrites73.8%

      \[\leadsto \frac{2}{\color{blue}{\frac{{k}^{2} \cdot \left(t \cdot {\sin k}^{2}\right)}{{\ell}^{2} \cdot \cos k}}} \]
    5. Step-by-step derivation
      1. lift-/.f64N/A

        \[\leadsto \frac{2}{\frac{{k}^{2} \cdot \left(t \cdot {\sin k}^{2}\right)}{\color{blue}{{\ell}^{2} \cdot \cos k}}} \]
      2. lift-*.f64N/A

        \[\leadsto \frac{2}{\frac{{k}^{2} \cdot \left(t \cdot {\sin k}^{2}\right)}{\color{blue}{{\ell}^{2}} \cdot \cos k}} \]
      3. associate-/l*N/A

        \[\leadsto \frac{2}{{k}^{2} \cdot \color{blue}{\frac{t \cdot {\sin k}^{2}}{{\ell}^{2} \cdot \cos k}}} \]
      4. lift-pow.f64N/A

        \[\leadsto \frac{2}{{k}^{2} \cdot \frac{\color{blue}{t \cdot {\sin k}^{2}}}{{\ell}^{2} \cdot \cos k}} \]
      5. unpow2N/A

        \[\leadsto \frac{2}{\left(k \cdot k\right) \cdot \frac{\color{blue}{t \cdot {\sin k}^{2}}}{{\ell}^{2} \cdot \cos k}} \]
      6. associate-*l*N/A

        \[\leadsto \frac{2}{k \cdot \color{blue}{\left(k \cdot \frac{t \cdot {\sin k}^{2}}{{\ell}^{2} \cdot \cos k}\right)}} \]
      7. lower-*.f64N/A

        \[\leadsto \frac{2}{k \cdot \color{blue}{\left(k \cdot \frac{t \cdot {\sin k}^{2}}{{\ell}^{2} \cdot \cos k}\right)}} \]
      8. lower-*.f64N/A

        \[\leadsto \frac{2}{k \cdot \left(k \cdot \color{blue}{\frac{t \cdot {\sin k}^{2}}{{\ell}^{2} \cdot \cos k}}\right)} \]
      9. lift-*.f64N/A

        \[\leadsto \frac{2}{k \cdot \left(k \cdot \frac{t \cdot {\sin k}^{2}}{\color{blue}{{\ell}^{2}} \cdot \cos k}\right)} \]
      10. *-commutativeN/A

        \[\leadsto \frac{2}{k \cdot \left(k \cdot \frac{{\sin k}^{2} \cdot t}{\color{blue}{{\ell}^{2}} \cdot \cos k}\right)} \]
      11. lift-*.f64N/A

        \[\leadsto \frac{2}{k \cdot \left(k \cdot \frac{{\sin k}^{2} \cdot t}{{\ell}^{2} \cdot \color{blue}{\cos k}}\right)} \]
      12. *-commutativeN/A

        \[\leadsto \frac{2}{k \cdot \left(k \cdot \frac{{\sin k}^{2} \cdot t}{\cos k \cdot \color{blue}{{\ell}^{2}}}\right)} \]
      13. times-fracN/A

        \[\leadsto \frac{2}{k \cdot \left(k \cdot \left(\frac{{\sin k}^{2}}{\cos k} \cdot \color{blue}{\frac{t}{{\ell}^{2}}}\right)\right)} \]
      14. lift-pow.f64N/A

        \[\leadsto \frac{2}{k \cdot \left(k \cdot \left(\frac{{\sin k}^{2}}{\cos k} \cdot \frac{t}{{\ell}^{\color{blue}{2}}}\right)\right)} \]
      15. pow2N/A

        \[\leadsto \frac{2}{k \cdot \left(k \cdot \left(\frac{{\sin k}^{2}}{\cos k} \cdot \frac{t}{\ell \cdot \color{blue}{\ell}}\right)\right)} \]
      16. lift-*.f64N/A

        \[\leadsto \frac{2}{k \cdot \left(k \cdot \left(\frac{{\sin k}^{2}}{\cos k} \cdot \frac{t}{\ell \cdot \color{blue}{\ell}}\right)\right)} \]
      17. lift-/.f64N/A

        \[\leadsto \frac{2}{k \cdot \left(k \cdot \left(\frac{{\sin k}^{2}}{\cos k} \cdot \frac{t}{\color{blue}{\ell \cdot \ell}}\right)\right)} \]
      18. lower-*.f64N/A

        \[\leadsto \frac{2}{k \cdot \left(k \cdot \left(\frac{{\sin k}^{2}}{\cos k} \cdot \color{blue}{\frac{t}{\ell \cdot \ell}}\right)\right)} \]
    6. Applied rewrites75.4%

      \[\leadsto \frac{2}{k \cdot \color{blue}{\left(k \cdot \left(\left(\tan k \cdot \sin k\right) \cdot \frac{t}{\ell \cdot \ell}\right)\right)}} \]
    7. Step-by-step derivation
      1. lift-*.f64N/A

        \[\leadsto \frac{2}{k \cdot \left(k \cdot \left(\left(\tan k \cdot \sin k\right) \cdot \color{blue}{\frac{t}{\ell \cdot \ell}}\right)\right)} \]
      2. *-commutativeN/A

        \[\leadsto \frac{2}{k \cdot \left(k \cdot \left(\frac{t}{\ell \cdot \ell} \cdot \color{blue}{\left(\tan k \cdot \sin k\right)}\right)\right)} \]
      3. lift-/.f64N/A

        \[\leadsto \frac{2}{k \cdot \left(k \cdot \left(\frac{t}{\ell \cdot \ell} \cdot \left(\color{blue}{\tan k} \cdot \sin k\right)\right)\right)} \]
      4. lift-*.f64N/A

        \[\leadsto \frac{2}{k \cdot \left(k \cdot \left(\frac{t}{\ell \cdot \ell} \cdot \left(\tan k \cdot \sin k\right)\right)\right)} \]
      5. associate-/r*N/A

        \[\leadsto \frac{2}{k \cdot \left(k \cdot \left(\frac{\frac{t}{\ell}}{\ell} \cdot \left(\color{blue}{\tan k} \cdot \sin k\right)\right)\right)} \]
      6. associate-*l/N/A

        \[\leadsto \frac{2}{k \cdot \left(k \cdot \frac{\frac{t}{\ell} \cdot \left(\tan k \cdot \sin k\right)}{\color{blue}{\ell}}\right)} \]
      7. lower-/.f64N/A

        \[\leadsto \frac{2}{k \cdot \left(k \cdot \frac{\frac{t}{\ell} \cdot \left(\tan k \cdot \sin k\right)}{\color{blue}{\ell}}\right)} \]
      8. lower-*.f64N/A

        \[\leadsto \frac{2}{k \cdot \left(k \cdot \frac{\frac{t}{\ell} \cdot \left(\tan k \cdot \sin k\right)}{\ell}\right)} \]
      9. lower-/.f6486.5

        \[\leadsto \frac{2}{k \cdot \left(k \cdot \frac{\frac{t}{\ell} \cdot \left(\tan k \cdot \sin k\right)}{\ell}\right)} \]
      10. lift-*.f64N/A

        \[\leadsto \frac{2}{k \cdot \left(k \cdot \frac{\frac{t}{\ell} \cdot \left(\tan k \cdot \sin k\right)}{\ell}\right)} \]
      11. *-commutativeN/A

        \[\leadsto \frac{2}{k \cdot \left(k \cdot \frac{\frac{t}{\ell} \cdot \left(\sin k \cdot \tan k\right)}{\ell}\right)} \]
      12. lower-*.f6486.5

        \[\leadsto \frac{2}{k \cdot \left(k \cdot \frac{\frac{t}{\ell} \cdot \left(\sin k \cdot \tan k\right)}{\ell}\right)} \]
    8. Applied rewrites86.5%

      \[\leadsto \frac{2}{k \cdot \left(k \cdot \frac{\frac{t}{\ell} \cdot \left(\sin k \cdot \tan k\right)}{\color{blue}{\ell}}\right)} \]
  3. Recombined 3 regimes into one program.
  4. Add Preprocessing

Alternative 9: 90.9% accurate, 1.2× speedup?

\[\begin{array}{l} t_1 := \tan k \cdot t\\ t_2 := \frac{2}{k \cdot \left(k \cdot \left(\frac{t\_1}{\left|\ell\right|} \cdot \frac{\sin k}{\left|\ell\right|}\right)\right)}\\ \mathbf{if}\;\left|\ell\right| \leq 2 \cdot 10^{-101}:\\ \;\;\;\;t\_2\\ \mathbf{elif}\;\left|\ell\right| \leq 6.5 \cdot 10^{+149}:\\ \;\;\;\;\frac{2}{\frac{k}{\left|\ell\right| \cdot \left|\ell\right|} \cdot \left(t\_1 \cdot \left(\sin k \cdot k\right)\right)}\\ \mathbf{else}:\\ \;\;\;\;t\_2\\ \end{array} \]
(FPCore (t l k)
 :precision binary64
 (let* ((t_1 (* (tan k) t))
        (t_2 (/ 2.0 (* k (* k (* (/ t_1 (fabs l)) (/ (sin k) (fabs l))))))))
   (if (<= (fabs l) 2e-101)
     t_2
     (if (<= (fabs l) 6.5e+149)
       (/ 2.0 (* (/ k (* (fabs l) (fabs l))) (* t_1 (* (sin k) k))))
       t_2))))
double code(double t, double l, double k) {
	double t_1 = tan(k) * t;
	double t_2 = 2.0 / (k * (k * ((t_1 / fabs(l)) * (sin(k) / fabs(l)))));
	double tmp;
	if (fabs(l) <= 2e-101) {
		tmp = t_2;
	} else if (fabs(l) <= 6.5e+149) {
		tmp = 2.0 / ((k / (fabs(l) * fabs(l))) * (t_1 * (sin(k) * k)));
	} else {
		tmp = t_2;
	}
	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 = tan(k) * t
    t_2 = 2.0d0 / (k * (k * ((t_1 / abs(l)) * (sin(k) / abs(l)))))
    if (abs(l) <= 2d-101) then
        tmp = t_2
    else if (abs(l) <= 6.5d+149) then
        tmp = 2.0d0 / ((k / (abs(l) * abs(l))) * (t_1 * (sin(k) * k)))
    else
        tmp = t_2
    end if
    code = tmp
end function
public static double code(double t, double l, double k) {
	double t_1 = Math.tan(k) * t;
	double t_2 = 2.0 / (k * (k * ((t_1 / Math.abs(l)) * (Math.sin(k) / Math.abs(l)))));
	double tmp;
	if (Math.abs(l) <= 2e-101) {
		tmp = t_2;
	} else if (Math.abs(l) <= 6.5e+149) {
		tmp = 2.0 / ((k / (Math.abs(l) * Math.abs(l))) * (t_1 * (Math.sin(k) * k)));
	} else {
		tmp = t_2;
	}
	return tmp;
}
def code(t, l, k):
	t_1 = math.tan(k) * t
	t_2 = 2.0 / (k * (k * ((t_1 / math.fabs(l)) * (math.sin(k) / math.fabs(l)))))
	tmp = 0
	if math.fabs(l) <= 2e-101:
		tmp = t_2
	elif math.fabs(l) <= 6.5e+149:
		tmp = 2.0 / ((k / (math.fabs(l) * math.fabs(l))) * (t_1 * (math.sin(k) * k)))
	else:
		tmp = t_2
	return tmp
function code(t, l, k)
	t_1 = Float64(tan(k) * t)
	t_2 = Float64(2.0 / Float64(k * Float64(k * Float64(Float64(t_1 / abs(l)) * Float64(sin(k) / abs(l))))))
	tmp = 0.0
	if (abs(l) <= 2e-101)
		tmp = t_2;
	elseif (abs(l) <= 6.5e+149)
		tmp = Float64(2.0 / Float64(Float64(k / Float64(abs(l) * abs(l))) * Float64(t_1 * Float64(sin(k) * k))));
	else
		tmp = t_2;
	end
	return tmp
end
function tmp_2 = code(t, l, k)
	t_1 = tan(k) * t;
	t_2 = 2.0 / (k * (k * ((t_1 / abs(l)) * (sin(k) / abs(l)))));
	tmp = 0.0;
	if (abs(l) <= 2e-101)
		tmp = t_2;
	elseif (abs(l) <= 6.5e+149)
		tmp = 2.0 / ((k / (abs(l) * abs(l))) * (t_1 * (sin(k) * k)));
	else
		tmp = t_2;
	end
	tmp_2 = tmp;
end
code[t_, l_, k_] := Block[{t$95$1 = N[(N[Tan[k], $MachinePrecision] * t), $MachinePrecision]}, Block[{t$95$2 = N[(2.0 / N[(k * N[(k * N[(N[(t$95$1 / N[Abs[l], $MachinePrecision]), $MachinePrecision] * N[(N[Sin[k], $MachinePrecision] / N[Abs[l], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[N[Abs[l], $MachinePrecision], 2e-101], t$95$2, If[LessEqual[N[Abs[l], $MachinePrecision], 6.5e+149], N[(2.0 / N[(N[(k / N[(N[Abs[l], $MachinePrecision] * N[Abs[l], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(t$95$1 * N[(N[Sin[k], $MachinePrecision] * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$2]]]]
\begin{array}{l}
t_1 := \tan k \cdot t\\
t_2 := \frac{2}{k \cdot \left(k \cdot \left(\frac{t\_1}{\left|\ell\right|} \cdot \frac{\sin k}{\left|\ell\right|}\right)\right)}\\
\mathbf{if}\;\left|\ell\right| \leq 2 \cdot 10^{-101}:\\
\;\;\;\;t\_2\\

\mathbf{elif}\;\left|\ell\right| \leq 6.5 \cdot 10^{+149}:\\
\;\;\;\;\frac{2}{\frac{k}{\left|\ell\right| \cdot \left|\ell\right|} \cdot \left(t\_1 \cdot \left(\sin k \cdot k\right)\right)}\\

\mathbf{else}:\\
\;\;\;\;t\_2\\


\end{array}
Derivation
  1. Split input into 2 regimes
  2. if l < 2.0000000000000001e-101 or 6.50000000000000015e149 < l

    1. Initial program 35.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}{\frac{{k}^{2} \cdot \left(t \cdot {\sin k}^{2}\right)}{{\ell}^{2} \cdot \cos k}}} \]
    3. Step-by-step derivation
      1. lower-/.f64N/A

        \[\leadsto \frac{2}{\frac{{k}^{2} \cdot \left(t \cdot {\sin k}^{2}\right)}{\color{blue}{{\ell}^{2} \cdot \cos k}}} \]
      2. lower-*.f64N/A

        \[\leadsto \frac{2}{\frac{{k}^{2} \cdot \left(t \cdot {\sin k}^{2}\right)}{\color{blue}{{\ell}^{2}} \cdot \cos k}} \]
      3. lower-pow.f64N/A

        \[\leadsto \frac{2}{\frac{{k}^{2} \cdot \left(t \cdot {\sin k}^{2}\right)}{{\color{blue}{\ell}}^{2} \cdot \cos k}} \]
      4. lower-*.f64N/A

        \[\leadsto \frac{2}{\frac{{k}^{2} \cdot \left(t \cdot {\sin k}^{2}\right)}{{\ell}^{\color{blue}{2}} \cdot \cos k}} \]
      5. lower-pow.f64N/A

        \[\leadsto \frac{2}{\frac{{k}^{2} \cdot \left(t \cdot {\sin k}^{2}\right)}{{\ell}^{2} \cdot \cos k}} \]
      6. lower-sin.f64N/A

        \[\leadsto \frac{2}{\frac{{k}^{2} \cdot \left(t \cdot {\sin k}^{2}\right)}{{\ell}^{2} \cdot \cos k}} \]
      7. lower-*.f64N/A

        \[\leadsto \frac{2}{\frac{{k}^{2} \cdot \left(t \cdot {\sin k}^{2}\right)}{{\ell}^{2} \cdot \color{blue}{\cos k}}} \]
      8. lower-pow.f64N/A

        \[\leadsto \frac{2}{\frac{{k}^{2} \cdot \left(t \cdot {\sin k}^{2}\right)}{{\ell}^{2} \cdot \cos \color{blue}{k}}} \]
      9. lower-cos.f6473.8

        \[\leadsto \frac{2}{\frac{{k}^{2} \cdot \left(t \cdot {\sin k}^{2}\right)}{{\ell}^{2} \cdot \cos k}} \]
    4. Applied rewrites73.8%

      \[\leadsto \frac{2}{\color{blue}{\frac{{k}^{2} \cdot \left(t \cdot {\sin k}^{2}\right)}{{\ell}^{2} \cdot \cos k}}} \]
    5. Step-by-step derivation
      1. lift-/.f64N/A

        \[\leadsto \frac{2}{\frac{{k}^{2} \cdot \left(t \cdot {\sin k}^{2}\right)}{\color{blue}{{\ell}^{2} \cdot \cos k}}} \]
      2. lift-*.f64N/A

        \[\leadsto \frac{2}{\frac{{k}^{2} \cdot \left(t \cdot {\sin k}^{2}\right)}{\color{blue}{{\ell}^{2}} \cdot \cos k}} \]
      3. associate-/l*N/A

        \[\leadsto \frac{2}{{k}^{2} \cdot \color{blue}{\frac{t \cdot {\sin k}^{2}}{{\ell}^{2} \cdot \cos k}}} \]
      4. lift-pow.f64N/A

        \[\leadsto \frac{2}{{k}^{2} \cdot \frac{\color{blue}{t \cdot {\sin k}^{2}}}{{\ell}^{2} \cdot \cos k}} \]
      5. unpow2N/A

        \[\leadsto \frac{2}{\left(k \cdot k\right) \cdot \frac{\color{blue}{t \cdot {\sin k}^{2}}}{{\ell}^{2} \cdot \cos k}} \]
      6. associate-*l*N/A

        \[\leadsto \frac{2}{k \cdot \color{blue}{\left(k \cdot \frac{t \cdot {\sin k}^{2}}{{\ell}^{2} \cdot \cos k}\right)}} \]
      7. lower-*.f64N/A

        \[\leadsto \frac{2}{k \cdot \color{blue}{\left(k \cdot \frac{t \cdot {\sin k}^{2}}{{\ell}^{2} \cdot \cos k}\right)}} \]
      8. lower-*.f64N/A

        \[\leadsto \frac{2}{k \cdot \left(k \cdot \color{blue}{\frac{t \cdot {\sin k}^{2}}{{\ell}^{2} \cdot \cos k}}\right)} \]
      9. lift-*.f64N/A

        \[\leadsto \frac{2}{k \cdot \left(k \cdot \frac{t \cdot {\sin k}^{2}}{\color{blue}{{\ell}^{2}} \cdot \cos k}\right)} \]
      10. *-commutativeN/A

        \[\leadsto \frac{2}{k \cdot \left(k \cdot \frac{{\sin k}^{2} \cdot t}{\color{blue}{{\ell}^{2}} \cdot \cos k}\right)} \]
      11. lift-*.f64N/A

        \[\leadsto \frac{2}{k \cdot \left(k \cdot \frac{{\sin k}^{2} \cdot t}{{\ell}^{2} \cdot \color{blue}{\cos k}}\right)} \]
      12. *-commutativeN/A

        \[\leadsto \frac{2}{k \cdot \left(k \cdot \frac{{\sin k}^{2} \cdot t}{\cos k \cdot \color{blue}{{\ell}^{2}}}\right)} \]
      13. times-fracN/A

        \[\leadsto \frac{2}{k \cdot \left(k \cdot \left(\frac{{\sin k}^{2}}{\cos k} \cdot \color{blue}{\frac{t}{{\ell}^{2}}}\right)\right)} \]
      14. lift-pow.f64N/A

        \[\leadsto \frac{2}{k \cdot \left(k \cdot \left(\frac{{\sin k}^{2}}{\cos k} \cdot \frac{t}{{\ell}^{\color{blue}{2}}}\right)\right)} \]
      15. pow2N/A

        \[\leadsto \frac{2}{k \cdot \left(k \cdot \left(\frac{{\sin k}^{2}}{\cos k} \cdot \frac{t}{\ell \cdot \color{blue}{\ell}}\right)\right)} \]
      16. lift-*.f64N/A

        \[\leadsto \frac{2}{k \cdot \left(k \cdot \left(\frac{{\sin k}^{2}}{\cos k} \cdot \frac{t}{\ell \cdot \color{blue}{\ell}}\right)\right)} \]
      17. lift-/.f64N/A

        \[\leadsto \frac{2}{k \cdot \left(k \cdot \left(\frac{{\sin k}^{2}}{\cos k} \cdot \frac{t}{\color{blue}{\ell \cdot \ell}}\right)\right)} \]
      18. lower-*.f64N/A

        \[\leadsto \frac{2}{k \cdot \left(k \cdot \left(\frac{{\sin k}^{2}}{\cos k} \cdot \color{blue}{\frac{t}{\ell \cdot \ell}}\right)\right)} \]
    6. Applied rewrites75.4%

      \[\leadsto \frac{2}{k \cdot \color{blue}{\left(k \cdot \left(\left(\tan k \cdot \sin k\right) \cdot \frac{t}{\ell \cdot \ell}\right)\right)}} \]
    7. Step-by-step derivation
      1. lift-*.f64N/A

        \[\leadsto \frac{2}{k \cdot \left(k \cdot \left(\left(\tan k \cdot \sin k\right) \cdot \color{blue}{\frac{t}{\ell \cdot \ell}}\right)\right)} \]
      2. lift-/.f64N/A

        \[\leadsto \frac{2}{k \cdot \left(k \cdot \left(\left(\tan k \cdot \sin k\right) \cdot \frac{t}{\color{blue}{\ell \cdot \ell}}\right)\right)} \]
      3. associate-*r/N/A

        \[\leadsto \frac{2}{k \cdot \left(k \cdot \frac{\left(\tan k \cdot \sin k\right) \cdot t}{\color{blue}{\ell \cdot \ell}}\right)} \]
      4. *-commutativeN/A

        \[\leadsto \frac{2}{k \cdot \left(k \cdot \frac{t \cdot \left(\tan k \cdot \sin k\right)}{\color{blue}{\ell} \cdot \ell}\right)} \]
      5. lift-*.f64N/A

        \[\leadsto \frac{2}{k \cdot \left(k \cdot \frac{t \cdot \left(\tan k \cdot \sin k\right)}{\ell \cdot \ell}\right)} \]
      6. associate-*r*N/A

        \[\leadsto \frac{2}{k \cdot \left(k \cdot \frac{\left(t \cdot \tan k\right) \cdot \sin k}{\color{blue}{\ell} \cdot \ell}\right)} \]
      7. lift-*.f64N/A

        \[\leadsto \frac{2}{k \cdot \left(k \cdot \frac{\left(t \cdot \tan k\right) \cdot \sin k}{\ell \cdot \color{blue}{\ell}}\right)} \]
      8. times-fracN/A

        \[\leadsto \frac{2}{k \cdot \left(k \cdot \left(\frac{t \cdot \tan k}{\ell} \cdot \color{blue}{\frac{\sin k}{\ell}}\right)\right)} \]
      9. lower-*.f64N/A

        \[\leadsto \frac{2}{k \cdot \left(k \cdot \left(\frac{t \cdot \tan k}{\ell} \cdot \color{blue}{\frac{\sin k}{\ell}}\right)\right)} \]
      10. lower-/.f64N/A

        \[\leadsto \frac{2}{k \cdot \left(k \cdot \left(\frac{t \cdot \tan k}{\ell} \cdot \frac{\color{blue}{\sin k}}{\ell}\right)\right)} \]
      11. *-commutativeN/A

        \[\leadsto \frac{2}{k \cdot \left(k \cdot \left(\frac{\tan k \cdot t}{\ell} \cdot \frac{\sin \color{blue}{k}}{\ell}\right)\right)} \]
      12. lower-*.f64N/A

        \[\leadsto \frac{2}{k \cdot \left(k \cdot \left(\frac{\tan k \cdot t}{\ell} \cdot \frac{\sin \color{blue}{k}}{\ell}\right)\right)} \]
      13. lower-/.f6489.7

        \[\leadsto \frac{2}{k \cdot \left(k \cdot \left(\frac{\tan k \cdot t}{\ell} \cdot \frac{\sin k}{\color{blue}{\ell}}\right)\right)} \]
    8. Applied rewrites89.7%

      \[\leadsto \frac{2}{k \cdot \left(k \cdot \left(\frac{\tan k \cdot t}{\ell} \cdot \color{blue}{\frac{\sin k}{\ell}}\right)\right)} \]

    if 2.0000000000000001e-101 < l < 6.50000000000000015e149

    1. Initial program 35.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}{\frac{{k}^{2} \cdot \left(t \cdot {\sin k}^{2}\right)}{{\ell}^{2} \cdot \cos k}}} \]
    3. Step-by-step derivation
      1. lower-/.f64N/A

        \[\leadsto \frac{2}{\frac{{k}^{2} \cdot \left(t \cdot {\sin k}^{2}\right)}{\color{blue}{{\ell}^{2} \cdot \cos k}}} \]
      2. lower-*.f64N/A

        \[\leadsto \frac{2}{\frac{{k}^{2} \cdot \left(t \cdot {\sin k}^{2}\right)}{\color{blue}{{\ell}^{2}} \cdot \cos k}} \]
      3. lower-pow.f64N/A

        \[\leadsto \frac{2}{\frac{{k}^{2} \cdot \left(t \cdot {\sin k}^{2}\right)}{{\color{blue}{\ell}}^{2} \cdot \cos k}} \]
      4. lower-*.f64N/A

        \[\leadsto \frac{2}{\frac{{k}^{2} \cdot \left(t \cdot {\sin k}^{2}\right)}{{\ell}^{\color{blue}{2}} \cdot \cos k}} \]
      5. lower-pow.f64N/A

        \[\leadsto \frac{2}{\frac{{k}^{2} \cdot \left(t \cdot {\sin k}^{2}\right)}{{\ell}^{2} \cdot \cos k}} \]
      6. lower-sin.f64N/A

        \[\leadsto \frac{2}{\frac{{k}^{2} \cdot \left(t \cdot {\sin k}^{2}\right)}{{\ell}^{2} \cdot \cos k}} \]
      7. lower-*.f64N/A

        \[\leadsto \frac{2}{\frac{{k}^{2} \cdot \left(t \cdot {\sin k}^{2}\right)}{{\ell}^{2} \cdot \color{blue}{\cos k}}} \]
      8. lower-pow.f64N/A

        \[\leadsto \frac{2}{\frac{{k}^{2} \cdot \left(t \cdot {\sin k}^{2}\right)}{{\ell}^{2} \cdot \cos \color{blue}{k}}} \]
      9. lower-cos.f6473.8

        \[\leadsto \frac{2}{\frac{{k}^{2} \cdot \left(t \cdot {\sin k}^{2}\right)}{{\ell}^{2} \cdot \cos k}} \]
    4. Applied rewrites73.8%

      \[\leadsto \frac{2}{\color{blue}{\frac{{k}^{2} \cdot \left(t \cdot {\sin k}^{2}\right)}{{\ell}^{2} \cdot \cos k}}} \]
    5. Step-by-step derivation
      1. lift-/.f64N/A

        \[\leadsto \frac{2}{\frac{{k}^{2} \cdot \left(t \cdot {\sin k}^{2}\right)}{\color{blue}{{\ell}^{2} \cdot \cos k}}} \]
      2. lift-*.f64N/A

        \[\leadsto \frac{2}{\frac{{k}^{2} \cdot \left(t \cdot {\sin k}^{2}\right)}{\color{blue}{{\ell}^{2}} \cdot \cos k}} \]
      3. lift-*.f64N/A

        \[\leadsto \frac{2}{\frac{{k}^{2} \cdot \left(t \cdot {\sin k}^{2}\right)}{{\ell}^{2} \cdot \color{blue}{\cos k}}} \]
      4. times-fracN/A

        \[\leadsto \frac{2}{\frac{{k}^{2}}{{\ell}^{2}} \cdot \color{blue}{\frac{t \cdot {\sin k}^{2}}{\cos k}}} \]
      5. *-commutativeN/A

        \[\leadsto \frac{2}{\frac{t \cdot {\sin k}^{2}}{\cos k} \cdot \color{blue}{\frac{{k}^{2}}{{\ell}^{2}}}} \]
      6. lower-*.f64N/A

        \[\leadsto \frac{2}{\frac{t \cdot {\sin k}^{2}}{\cos k} \cdot \color{blue}{\frac{{k}^{2}}{{\ell}^{2}}}} \]
      7. lift-*.f64N/A

        \[\leadsto \frac{2}{\frac{t \cdot {\sin k}^{2}}{\cos k} \cdot \frac{{\color{blue}{k}}^{2}}{{\ell}^{2}}} \]
      8. associate-/l*N/A

        \[\leadsto \frac{2}{\left(t \cdot \frac{{\sin k}^{2}}{\cos k}\right) \cdot \frac{\color{blue}{{k}^{2}}}{{\ell}^{2}}} \]
      9. lower-*.f64N/A

        \[\leadsto \frac{2}{\left(t \cdot \frac{{\sin k}^{2}}{\cos k}\right) \cdot \frac{\color{blue}{{k}^{2}}}{{\ell}^{2}}} \]
      10. lift-pow.f64N/A

        \[\leadsto \frac{2}{\left(t \cdot \frac{{\sin k}^{2}}{\cos k}\right) \cdot \frac{{k}^{2}}{{\ell}^{2}}} \]
      11. unpow2N/A

        \[\leadsto \frac{2}{\left(t \cdot \frac{\sin k \cdot \sin k}{\cos k}\right) \cdot \frac{{k}^{2}}{{\ell}^{2}}} \]
      12. associate-*l/N/A

        \[\leadsto \frac{2}{\left(t \cdot \left(\frac{\sin k}{\cos k} \cdot \sin k\right)\right) \cdot \frac{{k}^{\color{blue}{2}}}{{\ell}^{2}}} \]
      13. lift-sin.f64N/A

        \[\leadsto \frac{2}{\left(t \cdot \left(\frac{\sin k}{\cos k} \cdot \sin k\right)\right) \cdot \frac{{k}^{2}}{{\ell}^{2}}} \]
      14. lift-cos.f64N/A

        \[\leadsto \frac{2}{\left(t \cdot \left(\frac{\sin k}{\cos k} \cdot \sin k\right)\right) \cdot \frac{{k}^{2}}{{\ell}^{2}}} \]
      15. tan-quotN/A

        \[\leadsto \frac{2}{\left(t \cdot \left(\tan k \cdot \sin k\right)\right) \cdot \frac{{k}^{2}}{{\ell}^{2}}} \]
      16. lift-tan.f64N/A

        \[\leadsto \frac{2}{\left(t \cdot \left(\tan k \cdot \sin k\right)\right) \cdot \frac{{k}^{2}}{{\ell}^{2}}} \]
      17. lower-*.f64N/A

        \[\leadsto \frac{2}{\left(t \cdot \left(\tan k \cdot \sin k\right)\right) \cdot \frac{{k}^{\color{blue}{2}}}{{\ell}^{2}}} \]
      18. lift-pow.f64N/A

        \[\leadsto \frac{2}{\left(t \cdot \left(\tan k \cdot \sin k\right)\right) \cdot \frac{{k}^{2}}{{\color{blue}{\ell}}^{2}}} \]
      19. unpow2N/A

        \[\leadsto \frac{2}{\left(t \cdot \left(\tan k \cdot \sin k\right)\right) \cdot \frac{k \cdot k}{{\color{blue}{\ell}}^{2}}} \]
      20. associate-/l*N/A

        \[\leadsto \frac{2}{\left(t \cdot \left(\tan k \cdot \sin k\right)\right) \cdot \left(k \cdot \color{blue}{\frac{k}{{\ell}^{2}}}\right)} \]
    6. Applied rewrites77.4%

      \[\leadsto \frac{2}{\left(t \cdot \left(\tan k \cdot \sin k\right)\right) \cdot \color{blue}{\left(k \cdot \frac{k}{\ell \cdot \ell}\right)}} \]
    7. Step-by-step derivation
      1. lift-*.f64N/A

        \[\leadsto \frac{2}{\left(t \cdot \left(\tan k \cdot \sin k\right)\right) \cdot \color{blue}{\left(k \cdot \frac{k}{\ell \cdot \ell}\right)}} \]
      2. lift-*.f64N/A

        \[\leadsto \frac{2}{\left(t \cdot \left(\tan k \cdot \sin k\right)\right) \cdot \left(k \cdot \color{blue}{\frac{k}{\ell \cdot \ell}}\right)} \]
      3. associate-*r*N/A

        \[\leadsto \frac{2}{\left(\left(t \cdot \left(\tan k \cdot \sin k\right)\right) \cdot k\right) \cdot \color{blue}{\frac{k}{\ell \cdot \ell}}} \]
      4. *-commutativeN/A

        \[\leadsto \frac{2}{\frac{k}{\ell \cdot \ell} \cdot \color{blue}{\left(\left(t \cdot \left(\tan k \cdot \sin k\right)\right) \cdot k\right)}} \]
      5. lower-*.f64N/A

        \[\leadsto \frac{2}{\frac{k}{\ell \cdot \ell} \cdot \color{blue}{\left(\left(t \cdot \left(\tan k \cdot \sin k\right)\right) \cdot k\right)}} \]
      6. lift-*.f64N/A

        \[\leadsto \frac{2}{\frac{k}{\ell \cdot \ell} \cdot \left(\left(t \cdot \left(\tan k \cdot \sin k\right)\right) \cdot k\right)} \]
      7. lift-*.f64N/A

        \[\leadsto \frac{2}{\frac{k}{\ell \cdot \ell} \cdot \left(\left(t \cdot \left(\tan k \cdot \sin k\right)\right) \cdot k\right)} \]
      8. associate-*r*N/A

        \[\leadsto \frac{2}{\frac{k}{\ell \cdot \ell} \cdot \left(\left(\left(t \cdot \tan k\right) \cdot \sin k\right) \cdot k\right)} \]
      9. associate-*l*N/A

        \[\leadsto \frac{2}{\frac{k}{\ell \cdot \ell} \cdot \left(\left(t \cdot \tan k\right) \cdot \color{blue}{\left(\sin k \cdot k\right)}\right)} \]
      10. lower-*.f64N/A

        \[\leadsto \frac{2}{\frac{k}{\ell \cdot \ell} \cdot \left(\left(t \cdot \tan k\right) \cdot \color{blue}{\left(\sin k \cdot k\right)}\right)} \]
      11. *-commutativeN/A

        \[\leadsto \frac{2}{\frac{k}{\ell \cdot \ell} \cdot \left(\left(\tan k \cdot t\right) \cdot \left(\color{blue}{\sin k} \cdot k\right)\right)} \]
      12. lower-*.f64N/A

        \[\leadsto \frac{2}{\frac{k}{\ell \cdot \ell} \cdot \left(\left(\tan k \cdot t\right) \cdot \left(\color{blue}{\sin k} \cdot k\right)\right)} \]
      13. lower-*.f6478.3

        \[\leadsto \frac{2}{\frac{k}{\ell \cdot \ell} \cdot \left(\left(\tan k \cdot t\right) \cdot \left(\sin k \cdot \color{blue}{k}\right)\right)} \]
    8. Applied rewrites78.3%

      \[\leadsto \frac{2}{\frac{k}{\ell \cdot \ell} \cdot \color{blue}{\left(\left(\tan k \cdot t\right) \cdot \left(\sin k \cdot k\right)\right)}} \]
  3. Recombined 2 regimes into one program.
  4. Add Preprocessing

Alternative 10: 85.0% accurate, 1.3× speedup?

\[\begin{array}{l} t_1 := \sin \left(\left|k\right|\right) \cdot \left|k\right|\\ \mathbf{if}\;\left|k\right| \leq 0.000112:\\ \;\;\;\;\frac{2}{\frac{\left(\left(\left|k\right| \cdot t\right) \cdot t\_1\right) \cdot \frac{\left|k\right|}{\ell}}{\ell}}\\ \mathbf{else}:\\ \;\;\;\;\frac{2}{\frac{\left|k\right|}{\ell \cdot \ell} \cdot \left(\left(\tan \left(\left|k\right|\right) \cdot t\right) \cdot t\_1\right)}\\ \end{array} \]
(FPCore (t l k)
 :precision binary64
 (let* ((t_1 (* (sin (fabs k)) (fabs k))))
   (if (<= (fabs k) 0.000112)
     (/ 2.0 (/ (* (* (* (fabs k) t) t_1) (/ (fabs k) l)) l))
     (/ 2.0 (* (/ (fabs k) (* l l)) (* (* (tan (fabs k)) t) t_1))))))
double code(double t, double l, double k) {
	double t_1 = sin(fabs(k)) * fabs(k);
	double tmp;
	if (fabs(k) <= 0.000112) {
		tmp = 2.0 / ((((fabs(k) * t) * t_1) * (fabs(k) / l)) / l);
	} else {
		tmp = 2.0 / ((fabs(k) / (l * l)) * ((tan(fabs(k)) * t) * t_1));
	}
	return tmp;
}
module fmin_fmax_functions
    implicit none
    private
    public fmax
    public fmin

    interface fmax
        module procedure fmax88
        module procedure fmax44
        module procedure fmax84
        module procedure fmax48
    end interface
    interface fmin
        module procedure fmin88
        module procedure fmin44
        module procedure fmin84
        module procedure fmin48
    end interface
contains
    real(8) function fmax88(x, y) result (res)
        real(8), intent (in) :: x
        real(8), intent (in) :: y
        res = merge(y, merge(x, max(x, y), y /= y), x /= x)
    end function
    real(4) function fmax44(x, y) result (res)
        real(4), intent (in) :: x
        real(4), intent (in) :: y
        res = merge(y, merge(x, max(x, y), y /= y), x /= x)
    end function
    real(8) function fmax84(x, y) result(res)
        real(8), intent (in) :: x
        real(4), intent (in) :: y
        res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
    end function
    real(8) function fmax48(x, y) result(res)
        real(4), intent (in) :: x
        real(8), intent (in) :: y
        res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
    end function
    real(8) function fmin88(x, y) result (res)
        real(8), intent (in) :: x
        real(8), intent (in) :: y
        res = merge(y, merge(x, min(x, y), y /= y), x /= x)
    end function
    real(4) function fmin44(x, y) result (res)
        real(4), intent (in) :: x
        real(4), intent (in) :: y
        res = merge(y, merge(x, min(x, y), y /= y), x /= x)
    end function
    real(8) function fmin84(x, y) result(res)
        real(8), intent (in) :: x
        real(4), intent (in) :: y
        res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
    end function
    real(8) function fmin48(x, y) result(res)
        real(4), intent (in) :: x
        real(8), intent (in) :: y
        res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
    end function
end module

real(8) function code(t, l, k)
use fmin_fmax_functions
    real(8), intent (in) :: t
    real(8), intent (in) :: l
    real(8), intent (in) :: k
    real(8) :: t_1
    real(8) :: tmp
    t_1 = sin(abs(k)) * abs(k)
    if (abs(k) <= 0.000112d0) then
        tmp = 2.0d0 / ((((abs(k) * t) * t_1) * (abs(k) / l)) / l)
    else
        tmp = 2.0d0 / ((abs(k) / (l * l)) * ((tan(abs(k)) * t) * t_1))
    end if
    code = tmp
end function
public static double code(double t, double l, double k) {
	double t_1 = Math.sin(Math.abs(k)) * Math.abs(k);
	double tmp;
	if (Math.abs(k) <= 0.000112) {
		tmp = 2.0 / ((((Math.abs(k) * t) * t_1) * (Math.abs(k) / l)) / l);
	} else {
		tmp = 2.0 / ((Math.abs(k) / (l * l)) * ((Math.tan(Math.abs(k)) * t) * t_1));
	}
	return tmp;
}
def code(t, l, k):
	t_1 = math.sin(math.fabs(k)) * math.fabs(k)
	tmp = 0
	if math.fabs(k) <= 0.000112:
		tmp = 2.0 / ((((math.fabs(k) * t) * t_1) * (math.fabs(k) / l)) / l)
	else:
		tmp = 2.0 / ((math.fabs(k) / (l * l)) * ((math.tan(math.fabs(k)) * t) * t_1))
	return tmp
function code(t, l, k)
	t_1 = Float64(sin(abs(k)) * abs(k))
	tmp = 0.0
	if (abs(k) <= 0.000112)
		tmp = Float64(2.0 / Float64(Float64(Float64(Float64(abs(k) * t) * t_1) * Float64(abs(k) / l)) / l));
	else
		tmp = Float64(2.0 / Float64(Float64(abs(k) / Float64(l * l)) * Float64(Float64(tan(abs(k)) * t) * t_1)));
	end
	return tmp
end
function tmp_2 = code(t, l, k)
	t_1 = sin(abs(k)) * abs(k);
	tmp = 0.0;
	if (abs(k) <= 0.000112)
		tmp = 2.0 / ((((abs(k) * t) * t_1) * (abs(k) / l)) / l);
	else
		tmp = 2.0 / ((abs(k) / (l * l)) * ((tan(abs(k)) * t) * t_1));
	end
	tmp_2 = tmp;
end
code[t_, l_, k_] := Block[{t$95$1 = N[(N[Sin[N[Abs[k], $MachinePrecision]], $MachinePrecision] * N[Abs[k], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[N[Abs[k], $MachinePrecision], 0.000112], N[(2.0 / N[(N[(N[(N[(N[Abs[k], $MachinePrecision] * t), $MachinePrecision] * t$95$1), $MachinePrecision] * N[(N[Abs[k], $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision], N[(2.0 / N[(N[(N[Abs[k], $MachinePrecision] / N[(l * l), $MachinePrecision]), $MachinePrecision] * N[(N[(N[Tan[N[Abs[k], $MachinePrecision]], $MachinePrecision] * t), $MachinePrecision] * t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
t_1 := \sin \left(\left|k\right|\right) \cdot \left|k\right|\\
\mathbf{if}\;\left|k\right| \leq 0.000112:\\
\;\;\;\;\frac{2}{\frac{\left(\left(\left|k\right| \cdot t\right) \cdot t\_1\right) \cdot \frac{\left|k\right|}{\ell}}{\ell}}\\

\mathbf{else}:\\
\;\;\;\;\frac{2}{\frac{\left|k\right|}{\ell \cdot \ell} \cdot \left(\left(\tan \left(\left|k\right|\right) \cdot t\right) \cdot t\_1\right)}\\


\end{array}
Derivation
  1. Split input into 2 regimes
  2. if k < 1.11999999999999998e-4

    1. Initial program 35.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}{\frac{{k}^{2} \cdot \left(t \cdot {\sin k}^{2}\right)}{{\ell}^{2} \cdot \cos k}}} \]
    3. Step-by-step derivation
      1. lower-/.f64N/A

        \[\leadsto \frac{2}{\frac{{k}^{2} \cdot \left(t \cdot {\sin k}^{2}\right)}{\color{blue}{{\ell}^{2} \cdot \cos k}}} \]
      2. lower-*.f64N/A

        \[\leadsto \frac{2}{\frac{{k}^{2} \cdot \left(t \cdot {\sin k}^{2}\right)}{\color{blue}{{\ell}^{2}} \cdot \cos k}} \]
      3. lower-pow.f64N/A

        \[\leadsto \frac{2}{\frac{{k}^{2} \cdot \left(t \cdot {\sin k}^{2}\right)}{{\color{blue}{\ell}}^{2} \cdot \cos k}} \]
      4. lower-*.f64N/A

        \[\leadsto \frac{2}{\frac{{k}^{2} \cdot \left(t \cdot {\sin k}^{2}\right)}{{\ell}^{\color{blue}{2}} \cdot \cos k}} \]
      5. lower-pow.f64N/A

        \[\leadsto \frac{2}{\frac{{k}^{2} \cdot \left(t \cdot {\sin k}^{2}\right)}{{\ell}^{2} \cdot \cos k}} \]
      6. lower-sin.f64N/A

        \[\leadsto \frac{2}{\frac{{k}^{2} \cdot \left(t \cdot {\sin k}^{2}\right)}{{\ell}^{2} \cdot \cos k}} \]
      7. lower-*.f64N/A

        \[\leadsto \frac{2}{\frac{{k}^{2} \cdot \left(t \cdot {\sin k}^{2}\right)}{{\ell}^{2} \cdot \color{blue}{\cos k}}} \]
      8. lower-pow.f64N/A

        \[\leadsto \frac{2}{\frac{{k}^{2} \cdot \left(t \cdot {\sin k}^{2}\right)}{{\ell}^{2} \cdot \cos \color{blue}{k}}} \]
      9. lower-cos.f6473.8

        \[\leadsto \frac{2}{\frac{{k}^{2} \cdot \left(t \cdot {\sin k}^{2}\right)}{{\ell}^{2} \cdot \cos k}} \]
    4. Applied rewrites73.8%

      \[\leadsto \frac{2}{\color{blue}{\frac{{k}^{2} \cdot \left(t \cdot {\sin k}^{2}\right)}{{\ell}^{2} \cdot \cos k}}} \]
    5. Step-by-step derivation
      1. lift-/.f64N/A

        \[\leadsto \frac{2}{\frac{{k}^{2} \cdot \left(t \cdot {\sin k}^{2}\right)}{\color{blue}{{\ell}^{2} \cdot \cos k}}} \]
      2. lift-*.f64N/A

        \[\leadsto \frac{2}{\frac{{k}^{2} \cdot \left(t \cdot {\sin k}^{2}\right)}{\color{blue}{{\ell}^{2}} \cdot \cos k}} \]
      3. lift-*.f64N/A

        \[\leadsto \frac{2}{\frac{{k}^{2} \cdot \left(t \cdot {\sin k}^{2}\right)}{{\ell}^{2} \cdot \color{blue}{\cos k}}} \]
      4. times-fracN/A

        \[\leadsto \frac{2}{\frac{{k}^{2}}{{\ell}^{2}} \cdot \color{blue}{\frac{t \cdot {\sin k}^{2}}{\cos k}}} \]
      5. *-commutativeN/A

        \[\leadsto \frac{2}{\frac{t \cdot {\sin k}^{2}}{\cos k} \cdot \color{blue}{\frac{{k}^{2}}{{\ell}^{2}}}} \]
      6. lower-*.f64N/A

        \[\leadsto \frac{2}{\frac{t \cdot {\sin k}^{2}}{\cos k} \cdot \color{blue}{\frac{{k}^{2}}{{\ell}^{2}}}} \]
      7. lift-*.f64N/A

        \[\leadsto \frac{2}{\frac{t \cdot {\sin k}^{2}}{\cos k} \cdot \frac{{\color{blue}{k}}^{2}}{{\ell}^{2}}} \]
      8. associate-/l*N/A

        \[\leadsto \frac{2}{\left(t \cdot \frac{{\sin k}^{2}}{\cos k}\right) \cdot \frac{\color{blue}{{k}^{2}}}{{\ell}^{2}}} \]
      9. lower-*.f64N/A

        \[\leadsto \frac{2}{\left(t \cdot \frac{{\sin k}^{2}}{\cos k}\right) \cdot \frac{\color{blue}{{k}^{2}}}{{\ell}^{2}}} \]
      10. lift-pow.f64N/A

        \[\leadsto \frac{2}{\left(t \cdot \frac{{\sin k}^{2}}{\cos k}\right) \cdot \frac{{k}^{2}}{{\ell}^{2}}} \]
      11. unpow2N/A

        \[\leadsto \frac{2}{\left(t \cdot \frac{\sin k \cdot \sin k}{\cos k}\right) \cdot \frac{{k}^{2}}{{\ell}^{2}}} \]
      12. associate-*l/N/A

        \[\leadsto \frac{2}{\left(t \cdot \left(\frac{\sin k}{\cos k} \cdot \sin k\right)\right) \cdot \frac{{k}^{\color{blue}{2}}}{{\ell}^{2}}} \]
      13. lift-sin.f64N/A

        \[\leadsto \frac{2}{\left(t \cdot \left(\frac{\sin k}{\cos k} \cdot \sin k\right)\right) \cdot \frac{{k}^{2}}{{\ell}^{2}}} \]
      14. lift-cos.f64N/A

        \[\leadsto \frac{2}{\left(t \cdot \left(\frac{\sin k}{\cos k} \cdot \sin k\right)\right) \cdot \frac{{k}^{2}}{{\ell}^{2}}} \]
      15. tan-quotN/A

        \[\leadsto \frac{2}{\left(t \cdot \left(\tan k \cdot \sin k\right)\right) \cdot \frac{{k}^{2}}{{\ell}^{2}}} \]
      16. lift-tan.f64N/A

        \[\leadsto \frac{2}{\left(t \cdot \left(\tan k \cdot \sin k\right)\right) \cdot \frac{{k}^{2}}{{\ell}^{2}}} \]
      17. lower-*.f64N/A

        \[\leadsto \frac{2}{\left(t \cdot \left(\tan k \cdot \sin k\right)\right) \cdot \frac{{k}^{\color{blue}{2}}}{{\ell}^{2}}} \]
      18. lift-pow.f64N/A

        \[\leadsto \frac{2}{\left(t \cdot \left(\tan k \cdot \sin k\right)\right) \cdot \frac{{k}^{2}}{{\color{blue}{\ell}}^{2}}} \]
      19. unpow2N/A

        \[\leadsto \frac{2}{\left(t \cdot \left(\tan k \cdot \sin k\right)\right) \cdot \frac{k \cdot k}{{\color{blue}{\ell}}^{2}}} \]
      20. associate-/l*N/A

        \[\leadsto \frac{2}{\left(t \cdot \left(\tan k \cdot \sin k\right)\right) \cdot \left(k \cdot \color{blue}{\frac{k}{{\ell}^{2}}}\right)} \]
    6. Applied rewrites77.4%

      \[\leadsto \frac{2}{\left(t \cdot \left(\tan k \cdot \sin k\right)\right) \cdot \color{blue}{\left(k \cdot \frac{k}{\ell \cdot \ell}\right)}} \]
    7. Step-by-step derivation
      1. lift-*.f64N/A

        \[\leadsto \frac{2}{\left(t \cdot \left(\tan k \cdot \sin k\right)\right) \cdot \color{blue}{\left(k \cdot \frac{k}{\ell \cdot \ell}\right)}} \]
      2. lift-*.f64N/A

        \[\leadsto \frac{2}{\left(t \cdot \left(\tan k \cdot \sin k\right)\right) \cdot \left(k \cdot \color{blue}{\frac{k}{\ell \cdot \ell}}\right)} \]
      3. associate-*r*N/A

        \[\leadsto \frac{2}{\left(\left(t \cdot \left(\tan k \cdot \sin k\right)\right) \cdot k\right) \cdot \color{blue}{\frac{k}{\ell \cdot \ell}}} \]
      4. lift-/.f64N/A

        \[\leadsto \frac{2}{\left(\left(t \cdot \left(\tan k \cdot \sin k\right)\right) \cdot k\right) \cdot \frac{k}{\color{blue}{\ell \cdot \ell}}} \]
      5. lift-*.f64N/A

        \[\leadsto \frac{2}{\left(\left(t \cdot \left(\tan k \cdot \sin k\right)\right) \cdot k\right) \cdot \frac{k}{\ell \cdot \color{blue}{\ell}}} \]
      6. associate-/r*N/A

        \[\leadsto \frac{2}{\left(\left(t \cdot \left(\tan k \cdot \sin k\right)\right) \cdot k\right) \cdot \frac{\frac{k}{\ell}}{\color{blue}{\ell}}} \]
      7. associate-*r/N/A

        \[\leadsto \frac{2}{\frac{\left(\left(t \cdot \left(\tan k \cdot \sin k\right)\right) \cdot k\right) \cdot \frac{k}{\ell}}{\color{blue}{\ell}}} \]
      8. lower-/.f64N/A

        \[\leadsto \frac{2}{\frac{\left(\left(t \cdot \left(\tan k \cdot \sin k\right)\right) \cdot k\right) \cdot \frac{k}{\ell}}{\color{blue}{\ell}}} \]
      9. lower-*.f64N/A

        \[\leadsto \frac{2}{\frac{\left(\left(t \cdot \left(\tan k \cdot \sin k\right)\right) \cdot k\right) \cdot \frac{k}{\ell}}{\ell}} \]
      10. lift-*.f64N/A

        \[\leadsto \frac{2}{\frac{\left(\left(t \cdot \left(\tan k \cdot \sin k\right)\right) \cdot k\right) \cdot \frac{k}{\ell}}{\ell}} \]
      11. lift-*.f64N/A

        \[\leadsto \frac{2}{\frac{\left(\left(t \cdot \left(\tan k \cdot \sin k\right)\right) \cdot k\right) \cdot \frac{k}{\ell}}{\ell}} \]
      12. associate-*r*N/A

        \[\leadsto \frac{2}{\frac{\left(\left(\left(t \cdot \tan k\right) \cdot \sin k\right) \cdot k\right) \cdot \frac{k}{\ell}}{\ell}} \]
      13. associate-*l*N/A

        \[\leadsto \frac{2}{\frac{\left(\left(t \cdot \tan k\right) \cdot \left(\sin k \cdot k\right)\right) \cdot \frac{k}{\ell}}{\ell}} \]
      14. lower-*.f64N/A

        \[\leadsto \frac{2}{\frac{\left(\left(t \cdot \tan k\right) \cdot \left(\sin k \cdot k\right)\right) \cdot \frac{k}{\ell}}{\ell}} \]
      15. *-commutativeN/A

        \[\leadsto \frac{2}{\frac{\left(\left(\tan k \cdot t\right) \cdot \left(\sin k \cdot k\right)\right) \cdot \frac{k}{\ell}}{\ell}} \]
      16. lower-*.f64N/A

        \[\leadsto \frac{2}{\frac{\left(\left(\tan k \cdot t\right) \cdot \left(\sin k \cdot k\right)\right) \cdot \frac{k}{\ell}}{\ell}} \]
      17. lower-*.f64N/A

        \[\leadsto \frac{2}{\frac{\left(\left(\tan k \cdot t\right) \cdot \left(\sin k \cdot k\right)\right) \cdot \frac{k}{\ell}}{\ell}} \]
      18. lower-/.f6491.0

        \[\leadsto \frac{2}{\frac{\left(\left(\tan k \cdot t\right) \cdot \left(\sin k \cdot k\right)\right) \cdot \frac{k}{\ell}}{\ell}} \]
    8. Applied rewrites91.0%

      \[\leadsto \frac{2}{\frac{\left(\left(\tan k \cdot t\right) \cdot \left(\sin k \cdot k\right)\right) \cdot \frac{k}{\ell}}{\color{blue}{\ell}}} \]
    9. Taylor expanded in k around 0

      \[\leadsto \frac{2}{\frac{\left(\left(k \cdot t\right) \cdot \left(\sin k \cdot k\right)\right) \cdot \frac{k}{\ell}}{\ell}} \]
    10. Step-by-step derivation
      1. Applied rewrites72.1%

        \[\leadsto \frac{2}{\frac{\left(\left(k \cdot t\right) \cdot \left(\sin k \cdot k\right)\right) \cdot \frac{k}{\ell}}{\ell}} \]

      if 1.11999999999999998e-4 < k

      1. Initial program 35.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}{\frac{{k}^{2} \cdot \left(t \cdot {\sin k}^{2}\right)}{{\ell}^{2} \cdot \cos k}}} \]
      3. Step-by-step derivation
        1. lower-/.f64N/A

          \[\leadsto \frac{2}{\frac{{k}^{2} \cdot \left(t \cdot {\sin k}^{2}\right)}{\color{blue}{{\ell}^{2} \cdot \cos k}}} \]
        2. lower-*.f64N/A

          \[\leadsto \frac{2}{\frac{{k}^{2} \cdot \left(t \cdot {\sin k}^{2}\right)}{\color{blue}{{\ell}^{2}} \cdot \cos k}} \]
        3. lower-pow.f64N/A

          \[\leadsto \frac{2}{\frac{{k}^{2} \cdot \left(t \cdot {\sin k}^{2}\right)}{{\color{blue}{\ell}}^{2} \cdot \cos k}} \]
        4. lower-*.f64N/A

          \[\leadsto \frac{2}{\frac{{k}^{2} \cdot \left(t \cdot {\sin k}^{2}\right)}{{\ell}^{\color{blue}{2}} \cdot \cos k}} \]
        5. lower-pow.f64N/A

          \[\leadsto \frac{2}{\frac{{k}^{2} \cdot \left(t \cdot {\sin k}^{2}\right)}{{\ell}^{2} \cdot \cos k}} \]
        6. lower-sin.f64N/A

          \[\leadsto \frac{2}{\frac{{k}^{2} \cdot \left(t \cdot {\sin k}^{2}\right)}{{\ell}^{2} \cdot \cos k}} \]
        7. lower-*.f64N/A

          \[\leadsto \frac{2}{\frac{{k}^{2} \cdot \left(t \cdot {\sin k}^{2}\right)}{{\ell}^{2} \cdot \color{blue}{\cos k}}} \]
        8. lower-pow.f64N/A

          \[\leadsto \frac{2}{\frac{{k}^{2} \cdot \left(t \cdot {\sin k}^{2}\right)}{{\ell}^{2} \cdot \cos \color{blue}{k}}} \]
        9. lower-cos.f6473.8

          \[\leadsto \frac{2}{\frac{{k}^{2} \cdot \left(t \cdot {\sin k}^{2}\right)}{{\ell}^{2} \cdot \cos k}} \]
      4. Applied rewrites73.8%

        \[\leadsto \frac{2}{\color{blue}{\frac{{k}^{2} \cdot \left(t \cdot {\sin k}^{2}\right)}{{\ell}^{2} \cdot \cos k}}} \]
      5. Step-by-step derivation
        1. lift-/.f64N/A

          \[\leadsto \frac{2}{\frac{{k}^{2} \cdot \left(t \cdot {\sin k}^{2}\right)}{\color{blue}{{\ell}^{2} \cdot \cos k}}} \]
        2. lift-*.f64N/A

          \[\leadsto \frac{2}{\frac{{k}^{2} \cdot \left(t \cdot {\sin k}^{2}\right)}{\color{blue}{{\ell}^{2}} \cdot \cos k}} \]
        3. lift-*.f64N/A

          \[\leadsto \frac{2}{\frac{{k}^{2} \cdot \left(t \cdot {\sin k}^{2}\right)}{{\ell}^{2} \cdot \color{blue}{\cos k}}} \]
        4. times-fracN/A

          \[\leadsto \frac{2}{\frac{{k}^{2}}{{\ell}^{2}} \cdot \color{blue}{\frac{t \cdot {\sin k}^{2}}{\cos k}}} \]
        5. *-commutativeN/A

          \[\leadsto \frac{2}{\frac{t \cdot {\sin k}^{2}}{\cos k} \cdot \color{blue}{\frac{{k}^{2}}{{\ell}^{2}}}} \]
        6. lower-*.f64N/A

          \[\leadsto \frac{2}{\frac{t \cdot {\sin k}^{2}}{\cos k} \cdot \color{blue}{\frac{{k}^{2}}{{\ell}^{2}}}} \]
        7. lift-*.f64N/A

          \[\leadsto \frac{2}{\frac{t \cdot {\sin k}^{2}}{\cos k} \cdot \frac{{\color{blue}{k}}^{2}}{{\ell}^{2}}} \]
        8. associate-/l*N/A

          \[\leadsto \frac{2}{\left(t \cdot \frac{{\sin k}^{2}}{\cos k}\right) \cdot \frac{\color{blue}{{k}^{2}}}{{\ell}^{2}}} \]
        9. lower-*.f64N/A

          \[\leadsto \frac{2}{\left(t \cdot \frac{{\sin k}^{2}}{\cos k}\right) \cdot \frac{\color{blue}{{k}^{2}}}{{\ell}^{2}}} \]
        10. lift-pow.f64N/A

          \[\leadsto \frac{2}{\left(t \cdot \frac{{\sin k}^{2}}{\cos k}\right) \cdot \frac{{k}^{2}}{{\ell}^{2}}} \]
        11. unpow2N/A

          \[\leadsto \frac{2}{\left(t \cdot \frac{\sin k \cdot \sin k}{\cos k}\right) \cdot \frac{{k}^{2}}{{\ell}^{2}}} \]
        12. associate-*l/N/A

          \[\leadsto \frac{2}{\left(t \cdot \left(\frac{\sin k}{\cos k} \cdot \sin k\right)\right) \cdot \frac{{k}^{\color{blue}{2}}}{{\ell}^{2}}} \]
        13. lift-sin.f64N/A

          \[\leadsto \frac{2}{\left(t \cdot \left(\frac{\sin k}{\cos k} \cdot \sin k\right)\right) \cdot \frac{{k}^{2}}{{\ell}^{2}}} \]
        14. lift-cos.f64N/A

          \[\leadsto \frac{2}{\left(t \cdot \left(\frac{\sin k}{\cos k} \cdot \sin k\right)\right) \cdot \frac{{k}^{2}}{{\ell}^{2}}} \]
        15. tan-quotN/A

          \[\leadsto \frac{2}{\left(t \cdot \left(\tan k \cdot \sin k\right)\right) \cdot \frac{{k}^{2}}{{\ell}^{2}}} \]
        16. lift-tan.f64N/A

          \[\leadsto \frac{2}{\left(t \cdot \left(\tan k \cdot \sin k\right)\right) \cdot \frac{{k}^{2}}{{\ell}^{2}}} \]
        17. lower-*.f64N/A

          \[\leadsto \frac{2}{\left(t \cdot \left(\tan k \cdot \sin k\right)\right) \cdot \frac{{k}^{\color{blue}{2}}}{{\ell}^{2}}} \]
        18. lift-pow.f64N/A

          \[\leadsto \frac{2}{\left(t \cdot \left(\tan k \cdot \sin k\right)\right) \cdot \frac{{k}^{2}}{{\color{blue}{\ell}}^{2}}} \]
        19. unpow2N/A

          \[\leadsto \frac{2}{\left(t \cdot \left(\tan k \cdot \sin k\right)\right) \cdot \frac{k \cdot k}{{\color{blue}{\ell}}^{2}}} \]
        20. associate-/l*N/A

          \[\leadsto \frac{2}{\left(t \cdot \left(\tan k \cdot \sin k\right)\right) \cdot \left(k \cdot \color{blue}{\frac{k}{{\ell}^{2}}}\right)} \]
      6. Applied rewrites77.4%

        \[\leadsto \frac{2}{\left(t \cdot \left(\tan k \cdot \sin k\right)\right) \cdot \color{blue}{\left(k \cdot \frac{k}{\ell \cdot \ell}\right)}} \]
      7. Step-by-step derivation
        1. lift-*.f64N/A

          \[\leadsto \frac{2}{\left(t \cdot \left(\tan k \cdot \sin k\right)\right) \cdot \color{blue}{\left(k \cdot \frac{k}{\ell \cdot \ell}\right)}} \]
        2. lift-*.f64N/A

          \[\leadsto \frac{2}{\left(t \cdot \left(\tan k \cdot \sin k\right)\right) \cdot \left(k \cdot \color{blue}{\frac{k}{\ell \cdot \ell}}\right)} \]
        3. associate-*r*N/A

          \[\leadsto \frac{2}{\left(\left(t \cdot \left(\tan k \cdot \sin k\right)\right) \cdot k\right) \cdot \color{blue}{\frac{k}{\ell \cdot \ell}}} \]
        4. *-commutativeN/A

          \[\leadsto \frac{2}{\frac{k}{\ell \cdot \ell} \cdot \color{blue}{\left(\left(t \cdot \left(\tan k \cdot \sin k\right)\right) \cdot k\right)}} \]
        5. lower-*.f64N/A

          \[\leadsto \frac{2}{\frac{k}{\ell \cdot \ell} \cdot \color{blue}{\left(\left(t \cdot \left(\tan k \cdot \sin k\right)\right) \cdot k\right)}} \]
        6. lift-*.f64N/A

          \[\leadsto \frac{2}{\frac{k}{\ell \cdot \ell} \cdot \left(\left(t \cdot \left(\tan k \cdot \sin k\right)\right) \cdot k\right)} \]
        7. lift-*.f64N/A

          \[\leadsto \frac{2}{\frac{k}{\ell \cdot \ell} \cdot \left(\left(t \cdot \left(\tan k \cdot \sin k\right)\right) \cdot k\right)} \]
        8. associate-*r*N/A

          \[\leadsto \frac{2}{\frac{k}{\ell \cdot \ell} \cdot \left(\left(\left(t \cdot \tan k\right) \cdot \sin k\right) \cdot k\right)} \]
        9. associate-*l*N/A

          \[\leadsto \frac{2}{\frac{k}{\ell \cdot \ell} \cdot \left(\left(t \cdot \tan k\right) \cdot \color{blue}{\left(\sin k \cdot k\right)}\right)} \]
        10. lower-*.f64N/A

          \[\leadsto \frac{2}{\frac{k}{\ell \cdot \ell} \cdot \left(\left(t \cdot \tan k\right) \cdot \color{blue}{\left(\sin k \cdot k\right)}\right)} \]
        11. *-commutativeN/A

          \[\leadsto \frac{2}{\frac{k}{\ell \cdot \ell} \cdot \left(\left(\tan k \cdot t\right) \cdot \left(\color{blue}{\sin k} \cdot k\right)\right)} \]
        12. lower-*.f64N/A

          \[\leadsto \frac{2}{\frac{k}{\ell \cdot \ell} \cdot \left(\left(\tan k \cdot t\right) \cdot \left(\color{blue}{\sin k} \cdot k\right)\right)} \]
        13. lower-*.f6478.3

          \[\leadsto \frac{2}{\frac{k}{\ell \cdot \ell} \cdot \left(\left(\tan k \cdot t\right) \cdot \left(\sin k \cdot \color{blue}{k}\right)\right)} \]
      8. Applied rewrites78.3%

        \[\leadsto \frac{2}{\frac{k}{\ell \cdot \ell} \cdot \color{blue}{\left(\left(\tan k \cdot t\right) \cdot \left(\sin k \cdot k\right)\right)}} \]
    11. Recombined 2 regimes into one program.
    12. Add Preprocessing

    Alternative 11: 84.9% accurate, 1.3× speedup?

    \[\begin{array}{l} t_1 := \sin \left(\left|k\right|\right) \cdot \left|k\right|\\ \mathbf{if}\;\left|k\right| \leq 0.000112:\\ \;\;\;\;\frac{2}{\frac{\left(\left(\left|k\right| \cdot t\right) \cdot t\_1\right) \cdot \frac{\left|k\right|}{\ell}}{\ell}}\\ \mathbf{else}:\\ \;\;\;\;\frac{2}{\tan \left(\left|k\right|\right) \cdot \left(\left(t\_1 \cdot t\right) \cdot \frac{\left|k\right|}{\ell \cdot \ell}\right)}\\ \end{array} \]
    (FPCore (t l k)
     :precision binary64
     (let* ((t_1 (* (sin (fabs k)) (fabs k))))
       (if (<= (fabs k) 0.000112)
         (/ 2.0 (/ (* (* (* (fabs k) t) t_1) (/ (fabs k) l)) l))
         (/ 2.0 (* (tan (fabs k)) (* (* t_1 t) (/ (fabs k) (* l l))))))))
    double code(double t, double l, double k) {
    	double t_1 = sin(fabs(k)) * fabs(k);
    	double tmp;
    	if (fabs(k) <= 0.000112) {
    		tmp = 2.0 / ((((fabs(k) * t) * t_1) * (fabs(k) / l)) / l);
    	} else {
    		tmp = 2.0 / (tan(fabs(k)) * ((t_1 * t) * (fabs(k) / (l * l))));
    	}
    	return tmp;
    }
    
    module fmin_fmax_functions
        implicit none
        private
        public fmax
        public fmin
    
        interface fmax
            module procedure fmax88
            module procedure fmax44
            module procedure fmax84
            module procedure fmax48
        end interface
        interface fmin
            module procedure fmin88
            module procedure fmin44
            module procedure fmin84
            module procedure fmin48
        end interface
    contains
        real(8) function fmax88(x, y) result (res)
            real(8), intent (in) :: x
            real(8), intent (in) :: y
            res = merge(y, merge(x, max(x, y), y /= y), x /= x)
        end function
        real(4) function fmax44(x, y) result (res)
            real(4), intent (in) :: x
            real(4), intent (in) :: y
            res = merge(y, merge(x, max(x, y), y /= y), x /= x)
        end function
        real(8) function fmax84(x, y) result(res)
            real(8), intent (in) :: x
            real(4), intent (in) :: y
            res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
        end function
        real(8) function fmax48(x, y) result(res)
            real(4), intent (in) :: x
            real(8), intent (in) :: y
            res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
        end function
        real(8) function fmin88(x, y) result (res)
            real(8), intent (in) :: x
            real(8), intent (in) :: y
            res = merge(y, merge(x, min(x, y), y /= y), x /= x)
        end function
        real(4) function fmin44(x, y) result (res)
            real(4), intent (in) :: x
            real(4), intent (in) :: y
            res = merge(y, merge(x, min(x, y), y /= y), x /= x)
        end function
        real(8) function fmin84(x, y) result(res)
            real(8), intent (in) :: x
            real(4), intent (in) :: y
            res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
        end function
        real(8) function fmin48(x, y) result(res)
            real(4), intent (in) :: x
            real(8), intent (in) :: y
            res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
        end function
    end module
    
    real(8) function code(t, l, k)
    use fmin_fmax_functions
        real(8), intent (in) :: t
        real(8), intent (in) :: l
        real(8), intent (in) :: k
        real(8) :: t_1
        real(8) :: tmp
        t_1 = sin(abs(k)) * abs(k)
        if (abs(k) <= 0.000112d0) then
            tmp = 2.0d0 / ((((abs(k) * t) * t_1) * (abs(k) / l)) / l)
        else
            tmp = 2.0d0 / (tan(abs(k)) * ((t_1 * t) * (abs(k) / (l * l))))
        end if
        code = tmp
    end function
    
    public static double code(double t, double l, double k) {
    	double t_1 = Math.sin(Math.abs(k)) * Math.abs(k);
    	double tmp;
    	if (Math.abs(k) <= 0.000112) {
    		tmp = 2.0 / ((((Math.abs(k) * t) * t_1) * (Math.abs(k) / l)) / l);
    	} else {
    		tmp = 2.0 / (Math.tan(Math.abs(k)) * ((t_1 * t) * (Math.abs(k) / (l * l))));
    	}
    	return tmp;
    }
    
    def code(t, l, k):
    	t_1 = math.sin(math.fabs(k)) * math.fabs(k)
    	tmp = 0
    	if math.fabs(k) <= 0.000112:
    		tmp = 2.0 / ((((math.fabs(k) * t) * t_1) * (math.fabs(k) / l)) / l)
    	else:
    		tmp = 2.0 / (math.tan(math.fabs(k)) * ((t_1 * t) * (math.fabs(k) / (l * l))))
    	return tmp
    
    function code(t, l, k)
    	t_1 = Float64(sin(abs(k)) * abs(k))
    	tmp = 0.0
    	if (abs(k) <= 0.000112)
    		tmp = Float64(2.0 / Float64(Float64(Float64(Float64(abs(k) * t) * t_1) * Float64(abs(k) / l)) / l));
    	else
    		tmp = Float64(2.0 / Float64(tan(abs(k)) * Float64(Float64(t_1 * t) * Float64(abs(k) / Float64(l * l)))));
    	end
    	return tmp
    end
    
    function tmp_2 = code(t, l, k)
    	t_1 = sin(abs(k)) * abs(k);
    	tmp = 0.0;
    	if (abs(k) <= 0.000112)
    		tmp = 2.0 / ((((abs(k) * t) * t_1) * (abs(k) / l)) / l);
    	else
    		tmp = 2.0 / (tan(abs(k)) * ((t_1 * t) * (abs(k) / (l * l))));
    	end
    	tmp_2 = tmp;
    end
    
    code[t_, l_, k_] := Block[{t$95$1 = N[(N[Sin[N[Abs[k], $MachinePrecision]], $MachinePrecision] * N[Abs[k], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[N[Abs[k], $MachinePrecision], 0.000112], N[(2.0 / N[(N[(N[(N[(N[Abs[k], $MachinePrecision] * t), $MachinePrecision] * t$95$1), $MachinePrecision] * N[(N[Abs[k], $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision], N[(2.0 / N[(N[Tan[N[Abs[k], $MachinePrecision]], $MachinePrecision] * N[(N[(t$95$1 * t), $MachinePrecision] * N[(N[Abs[k], $MachinePrecision] / N[(l * l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
    
    \begin{array}{l}
    t_1 := \sin \left(\left|k\right|\right) \cdot \left|k\right|\\
    \mathbf{if}\;\left|k\right| \leq 0.000112:\\
    \;\;\;\;\frac{2}{\frac{\left(\left(\left|k\right| \cdot t\right) \cdot t\_1\right) \cdot \frac{\left|k\right|}{\ell}}{\ell}}\\
    
    \mathbf{else}:\\
    \;\;\;\;\frac{2}{\tan \left(\left|k\right|\right) \cdot \left(\left(t\_1 \cdot t\right) \cdot \frac{\left|k\right|}{\ell \cdot \ell}\right)}\\
    
    
    \end{array}
    
    Derivation
    1. Split input into 2 regimes
    2. if k < 1.11999999999999998e-4

      1. Initial program 35.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}{\frac{{k}^{2} \cdot \left(t \cdot {\sin k}^{2}\right)}{{\ell}^{2} \cdot \cos k}}} \]
      3. Step-by-step derivation
        1. lower-/.f64N/A

          \[\leadsto \frac{2}{\frac{{k}^{2} \cdot \left(t \cdot {\sin k}^{2}\right)}{\color{blue}{{\ell}^{2} \cdot \cos k}}} \]
        2. lower-*.f64N/A

          \[\leadsto \frac{2}{\frac{{k}^{2} \cdot \left(t \cdot {\sin k}^{2}\right)}{\color{blue}{{\ell}^{2}} \cdot \cos k}} \]
        3. lower-pow.f64N/A

          \[\leadsto \frac{2}{\frac{{k}^{2} \cdot \left(t \cdot {\sin k}^{2}\right)}{{\color{blue}{\ell}}^{2} \cdot \cos k}} \]
        4. lower-*.f64N/A

          \[\leadsto \frac{2}{\frac{{k}^{2} \cdot \left(t \cdot {\sin k}^{2}\right)}{{\ell}^{\color{blue}{2}} \cdot \cos k}} \]
        5. lower-pow.f64N/A

          \[\leadsto \frac{2}{\frac{{k}^{2} \cdot \left(t \cdot {\sin k}^{2}\right)}{{\ell}^{2} \cdot \cos k}} \]
        6. lower-sin.f64N/A

          \[\leadsto \frac{2}{\frac{{k}^{2} \cdot \left(t \cdot {\sin k}^{2}\right)}{{\ell}^{2} \cdot \cos k}} \]
        7. lower-*.f64N/A

          \[\leadsto \frac{2}{\frac{{k}^{2} \cdot \left(t \cdot {\sin k}^{2}\right)}{{\ell}^{2} \cdot \color{blue}{\cos k}}} \]
        8. lower-pow.f64N/A

          \[\leadsto \frac{2}{\frac{{k}^{2} \cdot \left(t \cdot {\sin k}^{2}\right)}{{\ell}^{2} \cdot \cos \color{blue}{k}}} \]
        9. lower-cos.f6473.8

          \[\leadsto \frac{2}{\frac{{k}^{2} \cdot \left(t \cdot {\sin k}^{2}\right)}{{\ell}^{2} \cdot \cos k}} \]
      4. Applied rewrites73.8%

        \[\leadsto \frac{2}{\color{blue}{\frac{{k}^{2} \cdot \left(t \cdot {\sin k}^{2}\right)}{{\ell}^{2} \cdot \cos k}}} \]
      5. Step-by-step derivation
        1. lift-/.f64N/A

          \[\leadsto \frac{2}{\frac{{k}^{2} \cdot \left(t \cdot {\sin k}^{2}\right)}{\color{blue}{{\ell}^{2} \cdot \cos k}}} \]
        2. lift-*.f64N/A

          \[\leadsto \frac{2}{\frac{{k}^{2} \cdot \left(t \cdot {\sin k}^{2}\right)}{\color{blue}{{\ell}^{2}} \cdot \cos k}} \]
        3. lift-*.f64N/A

          \[\leadsto \frac{2}{\frac{{k}^{2} \cdot \left(t \cdot {\sin k}^{2}\right)}{{\ell}^{2} \cdot \color{blue}{\cos k}}} \]
        4. times-fracN/A

          \[\leadsto \frac{2}{\frac{{k}^{2}}{{\ell}^{2}} \cdot \color{blue}{\frac{t \cdot {\sin k}^{2}}{\cos k}}} \]
        5. *-commutativeN/A

          \[\leadsto \frac{2}{\frac{t \cdot {\sin k}^{2}}{\cos k} \cdot \color{blue}{\frac{{k}^{2}}{{\ell}^{2}}}} \]
        6. lower-*.f64N/A

          \[\leadsto \frac{2}{\frac{t \cdot {\sin k}^{2}}{\cos k} \cdot \color{blue}{\frac{{k}^{2}}{{\ell}^{2}}}} \]
        7. lift-*.f64N/A

          \[\leadsto \frac{2}{\frac{t \cdot {\sin k}^{2}}{\cos k} \cdot \frac{{\color{blue}{k}}^{2}}{{\ell}^{2}}} \]
        8. associate-/l*N/A

          \[\leadsto \frac{2}{\left(t \cdot \frac{{\sin k}^{2}}{\cos k}\right) \cdot \frac{\color{blue}{{k}^{2}}}{{\ell}^{2}}} \]
        9. lower-*.f64N/A

          \[\leadsto \frac{2}{\left(t \cdot \frac{{\sin k}^{2}}{\cos k}\right) \cdot \frac{\color{blue}{{k}^{2}}}{{\ell}^{2}}} \]
        10. lift-pow.f64N/A

          \[\leadsto \frac{2}{\left(t \cdot \frac{{\sin k}^{2}}{\cos k}\right) \cdot \frac{{k}^{2}}{{\ell}^{2}}} \]
        11. unpow2N/A

          \[\leadsto \frac{2}{\left(t \cdot \frac{\sin k \cdot \sin k}{\cos k}\right) \cdot \frac{{k}^{2}}{{\ell}^{2}}} \]
        12. associate-*l/N/A

          \[\leadsto \frac{2}{\left(t \cdot \left(\frac{\sin k}{\cos k} \cdot \sin k\right)\right) \cdot \frac{{k}^{\color{blue}{2}}}{{\ell}^{2}}} \]
        13. lift-sin.f64N/A

          \[\leadsto \frac{2}{\left(t \cdot \left(\frac{\sin k}{\cos k} \cdot \sin k\right)\right) \cdot \frac{{k}^{2}}{{\ell}^{2}}} \]
        14. lift-cos.f64N/A

          \[\leadsto \frac{2}{\left(t \cdot \left(\frac{\sin k}{\cos k} \cdot \sin k\right)\right) \cdot \frac{{k}^{2}}{{\ell}^{2}}} \]
        15. tan-quotN/A

          \[\leadsto \frac{2}{\left(t \cdot \left(\tan k \cdot \sin k\right)\right) \cdot \frac{{k}^{2}}{{\ell}^{2}}} \]
        16. lift-tan.f64N/A

          \[\leadsto \frac{2}{\left(t \cdot \left(\tan k \cdot \sin k\right)\right) \cdot \frac{{k}^{2}}{{\ell}^{2}}} \]
        17. lower-*.f64N/A

          \[\leadsto \frac{2}{\left(t \cdot \left(\tan k \cdot \sin k\right)\right) \cdot \frac{{k}^{\color{blue}{2}}}{{\ell}^{2}}} \]
        18. lift-pow.f64N/A

          \[\leadsto \frac{2}{\left(t \cdot \left(\tan k \cdot \sin k\right)\right) \cdot \frac{{k}^{2}}{{\color{blue}{\ell}}^{2}}} \]
        19. unpow2N/A

          \[\leadsto \frac{2}{\left(t \cdot \left(\tan k \cdot \sin k\right)\right) \cdot \frac{k \cdot k}{{\color{blue}{\ell}}^{2}}} \]
        20. associate-/l*N/A

          \[\leadsto \frac{2}{\left(t \cdot \left(\tan k \cdot \sin k\right)\right) \cdot \left(k \cdot \color{blue}{\frac{k}{{\ell}^{2}}}\right)} \]
      6. Applied rewrites77.4%

        \[\leadsto \frac{2}{\left(t \cdot \left(\tan k \cdot \sin k\right)\right) \cdot \color{blue}{\left(k \cdot \frac{k}{\ell \cdot \ell}\right)}} \]
      7. Step-by-step derivation
        1. lift-*.f64N/A

          \[\leadsto \frac{2}{\left(t \cdot \left(\tan k \cdot \sin k\right)\right) \cdot \color{blue}{\left(k \cdot \frac{k}{\ell \cdot \ell}\right)}} \]
        2. lift-*.f64N/A

          \[\leadsto \frac{2}{\left(t \cdot \left(\tan k \cdot \sin k\right)\right) \cdot \left(k \cdot \color{blue}{\frac{k}{\ell \cdot \ell}}\right)} \]
        3. associate-*r*N/A

          \[\leadsto \frac{2}{\left(\left(t \cdot \left(\tan k \cdot \sin k\right)\right) \cdot k\right) \cdot \color{blue}{\frac{k}{\ell \cdot \ell}}} \]
        4. lift-/.f64N/A

          \[\leadsto \frac{2}{\left(\left(t \cdot \left(\tan k \cdot \sin k\right)\right) \cdot k\right) \cdot \frac{k}{\color{blue}{\ell \cdot \ell}}} \]
        5. lift-*.f64N/A

          \[\leadsto \frac{2}{\left(\left(t \cdot \left(\tan k \cdot \sin k\right)\right) \cdot k\right) \cdot \frac{k}{\ell \cdot \color{blue}{\ell}}} \]
        6. associate-/r*N/A

          \[\leadsto \frac{2}{\left(\left(t \cdot \left(\tan k \cdot \sin k\right)\right) \cdot k\right) \cdot \frac{\frac{k}{\ell}}{\color{blue}{\ell}}} \]
        7. associate-*r/N/A

          \[\leadsto \frac{2}{\frac{\left(\left(t \cdot \left(\tan k \cdot \sin k\right)\right) \cdot k\right) \cdot \frac{k}{\ell}}{\color{blue}{\ell}}} \]
        8. lower-/.f64N/A

          \[\leadsto \frac{2}{\frac{\left(\left(t \cdot \left(\tan k \cdot \sin k\right)\right) \cdot k\right) \cdot \frac{k}{\ell}}{\color{blue}{\ell}}} \]
        9. lower-*.f64N/A

          \[\leadsto \frac{2}{\frac{\left(\left(t \cdot \left(\tan k \cdot \sin k\right)\right) \cdot k\right) \cdot \frac{k}{\ell}}{\ell}} \]
        10. lift-*.f64N/A

          \[\leadsto \frac{2}{\frac{\left(\left(t \cdot \left(\tan k \cdot \sin k\right)\right) \cdot k\right) \cdot \frac{k}{\ell}}{\ell}} \]
        11. lift-*.f64N/A

          \[\leadsto \frac{2}{\frac{\left(\left(t \cdot \left(\tan k \cdot \sin k\right)\right) \cdot k\right) \cdot \frac{k}{\ell}}{\ell}} \]
        12. associate-*r*N/A

          \[\leadsto \frac{2}{\frac{\left(\left(\left(t \cdot \tan k\right) \cdot \sin k\right) \cdot k\right) \cdot \frac{k}{\ell}}{\ell}} \]
        13. associate-*l*N/A

          \[\leadsto \frac{2}{\frac{\left(\left(t \cdot \tan k\right) \cdot \left(\sin k \cdot k\right)\right) \cdot \frac{k}{\ell}}{\ell}} \]
        14. lower-*.f64N/A

          \[\leadsto \frac{2}{\frac{\left(\left(t \cdot \tan k\right) \cdot \left(\sin k \cdot k\right)\right) \cdot \frac{k}{\ell}}{\ell}} \]
        15. *-commutativeN/A

          \[\leadsto \frac{2}{\frac{\left(\left(\tan k \cdot t\right) \cdot \left(\sin k \cdot k\right)\right) \cdot \frac{k}{\ell}}{\ell}} \]
        16. lower-*.f64N/A

          \[\leadsto \frac{2}{\frac{\left(\left(\tan k \cdot t\right) \cdot \left(\sin k \cdot k\right)\right) \cdot \frac{k}{\ell}}{\ell}} \]
        17. lower-*.f64N/A

          \[\leadsto \frac{2}{\frac{\left(\left(\tan k \cdot t\right) \cdot \left(\sin k \cdot k\right)\right) \cdot \frac{k}{\ell}}{\ell}} \]
        18. lower-/.f6491.0

          \[\leadsto \frac{2}{\frac{\left(\left(\tan k \cdot t\right) \cdot \left(\sin k \cdot k\right)\right) \cdot \frac{k}{\ell}}{\ell}} \]
      8. Applied rewrites91.0%

        \[\leadsto \frac{2}{\frac{\left(\left(\tan k \cdot t\right) \cdot \left(\sin k \cdot k\right)\right) \cdot \frac{k}{\ell}}{\color{blue}{\ell}}} \]
      9. Taylor expanded in k around 0

        \[\leadsto \frac{2}{\frac{\left(\left(k \cdot t\right) \cdot \left(\sin k \cdot k\right)\right) \cdot \frac{k}{\ell}}{\ell}} \]
      10. Step-by-step derivation
        1. Applied rewrites72.1%

          \[\leadsto \frac{2}{\frac{\left(\left(k \cdot t\right) \cdot \left(\sin k \cdot k\right)\right) \cdot \frac{k}{\ell}}{\ell}} \]

        if 1.11999999999999998e-4 < k

        1. Initial program 35.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}{\frac{{k}^{2} \cdot \left(t \cdot {\sin k}^{2}\right)}{{\ell}^{2} \cdot \cos k}}} \]
        3. Step-by-step derivation
          1. lower-/.f64N/A

            \[\leadsto \frac{2}{\frac{{k}^{2} \cdot \left(t \cdot {\sin k}^{2}\right)}{\color{blue}{{\ell}^{2} \cdot \cos k}}} \]
          2. lower-*.f64N/A

            \[\leadsto \frac{2}{\frac{{k}^{2} \cdot \left(t \cdot {\sin k}^{2}\right)}{\color{blue}{{\ell}^{2}} \cdot \cos k}} \]
          3. lower-pow.f64N/A

            \[\leadsto \frac{2}{\frac{{k}^{2} \cdot \left(t \cdot {\sin k}^{2}\right)}{{\color{blue}{\ell}}^{2} \cdot \cos k}} \]
          4. lower-*.f64N/A

            \[\leadsto \frac{2}{\frac{{k}^{2} \cdot \left(t \cdot {\sin k}^{2}\right)}{{\ell}^{\color{blue}{2}} \cdot \cos k}} \]
          5. lower-pow.f64N/A

            \[\leadsto \frac{2}{\frac{{k}^{2} \cdot \left(t \cdot {\sin k}^{2}\right)}{{\ell}^{2} \cdot \cos k}} \]
          6. lower-sin.f64N/A

            \[\leadsto \frac{2}{\frac{{k}^{2} \cdot \left(t \cdot {\sin k}^{2}\right)}{{\ell}^{2} \cdot \cos k}} \]
          7. lower-*.f64N/A

            \[\leadsto \frac{2}{\frac{{k}^{2} \cdot \left(t \cdot {\sin k}^{2}\right)}{{\ell}^{2} \cdot \color{blue}{\cos k}}} \]
          8. lower-pow.f64N/A

            \[\leadsto \frac{2}{\frac{{k}^{2} \cdot \left(t \cdot {\sin k}^{2}\right)}{{\ell}^{2} \cdot \cos \color{blue}{k}}} \]
          9. lower-cos.f6473.8

            \[\leadsto \frac{2}{\frac{{k}^{2} \cdot \left(t \cdot {\sin k}^{2}\right)}{{\ell}^{2} \cdot \cos k}} \]
        4. Applied rewrites73.8%

          \[\leadsto \frac{2}{\color{blue}{\frac{{k}^{2} \cdot \left(t \cdot {\sin k}^{2}\right)}{{\ell}^{2} \cdot \cos k}}} \]
        5. Step-by-step derivation
          1. lift-/.f64N/A

            \[\leadsto \frac{2}{\frac{{k}^{2} \cdot \left(t \cdot {\sin k}^{2}\right)}{\color{blue}{{\ell}^{2} \cdot \cos k}}} \]
          2. lift-*.f64N/A

            \[\leadsto \frac{2}{\frac{{k}^{2} \cdot \left(t \cdot {\sin k}^{2}\right)}{\color{blue}{{\ell}^{2}} \cdot \cos k}} \]
          3. lift-*.f64N/A

            \[\leadsto \frac{2}{\frac{{k}^{2} \cdot \left(t \cdot {\sin k}^{2}\right)}{{\ell}^{2} \cdot \color{blue}{\cos k}}} \]
          4. times-fracN/A

            \[\leadsto \frac{2}{\frac{{k}^{2}}{{\ell}^{2}} \cdot \color{blue}{\frac{t \cdot {\sin k}^{2}}{\cos k}}} \]
          5. *-commutativeN/A

            \[\leadsto \frac{2}{\frac{t \cdot {\sin k}^{2}}{\cos k} \cdot \color{blue}{\frac{{k}^{2}}{{\ell}^{2}}}} \]
          6. lower-*.f64N/A

            \[\leadsto \frac{2}{\frac{t \cdot {\sin k}^{2}}{\cos k} \cdot \color{blue}{\frac{{k}^{2}}{{\ell}^{2}}}} \]
          7. lift-*.f64N/A

            \[\leadsto \frac{2}{\frac{t \cdot {\sin k}^{2}}{\cos k} \cdot \frac{{\color{blue}{k}}^{2}}{{\ell}^{2}}} \]
          8. associate-/l*N/A

            \[\leadsto \frac{2}{\left(t \cdot \frac{{\sin k}^{2}}{\cos k}\right) \cdot \frac{\color{blue}{{k}^{2}}}{{\ell}^{2}}} \]
          9. lower-*.f64N/A

            \[\leadsto \frac{2}{\left(t \cdot \frac{{\sin k}^{2}}{\cos k}\right) \cdot \frac{\color{blue}{{k}^{2}}}{{\ell}^{2}}} \]
          10. lift-pow.f64N/A

            \[\leadsto \frac{2}{\left(t \cdot \frac{{\sin k}^{2}}{\cos k}\right) \cdot \frac{{k}^{2}}{{\ell}^{2}}} \]
          11. unpow2N/A

            \[\leadsto \frac{2}{\left(t \cdot \frac{\sin k \cdot \sin k}{\cos k}\right) \cdot \frac{{k}^{2}}{{\ell}^{2}}} \]
          12. associate-*l/N/A

            \[\leadsto \frac{2}{\left(t \cdot \left(\frac{\sin k}{\cos k} \cdot \sin k\right)\right) \cdot \frac{{k}^{\color{blue}{2}}}{{\ell}^{2}}} \]
          13. lift-sin.f64N/A

            \[\leadsto \frac{2}{\left(t \cdot \left(\frac{\sin k}{\cos k} \cdot \sin k\right)\right) \cdot \frac{{k}^{2}}{{\ell}^{2}}} \]
          14. lift-cos.f64N/A

            \[\leadsto \frac{2}{\left(t \cdot \left(\frac{\sin k}{\cos k} \cdot \sin k\right)\right) \cdot \frac{{k}^{2}}{{\ell}^{2}}} \]
          15. tan-quotN/A

            \[\leadsto \frac{2}{\left(t \cdot \left(\tan k \cdot \sin k\right)\right) \cdot \frac{{k}^{2}}{{\ell}^{2}}} \]
          16. lift-tan.f64N/A

            \[\leadsto \frac{2}{\left(t \cdot \left(\tan k \cdot \sin k\right)\right) \cdot \frac{{k}^{2}}{{\ell}^{2}}} \]
          17. lower-*.f64N/A

            \[\leadsto \frac{2}{\left(t \cdot \left(\tan k \cdot \sin k\right)\right) \cdot \frac{{k}^{\color{blue}{2}}}{{\ell}^{2}}} \]
          18. lift-pow.f64N/A

            \[\leadsto \frac{2}{\left(t \cdot \left(\tan k \cdot \sin k\right)\right) \cdot \frac{{k}^{2}}{{\color{blue}{\ell}}^{2}}} \]
          19. unpow2N/A

            \[\leadsto \frac{2}{\left(t \cdot \left(\tan k \cdot \sin k\right)\right) \cdot \frac{k \cdot k}{{\color{blue}{\ell}}^{2}}} \]
          20. associate-/l*N/A

            \[\leadsto \frac{2}{\left(t \cdot \left(\tan k \cdot \sin k\right)\right) \cdot \left(k \cdot \color{blue}{\frac{k}{{\ell}^{2}}}\right)} \]
        6. Applied rewrites77.4%

          \[\leadsto \frac{2}{\left(t \cdot \left(\tan k \cdot \sin k\right)\right) \cdot \color{blue}{\left(k \cdot \frac{k}{\ell \cdot \ell}\right)}} \]
        7. Step-by-step derivation
          1. lift-*.f64N/A

            \[\leadsto \frac{2}{\left(t \cdot \left(\tan k \cdot \sin k\right)\right) \cdot \color{blue}{\left(k \cdot \frac{k}{\ell \cdot \ell}\right)}} \]
          2. lift-*.f64N/A

            \[\leadsto \frac{2}{\left(t \cdot \left(\tan k \cdot \sin k\right)\right) \cdot \left(k \cdot \color{blue}{\frac{k}{\ell \cdot \ell}}\right)} \]
          3. associate-*r*N/A

            \[\leadsto \frac{2}{\left(\left(t \cdot \left(\tan k \cdot \sin k\right)\right) \cdot k\right) \cdot \color{blue}{\frac{k}{\ell \cdot \ell}}} \]
          4. lift-/.f64N/A

            \[\leadsto \frac{2}{\left(\left(t \cdot \left(\tan k \cdot \sin k\right)\right) \cdot k\right) \cdot \frac{k}{\color{blue}{\ell \cdot \ell}}} \]
          5. lift-*.f64N/A

            \[\leadsto \frac{2}{\left(\left(t \cdot \left(\tan k \cdot \sin k\right)\right) \cdot k\right) \cdot \frac{k}{\ell \cdot \color{blue}{\ell}}} \]
          6. associate-/r*N/A

            \[\leadsto \frac{2}{\left(\left(t \cdot \left(\tan k \cdot \sin k\right)\right) \cdot k\right) \cdot \frac{\frac{k}{\ell}}{\color{blue}{\ell}}} \]
          7. associate-*r/N/A

            \[\leadsto \frac{2}{\frac{\left(\left(t \cdot \left(\tan k \cdot \sin k\right)\right) \cdot k\right) \cdot \frac{k}{\ell}}{\color{blue}{\ell}}} \]
          8. lower-/.f64N/A

            \[\leadsto \frac{2}{\frac{\left(\left(t \cdot \left(\tan k \cdot \sin k\right)\right) \cdot k\right) \cdot \frac{k}{\ell}}{\color{blue}{\ell}}} \]
          9. lower-*.f64N/A

            \[\leadsto \frac{2}{\frac{\left(\left(t \cdot \left(\tan k \cdot \sin k\right)\right) \cdot k\right) \cdot \frac{k}{\ell}}{\ell}} \]
          10. lift-*.f64N/A

            \[\leadsto \frac{2}{\frac{\left(\left(t \cdot \left(\tan k \cdot \sin k\right)\right) \cdot k\right) \cdot \frac{k}{\ell}}{\ell}} \]
          11. lift-*.f64N/A

            \[\leadsto \frac{2}{\frac{\left(\left(t \cdot \left(\tan k \cdot \sin k\right)\right) \cdot k\right) \cdot \frac{k}{\ell}}{\ell}} \]
          12. associate-*r*N/A

            \[\leadsto \frac{2}{\frac{\left(\left(\left(t \cdot \tan k\right) \cdot \sin k\right) \cdot k\right) \cdot \frac{k}{\ell}}{\ell}} \]
          13. associate-*l*N/A

            \[\leadsto \frac{2}{\frac{\left(\left(t \cdot \tan k\right) \cdot \left(\sin k \cdot k\right)\right) \cdot \frac{k}{\ell}}{\ell}} \]
          14. lower-*.f64N/A

            \[\leadsto \frac{2}{\frac{\left(\left(t \cdot \tan k\right) \cdot \left(\sin k \cdot k\right)\right) \cdot \frac{k}{\ell}}{\ell}} \]
          15. *-commutativeN/A

            \[\leadsto \frac{2}{\frac{\left(\left(\tan k \cdot t\right) \cdot \left(\sin k \cdot k\right)\right) \cdot \frac{k}{\ell}}{\ell}} \]
          16. lower-*.f64N/A

            \[\leadsto \frac{2}{\frac{\left(\left(\tan k \cdot t\right) \cdot \left(\sin k \cdot k\right)\right) \cdot \frac{k}{\ell}}{\ell}} \]
          17. lower-*.f64N/A

            \[\leadsto \frac{2}{\frac{\left(\left(\tan k \cdot t\right) \cdot \left(\sin k \cdot k\right)\right) \cdot \frac{k}{\ell}}{\ell}} \]
          18. lower-/.f6491.0

            \[\leadsto \frac{2}{\frac{\left(\left(\tan k \cdot t\right) \cdot \left(\sin k \cdot k\right)\right) \cdot \frac{k}{\ell}}{\ell}} \]
        8. Applied rewrites91.0%

          \[\leadsto \frac{2}{\frac{\left(\left(\tan k \cdot t\right) \cdot \left(\sin k \cdot k\right)\right) \cdot \frac{k}{\ell}}{\color{blue}{\ell}}} \]
        9. Step-by-step derivation
          1. lift-/.f64N/A

            \[\leadsto \frac{2}{\frac{\left(\left(\tan k \cdot t\right) \cdot \left(\sin k \cdot k\right)\right) \cdot \frac{k}{\ell}}{\color{blue}{\ell}}} \]
          2. lift-*.f64N/A

            \[\leadsto \frac{2}{\frac{\left(\left(\tan k \cdot t\right) \cdot \left(\sin k \cdot k\right)\right) \cdot \frac{k}{\ell}}{\ell}} \]
          3. associate-/l*N/A

            \[\leadsto \frac{2}{\left(\left(\tan k \cdot t\right) \cdot \left(\sin k \cdot k\right)\right) \cdot \color{blue}{\frac{\frac{k}{\ell}}{\ell}}} \]
          4. lift-*.f64N/A

            \[\leadsto \frac{2}{\left(\left(\tan k \cdot t\right) \cdot \left(\sin k \cdot k\right)\right) \cdot \frac{\color{blue}{\frac{k}{\ell}}}{\ell}} \]
          5. lift-*.f64N/A

            \[\leadsto \frac{2}{\left(\left(\tan k \cdot t\right) \cdot \left(\sin k \cdot k\right)\right) \cdot \frac{\frac{\color{blue}{k}}{\ell}}{\ell}} \]
          6. associate-*l*N/A

            \[\leadsto \frac{2}{\left(\tan k \cdot \left(t \cdot \left(\sin k \cdot k\right)\right)\right) \cdot \frac{\color{blue}{\frac{k}{\ell}}}{\ell}} \]
          7. lift-/.f64N/A

            \[\leadsto \frac{2}{\left(\tan k \cdot \left(t \cdot \left(\sin k \cdot k\right)\right)\right) \cdot \frac{\frac{k}{\ell}}{\ell}} \]
          8. associate-/r*N/A

            \[\leadsto \frac{2}{\left(\tan k \cdot \left(t \cdot \left(\sin k \cdot k\right)\right)\right) \cdot \frac{k}{\color{blue}{\ell \cdot \ell}}} \]
          9. lift-*.f64N/A

            \[\leadsto \frac{2}{\left(\tan k \cdot \left(t \cdot \left(\sin k \cdot k\right)\right)\right) \cdot \frac{k}{\ell \cdot \color{blue}{\ell}}} \]
          10. lift-/.f64N/A

            \[\leadsto \frac{2}{\left(\tan k \cdot \left(t \cdot \left(\sin k \cdot k\right)\right)\right) \cdot \frac{k}{\color{blue}{\ell \cdot \ell}}} \]
          11. associate-*l*N/A

            \[\leadsto \frac{2}{\tan k \cdot \color{blue}{\left(\left(t \cdot \left(\sin k \cdot k\right)\right) \cdot \frac{k}{\ell \cdot \ell}\right)}} \]
          12. lower-*.f64N/A

            \[\leadsto \frac{2}{\tan k \cdot \color{blue}{\left(\left(t \cdot \left(\sin k \cdot k\right)\right) \cdot \frac{k}{\ell \cdot \ell}\right)}} \]
          13. lower-*.f64N/A

            \[\leadsto \frac{2}{\tan k \cdot \left(\left(t \cdot \left(\sin k \cdot k\right)\right) \cdot \color{blue}{\frac{k}{\ell \cdot \ell}}\right)} \]
          14. *-commutativeN/A

            \[\leadsto \frac{2}{\tan k \cdot \left(\left(\left(\sin k \cdot k\right) \cdot t\right) \cdot \frac{\color{blue}{k}}{\ell \cdot \ell}\right)} \]
          15. lower-*.f6478.6

            \[\leadsto \frac{2}{\tan k \cdot \left(\left(\left(\sin k \cdot k\right) \cdot t\right) \cdot \frac{\color{blue}{k}}{\ell \cdot \ell}\right)} \]
        10. Applied rewrites78.6%

          \[\leadsto \frac{2}{\tan k \cdot \color{blue}{\left(\left(\left(\sin k \cdot k\right) \cdot t\right) \cdot \frac{k}{\ell \cdot \ell}\right)}} \]
      11. Recombined 2 regimes into one program.
      12. Add Preprocessing

      Alternative 12: 83.5% accurate, 1.3× speedup?

      \[\begin{array}{l} t_1 := \sin \left(\left|k\right|\right) \cdot \left|k\right|\\ \mathbf{if}\;\left|k\right| \leq 0.0014:\\ \;\;\;\;\frac{2}{\frac{\left(\left(\left|k\right| \cdot \left(t + 0.3333333333333333 \cdot \left({\left(\left|k\right|\right)}^{2} \cdot t\right)\right)\right) \cdot t\_1\right) \cdot \frac{\left|k\right|}{\ell}}{\ell}}\\ \mathbf{else}:\\ \;\;\;\;\frac{2}{\frac{t\_1 \cdot \left(\left(\tan \left(\left|k\right|\right) \cdot t\right) \cdot \left|k\right|\right)}{\ell \cdot \ell}}\\ \end{array} \]
      (FPCore (t l k)
       :precision binary64
       (let* ((t_1 (* (sin (fabs k)) (fabs k))))
         (if (<= (fabs k) 0.0014)
           (/
            2.0
            (/
             (*
              (*
               (* (fabs k) (+ t (* 0.3333333333333333 (* (pow (fabs k) 2.0) t))))
               t_1)
              (/ (fabs k) l))
             l))
           (/ 2.0 (/ (* t_1 (* (* (tan (fabs k)) t) (fabs k))) (* l l))))))
      double code(double t, double l, double k) {
      	double t_1 = sin(fabs(k)) * fabs(k);
      	double tmp;
      	if (fabs(k) <= 0.0014) {
      		tmp = 2.0 / ((((fabs(k) * (t + (0.3333333333333333 * (pow(fabs(k), 2.0) * t)))) * t_1) * (fabs(k) / l)) / l);
      	} else {
      		tmp = 2.0 / ((t_1 * ((tan(fabs(k)) * t) * fabs(k))) / (l * l));
      	}
      	return tmp;
      }
      
      module fmin_fmax_functions
          implicit none
          private
          public fmax
          public fmin
      
          interface fmax
              module procedure fmax88
              module procedure fmax44
              module procedure fmax84
              module procedure fmax48
          end interface
          interface fmin
              module procedure fmin88
              module procedure fmin44
              module procedure fmin84
              module procedure fmin48
          end interface
      contains
          real(8) function fmax88(x, y) result (res)
              real(8), intent (in) :: x
              real(8), intent (in) :: y
              res = merge(y, merge(x, max(x, y), y /= y), x /= x)
          end function
          real(4) function fmax44(x, y) result (res)
              real(4), intent (in) :: x
              real(4), intent (in) :: y
              res = merge(y, merge(x, max(x, y), y /= y), x /= x)
          end function
          real(8) function fmax84(x, y) result(res)
              real(8), intent (in) :: x
              real(4), intent (in) :: y
              res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
          end function
          real(8) function fmax48(x, y) result(res)
              real(4), intent (in) :: x
              real(8), intent (in) :: y
              res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
          end function
          real(8) function fmin88(x, y) result (res)
              real(8), intent (in) :: x
              real(8), intent (in) :: y
              res = merge(y, merge(x, min(x, y), y /= y), x /= x)
          end function
          real(4) function fmin44(x, y) result (res)
              real(4), intent (in) :: x
              real(4), intent (in) :: y
              res = merge(y, merge(x, min(x, y), y /= y), x /= x)
          end function
          real(8) function fmin84(x, y) result(res)
              real(8), intent (in) :: x
              real(4), intent (in) :: y
              res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
          end function
          real(8) function fmin48(x, y) result(res)
              real(4), intent (in) :: x
              real(8), intent (in) :: y
              res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
          end function
      end module
      
      real(8) function code(t, l, k)
      use fmin_fmax_functions
          real(8), intent (in) :: t
          real(8), intent (in) :: l
          real(8), intent (in) :: k
          real(8) :: t_1
          real(8) :: tmp
          t_1 = sin(abs(k)) * abs(k)
          if (abs(k) <= 0.0014d0) then
              tmp = 2.0d0 / ((((abs(k) * (t + (0.3333333333333333d0 * ((abs(k) ** 2.0d0) * t)))) * t_1) * (abs(k) / l)) / l)
          else
              tmp = 2.0d0 / ((t_1 * ((tan(abs(k)) * t) * abs(k))) / (l * l))
          end if
          code = tmp
      end function
      
      public static double code(double t, double l, double k) {
      	double t_1 = Math.sin(Math.abs(k)) * Math.abs(k);
      	double tmp;
      	if (Math.abs(k) <= 0.0014) {
      		tmp = 2.0 / ((((Math.abs(k) * (t + (0.3333333333333333 * (Math.pow(Math.abs(k), 2.0) * t)))) * t_1) * (Math.abs(k) / l)) / l);
      	} else {
      		tmp = 2.0 / ((t_1 * ((Math.tan(Math.abs(k)) * t) * Math.abs(k))) / (l * l));
      	}
      	return tmp;
      }
      
      def code(t, l, k):
      	t_1 = math.sin(math.fabs(k)) * math.fabs(k)
      	tmp = 0
      	if math.fabs(k) <= 0.0014:
      		tmp = 2.0 / ((((math.fabs(k) * (t + (0.3333333333333333 * (math.pow(math.fabs(k), 2.0) * t)))) * t_1) * (math.fabs(k) / l)) / l)
      	else:
      		tmp = 2.0 / ((t_1 * ((math.tan(math.fabs(k)) * t) * math.fabs(k))) / (l * l))
      	return tmp
      
      function code(t, l, k)
      	t_1 = Float64(sin(abs(k)) * abs(k))
      	tmp = 0.0
      	if (abs(k) <= 0.0014)
      		tmp = Float64(2.0 / Float64(Float64(Float64(Float64(abs(k) * Float64(t + Float64(0.3333333333333333 * Float64((abs(k) ^ 2.0) * t)))) * t_1) * Float64(abs(k) / l)) / l));
      	else
      		tmp = Float64(2.0 / Float64(Float64(t_1 * Float64(Float64(tan(abs(k)) * t) * abs(k))) / Float64(l * l)));
      	end
      	return tmp
      end
      
      function tmp_2 = code(t, l, k)
      	t_1 = sin(abs(k)) * abs(k);
      	tmp = 0.0;
      	if (abs(k) <= 0.0014)
      		tmp = 2.0 / ((((abs(k) * (t + (0.3333333333333333 * ((abs(k) ^ 2.0) * t)))) * t_1) * (abs(k) / l)) / l);
      	else
      		tmp = 2.0 / ((t_1 * ((tan(abs(k)) * t) * abs(k))) / (l * l));
      	end
      	tmp_2 = tmp;
      end
      
      code[t_, l_, k_] := Block[{t$95$1 = N[(N[Sin[N[Abs[k], $MachinePrecision]], $MachinePrecision] * N[Abs[k], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[N[Abs[k], $MachinePrecision], 0.0014], N[(2.0 / N[(N[(N[(N[(N[Abs[k], $MachinePrecision] * N[(t + N[(0.3333333333333333 * N[(N[Power[N[Abs[k], $MachinePrecision], 2.0], $MachinePrecision] * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * t$95$1), $MachinePrecision] * N[(N[Abs[k], $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision], N[(2.0 / N[(N[(t$95$1 * N[(N[(N[Tan[N[Abs[k], $MachinePrecision]], $MachinePrecision] * t), $MachinePrecision] * N[Abs[k], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(l * l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
      
      \begin{array}{l}
      t_1 := \sin \left(\left|k\right|\right) \cdot \left|k\right|\\
      \mathbf{if}\;\left|k\right| \leq 0.0014:\\
      \;\;\;\;\frac{2}{\frac{\left(\left(\left|k\right| \cdot \left(t + 0.3333333333333333 \cdot \left({\left(\left|k\right|\right)}^{2} \cdot t\right)\right)\right) \cdot t\_1\right) \cdot \frac{\left|k\right|}{\ell}}{\ell}}\\
      
      \mathbf{else}:\\
      \;\;\;\;\frac{2}{\frac{t\_1 \cdot \left(\left(\tan \left(\left|k\right|\right) \cdot t\right) \cdot \left|k\right|\right)}{\ell \cdot \ell}}\\
      
      
      \end{array}
      
      Derivation
      1. Split input into 2 regimes
      2. if k < 0.00139999999999999999

        1. Initial program 35.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}{\frac{{k}^{2} \cdot \left(t \cdot {\sin k}^{2}\right)}{{\ell}^{2} \cdot \cos k}}} \]
        3. Step-by-step derivation
          1. lower-/.f64N/A

            \[\leadsto \frac{2}{\frac{{k}^{2} \cdot \left(t \cdot {\sin k}^{2}\right)}{\color{blue}{{\ell}^{2} \cdot \cos k}}} \]
          2. lower-*.f64N/A

            \[\leadsto \frac{2}{\frac{{k}^{2} \cdot \left(t \cdot {\sin k}^{2}\right)}{\color{blue}{{\ell}^{2}} \cdot \cos k}} \]
          3. lower-pow.f64N/A

            \[\leadsto \frac{2}{\frac{{k}^{2} \cdot \left(t \cdot {\sin k}^{2}\right)}{{\color{blue}{\ell}}^{2} \cdot \cos k}} \]
          4. lower-*.f64N/A

            \[\leadsto \frac{2}{\frac{{k}^{2} \cdot \left(t \cdot {\sin k}^{2}\right)}{{\ell}^{\color{blue}{2}} \cdot \cos k}} \]
          5. lower-pow.f64N/A

            \[\leadsto \frac{2}{\frac{{k}^{2} \cdot \left(t \cdot {\sin k}^{2}\right)}{{\ell}^{2} \cdot \cos k}} \]
          6. lower-sin.f64N/A

            \[\leadsto \frac{2}{\frac{{k}^{2} \cdot \left(t \cdot {\sin k}^{2}\right)}{{\ell}^{2} \cdot \cos k}} \]
          7. lower-*.f64N/A

            \[\leadsto \frac{2}{\frac{{k}^{2} \cdot \left(t \cdot {\sin k}^{2}\right)}{{\ell}^{2} \cdot \color{blue}{\cos k}}} \]
          8. lower-pow.f64N/A

            \[\leadsto \frac{2}{\frac{{k}^{2} \cdot \left(t \cdot {\sin k}^{2}\right)}{{\ell}^{2} \cdot \cos \color{blue}{k}}} \]
          9. lower-cos.f6473.8

            \[\leadsto \frac{2}{\frac{{k}^{2} \cdot \left(t \cdot {\sin k}^{2}\right)}{{\ell}^{2} \cdot \cos k}} \]
        4. Applied rewrites73.8%

          \[\leadsto \frac{2}{\color{blue}{\frac{{k}^{2} \cdot \left(t \cdot {\sin k}^{2}\right)}{{\ell}^{2} \cdot \cos k}}} \]
        5. Step-by-step derivation
          1. lift-/.f64N/A

            \[\leadsto \frac{2}{\frac{{k}^{2} \cdot \left(t \cdot {\sin k}^{2}\right)}{\color{blue}{{\ell}^{2} \cdot \cos k}}} \]
          2. lift-*.f64N/A

            \[\leadsto \frac{2}{\frac{{k}^{2} \cdot \left(t \cdot {\sin k}^{2}\right)}{\color{blue}{{\ell}^{2}} \cdot \cos k}} \]
          3. lift-*.f64N/A

            \[\leadsto \frac{2}{\frac{{k}^{2} \cdot \left(t \cdot {\sin k}^{2}\right)}{{\ell}^{2} \cdot \color{blue}{\cos k}}} \]
          4. times-fracN/A

            \[\leadsto \frac{2}{\frac{{k}^{2}}{{\ell}^{2}} \cdot \color{blue}{\frac{t \cdot {\sin k}^{2}}{\cos k}}} \]
          5. *-commutativeN/A

            \[\leadsto \frac{2}{\frac{t \cdot {\sin k}^{2}}{\cos k} \cdot \color{blue}{\frac{{k}^{2}}{{\ell}^{2}}}} \]
          6. lower-*.f64N/A

            \[\leadsto \frac{2}{\frac{t \cdot {\sin k}^{2}}{\cos k} \cdot \color{blue}{\frac{{k}^{2}}{{\ell}^{2}}}} \]
          7. lift-*.f64N/A

            \[\leadsto \frac{2}{\frac{t \cdot {\sin k}^{2}}{\cos k} \cdot \frac{{\color{blue}{k}}^{2}}{{\ell}^{2}}} \]
          8. associate-/l*N/A

            \[\leadsto \frac{2}{\left(t \cdot \frac{{\sin k}^{2}}{\cos k}\right) \cdot \frac{\color{blue}{{k}^{2}}}{{\ell}^{2}}} \]
          9. lower-*.f64N/A

            \[\leadsto \frac{2}{\left(t \cdot \frac{{\sin k}^{2}}{\cos k}\right) \cdot \frac{\color{blue}{{k}^{2}}}{{\ell}^{2}}} \]
          10. lift-pow.f64N/A

            \[\leadsto \frac{2}{\left(t \cdot \frac{{\sin k}^{2}}{\cos k}\right) \cdot \frac{{k}^{2}}{{\ell}^{2}}} \]
          11. unpow2N/A

            \[\leadsto \frac{2}{\left(t \cdot \frac{\sin k \cdot \sin k}{\cos k}\right) \cdot \frac{{k}^{2}}{{\ell}^{2}}} \]
          12. associate-*l/N/A

            \[\leadsto \frac{2}{\left(t \cdot \left(\frac{\sin k}{\cos k} \cdot \sin k\right)\right) \cdot \frac{{k}^{\color{blue}{2}}}{{\ell}^{2}}} \]
          13. lift-sin.f64N/A

            \[\leadsto \frac{2}{\left(t \cdot \left(\frac{\sin k}{\cos k} \cdot \sin k\right)\right) \cdot \frac{{k}^{2}}{{\ell}^{2}}} \]
          14. lift-cos.f64N/A

            \[\leadsto \frac{2}{\left(t \cdot \left(\frac{\sin k}{\cos k} \cdot \sin k\right)\right) \cdot \frac{{k}^{2}}{{\ell}^{2}}} \]
          15. tan-quotN/A

            \[\leadsto \frac{2}{\left(t \cdot \left(\tan k \cdot \sin k\right)\right) \cdot \frac{{k}^{2}}{{\ell}^{2}}} \]
          16. lift-tan.f64N/A

            \[\leadsto \frac{2}{\left(t \cdot \left(\tan k \cdot \sin k\right)\right) \cdot \frac{{k}^{2}}{{\ell}^{2}}} \]
          17. lower-*.f64N/A

            \[\leadsto \frac{2}{\left(t \cdot \left(\tan k \cdot \sin k\right)\right) \cdot \frac{{k}^{\color{blue}{2}}}{{\ell}^{2}}} \]
          18. lift-pow.f64N/A

            \[\leadsto \frac{2}{\left(t \cdot \left(\tan k \cdot \sin k\right)\right) \cdot \frac{{k}^{2}}{{\color{blue}{\ell}}^{2}}} \]
          19. unpow2N/A

            \[\leadsto \frac{2}{\left(t \cdot \left(\tan k \cdot \sin k\right)\right) \cdot \frac{k \cdot k}{{\color{blue}{\ell}}^{2}}} \]
          20. associate-/l*N/A

            \[\leadsto \frac{2}{\left(t \cdot \left(\tan k \cdot \sin k\right)\right) \cdot \left(k \cdot \color{blue}{\frac{k}{{\ell}^{2}}}\right)} \]
        6. Applied rewrites77.4%

          \[\leadsto \frac{2}{\left(t \cdot \left(\tan k \cdot \sin k\right)\right) \cdot \color{blue}{\left(k \cdot \frac{k}{\ell \cdot \ell}\right)}} \]
        7. Step-by-step derivation
          1. lift-*.f64N/A

            \[\leadsto \frac{2}{\left(t \cdot \left(\tan k \cdot \sin k\right)\right) \cdot \color{blue}{\left(k \cdot \frac{k}{\ell \cdot \ell}\right)}} \]
          2. lift-*.f64N/A

            \[\leadsto \frac{2}{\left(t \cdot \left(\tan k \cdot \sin k\right)\right) \cdot \left(k \cdot \color{blue}{\frac{k}{\ell \cdot \ell}}\right)} \]
          3. associate-*r*N/A

            \[\leadsto \frac{2}{\left(\left(t \cdot \left(\tan k \cdot \sin k\right)\right) \cdot k\right) \cdot \color{blue}{\frac{k}{\ell \cdot \ell}}} \]
          4. lift-/.f64N/A

            \[\leadsto \frac{2}{\left(\left(t \cdot \left(\tan k \cdot \sin k\right)\right) \cdot k\right) \cdot \frac{k}{\color{blue}{\ell \cdot \ell}}} \]
          5. lift-*.f64N/A

            \[\leadsto \frac{2}{\left(\left(t \cdot \left(\tan k \cdot \sin k\right)\right) \cdot k\right) \cdot \frac{k}{\ell \cdot \color{blue}{\ell}}} \]
          6. associate-/r*N/A

            \[\leadsto \frac{2}{\left(\left(t \cdot \left(\tan k \cdot \sin k\right)\right) \cdot k\right) \cdot \frac{\frac{k}{\ell}}{\color{blue}{\ell}}} \]
          7. associate-*r/N/A

            \[\leadsto \frac{2}{\frac{\left(\left(t \cdot \left(\tan k \cdot \sin k\right)\right) \cdot k\right) \cdot \frac{k}{\ell}}{\color{blue}{\ell}}} \]
          8. lower-/.f64N/A

            \[\leadsto \frac{2}{\frac{\left(\left(t \cdot \left(\tan k \cdot \sin k\right)\right) \cdot k\right) \cdot \frac{k}{\ell}}{\color{blue}{\ell}}} \]
          9. lower-*.f64N/A

            \[\leadsto \frac{2}{\frac{\left(\left(t \cdot \left(\tan k \cdot \sin k\right)\right) \cdot k\right) \cdot \frac{k}{\ell}}{\ell}} \]
          10. lift-*.f64N/A

            \[\leadsto \frac{2}{\frac{\left(\left(t \cdot \left(\tan k \cdot \sin k\right)\right) \cdot k\right) \cdot \frac{k}{\ell}}{\ell}} \]
          11. lift-*.f64N/A

            \[\leadsto \frac{2}{\frac{\left(\left(t \cdot \left(\tan k \cdot \sin k\right)\right) \cdot k\right) \cdot \frac{k}{\ell}}{\ell}} \]
          12. associate-*r*N/A

            \[\leadsto \frac{2}{\frac{\left(\left(\left(t \cdot \tan k\right) \cdot \sin k\right) \cdot k\right) \cdot \frac{k}{\ell}}{\ell}} \]
          13. associate-*l*N/A

            \[\leadsto \frac{2}{\frac{\left(\left(t \cdot \tan k\right) \cdot \left(\sin k \cdot k\right)\right) \cdot \frac{k}{\ell}}{\ell}} \]
          14. lower-*.f64N/A

            \[\leadsto \frac{2}{\frac{\left(\left(t \cdot \tan k\right) \cdot \left(\sin k \cdot k\right)\right) \cdot \frac{k}{\ell}}{\ell}} \]
          15. *-commutativeN/A

            \[\leadsto \frac{2}{\frac{\left(\left(\tan k \cdot t\right) \cdot \left(\sin k \cdot k\right)\right) \cdot \frac{k}{\ell}}{\ell}} \]
          16. lower-*.f64N/A

            \[\leadsto \frac{2}{\frac{\left(\left(\tan k \cdot t\right) \cdot \left(\sin k \cdot k\right)\right) \cdot \frac{k}{\ell}}{\ell}} \]
          17. lower-*.f64N/A

            \[\leadsto \frac{2}{\frac{\left(\left(\tan k \cdot t\right) \cdot \left(\sin k \cdot k\right)\right) \cdot \frac{k}{\ell}}{\ell}} \]
          18. lower-/.f6491.0

            \[\leadsto \frac{2}{\frac{\left(\left(\tan k \cdot t\right) \cdot \left(\sin k \cdot k\right)\right) \cdot \frac{k}{\ell}}{\ell}} \]
        8. Applied rewrites91.0%

          \[\leadsto \frac{2}{\frac{\left(\left(\tan k \cdot t\right) \cdot \left(\sin k \cdot k\right)\right) \cdot \frac{k}{\ell}}{\color{blue}{\ell}}} \]
        9. Taylor expanded in k around 0

          \[\leadsto \frac{2}{\frac{\left(\left(k \cdot \left(t + \frac{1}{3} \cdot \left({k}^{2} \cdot t\right)\right)\right) \cdot \left(\sin k \cdot k\right)\right) \cdot \frac{k}{\ell}}{\ell}} \]
        10. Step-by-step derivation
          1. lower-*.f64N/A

            \[\leadsto \frac{2}{\frac{\left(\left(k \cdot \left(t + \frac{1}{3} \cdot \left({k}^{2} \cdot t\right)\right)\right) \cdot \left(\sin k \cdot k\right)\right) \cdot \frac{k}{\ell}}{\ell}} \]
          2. lower-+.f64N/A

            \[\leadsto \frac{2}{\frac{\left(\left(k \cdot \left(t + \frac{1}{3} \cdot \left({k}^{2} \cdot t\right)\right)\right) \cdot \left(\sin k \cdot k\right)\right) \cdot \frac{k}{\ell}}{\ell}} \]
          3. lower-*.f64N/A

            \[\leadsto \frac{2}{\frac{\left(\left(k \cdot \left(t + \frac{1}{3} \cdot \left({k}^{2} \cdot t\right)\right)\right) \cdot \left(\sin k \cdot k\right)\right) \cdot \frac{k}{\ell}}{\ell}} \]
          4. lower-*.f64N/A

            \[\leadsto \frac{2}{\frac{\left(\left(k \cdot \left(t + \frac{1}{3} \cdot \left({k}^{2} \cdot t\right)\right)\right) \cdot \left(\sin k \cdot k\right)\right) \cdot \frac{k}{\ell}}{\ell}} \]
          5. lower-pow.f6471.6

            \[\leadsto \frac{2}{\frac{\left(\left(k \cdot \left(t + 0.3333333333333333 \cdot \left({k}^{2} \cdot t\right)\right)\right) \cdot \left(\sin k \cdot k\right)\right) \cdot \frac{k}{\ell}}{\ell}} \]
        11. Applied rewrites71.6%

          \[\leadsto \frac{2}{\frac{\left(\left(k \cdot \left(t + 0.3333333333333333 \cdot \left({k}^{2} \cdot t\right)\right)\right) \cdot \left(\sin k \cdot k\right)\right) \cdot \frac{k}{\ell}}{\ell}} \]

        if 0.00139999999999999999 < k

        1. Initial program 35.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}{\frac{{k}^{2} \cdot \left(t \cdot {\sin k}^{2}\right)}{{\ell}^{2} \cdot \cos k}}} \]
        3. Step-by-step derivation
          1. lower-/.f64N/A

            \[\leadsto \frac{2}{\frac{{k}^{2} \cdot \left(t \cdot {\sin k}^{2}\right)}{\color{blue}{{\ell}^{2} \cdot \cos k}}} \]
          2. lower-*.f64N/A

            \[\leadsto \frac{2}{\frac{{k}^{2} \cdot \left(t \cdot {\sin k}^{2}\right)}{\color{blue}{{\ell}^{2}} \cdot \cos k}} \]
          3. lower-pow.f64N/A

            \[\leadsto \frac{2}{\frac{{k}^{2} \cdot \left(t \cdot {\sin k}^{2}\right)}{{\color{blue}{\ell}}^{2} \cdot \cos k}} \]
          4. lower-*.f64N/A

            \[\leadsto \frac{2}{\frac{{k}^{2} \cdot \left(t \cdot {\sin k}^{2}\right)}{{\ell}^{\color{blue}{2}} \cdot \cos k}} \]
          5. lower-pow.f64N/A

            \[\leadsto \frac{2}{\frac{{k}^{2} \cdot \left(t \cdot {\sin k}^{2}\right)}{{\ell}^{2} \cdot \cos k}} \]
          6. lower-sin.f64N/A

            \[\leadsto \frac{2}{\frac{{k}^{2} \cdot \left(t \cdot {\sin k}^{2}\right)}{{\ell}^{2} \cdot \cos k}} \]
          7. lower-*.f64N/A

            \[\leadsto \frac{2}{\frac{{k}^{2} \cdot \left(t \cdot {\sin k}^{2}\right)}{{\ell}^{2} \cdot \color{blue}{\cos k}}} \]
          8. lower-pow.f64N/A

            \[\leadsto \frac{2}{\frac{{k}^{2} \cdot \left(t \cdot {\sin k}^{2}\right)}{{\ell}^{2} \cdot \cos \color{blue}{k}}} \]
          9. lower-cos.f6473.8

            \[\leadsto \frac{2}{\frac{{k}^{2} \cdot \left(t \cdot {\sin k}^{2}\right)}{{\ell}^{2} \cdot \cos k}} \]
        4. Applied rewrites73.8%

          \[\leadsto \frac{2}{\color{blue}{\frac{{k}^{2} \cdot \left(t \cdot {\sin k}^{2}\right)}{{\ell}^{2} \cdot \cos k}}} \]
        5. Step-by-step derivation
          1. lift-/.f64N/A

            \[\leadsto \frac{2}{\frac{{k}^{2} \cdot \left(t \cdot {\sin k}^{2}\right)}{\color{blue}{{\ell}^{2} \cdot \cos k}}} \]
          2. lift-*.f64N/A

            \[\leadsto \frac{2}{\frac{{k}^{2} \cdot \left(t \cdot {\sin k}^{2}\right)}{\color{blue}{{\ell}^{2}} \cdot \cos k}} \]
          3. lift-*.f64N/A

            \[\leadsto \frac{2}{\frac{{k}^{2} \cdot \left(t \cdot {\sin k}^{2}\right)}{{\ell}^{2} \cdot \color{blue}{\cos k}}} \]
          4. times-fracN/A

            \[\leadsto \frac{2}{\frac{{k}^{2}}{{\ell}^{2}} \cdot \color{blue}{\frac{t \cdot {\sin k}^{2}}{\cos k}}} \]
          5. *-commutativeN/A

            \[\leadsto \frac{2}{\frac{t \cdot {\sin k}^{2}}{\cos k} \cdot \color{blue}{\frac{{k}^{2}}{{\ell}^{2}}}} \]
          6. lower-*.f64N/A

            \[\leadsto \frac{2}{\frac{t \cdot {\sin k}^{2}}{\cos k} \cdot \color{blue}{\frac{{k}^{2}}{{\ell}^{2}}}} \]
          7. lift-*.f64N/A

            \[\leadsto \frac{2}{\frac{t \cdot {\sin k}^{2}}{\cos k} \cdot \frac{{\color{blue}{k}}^{2}}{{\ell}^{2}}} \]
          8. associate-/l*N/A

            \[\leadsto \frac{2}{\left(t \cdot \frac{{\sin k}^{2}}{\cos k}\right) \cdot \frac{\color{blue}{{k}^{2}}}{{\ell}^{2}}} \]
          9. lower-*.f64N/A

            \[\leadsto \frac{2}{\left(t \cdot \frac{{\sin k}^{2}}{\cos k}\right) \cdot \frac{\color{blue}{{k}^{2}}}{{\ell}^{2}}} \]
          10. lift-pow.f64N/A

            \[\leadsto \frac{2}{\left(t \cdot \frac{{\sin k}^{2}}{\cos k}\right) \cdot \frac{{k}^{2}}{{\ell}^{2}}} \]
          11. unpow2N/A

            \[\leadsto \frac{2}{\left(t \cdot \frac{\sin k \cdot \sin k}{\cos k}\right) \cdot \frac{{k}^{2}}{{\ell}^{2}}} \]
          12. associate-*l/N/A

            \[\leadsto \frac{2}{\left(t \cdot \left(\frac{\sin k}{\cos k} \cdot \sin k\right)\right) \cdot \frac{{k}^{\color{blue}{2}}}{{\ell}^{2}}} \]
          13. lift-sin.f64N/A

            \[\leadsto \frac{2}{\left(t \cdot \left(\frac{\sin k}{\cos k} \cdot \sin k\right)\right) \cdot \frac{{k}^{2}}{{\ell}^{2}}} \]
          14. lift-cos.f64N/A

            \[\leadsto \frac{2}{\left(t \cdot \left(\frac{\sin k}{\cos k} \cdot \sin k\right)\right) \cdot \frac{{k}^{2}}{{\ell}^{2}}} \]
          15. tan-quotN/A

            \[\leadsto \frac{2}{\left(t \cdot \left(\tan k \cdot \sin k\right)\right) \cdot \frac{{k}^{2}}{{\ell}^{2}}} \]
          16. lift-tan.f64N/A

            \[\leadsto \frac{2}{\left(t \cdot \left(\tan k \cdot \sin k\right)\right) \cdot \frac{{k}^{2}}{{\ell}^{2}}} \]
          17. lower-*.f64N/A

            \[\leadsto \frac{2}{\left(t \cdot \left(\tan k \cdot \sin k\right)\right) \cdot \frac{{k}^{\color{blue}{2}}}{{\ell}^{2}}} \]
          18. lift-pow.f64N/A

            \[\leadsto \frac{2}{\left(t \cdot \left(\tan k \cdot \sin k\right)\right) \cdot \frac{{k}^{2}}{{\color{blue}{\ell}}^{2}}} \]
          19. unpow2N/A

            \[\leadsto \frac{2}{\left(t \cdot \left(\tan k \cdot \sin k\right)\right) \cdot \frac{k \cdot k}{{\color{blue}{\ell}}^{2}}} \]
          20. associate-/l*N/A

            \[\leadsto \frac{2}{\left(t \cdot \left(\tan k \cdot \sin k\right)\right) \cdot \left(k \cdot \color{blue}{\frac{k}{{\ell}^{2}}}\right)} \]
        6. Applied rewrites77.4%

          \[\leadsto \frac{2}{\left(t \cdot \left(\tan k \cdot \sin k\right)\right) \cdot \color{blue}{\left(k \cdot \frac{k}{\ell \cdot \ell}\right)}} \]
        7. Step-by-step derivation
          1. lift-*.f64N/A

            \[\leadsto \frac{2}{\left(t \cdot \left(\tan k \cdot \sin k\right)\right) \cdot \color{blue}{\left(k \cdot \frac{k}{\ell \cdot \ell}\right)}} \]
          2. lift-*.f64N/A

            \[\leadsto \frac{2}{\left(t \cdot \left(\tan k \cdot \sin k\right)\right) \cdot \left(k \cdot \color{blue}{\frac{k}{\ell \cdot \ell}}\right)} \]
          3. associate-*r*N/A

            \[\leadsto \frac{2}{\left(\left(t \cdot \left(\tan k \cdot \sin k\right)\right) \cdot k\right) \cdot \color{blue}{\frac{k}{\ell \cdot \ell}}} \]
          4. lift-/.f64N/A

            \[\leadsto \frac{2}{\left(\left(t \cdot \left(\tan k \cdot \sin k\right)\right) \cdot k\right) \cdot \frac{k}{\color{blue}{\ell \cdot \ell}}} \]
          5. lift-*.f64N/A

            \[\leadsto \frac{2}{\left(\left(t \cdot \left(\tan k \cdot \sin k\right)\right) \cdot k\right) \cdot \frac{k}{\ell \cdot \color{blue}{\ell}}} \]
          6. associate-/r*N/A

            \[\leadsto \frac{2}{\left(\left(t \cdot \left(\tan k \cdot \sin k\right)\right) \cdot k\right) \cdot \frac{\frac{k}{\ell}}{\color{blue}{\ell}}} \]
          7. associate-*r/N/A

            \[\leadsto \frac{2}{\frac{\left(\left(t \cdot \left(\tan k \cdot \sin k\right)\right) \cdot k\right) \cdot \frac{k}{\ell}}{\color{blue}{\ell}}} \]
          8. lower-/.f64N/A

            \[\leadsto \frac{2}{\frac{\left(\left(t \cdot \left(\tan k \cdot \sin k\right)\right) \cdot k\right) \cdot \frac{k}{\ell}}{\color{blue}{\ell}}} \]
          9. lower-*.f64N/A

            \[\leadsto \frac{2}{\frac{\left(\left(t \cdot \left(\tan k \cdot \sin k\right)\right) \cdot k\right) \cdot \frac{k}{\ell}}{\ell}} \]
          10. lift-*.f64N/A

            \[\leadsto \frac{2}{\frac{\left(\left(t \cdot \left(\tan k \cdot \sin k\right)\right) \cdot k\right) \cdot \frac{k}{\ell}}{\ell}} \]
          11. lift-*.f64N/A

            \[\leadsto \frac{2}{\frac{\left(\left(t \cdot \left(\tan k \cdot \sin k\right)\right) \cdot k\right) \cdot \frac{k}{\ell}}{\ell}} \]
          12. associate-*r*N/A

            \[\leadsto \frac{2}{\frac{\left(\left(\left(t \cdot \tan k\right) \cdot \sin k\right) \cdot k\right) \cdot \frac{k}{\ell}}{\ell}} \]
          13. associate-*l*N/A

            \[\leadsto \frac{2}{\frac{\left(\left(t \cdot \tan k\right) \cdot \left(\sin k \cdot k\right)\right) \cdot \frac{k}{\ell}}{\ell}} \]
          14. lower-*.f64N/A

            \[\leadsto \frac{2}{\frac{\left(\left(t \cdot \tan k\right) \cdot \left(\sin k \cdot k\right)\right) \cdot \frac{k}{\ell}}{\ell}} \]
          15. *-commutativeN/A

            \[\leadsto \frac{2}{\frac{\left(\left(\tan k \cdot t\right) \cdot \left(\sin k \cdot k\right)\right) \cdot \frac{k}{\ell}}{\ell}} \]
          16. lower-*.f64N/A

            \[\leadsto \frac{2}{\frac{\left(\left(\tan k \cdot t\right) \cdot \left(\sin k \cdot k\right)\right) \cdot \frac{k}{\ell}}{\ell}} \]
          17. lower-*.f64N/A

            \[\leadsto \frac{2}{\frac{\left(\left(\tan k \cdot t\right) \cdot \left(\sin k \cdot k\right)\right) \cdot \frac{k}{\ell}}{\ell}} \]
          18. lower-/.f6491.0

            \[\leadsto \frac{2}{\frac{\left(\left(\tan k \cdot t\right) \cdot \left(\sin k \cdot k\right)\right) \cdot \frac{k}{\ell}}{\ell}} \]
        8. Applied rewrites91.0%

          \[\leadsto \frac{2}{\frac{\left(\left(\tan k \cdot t\right) \cdot \left(\sin k \cdot k\right)\right) \cdot \frac{k}{\ell}}{\color{blue}{\ell}}} \]
        9. Step-by-step derivation
          1. lift-/.f64N/A

            \[\leadsto \frac{2}{\frac{\left(\left(\tan k \cdot t\right) \cdot \left(\sin k \cdot k\right)\right) \cdot \frac{k}{\ell}}{\color{blue}{\ell}}} \]
          2. lift-*.f64N/A

            \[\leadsto \frac{2}{\frac{\left(\left(\tan k \cdot t\right) \cdot \left(\sin k \cdot k\right)\right) \cdot \frac{k}{\ell}}{\ell}} \]
          3. lift-/.f64N/A

            \[\leadsto \frac{2}{\frac{\left(\left(\tan k \cdot t\right) \cdot \left(\sin k \cdot k\right)\right) \cdot \frac{k}{\ell}}{\ell}} \]
          4. associate-*r/N/A

            \[\leadsto \frac{2}{\frac{\frac{\left(\left(\tan k \cdot t\right) \cdot \left(\sin k \cdot k\right)\right) \cdot k}{\ell}}{\ell}} \]
          5. associate-/l/N/A

            \[\leadsto \frac{2}{\frac{\left(\left(\tan k \cdot t\right) \cdot \left(\sin k \cdot k\right)\right) \cdot k}{\color{blue}{\ell \cdot \ell}}} \]
          6. lift-*.f64N/A

            \[\leadsto \frac{2}{\frac{\left(\left(\tan k \cdot t\right) \cdot \left(\sin k \cdot k\right)\right) \cdot k}{\ell \cdot \color{blue}{\ell}}} \]
          7. lower-/.f64N/A

            \[\leadsto \frac{2}{\frac{\left(\left(\tan k \cdot t\right) \cdot \left(\sin k \cdot k\right)\right) \cdot k}{\color{blue}{\ell \cdot \ell}}} \]
          8. lift-*.f64N/A

            \[\leadsto \frac{2}{\frac{\left(\left(\tan k \cdot t\right) \cdot \left(\sin k \cdot k\right)\right) \cdot k}{\ell \cdot \ell}} \]
          9. *-commutativeN/A

            \[\leadsto \frac{2}{\frac{\left(\left(\sin k \cdot k\right) \cdot \left(\tan k \cdot t\right)\right) \cdot k}{\ell \cdot \ell}} \]
          10. associate-*l*N/A

            \[\leadsto \frac{2}{\frac{\left(\sin k \cdot k\right) \cdot \left(\left(\tan k \cdot t\right) \cdot k\right)}{\color{blue}{\ell} \cdot \ell}} \]
          11. lower-*.f64N/A

            \[\leadsto \frac{2}{\frac{\left(\sin k \cdot k\right) \cdot \left(\left(\tan k \cdot t\right) \cdot k\right)}{\color{blue}{\ell} \cdot \ell}} \]
          12. lower-*.f6476.1

            \[\leadsto \frac{2}{\frac{\left(\sin k \cdot k\right) \cdot \left(\left(\tan k \cdot t\right) \cdot k\right)}{\ell \cdot \ell}} \]
        10. Applied rewrites76.1%

          \[\leadsto \frac{2}{\color{blue}{\frac{\left(\sin k \cdot k\right) \cdot \left(\left(\tan k \cdot t\right) \cdot k\right)}{\ell \cdot \ell}}} \]
      3. Recombined 2 regimes into one program.
      4. Add Preprocessing

      Alternative 13: 74.6% accurate, 1.5× speedup?

      \[\mathsf{copysign}\left(1, t\right) \cdot \begin{array}{l} \mathbf{if}\;\left|t\right| \leq 6 \cdot 10^{-83}:\\ \;\;\;\;\frac{2}{k \cdot \left(k \cdot \frac{\frac{\left|t\right|}{\ell} \cdot \left(\sin k \cdot k\right)}{\ell}\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{2}{\frac{\left(\left(\tan k \cdot \left|t\right|\right) \cdot {k}^{2}\right) \cdot \frac{k}{\ell}}{\ell}}\\ \end{array} \]
      (FPCore (t l k)
       :precision binary64
       (*
        (copysign 1.0 t)
        (if (<= (fabs t) 6e-83)
          (/ 2.0 (* k (* k (/ (* (/ (fabs t) l) (* (sin k) k)) l))))
          (/ 2.0 (/ (* (* (* (tan k) (fabs t)) (pow k 2.0)) (/ k l)) l)))))
      double code(double t, double l, double k) {
      	double tmp;
      	if (fabs(t) <= 6e-83) {
      		tmp = 2.0 / (k * (k * (((fabs(t) / l) * (sin(k) * k)) / l)));
      	} else {
      		tmp = 2.0 / ((((tan(k) * fabs(t)) * pow(k, 2.0)) * (k / l)) / l);
      	}
      	return copysign(1.0, t) * tmp;
      }
      
      public static double code(double t, double l, double k) {
      	double tmp;
      	if (Math.abs(t) <= 6e-83) {
      		tmp = 2.0 / (k * (k * (((Math.abs(t) / l) * (Math.sin(k) * k)) / l)));
      	} else {
      		tmp = 2.0 / ((((Math.tan(k) * Math.abs(t)) * Math.pow(k, 2.0)) * (k / l)) / l);
      	}
      	return Math.copySign(1.0, t) * tmp;
      }
      
      def code(t, l, k):
      	tmp = 0
      	if math.fabs(t) <= 6e-83:
      		tmp = 2.0 / (k * (k * (((math.fabs(t) / l) * (math.sin(k) * k)) / l)))
      	else:
      		tmp = 2.0 / ((((math.tan(k) * math.fabs(t)) * math.pow(k, 2.0)) * (k / l)) / l)
      	return math.copysign(1.0, t) * tmp
      
      function code(t, l, k)
      	tmp = 0.0
      	if (abs(t) <= 6e-83)
      		tmp = Float64(2.0 / Float64(k * Float64(k * Float64(Float64(Float64(abs(t) / l) * Float64(sin(k) * k)) / l))));
      	else
      		tmp = Float64(2.0 / Float64(Float64(Float64(Float64(tan(k) * abs(t)) * (k ^ 2.0)) * Float64(k / l)) / l));
      	end
      	return Float64(copysign(1.0, t) * tmp)
      end
      
      function tmp_2 = code(t, l, k)
      	tmp = 0.0;
      	if (abs(t) <= 6e-83)
      		tmp = 2.0 / (k * (k * (((abs(t) / l) * (sin(k) * k)) / l)));
      	else
      		tmp = 2.0 / ((((tan(k) * abs(t)) * (k ^ 2.0)) * (k / l)) / l);
      	end
      	tmp_2 = (sign(t) * abs(1.0)) * tmp;
      end
      
      code[t_, l_, k_] := N[(N[With[{TMP1 = Abs[1.0], TMP2 = Sign[t]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision] * If[LessEqual[N[Abs[t], $MachinePrecision], 6e-83], N[(2.0 / N[(k * N[(k * N[(N[(N[(N[Abs[t], $MachinePrecision] / l), $MachinePrecision] * N[(N[Sin[k], $MachinePrecision] * k), $MachinePrecision]), $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(2.0 / N[(N[(N[(N[(N[Tan[k], $MachinePrecision] * N[Abs[t], $MachinePrecision]), $MachinePrecision] * N[Power[k, 2.0], $MachinePrecision]), $MachinePrecision] * N[(k / l), $MachinePrecision]), $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision]]), $MachinePrecision]
      
      \mathsf{copysign}\left(1, t\right) \cdot \begin{array}{l}
      \mathbf{if}\;\left|t\right| \leq 6 \cdot 10^{-83}:\\
      \;\;\;\;\frac{2}{k \cdot \left(k \cdot \frac{\frac{\left|t\right|}{\ell} \cdot \left(\sin k \cdot k\right)}{\ell}\right)}\\
      
      \mathbf{else}:\\
      \;\;\;\;\frac{2}{\frac{\left(\left(\tan k \cdot \left|t\right|\right) \cdot {k}^{2}\right) \cdot \frac{k}{\ell}}{\ell}}\\
      
      
      \end{array}
      
      Derivation
      1. Split input into 2 regimes
      2. if t < 6.00000000000000021e-83

        1. Initial program 35.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}{\frac{{k}^{2} \cdot \left(t \cdot {\sin k}^{2}\right)}{{\ell}^{2} \cdot \cos k}}} \]
        3. Step-by-step derivation
          1. lower-/.f64N/A

            \[\leadsto \frac{2}{\frac{{k}^{2} \cdot \left(t \cdot {\sin k}^{2}\right)}{\color{blue}{{\ell}^{2} \cdot \cos k}}} \]
          2. lower-*.f64N/A

            \[\leadsto \frac{2}{\frac{{k}^{2} \cdot \left(t \cdot {\sin k}^{2}\right)}{\color{blue}{{\ell}^{2}} \cdot \cos k}} \]
          3. lower-pow.f64N/A

            \[\leadsto \frac{2}{\frac{{k}^{2} \cdot \left(t \cdot {\sin k}^{2}\right)}{{\color{blue}{\ell}}^{2} \cdot \cos k}} \]
          4. lower-*.f64N/A

            \[\leadsto \frac{2}{\frac{{k}^{2} \cdot \left(t \cdot {\sin k}^{2}\right)}{{\ell}^{\color{blue}{2}} \cdot \cos k}} \]
          5. lower-pow.f64N/A

            \[\leadsto \frac{2}{\frac{{k}^{2} \cdot \left(t \cdot {\sin k}^{2}\right)}{{\ell}^{2} \cdot \cos k}} \]
          6. lower-sin.f64N/A

            \[\leadsto \frac{2}{\frac{{k}^{2} \cdot \left(t \cdot {\sin k}^{2}\right)}{{\ell}^{2} \cdot \cos k}} \]
          7. lower-*.f64N/A

            \[\leadsto \frac{2}{\frac{{k}^{2} \cdot \left(t \cdot {\sin k}^{2}\right)}{{\ell}^{2} \cdot \color{blue}{\cos k}}} \]
          8. lower-pow.f64N/A

            \[\leadsto \frac{2}{\frac{{k}^{2} \cdot \left(t \cdot {\sin k}^{2}\right)}{{\ell}^{2} \cdot \cos \color{blue}{k}}} \]
          9. lower-cos.f6473.8

            \[\leadsto \frac{2}{\frac{{k}^{2} \cdot \left(t \cdot {\sin k}^{2}\right)}{{\ell}^{2} \cdot \cos k}} \]
        4. Applied rewrites73.8%

          \[\leadsto \frac{2}{\color{blue}{\frac{{k}^{2} \cdot \left(t \cdot {\sin k}^{2}\right)}{{\ell}^{2} \cdot \cos k}}} \]
        5. Step-by-step derivation
          1. lift-/.f64N/A

            \[\leadsto \frac{2}{\frac{{k}^{2} \cdot \left(t \cdot {\sin k}^{2}\right)}{\color{blue}{{\ell}^{2} \cdot \cos k}}} \]
          2. lift-*.f64N/A

            \[\leadsto \frac{2}{\frac{{k}^{2} \cdot \left(t \cdot {\sin k}^{2}\right)}{\color{blue}{{\ell}^{2}} \cdot \cos k}} \]
          3. associate-/l*N/A

            \[\leadsto \frac{2}{{k}^{2} \cdot \color{blue}{\frac{t \cdot {\sin k}^{2}}{{\ell}^{2} \cdot \cos k}}} \]
          4. lift-pow.f64N/A

            \[\leadsto \frac{2}{{k}^{2} \cdot \frac{\color{blue}{t \cdot {\sin k}^{2}}}{{\ell}^{2} \cdot \cos k}} \]
          5. unpow2N/A

            \[\leadsto \frac{2}{\left(k \cdot k\right) \cdot \frac{\color{blue}{t \cdot {\sin k}^{2}}}{{\ell}^{2} \cdot \cos k}} \]
          6. associate-*l*N/A

            \[\leadsto \frac{2}{k \cdot \color{blue}{\left(k \cdot \frac{t \cdot {\sin k}^{2}}{{\ell}^{2} \cdot \cos k}\right)}} \]
          7. lower-*.f64N/A

            \[\leadsto \frac{2}{k \cdot \color{blue}{\left(k \cdot \frac{t \cdot {\sin k}^{2}}{{\ell}^{2} \cdot \cos k}\right)}} \]
          8. lower-*.f64N/A

            \[\leadsto \frac{2}{k \cdot \left(k \cdot \color{blue}{\frac{t \cdot {\sin k}^{2}}{{\ell}^{2} \cdot \cos k}}\right)} \]
          9. lift-*.f64N/A

            \[\leadsto \frac{2}{k \cdot \left(k \cdot \frac{t \cdot {\sin k}^{2}}{\color{blue}{{\ell}^{2}} \cdot \cos k}\right)} \]
          10. *-commutativeN/A

            \[\leadsto \frac{2}{k \cdot \left(k \cdot \frac{{\sin k}^{2} \cdot t}{\color{blue}{{\ell}^{2}} \cdot \cos k}\right)} \]
          11. lift-*.f64N/A

            \[\leadsto \frac{2}{k \cdot \left(k \cdot \frac{{\sin k}^{2} \cdot t}{{\ell}^{2} \cdot \color{blue}{\cos k}}\right)} \]
          12. *-commutativeN/A

            \[\leadsto \frac{2}{k \cdot \left(k \cdot \frac{{\sin k}^{2} \cdot t}{\cos k \cdot \color{blue}{{\ell}^{2}}}\right)} \]
          13. times-fracN/A

            \[\leadsto \frac{2}{k \cdot \left(k \cdot \left(\frac{{\sin k}^{2}}{\cos k} \cdot \color{blue}{\frac{t}{{\ell}^{2}}}\right)\right)} \]
          14. lift-pow.f64N/A

            \[\leadsto \frac{2}{k \cdot \left(k \cdot \left(\frac{{\sin k}^{2}}{\cos k} \cdot \frac{t}{{\ell}^{\color{blue}{2}}}\right)\right)} \]
          15. pow2N/A

            \[\leadsto \frac{2}{k \cdot \left(k \cdot \left(\frac{{\sin k}^{2}}{\cos k} \cdot \frac{t}{\ell \cdot \color{blue}{\ell}}\right)\right)} \]
          16. lift-*.f64N/A

            \[\leadsto \frac{2}{k \cdot \left(k \cdot \left(\frac{{\sin k}^{2}}{\cos k} \cdot \frac{t}{\ell \cdot \color{blue}{\ell}}\right)\right)} \]
          17. lift-/.f64N/A

            \[\leadsto \frac{2}{k \cdot \left(k \cdot \left(\frac{{\sin k}^{2}}{\cos k} \cdot \frac{t}{\color{blue}{\ell \cdot \ell}}\right)\right)} \]
          18. lower-*.f64N/A

            \[\leadsto \frac{2}{k \cdot \left(k \cdot \left(\frac{{\sin k}^{2}}{\cos k} \cdot \color{blue}{\frac{t}{\ell \cdot \ell}}\right)\right)} \]
        6. Applied rewrites75.4%

          \[\leadsto \frac{2}{k \cdot \color{blue}{\left(k \cdot \left(\left(\tan k \cdot \sin k\right) \cdot \frac{t}{\ell \cdot \ell}\right)\right)}} \]
        7. Step-by-step derivation
          1. lift-*.f64N/A

            \[\leadsto \frac{2}{k \cdot \left(k \cdot \left(\left(\tan k \cdot \sin k\right) \cdot \color{blue}{\frac{t}{\ell \cdot \ell}}\right)\right)} \]
          2. *-commutativeN/A

            \[\leadsto \frac{2}{k \cdot \left(k \cdot \left(\frac{t}{\ell \cdot \ell} \cdot \color{blue}{\left(\tan k \cdot \sin k\right)}\right)\right)} \]
          3. lift-/.f64N/A

            \[\leadsto \frac{2}{k \cdot \left(k \cdot \left(\frac{t}{\ell \cdot \ell} \cdot \left(\color{blue}{\tan k} \cdot \sin k\right)\right)\right)} \]
          4. lift-*.f64N/A

            \[\leadsto \frac{2}{k \cdot \left(k \cdot \left(\frac{t}{\ell \cdot \ell} \cdot \left(\tan k \cdot \sin k\right)\right)\right)} \]
          5. associate-/r*N/A

            \[\leadsto \frac{2}{k \cdot \left(k \cdot \left(\frac{\frac{t}{\ell}}{\ell} \cdot \left(\color{blue}{\tan k} \cdot \sin k\right)\right)\right)} \]
          6. associate-*l/N/A

            \[\leadsto \frac{2}{k \cdot \left(k \cdot \frac{\frac{t}{\ell} \cdot \left(\tan k \cdot \sin k\right)}{\color{blue}{\ell}}\right)} \]
          7. lower-/.f64N/A

            \[\leadsto \frac{2}{k \cdot \left(k \cdot \frac{\frac{t}{\ell} \cdot \left(\tan k \cdot \sin k\right)}{\color{blue}{\ell}}\right)} \]
          8. lower-*.f64N/A

            \[\leadsto \frac{2}{k \cdot \left(k \cdot \frac{\frac{t}{\ell} \cdot \left(\tan k \cdot \sin k\right)}{\ell}\right)} \]
          9. lower-/.f6486.5

            \[\leadsto \frac{2}{k \cdot \left(k \cdot \frac{\frac{t}{\ell} \cdot \left(\tan k \cdot \sin k\right)}{\ell}\right)} \]
          10. lift-*.f64N/A

            \[\leadsto \frac{2}{k \cdot \left(k \cdot \frac{\frac{t}{\ell} \cdot \left(\tan k \cdot \sin k\right)}{\ell}\right)} \]
          11. *-commutativeN/A

            \[\leadsto \frac{2}{k \cdot \left(k \cdot \frac{\frac{t}{\ell} \cdot \left(\sin k \cdot \tan k\right)}{\ell}\right)} \]
          12. lower-*.f6486.5

            \[\leadsto \frac{2}{k \cdot \left(k \cdot \frac{\frac{t}{\ell} \cdot \left(\sin k \cdot \tan k\right)}{\ell}\right)} \]
        8. Applied rewrites86.5%

          \[\leadsto \frac{2}{k \cdot \left(k \cdot \frac{\frac{t}{\ell} \cdot \left(\sin k \cdot \tan k\right)}{\color{blue}{\ell}}\right)} \]
        9. Taylor expanded in k around 0

          \[\leadsto \frac{2}{k \cdot \left(k \cdot \frac{\frac{t}{\ell} \cdot \left(\sin k \cdot k\right)}{\ell}\right)} \]
        10. Step-by-step derivation
          1. Applied rewrites71.7%

            \[\leadsto \frac{2}{k \cdot \left(k \cdot \frac{\frac{t}{\ell} \cdot \left(\sin k \cdot k\right)}{\ell}\right)} \]

          if 6.00000000000000021e-83 < t

          1. Initial program 35.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}{\frac{{k}^{2} \cdot \left(t \cdot {\sin k}^{2}\right)}{{\ell}^{2} \cdot \cos k}}} \]
          3. Step-by-step derivation
            1. lower-/.f64N/A

              \[\leadsto \frac{2}{\frac{{k}^{2} \cdot \left(t \cdot {\sin k}^{2}\right)}{\color{blue}{{\ell}^{2} \cdot \cos k}}} \]
            2. lower-*.f64N/A

              \[\leadsto \frac{2}{\frac{{k}^{2} \cdot \left(t \cdot {\sin k}^{2}\right)}{\color{blue}{{\ell}^{2}} \cdot \cos k}} \]
            3. lower-pow.f64N/A

              \[\leadsto \frac{2}{\frac{{k}^{2} \cdot \left(t \cdot {\sin k}^{2}\right)}{{\color{blue}{\ell}}^{2} \cdot \cos k}} \]
            4. lower-*.f64N/A

              \[\leadsto \frac{2}{\frac{{k}^{2} \cdot \left(t \cdot {\sin k}^{2}\right)}{{\ell}^{\color{blue}{2}} \cdot \cos k}} \]
            5. lower-pow.f64N/A

              \[\leadsto \frac{2}{\frac{{k}^{2} \cdot \left(t \cdot {\sin k}^{2}\right)}{{\ell}^{2} \cdot \cos k}} \]
            6. lower-sin.f64N/A

              \[\leadsto \frac{2}{\frac{{k}^{2} \cdot \left(t \cdot {\sin k}^{2}\right)}{{\ell}^{2} \cdot \cos k}} \]
            7. lower-*.f64N/A

              \[\leadsto \frac{2}{\frac{{k}^{2} \cdot \left(t \cdot {\sin k}^{2}\right)}{{\ell}^{2} \cdot \color{blue}{\cos k}}} \]
            8. lower-pow.f64N/A

              \[\leadsto \frac{2}{\frac{{k}^{2} \cdot \left(t \cdot {\sin k}^{2}\right)}{{\ell}^{2} \cdot \cos \color{blue}{k}}} \]
            9. lower-cos.f6473.8

              \[\leadsto \frac{2}{\frac{{k}^{2} \cdot \left(t \cdot {\sin k}^{2}\right)}{{\ell}^{2} \cdot \cos k}} \]
          4. Applied rewrites73.8%

            \[\leadsto \frac{2}{\color{blue}{\frac{{k}^{2} \cdot \left(t \cdot {\sin k}^{2}\right)}{{\ell}^{2} \cdot \cos k}}} \]
          5. Step-by-step derivation
            1. lift-/.f64N/A

              \[\leadsto \frac{2}{\frac{{k}^{2} \cdot \left(t \cdot {\sin k}^{2}\right)}{\color{blue}{{\ell}^{2} \cdot \cos k}}} \]
            2. lift-*.f64N/A

              \[\leadsto \frac{2}{\frac{{k}^{2} \cdot \left(t \cdot {\sin k}^{2}\right)}{\color{blue}{{\ell}^{2}} \cdot \cos k}} \]
            3. lift-*.f64N/A

              \[\leadsto \frac{2}{\frac{{k}^{2} \cdot \left(t \cdot {\sin k}^{2}\right)}{{\ell}^{2} \cdot \color{blue}{\cos k}}} \]
            4. times-fracN/A

              \[\leadsto \frac{2}{\frac{{k}^{2}}{{\ell}^{2}} \cdot \color{blue}{\frac{t \cdot {\sin k}^{2}}{\cos k}}} \]
            5. *-commutativeN/A

              \[\leadsto \frac{2}{\frac{t \cdot {\sin k}^{2}}{\cos k} \cdot \color{blue}{\frac{{k}^{2}}{{\ell}^{2}}}} \]
            6. lower-*.f64N/A

              \[\leadsto \frac{2}{\frac{t \cdot {\sin k}^{2}}{\cos k} \cdot \color{blue}{\frac{{k}^{2}}{{\ell}^{2}}}} \]
            7. lift-*.f64N/A

              \[\leadsto \frac{2}{\frac{t \cdot {\sin k}^{2}}{\cos k} \cdot \frac{{\color{blue}{k}}^{2}}{{\ell}^{2}}} \]
            8. associate-/l*N/A

              \[\leadsto \frac{2}{\left(t \cdot \frac{{\sin k}^{2}}{\cos k}\right) \cdot \frac{\color{blue}{{k}^{2}}}{{\ell}^{2}}} \]
            9. lower-*.f64N/A

              \[\leadsto \frac{2}{\left(t \cdot \frac{{\sin k}^{2}}{\cos k}\right) \cdot \frac{\color{blue}{{k}^{2}}}{{\ell}^{2}}} \]
            10. lift-pow.f64N/A

              \[\leadsto \frac{2}{\left(t \cdot \frac{{\sin k}^{2}}{\cos k}\right) \cdot \frac{{k}^{2}}{{\ell}^{2}}} \]
            11. unpow2N/A

              \[\leadsto \frac{2}{\left(t \cdot \frac{\sin k \cdot \sin k}{\cos k}\right) \cdot \frac{{k}^{2}}{{\ell}^{2}}} \]
            12. associate-*l/N/A

              \[\leadsto \frac{2}{\left(t \cdot \left(\frac{\sin k}{\cos k} \cdot \sin k\right)\right) \cdot \frac{{k}^{\color{blue}{2}}}{{\ell}^{2}}} \]
            13. lift-sin.f64N/A

              \[\leadsto \frac{2}{\left(t \cdot \left(\frac{\sin k}{\cos k} \cdot \sin k\right)\right) \cdot \frac{{k}^{2}}{{\ell}^{2}}} \]
            14. lift-cos.f64N/A

              \[\leadsto \frac{2}{\left(t \cdot \left(\frac{\sin k}{\cos k} \cdot \sin k\right)\right) \cdot \frac{{k}^{2}}{{\ell}^{2}}} \]
            15. tan-quotN/A

              \[\leadsto \frac{2}{\left(t \cdot \left(\tan k \cdot \sin k\right)\right) \cdot \frac{{k}^{2}}{{\ell}^{2}}} \]
            16. lift-tan.f64N/A

              \[\leadsto \frac{2}{\left(t \cdot \left(\tan k \cdot \sin k\right)\right) \cdot \frac{{k}^{2}}{{\ell}^{2}}} \]
            17. lower-*.f64N/A

              \[\leadsto \frac{2}{\left(t \cdot \left(\tan k \cdot \sin k\right)\right) \cdot \frac{{k}^{\color{blue}{2}}}{{\ell}^{2}}} \]
            18. lift-pow.f64N/A

              \[\leadsto \frac{2}{\left(t \cdot \left(\tan k \cdot \sin k\right)\right) \cdot \frac{{k}^{2}}{{\color{blue}{\ell}}^{2}}} \]
            19. unpow2N/A

              \[\leadsto \frac{2}{\left(t \cdot \left(\tan k \cdot \sin k\right)\right) \cdot \frac{k \cdot k}{{\color{blue}{\ell}}^{2}}} \]
            20. associate-/l*N/A

              \[\leadsto \frac{2}{\left(t \cdot \left(\tan k \cdot \sin k\right)\right) \cdot \left(k \cdot \color{blue}{\frac{k}{{\ell}^{2}}}\right)} \]
          6. Applied rewrites77.4%

            \[\leadsto \frac{2}{\left(t \cdot \left(\tan k \cdot \sin k\right)\right) \cdot \color{blue}{\left(k \cdot \frac{k}{\ell \cdot \ell}\right)}} \]
          7. Step-by-step derivation
            1. lift-*.f64N/A

              \[\leadsto \frac{2}{\left(t \cdot \left(\tan k \cdot \sin k\right)\right) \cdot \color{blue}{\left(k \cdot \frac{k}{\ell \cdot \ell}\right)}} \]
            2. lift-*.f64N/A

              \[\leadsto \frac{2}{\left(t \cdot \left(\tan k \cdot \sin k\right)\right) \cdot \left(k \cdot \color{blue}{\frac{k}{\ell \cdot \ell}}\right)} \]
            3. associate-*r*N/A

              \[\leadsto \frac{2}{\left(\left(t \cdot \left(\tan k \cdot \sin k\right)\right) \cdot k\right) \cdot \color{blue}{\frac{k}{\ell \cdot \ell}}} \]
            4. lift-/.f64N/A

              \[\leadsto \frac{2}{\left(\left(t \cdot \left(\tan k \cdot \sin k\right)\right) \cdot k\right) \cdot \frac{k}{\color{blue}{\ell \cdot \ell}}} \]
            5. lift-*.f64N/A

              \[\leadsto \frac{2}{\left(\left(t \cdot \left(\tan k \cdot \sin k\right)\right) \cdot k\right) \cdot \frac{k}{\ell \cdot \color{blue}{\ell}}} \]
            6. associate-/r*N/A

              \[\leadsto \frac{2}{\left(\left(t \cdot \left(\tan k \cdot \sin k\right)\right) \cdot k\right) \cdot \frac{\frac{k}{\ell}}{\color{blue}{\ell}}} \]
            7. associate-*r/N/A

              \[\leadsto \frac{2}{\frac{\left(\left(t \cdot \left(\tan k \cdot \sin k\right)\right) \cdot k\right) \cdot \frac{k}{\ell}}{\color{blue}{\ell}}} \]
            8. lower-/.f64N/A

              \[\leadsto \frac{2}{\frac{\left(\left(t \cdot \left(\tan k \cdot \sin k\right)\right) \cdot k\right) \cdot \frac{k}{\ell}}{\color{blue}{\ell}}} \]
            9. lower-*.f64N/A

              \[\leadsto \frac{2}{\frac{\left(\left(t \cdot \left(\tan k \cdot \sin k\right)\right) \cdot k\right) \cdot \frac{k}{\ell}}{\ell}} \]
            10. lift-*.f64N/A

              \[\leadsto \frac{2}{\frac{\left(\left(t \cdot \left(\tan k \cdot \sin k\right)\right) \cdot k\right) \cdot \frac{k}{\ell}}{\ell}} \]
            11. lift-*.f64N/A

              \[\leadsto \frac{2}{\frac{\left(\left(t \cdot \left(\tan k \cdot \sin k\right)\right) \cdot k\right) \cdot \frac{k}{\ell}}{\ell}} \]
            12. associate-*r*N/A

              \[\leadsto \frac{2}{\frac{\left(\left(\left(t \cdot \tan k\right) \cdot \sin k\right) \cdot k\right) \cdot \frac{k}{\ell}}{\ell}} \]
            13. associate-*l*N/A

              \[\leadsto \frac{2}{\frac{\left(\left(t \cdot \tan k\right) \cdot \left(\sin k \cdot k\right)\right) \cdot \frac{k}{\ell}}{\ell}} \]
            14. lower-*.f64N/A

              \[\leadsto \frac{2}{\frac{\left(\left(t \cdot \tan k\right) \cdot \left(\sin k \cdot k\right)\right) \cdot \frac{k}{\ell}}{\ell}} \]
            15. *-commutativeN/A

              \[\leadsto \frac{2}{\frac{\left(\left(\tan k \cdot t\right) \cdot \left(\sin k \cdot k\right)\right) \cdot \frac{k}{\ell}}{\ell}} \]
            16. lower-*.f64N/A

              \[\leadsto \frac{2}{\frac{\left(\left(\tan k \cdot t\right) \cdot \left(\sin k \cdot k\right)\right) \cdot \frac{k}{\ell}}{\ell}} \]
            17. lower-*.f64N/A

              \[\leadsto \frac{2}{\frac{\left(\left(\tan k \cdot t\right) \cdot \left(\sin k \cdot k\right)\right) \cdot \frac{k}{\ell}}{\ell}} \]
            18. lower-/.f6491.0

              \[\leadsto \frac{2}{\frac{\left(\left(\tan k \cdot t\right) \cdot \left(\sin k \cdot k\right)\right) \cdot \frac{k}{\ell}}{\ell}} \]
          8. Applied rewrites91.0%

            \[\leadsto \frac{2}{\frac{\left(\left(\tan k \cdot t\right) \cdot \left(\sin k \cdot k\right)\right) \cdot \frac{k}{\ell}}{\color{blue}{\ell}}} \]
          9. Taylor expanded in k around 0

            \[\leadsto \frac{2}{\frac{\left(\left(\tan k \cdot t\right) \cdot {k}^{2}\right) \cdot \frac{k}{\ell}}{\ell}} \]
          10. Step-by-step derivation
            1. lower-pow.f6472.1

              \[\leadsto \frac{2}{\frac{\left(\left(\tan k \cdot t\right) \cdot {k}^{2}\right) \cdot \frac{k}{\ell}}{\ell}} \]
          11. Applied rewrites72.1%

            \[\leadsto \frac{2}{\frac{\left(\left(\tan k \cdot t\right) \cdot {k}^{2}\right) \cdot \frac{k}{\ell}}{\ell}} \]
        11. Recombined 2 regimes into one program.
        12. Add Preprocessing

        Alternative 14: 74.2% accurate, 1.9× speedup?

        \[\begin{array}{l} t_1 := \sin k \cdot k\\ \mathsf{copysign}\left(1, t\right) \cdot \begin{array}{l} \mathbf{if}\;\left|t\right| \leq 10^{+98}:\\ \;\;\;\;\frac{2}{k \cdot \left(k \cdot \frac{\frac{\left|t\right|}{\ell} \cdot t\_1}{\ell}\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{2}{\frac{\left(\left(k \cdot \left|t\right|\right) \cdot t\_1\right) \cdot \frac{k}{\ell}}{\ell}}\\ \end{array} \end{array} \]
        (FPCore (t l k)
         :precision binary64
         (let* ((t_1 (* (sin k) k)))
           (*
            (copysign 1.0 t)
            (if (<= (fabs t) 1e+98)
              (/ 2.0 (* k (* k (/ (* (/ (fabs t) l) t_1) l))))
              (/ 2.0 (/ (* (* (* k (fabs t)) t_1) (/ k l)) l))))))
        double code(double t, double l, double k) {
        	double t_1 = sin(k) * k;
        	double tmp;
        	if (fabs(t) <= 1e+98) {
        		tmp = 2.0 / (k * (k * (((fabs(t) / l) * t_1) / l)));
        	} else {
        		tmp = 2.0 / ((((k * fabs(t)) * t_1) * (k / l)) / l);
        	}
        	return copysign(1.0, t) * tmp;
        }
        
        public static double code(double t, double l, double k) {
        	double t_1 = Math.sin(k) * k;
        	double tmp;
        	if (Math.abs(t) <= 1e+98) {
        		tmp = 2.0 / (k * (k * (((Math.abs(t) / l) * t_1) / l)));
        	} else {
        		tmp = 2.0 / ((((k * Math.abs(t)) * t_1) * (k / l)) / l);
        	}
        	return Math.copySign(1.0, t) * tmp;
        }
        
        def code(t, l, k):
        	t_1 = math.sin(k) * k
        	tmp = 0
        	if math.fabs(t) <= 1e+98:
        		tmp = 2.0 / (k * (k * (((math.fabs(t) / l) * t_1) / l)))
        	else:
        		tmp = 2.0 / ((((k * math.fabs(t)) * t_1) * (k / l)) / l)
        	return math.copysign(1.0, t) * tmp
        
        function code(t, l, k)
        	t_1 = Float64(sin(k) * k)
        	tmp = 0.0
        	if (abs(t) <= 1e+98)
        		tmp = Float64(2.0 / Float64(k * Float64(k * Float64(Float64(Float64(abs(t) / l) * t_1) / l))));
        	else
        		tmp = Float64(2.0 / Float64(Float64(Float64(Float64(k * abs(t)) * t_1) * Float64(k / l)) / l));
        	end
        	return Float64(copysign(1.0, t) * tmp)
        end
        
        function tmp_2 = code(t, l, k)
        	t_1 = sin(k) * k;
        	tmp = 0.0;
        	if (abs(t) <= 1e+98)
        		tmp = 2.0 / (k * (k * (((abs(t) / l) * t_1) / l)));
        	else
        		tmp = 2.0 / ((((k * abs(t)) * t_1) * (k / l)) / l);
        	end
        	tmp_2 = (sign(t) * abs(1.0)) * tmp;
        end
        
        code[t_, l_, k_] := Block[{t$95$1 = N[(N[Sin[k], $MachinePrecision] * k), $MachinePrecision]}, N[(N[With[{TMP1 = Abs[1.0], TMP2 = Sign[t]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision] * If[LessEqual[N[Abs[t], $MachinePrecision], 1e+98], N[(2.0 / N[(k * N[(k * N[(N[(N[(N[Abs[t], $MachinePrecision] / l), $MachinePrecision] * t$95$1), $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(2.0 / N[(N[(N[(N[(k * N[Abs[t], $MachinePrecision]), $MachinePrecision] * t$95$1), $MachinePrecision] * N[(k / l), $MachinePrecision]), $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision]]), $MachinePrecision]]
        
        \begin{array}{l}
        t_1 := \sin k \cdot k\\
        \mathsf{copysign}\left(1, t\right) \cdot \begin{array}{l}
        \mathbf{if}\;\left|t\right| \leq 10^{+98}:\\
        \;\;\;\;\frac{2}{k \cdot \left(k \cdot \frac{\frac{\left|t\right|}{\ell} \cdot t\_1}{\ell}\right)}\\
        
        \mathbf{else}:\\
        \;\;\;\;\frac{2}{\frac{\left(\left(k \cdot \left|t\right|\right) \cdot t\_1\right) \cdot \frac{k}{\ell}}{\ell}}\\
        
        
        \end{array}
        \end{array}
        
        Derivation
        1. Split input into 2 regimes
        2. if t < 9.99999999999999998e97

          1. Initial program 35.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}{\frac{{k}^{2} \cdot \left(t \cdot {\sin k}^{2}\right)}{{\ell}^{2} \cdot \cos k}}} \]
          3. Step-by-step derivation
            1. lower-/.f64N/A

              \[\leadsto \frac{2}{\frac{{k}^{2} \cdot \left(t \cdot {\sin k}^{2}\right)}{\color{blue}{{\ell}^{2} \cdot \cos k}}} \]
            2. lower-*.f64N/A

              \[\leadsto \frac{2}{\frac{{k}^{2} \cdot \left(t \cdot {\sin k}^{2}\right)}{\color{blue}{{\ell}^{2}} \cdot \cos k}} \]
            3. lower-pow.f64N/A

              \[\leadsto \frac{2}{\frac{{k}^{2} \cdot \left(t \cdot {\sin k}^{2}\right)}{{\color{blue}{\ell}}^{2} \cdot \cos k}} \]
            4. lower-*.f64N/A

              \[\leadsto \frac{2}{\frac{{k}^{2} \cdot \left(t \cdot {\sin k}^{2}\right)}{{\ell}^{\color{blue}{2}} \cdot \cos k}} \]
            5. lower-pow.f64N/A

              \[\leadsto \frac{2}{\frac{{k}^{2} \cdot \left(t \cdot {\sin k}^{2}\right)}{{\ell}^{2} \cdot \cos k}} \]
            6. lower-sin.f64N/A

              \[\leadsto \frac{2}{\frac{{k}^{2} \cdot \left(t \cdot {\sin k}^{2}\right)}{{\ell}^{2} \cdot \cos k}} \]
            7. lower-*.f64N/A

              \[\leadsto \frac{2}{\frac{{k}^{2} \cdot \left(t \cdot {\sin k}^{2}\right)}{{\ell}^{2} \cdot \color{blue}{\cos k}}} \]
            8. lower-pow.f64N/A

              \[\leadsto \frac{2}{\frac{{k}^{2} \cdot \left(t \cdot {\sin k}^{2}\right)}{{\ell}^{2} \cdot \cos \color{blue}{k}}} \]
            9. lower-cos.f6473.8

              \[\leadsto \frac{2}{\frac{{k}^{2} \cdot \left(t \cdot {\sin k}^{2}\right)}{{\ell}^{2} \cdot \cos k}} \]
          4. Applied rewrites73.8%

            \[\leadsto \frac{2}{\color{blue}{\frac{{k}^{2} \cdot \left(t \cdot {\sin k}^{2}\right)}{{\ell}^{2} \cdot \cos k}}} \]
          5. Step-by-step derivation
            1. lift-/.f64N/A

              \[\leadsto \frac{2}{\frac{{k}^{2} \cdot \left(t \cdot {\sin k}^{2}\right)}{\color{blue}{{\ell}^{2} \cdot \cos k}}} \]
            2. lift-*.f64N/A

              \[\leadsto \frac{2}{\frac{{k}^{2} \cdot \left(t \cdot {\sin k}^{2}\right)}{\color{blue}{{\ell}^{2}} \cdot \cos k}} \]
            3. associate-/l*N/A

              \[\leadsto \frac{2}{{k}^{2} \cdot \color{blue}{\frac{t \cdot {\sin k}^{2}}{{\ell}^{2} \cdot \cos k}}} \]
            4. lift-pow.f64N/A

              \[\leadsto \frac{2}{{k}^{2} \cdot \frac{\color{blue}{t \cdot {\sin k}^{2}}}{{\ell}^{2} \cdot \cos k}} \]
            5. unpow2N/A

              \[\leadsto \frac{2}{\left(k \cdot k\right) \cdot \frac{\color{blue}{t \cdot {\sin k}^{2}}}{{\ell}^{2} \cdot \cos k}} \]
            6. associate-*l*N/A

              \[\leadsto \frac{2}{k \cdot \color{blue}{\left(k \cdot \frac{t \cdot {\sin k}^{2}}{{\ell}^{2} \cdot \cos k}\right)}} \]
            7. lower-*.f64N/A

              \[\leadsto \frac{2}{k \cdot \color{blue}{\left(k \cdot \frac{t \cdot {\sin k}^{2}}{{\ell}^{2} \cdot \cos k}\right)}} \]
            8. lower-*.f64N/A

              \[\leadsto \frac{2}{k \cdot \left(k \cdot \color{blue}{\frac{t \cdot {\sin k}^{2}}{{\ell}^{2} \cdot \cos k}}\right)} \]
            9. lift-*.f64N/A

              \[\leadsto \frac{2}{k \cdot \left(k \cdot \frac{t \cdot {\sin k}^{2}}{\color{blue}{{\ell}^{2}} \cdot \cos k}\right)} \]
            10. *-commutativeN/A

              \[\leadsto \frac{2}{k \cdot \left(k \cdot \frac{{\sin k}^{2} \cdot t}{\color{blue}{{\ell}^{2}} \cdot \cos k}\right)} \]
            11. lift-*.f64N/A

              \[\leadsto \frac{2}{k \cdot \left(k \cdot \frac{{\sin k}^{2} \cdot t}{{\ell}^{2} \cdot \color{blue}{\cos k}}\right)} \]
            12. *-commutativeN/A

              \[\leadsto \frac{2}{k \cdot \left(k \cdot \frac{{\sin k}^{2} \cdot t}{\cos k \cdot \color{blue}{{\ell}^{2}}}\right)} \]
            13. times-fracN/A

              \[\leadsto \frac{2}{k \cdot \left(k \cdot \left(\frac{{\sin k}^{2}}{\cos k} \cdot \color{blue}{\frac{t}{{\ell}^{2}}}\right)\right)} \]
            14. lift-pow.f64N/A

              \[\leadsto \frac{2}{k \cdot \left(k \cdot \left(\frac{{\sin k}^{2}}{\cos k} \cdot \frac{t}{{\ell}^{\color{blue}{2}}}\right)\right)} \]
            15. pow2N/A

              \[\leadsto \frac{2}{k \cdot \left(k \cdot \left(\frac{{\sin k}^{2}}{\cos k} \cdot \frac{t}{\ell \cdot \color{blue}{\ell}}\right)\right)} \]
            16. lift-*.f64N/A

              \[\leadsto \frac{2}{k \cdot \left(k \cdot \left(\frac{{\sin k}^{2}}{\cos k} \cdot \frac{t}{\ell \cdot \color{blue}{\ell}}\right)\right)} \]
            17. lift-/.f64N/A

              \[\leadsto \frac{2}{k \cdot \left(k \cdot \left(\frac{{\sin k}^{2}}{\cos k} \cdot \frac{t}{\color{blue}{\ell \cdot \ell}}\right)\right)} \]
            18. lower-*.f64N/A

              \[\leadsto \frac{2}{k \cdot \left(k \cdot \left(\frac{{\sin k}^{2}}{\cos k} \cdot \color{blue}{\frac{t}{\ell \cdot \ell}}\right)\right)} \]
          6. Applied rewrites75.4%

            \[\leadsto \frac{2}{k \cdot \color{blue}{\left(k \cdot \left(\left(\tan k \cdot \sin k\right) \cdot \frac{t}{\ell \cdot \ell}\right)\right)}} \]
          7. Step-by-step derivation
            1. lift-*.f64N/A

              \[\leadsto \frac{2}{k \cdot \left(k \cdot \left(\left(\tan k \cdot \sin k\right) \cdot \color{blue}{\frac{t}{\ell \cdot \ell}}\right)\right)} \]
            2. *-commutativeN/A

              \[\leadsto \frac{2}{k \cdot \left(k \cdot \left(\frac{t}{\ell \cdot \ell} \cdot \color{blue}{\left(\tan k \cdot \sin k\right)}\right)\right)} \]
            3. lift-/.f64N/A

              \[\leadsto \frac{2}{k \cdot \left(k \cdot \left(\frac{t}{\ell \cdot \ell} \cdot \left(\color{blue}{\tan k} \cdot \sin k\right)\right)\right)} \]
            4. lift-*.f64N/A

              \[\leadsto \frac{2}{k \cdot \left(k \cdot \left(\frac{t}{\ell \cdot \ell} \cdot \left(\tan k \cdot \sin k\right)\right)\right)} \]
            5. associate-/r*N/A

              \[\leadsto \frac{2}{k \cdot \left(k \cdot \left(\frac{\frac{t}{\ell}}{\ell} \cdot \left(\color{blue}{\tan k} \cdot \sin k\right)\right)\right)} \]
            6. associate-*l/N/A

              \[\leadsto \frac{2}{k \cdot \left(k \cdot \frac{\frac{t}{\ell} \cdot \left(\tan k \cdot \sin k\right)}{\color{blue}{\ell}}\right)} \]
            7. lower-/.f64N/A

              \[\leadsto \frac{2}{k \cdot \left(k \cdot \frac{\frac{t}{\ell} \cdot \left(\tan k \cdot \sin k\right)}{\color{blue}{\ell}}\right)} \]
            8. lower-*.f64N/A

              \[\leadsto \frac{2}{k \cdot \left(k \cdot \frac{\frac{t}{\ell} \cdot \left(\tan k \cdot \sin k\right)}{\ell}\right)} \]
            9. lower-/.f6486.5

              \[\leadsto \frac{2}{k \cdot \left(k \cdot \frac{\frac{t}{\ell} \cdot \left(\tan k \cdot \sin k\right)}{\ell}\right)} \]
            10. lift-*.f64N/A

              \[\leadsto \frac{2}{k \cdot \left(k \cdot \frac{\frac{t}{\ell} \cdot \left(\tan k \cdot \sin k\right)}{\ell}\right)} \]
            11. *-commutativeN/A

              \[\leadsto \frac{2}{k \cdot \left(k \cdot \frac{\frac{t}{\ell} \cdot \left(\sin k \cdot \tan k\right)}{\ell}\right)} \]
            12. lower-*.f6486.5

              \[\leadsto \frac{2}{k \cdot \left(k \cdot \frac{\frac{t}{\ell} \cdot \left(\sin k \cdot \tan k\right)}{\ell}\right)} \]
          8. Applied rewrites86.5%

            \[\leadsto \frac{2}{k \cdot \left(k \cdot \frac{\frac{t}{\ell} \cdot \left(\sin k \cdot \tan k\right)}{\color{blue}{\ell}}\right)} \]
          9. Taylor expanded in k around 0

            \[\leadsto \frac{2}{k \cdot \left(k \cdot \frac{\frac{t}{\ell} \cdot \left(\sin k \cdot k\right)}{\ell}\right)} \]
          10. Step-by-step derivation
            1. Applied rewrites71.7%

              \[\leadsto \frac{2}{k \cdot \left(k \cdot \frac{\frac{t}{\ell} \cdot \left(\sin k \cdot k\right)}{\ell}\right)} \]

            if 9.99999999999999998e97 < t

            1. Initial program 35.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}{\frac{{k}^{2} \cdot \left(t \cdot {\sin k}^{2}\right)}{{\ell}^{2} \cdot \cos k}}} \]
            3. Step-by-step derivation
              1. lower-/.f64N/A

                \[\leadsto \frac{2}{\frac{{k}^{2} \cdot \left(t \cdot {\sin k}^{2}\right)}{\color{blue}{{\ell}^{2} \cdot \cos k}}} \]
              2. lower-*.f64N/A

                \[\leadsto \frac{2}{\frac{{k}^{2} \cdot \left(t \cdot {\sin k}^{2}\right)}{\color{blue}{{\ell}^{2}} \cdot \cos k}} \]
              3. lower-pow.f64N/A

                \[\leadsto \frac{2}{\frac{{k}^{2} \cdot \left(t \cdot {\sin k}^{2}\right)}{{\color{blue}{\ell}}^{2} \cdot \cos k}} \]
              4. lower-*.f64N/A

                \[\leadsto \frac{2}{\frac{{k}^{2} \cdot \left(t \cdot {\sin k}^{2}\right)}{{\ell}^{\color{blue}{2}} \cdot \cos k}} \]
              5. lower-pow.f64N/A

                \[\leadsto \frac{2}{\frac{{k}^{2} \cdot \left(t \cdot {\sin k}^{2}\right)}{{\ell}^{2} \cdot \cos k}} \]
              6. lower-sin.f64N/A

                \[\leadsto \frac{2}{\frac{{k}^{2} \cdot \left(t \cdot {\sin k}^{2}\right)}{{\ell}^{2} \cdot \cos k}} \]
              7. lower-*.f64N/A

                \[\leadsto \frac{2}{\frac{{k}^{2} \cdot \left(t \cdot {\sin k}^{2}\right)}{{\ell}^{2} \cdot \color{blue}{\cos k}}} \]
              8. lower-pow.f64N/A

                \[\leadsto \frac{2}{\frac{{k}^{2} \cdot \left(t \cdot {\sin k}^{2}\right)}{{\ell}^{2} \cdot \cos \color{blue}{k}}} \]
              9. lower-cos.f6473.8

                \[\leadsto \frac{2}{\frac{{k}^{2} \cdot \left(t \cdot {\sin k}^{2}\right)}{{\ell}^{2} \cdot \cos k}} \]
            4. Applied rewrites73.8%

              \[\leadsto \frac{2}{\color{blue}{\frac{{k}^{2} \cdot \left(t \cdot {\sin k}^{2}\right)}{{\ell}^{2} \cdot \cos k}}} \]
            5. Step-by-step derivation
              1. lift-/.f64N/A

                \[\leadsto \frac{2}{\frac{{k}^{2} \cdot \left(t \cdot {\sin k}^{2}\right)}{\color{blue}{{\ell}^{2} \cdot \cos k}}} \]
              2. lift-*.f64N/A

                \[\leadsto \frac{2}{\frac{{k}^{2} \cdot \left(t \cdot {\sin k}^{2}\right)}{\color{blue}{{\ell}^{2}} \cdot \cos k}} \]
              3. lift-*.f64N/A

                \[\leadsto \frac{2}{\frac{{k}^{2} \cdot \left(t \cdot {\sin k}^{2}\right)}{{\ell}^{2} \cdot \color{blue}{\cos k}}} \]
              4. times-fracN/A

                \[\leadsto \frac{2}{\frac{{k}^{2}}{{\ell}^{2}} \cdot \color{blue}{\frac{t \cdot {\sin k}^{2}}{\cos k}}} \]
              5. *-commutativeN/A

                \[\leadsto \frac{2}{\frac{t \cdot {\sin k}^{2}}{\cos k} \cdot \color{blue}{\frac{{k}^{2}}{{\ell}^{2}}}} \]
              6. lower-*.f64N/A

                \[\leadsto \frac{2}{\frac{t \cdot {\sin k}^{2}}{\cos k} \cdot \color{blue}{\frac{{k}^{2}}{{\ell}^{2}}}} \]
              7. lift-*.f64N/A

                \[\leadsto \frac{2}{\frac{t \cdot {\sin k}^{2}}{\cos k} \cdot \frac{{\color{blue}{k}}^{2}}{{\ell}^{2}}} \]
              8. associate-/l*N/A

                \[\leadsto \frac{2}{\left(t \cdot \frac{{\sin k}^{2}}{\cos k}\right) \cdot \frac{\color{blue}{{k}^{2}}}{{\ell}^{2}}} \]
              9. lower-*.f64N/A

                \[\leadsto \frac{2}{\left(t \cdot \frac{{\sin k}^{2}}{\cos k}\right) \cdot \frac{\color{blue}{{k}^{2}}}{{\ell}^{2}}} \]
              10. lift-pow.f64N/A

                \[\leadsto \frac{2}{\left(t \cdot \frac{{\sin k}^{2}}{\cos k}\right) \cdot \frac{{k}^{2}}{{\ell}^{2}}} \]
              11. unpow2N/A

                \[\leadsto \frac{2}{\left(t \cdot \frac{\sin k \cdot \sin k}{\cos k}\right) \cdot \frac{{k}^{2}}{{\ell}^{2}}} \]
              12. associate-*l/N/A

                \[\leadsto \frac{2}{\left(t \cdot \left(\frac{\sin k}{\cos k} \cdot \sin k\right)\right) \cdot \frac{{k}^{\color{blue}{2}}}{{\ell}^{2}}} \]
              13. lift-sin.f64N/A

                \[\leadsto \frac{2}{\left(t \cdot \left(\frac{\sin k}{\cos k} \cdot \sin k\right)\right) \cdot \frac{{k}^{2}}{{\ell}^{2}}} \]
              14. lift-cos.f64N/A

                \[\leadsto \frac{2}{\left(t \cdot \left(\frac{\sin k}{\cos k} \cdot \sin k\right)\right) \cdot \frac{{k}^{2}}{{\ell}^{2}}} \]
              15. tan-quotN/A

                \[\leadsto \frac{2}{\left(t \cdot \left(\tan k \cdot \sin k\right)\right) \cdot \frac{{k}^{2}}{{\ell}^{2}}} \]
              16. lift-tan.f64N/A

                \[\leadsto \frac{2}{\left(t \cdot \left(\tan k \cdot \sin k\right)\right) \cdot \frac{{k}^{2}}{{\ell}^{2}}} \]
              17. lower-*.f64N/A

                \[\leadsto \frac{2}{\left(t \cdot \left(\tan k \cdot \sin k\right)\right) \cdot \frac{{k}^{\color{blue}{2}}}{{\ell}^{2}}} \]
              18. lift-pow.f64N/A

                \[\leadsto \frac{2}{\left(t \cdot \left(\tan k \cdot \sin k\right)\right) \cdot \frac{{k}^{2}}{{\color{blue}{\ell}}^{2}}} \]
              19. unpow2N/A

                \[\leadsto \frac{2}{\left(t \cdot \left(\tan k \cdot \sin k\right)\right) \cdot \frac{k \cdot k}{{\color{blue}{\ell}}^{2}}} \]
              20. associate-/l*N/A

                \[\leadsto \frac{2}{\left(t \cdot \left(\tan k \cdot \sin k\right)\right) \cdot \left(k \cdot \color{blue}{\frac{k}{{\ell}^{2}}}\right)} \]
            6. Applied rewrites77.4%

              \[\leadsto \frac{2}{\left(t \cdot \left(\tan k \cdot \sin k\right)\right) \cdot \color{blue}{\left(k \cdot \frac{k}{\ell \cdot \ell}\right)}} \]
            7. Step-by-step derivation
              1. lift-*.f64N/A

                \[\leadsto \frac{2}{\left(t \cdot \left(\tan k \cdot \sin k\right)\right) \cdot \color{blue}{\left(k \cdot \frac{k}{\ell \cdot \ell}\right)}} \]
              2. lift-*.f64N/A

                \[\leadsto \frac{2}{\left(t \cdot \left(\tan k \cdot \sin k\right)\right) \cdot \left(k \cdot \color{blue}{\frac{k}{\ell \cdot \ell}}\right)} \]
              3. associate-*r*N/A

                \[\leadsto \frac{2}{\left(\left(t \cdot \left(\tan k \cdot \sin k\right)\right) \cdot k\right) \cdot \color{blue}{\frac{k}{\ell \cdot \ell}}} \]
              4. lift-/.f64N/A

                \[\leadsto \frac{2}{\left(\left(t \cdot \left(\tan k \cdot \sin k\right)\right) \cdot k\right) \cdot \frac{k}{\color{blue}{\ell \cdot \ell}}} \]
              5. lift-*.f64N/A

                \[\leadsto \frac{2}{\left(\left(t \cdot \left(\tan k \cdot \sin k\right)\right) \cdot k\right) \cdot \frac{k}{\ell \cdot \color{blue}{\ell}}} \]
              6. associate-/r*N/A

                \[\leadsto \frac{2}{\left(\left(t \cdot \left(\tan k \cdot \sin k\right)\right) \cdot k\right) \cdot \frac{\frac{k}{\ell}}{\color{blue}{\ell}}} \]
              7. associate-*r/N/A

                \[\leadsto \frac{2}{\frac{\left(\left(t \cdot \left(\tan k \cdot \sin k\right)\right) \cdot k\right) \cdot \frac{k}{\ell}}{\color{blue}{\ell}}} \]
              8. lower-/.f64N/A

                \[\leadsto \frac{2}{\frac{\left(\left(t \cdot \left(\tan k \cdot \sin k\right)\right) \cdot k\right) \cdot \frac{k}{\ell}}{\color{blue}{\ell}}} \]
              9. lower-*.f64N/A

                \[\leadsto \frac{2}{\frac{\left(\left(t \cdot \left(\tan k \cdot \sin k\right)\right) \cdot k\right) \cdot \frac{k}{\ell}}{\ell}} \]
              10. lift-*.f64N/A

                \[\leadsto \frac{2}{\frac{\left(\left(t \cdot \left(\tan k \cdot \sin k\right)\right) \cdot k\right) \cdot \frac{k}{\ell}}{\ell}} \]
              11. lift-*.f64N/A

                \[\leadsto \frac{2}{\frac{\left(\left(t \cdot \left(\tan k \cdot \sin k\right)\right) \cdot k\right) \cdot \frac{k}{\ell}}{\ell}} \]
              12. associate-*r*N/A

                \[\leadsto \frac{2}{\frac{\left(\left(\left(t \cdot \tan k\right) \cdot \sin k\right) \cdot k\right) \cdot \frac{k}{\ell}}{\ell}} \]
              13. associate-*l*N/A

                \[\leadsto \frac{2}{\frac{\left(\left(t \cdot \tan k\right) \cdot \left(\sin k \cdot k\right)\right) \cdot \frac{k}{\ell}}{\ell}} \]
              14. lower-*.f64N/A

                \[\leadsto \frac{2}{\frac{\left(\left(t \cdot \tan k\right) \cdot \left(\sin k \cdot k\right)\right) \cdot \frac{k}{\ell}}{\ell}} \]
              15. *-commutativeN/A

                \[\leadsto \frac{2}{\frac{\left(\left(\tan k \cdot t\right) \cdot \left(\sin k \cdot k\right)\right) \cdot \frac{k}{\ell}}{\ell}} \]
              16. lower-*.f64N/A

                \[\leadsto \frac{2}{\frac{\left(\left(\tan k \cdot t\right) \cdot \left(\sin k \cdot k\right)\right) \cdot \frac{k}{\ell}}{\ell}} \]
              17. lower-*.f64N/A

                \[\leadsto \frac{2}{\frac{\left(\left(\tan k \cdot t\right) \cdot \left(\sin k \cdot k\right)\right) \cdot \frac{k}{\ell}}{\ell}} \]
              18. lower-/.f6491.0

                \[\leadsto \frac{2}{\frac{\left(\left(\tan k \cdot t\right) \cdot \left(\sin k \cdot k\right)\right) \cdot \frac{k}{\ell}}{\ell}} \]
            8. Applied rewrites91.0%

              \[\leadsto \frac{2}{\frac{\left(\left(\tan k \cdot t\right) \cdot \left(\sin k \cdot k\right)\right) \cdot \frac{k}{\ell}}{\color{blue}{\ell}}} \]
            9. Taylor expanded in k around 0

              \[\leadsto \frac{2}{\frac{\left(\left(k \cdot t\right) \cdot \left(\sin k \cdot k\right)\right) \cdot \frac{k}{\ell}}{\ell}} \]
            10. Step-by-step derivation
              1. Applied rewrites72.1%

                \[\leadsto \frac{2}{\frac{\left(\left(k \cdot t\right) \cdot \left(\sin k \cdot k\right)\right) \cdot \frac{k}{\ell}}{\ell}} \]
            11. Recombined 2 regimes into one program.
            12. Add Preprocessing

            Alternative 15: 72.1% accurate, 2.3× speedup?

            \[\frac{2}{\frac{\left(\left(k \cdot t\right) \cdot \left(\sin k \cdot k\right)\right) \cdot \frac{k}{\ell}}{\ell}} \]
            (FPCore (t l k)
             :precision binary64
             (/ 2.0 (/ (* (* (* k t) (* (sin k) k)) (/ k l)) l)))
            double code(double t, double l, double k) {
            	return 2.0 / ((((k * t) * (sin(k) * k)) * (k / l)) / 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 = 2.0d0 / ((((k * t) * (sin(k) * k)) * (k / l)) / l)
            end function
            
            public static double code(double t, double l, double k) {
            	return 2.0 / ((((k * t) * (Math.sin(k) * k)) * (k / l)) / l);
            }
            
            def code(t, l, k):
            	return 2.0 / ((((k * t) * (math.sin(k) * k)) * (k / l)) / l)
            
            function code(t, l, k)
            	return Float64(2.0 / Float64(Float64(Float64(Float64(k * t) * Float64(sin(k) * k)) * Float64(k / l)) / l))
            end
            
            function tmp = code(t, l, k)
            	tmp = 2.0 / ((((k * t) * (sin(k) * k)) * (k / l)) / l);
            end
            
            code[t_, l_, k_] := N[(2.0 / N[(N[(N[(N[(k * t), $MachinePrecision] * N[(N[Sin[k], $MachinePrecision] * k), $MachinePrecision]), $MachinePrecision] * N[(k / l), $MachinePrecision]), $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision]
            
            \frac{2}{\frac{\left(\left(k \cdot t\right) \cdot \left(\sin k \cdot k\right)\right) \cdot \frac{k}{\ell}}{\ell}}
            
            Derivation
            1. Initial program 35.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}{\frac{{k}^{2} \cdot \left(t \cdot {\sin k}^{2}\right)}{{\ell}^{2} \cdot \cos k}}} \]
            3. Step-by-step derivation
              1. lower-/.f64N/A

                \[\leadsto \frac{2}{\frac{{k}^{2} \cdot \left(t \cdot {\sin k}^{2}\right)}{\color{blue}{{\ell}^{2} \cdot \cos k}}} \]
              2. lower-*.f64N/A

                \[\leadsto \frac{2}{\frac{{k}^{2} \cdot \left(t \cdot {\sin k}^{2}\right)}{\color{blue}{{\ell}^{2}} \cdot \cos k}} \]
              3. lower-pow.f64N/A

                \[\leadsto \frac{2}{\frac{{k}^{2} \cdot \left(t \cdot {\sin k}^{2}\right)}{{\color{blue}{\ell}}^{2} \cdot \cos k}} \]
              4. lower-*.f64N/A

                \[\leadsto \frac{2}{\frac{{k}^{2} \cdot \left(t \cdot {\sin k}^{2}\right)}{{\ell}^{\color{blue}{2}} \cdot \cos k}} \]
              5. lower-pow.f64N/A

                \[\leadsto \frac{2}{\frac{{k}^{2} \cdot \left(t \cdot {\sin k}^{2}\right)}{{\ell}^{2} \cdot \cos k}} \]
              6. lower-sin.f64N/A

                \[\leadsto \frac{2}{\frac{{k}^{2} \cdot \left(t \cdot {\sin k}^{2}\right)}{{\ell}^{2} \cdot \cos k}} \]
              7. lower-*.f64N/A

                \[\leadsto \frac{2}{\frac{{k}^{2} \cdot \left(t \cdot {\sin k}^{2}\right)}{{\ell}^{2} \cdot \color{blue}{\cos k}}} \]
              8. lower-pow.f64N/A

                \[\leadsto \frac{2}{\frac{{k}^{2} \cdot \left(t \cdot {\sin k}^{2}\right)}{{\ell}^{2} \cdot \cos \color{blue}{k}}} \]
              9. lower-cos.f6473.8

                \[\leadsto \frac{2}{\frac{{k}^{2} \cdot \left(t \cdot {\sin k}^{2}\right)}{{\ell}^{2} \cdot \cos k}} \]
            4. Applied rewrites73.8%

              \[\leadsto \frac{2}{\color{blue}{\frac{{k}^{2} \cdot \left(t \cdot {\sin k}^{2}\right)}{{\ell}^{2} \cdot \cos k}}} \]
            5. Step-by-step derivation
              1. lift-/.f64N/A

                \[\leadsto \frac{2}{\frac{{k}^{2} \cdot \left(t \cdot {\sin k}^{2}\right)}{\color{blue}{{\ell}^{2} \cdot \cos k}}} \]
              2. lift-*.f64N/A

                \[\leadsto \frac{2}{\frac{{k}^{2} \cdot \left(t \cdot {\sin k}^{2}\right)}{\color{blue}{{\ell}^{2}} \cdot \cos k}} \]
              3. lift-*.f64N/A

                \[\leadsto \frac{2}{\frac{{k}^{2} \cdot \left(t \cdot {\sin k}^{2}\right)}{{\ell}^{2} \cdot \color{blue}{\cos k}}} \]
              4. times-fracN/A

                \[\leadsto \frac{2}{\frac{{k}^{2}}{{\ell}^{2}} \cdot \color{blue}{\frac{t \cdot {\sin k}^{2}}{\cos k}}} \]
              5. *-commutativeN/A

                \[\leadsto \frac{2}{\frac{t \cdot {\sin k}^{2}}{\cos k} \cdot \color{blue}{\frac{{k}^{2}}{{\ell}^{2}}}} \]
              6. lower-*.f64N/A

                \[\leadsto \frac{2}{\frac{t \cdot {\sin k}^{2}}{\cos k} \cdot \color{blue}{\frac{{k}^{2}}{{\ell}^{2}}}} \]
              7. lift-*.f64N/A

                \[\leadsto \frac{2}{\frac{t \cdot {\sin k}^{2}}{\cos k} \cdot \frac{{\color{blue}{k}}^{2}}{{\ell}^{2}}} \]
              8. associate-/l*N/A

                \[\leadsto \frac{2}{\left(t \cdot \frac{{\sin k}^{2}}{\cos k}\right) \cdot \frac{\color{blue}{{k}^{2}}}{{\ell}^{2}}} \]
              9. lower-*.f64N/A

                \[\leadsto \frac{2}{\left(t \cdot \frac{{\sin k}^{2}}{\cos k}\right) \cdot \frac{\color{blue}{{k}^{2}}}{{\ell}^{2}}} \]
              10. lift-pow.f64N/A

                \[\leadsto \frac{2}{\left(t \cdot \frac{{\sin k}^{2}}{\cos k}\right) \cdot \frac{{k}^{2}}{{\ell}^{2}}} \]
              11. unpow2N/A

                \[\leadsto \frac{2}{\left(t \cdot \frac{\sin k \cdot \sin k}{\cos k}\right) \cdot \frac{{k}^{2}}{{\ell}^{2}}} \]
              12. associate-*l/N/A

                \[\leadsto \frac{2}{\left(t \cdot \left(\frac{\sin k}{\cos k} \cdot \sin k\right)\right) \cdot \frac{{k}^{\color{blue}{2}}}{{\ell}^{2}}} \]
              13. lift-sin.f64N/A

                \[\leadsto \frac{2}{\left(t \cdot \left(\frac{\sin k}{\cos k} \cdot \sin k\right)\right) \cdot \frac{{k}^{2}}{{\ell}^{2}}} \]
              14. lift-cos.f64N/A

                \[\leadsto \frac{2}{\left(t \cdot \left(\frac{\sin k}{\cos k} \cdot \sin k\right)\right) \cdot \frac{{k}^{2}}{{\ell}^{2}}} \]
              15. tan-quotN/A

                \[\leadsto \frac{2}{\left(t \cdot \left(\tan k \cdot \sin k\right)\right) \cdot \frac{{k}^{2}}{{\ell}^{2}}} \]
              16. lift-tan.f64N/A

                \[\leadsto \frac{2}{\left(t \cdot \left(\tan k \cdot \sin k\right)\right) \cdot \frac{{k}^{2}}{{\ell}^{2}}} \]
              17. lower-*.f64N/A

                \[\leadsto \frac{2}{\left(t \cdot \left(\tan k \cdot \sin k\right)\right) \cdot \frac{{k}^{\color{blue}{2}}}{{\ell}^{2}}} \]
              18. lift-pow.f64N/A

                \[\leadsto \frac{2}{\left(t \cdot \left(\tan k \cdot \sin k\right)\right) \cdot \frac{{k}^{2}}{{\color{blue}{\ell}}^{2}}} \]
              19. unpow2N/A

                \[\leadsto \frac{2}{\left(t \cdot \left(\tan k \cdot \sin k\right)\right) \cdot \frac{k \cdot k}{{\color{blue}{\ell}}^{2}}} \]
              20. associate-/l*N/A

                \[\leadsto \frac{2}{\left(t \cdot \left(\tan k \cdot \sin k\right)\right) \cdot \left(k \cdot \color{blue}{\frac{k}{{\ell}^{2}}}\right)} \]
            6. Applied rewrites77.4%

              \[\leadsto \frac{2}{\left(t \cdot \left(\tan k \cdot \sin k\right)\right) \cdot \color{blue}{\left(k \cdot \frac{k}{\ell \cdot \ell}\right)}} \]
            7. Step-by-step derivation
              1. lift-*.f64N/A

                \[\leadsto \frac{2}{\left(t \cdot \left(\tan k \cdot \sin k\right)\right) \cdot \color{blue}{\left(k \cdot \frac{k}{\ell \cdot \ell}\right)}} \]
              2. lift-*.f64N/A

                \[\leadsto \frac{2}{\left(t \cdot \left(\tan k \cdot \sin k\right)\right) \cdot \left(k \cdot \color{blue}{\frac{k}{\ell \cdot \ell}}\right)} \]
              3. associate-*r*N/A

                \[\leadsto \frac{2}{\left(\left(t \cdot \left(\tan k \cdot \sin k\right)\right) \cdot k\right) \cdot \color{blue}{\frac{k}{\ell \cdot \ell}}} \]
              4. lift-/.f64N/A

                \[\leadsto \frac{2}{\left(\left(t \cdot \left(\tan k \cdot \sin k\right)\right) \cdot k\right) \cdot \frac{k}{\color{blue}{\ell \cdot \ell}}} \]
              5. lift-*.f64N/A

                \[\leadsto \frac{2}{\left(\left(t \cdot \left(\tan k \cdot \sin k\right)\right) \cdot k\right) \cdot \frac{k}{\ell \cdot \color{blue}{\ell}}} \]
              6. associate-/r*N/A

                \[\leadsto \frac{2}{\left(\left(t \cdot \left(\tan k \cdot \sin k\right)\right) \cdot k\right) \cdot \frac{\frac{k}{\ell}}{\color{blue}{\ell}}} \]
              7. associate-*r/N/A

                \[\leadsto \frac{2}{\frac{\left(\left(t \cdot \left(\tan k \cdot \sin k\right)\right) \cdot k\right) \cdot \frac{k}{\ell}}{\color{blue}{\ell}}} \]
              8. lower-/.f64N/A

                \[\leadsto \frac{2}{\frac{\left(\left(t \cdot \left(\tan k \cdot \sin k\right)\right) \cdot k\right) \cdot \frac{k}{\ell}}{\color{blue}{\ell}}} \]
              9. lower-*.f64N/A

                \[\leadsto \frac{2}{\frac{\left(\left(t \cdot \left(\tan k \cdot \sin k\right)\right) \cdot k\right) \cdot \frac{k}{\ell}}{\ell}} \]
              10. lift-*.f64N/A

                \[\leadsto \frac{2}{\frac{\left(\left(t \cdot \left(\tan k \cdot \sin k\right)\right) \cdot k\right) \cdot \frac{k}{\ell}}{\ell}} \]
              11. lift-*.f64N/A

                \[\leadsto \frac{2}{\frac{\left(\left(t \cdot \left(\tan k \cdot \sin k\right)\right) \cdot k\right) \cdot \frac{k}{\ell}}{\ell}} \]
              12. associate-*r*N/A

                \[\leadsto \frac{2}{\frac{\left(\left(\left(t \cdot \tan k\right) \cdot \sin k\right) \cdot k\right) \cdot \frac{k}{\ell}}{\ell}} \]
              13. associate-*l*N/A

                \[\leadsto \frac{2}{\frac{\left(\left(t \cdot \tan k\right) \cdot \left(\sin k \cdot k\right)\right) \cdot \frac{k}{\ell}}{\ell}} \]
              14. lower-*.f64N/A

                \[\leadsto \frac{2}{\frac{\left(\left(t \cdot \tan k\right) \cdot \left(\sin k \cdot k\right)\right) \cdot \frac{k}{\ell}}{\ell}} \]
              15. *-commutativeN/A

                \[\leadsto \frac{2}{\frac{\left(\left(\tan k \cdot t\right) \cdot \left(\sin k \cdot k\right)\right) \cdot \frac{k}{\ell}}{\ell}} \]
              16. lower-*.f64N/A

                \[\leadsto \frac{2}{\frac{\left(\left(\tan k \cdot t\right) \cdot \left(\sin k \cdot k\right)\right) \cdot \frac{k}{\ell}}{\ell}} \]
              17. lower-*.f64N/A

                \[\leadsto \frac{2}{\frac{\left(\left(\tan k \cdot t\right) \cdot \left(\sin k \cdot k\right)\right) \cdot \frac{k}{\ell}}{\ell}} \]
              18. lower-/.f6491.0

                \[\leadsto \frac{2}{\frac{\left(\left(\tan k \cdot t\right) \cdot \left(\sin k \cdot k\right)\right) \cdot \frac{k}{\ell}}{\ell}} \]
            8. Applied rewrites91.0%

              \[\leadsto \frac{2}{\frac{\left(\left(\tan k \cdot t\right) \cdot \left(\sin k \cdot k\right)\right) \cdot \frac{k}{\ell}}{\color{blue}{\ell}}} \]
            9. Taylor expanded in k around 0

              \[\leadsto \frac{2}{\frac{\left(\left(k \cdot t\right) \cdot \left(\sin k \cdot k\right)\right) \cdot \frac{k}{\ell}}{\ell}} \]
            10. Step-by-step derivation
              1. Applied rewrites72.1%

                \[\leadsto \frac{2}{\frac{\left(\left(k \cdot t\right) \cdot \left(\sin k \cdot k\right)\right) \cdot \frac{k}{\ell}}{\ell}} \]
              2. Add Preprocessing

              Alternative 16: 72.0% accurate, 3.5× speedup?

              \[\frac{2}{k \cdot \left(k \cdot \frac{\frac{{k}^{2} \cdot t}{\ell}}{\ell}\right)} \]
              (FPCore (t l k)
               :precision binary64
               (/ 2.0 (* k (* k (/ (/ (* (pow k 2.0) t) l) l)))))
              double code(double t, double l, double k) {
              	return 2.0 / (k * (k * (((pow(k, 2.0) * t) / l) / 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 = 2.0d0 / (k * (k * ((((k ** 2.0d0) * t) / l) / l)))
              end function
              
              public static double code(double t, double l, double k) {
              	return 2.0 / (k * (k * (((Math.pow(k, 2.0) * t) / l) / l)));
              }
              
              def code(t, l, k):
              	return 2.0 / (k * (k * (((math.pow(k, 2.0) * t) / l) / l)))
              
              function code(t, l, k)
              	return Float64(2.0 / Float64(k * Float64(k * Float64(Float64(Float64((k ^ 2.0) * t) / l) / l))))
              end
              
              function tmp = code(t, l, k)
              	tmp = 2.0 / (k * (k * ((((k ^ 2.0) * t) / l) / l)));
              end
              
              code[t_, l_, k_] := N[(2.0 / N[(k * N[(k * N[(N[(N[(N[Power[k, 2.0], $MachinePrecision] * t), $MachinePrecision] / l), $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
              
              \frac{2}{k \cdot \left(k \cdot \frac{\frac{{k}^{2} \cdot t}{\ell}}{\ell}\right)}
              
              Derivation
              1. Initial program 35.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}{\frac{{k}^{2} \cdot \left(t \cdot {\sin k}^{2}\right)}{{\ell}^{2} \cdot \cos k}}} \]
              3. Step-by-step derivation
                1. lower-/.f64N/A

                  \[\leadsto \frac{2}{\frac{{k}^{2} \cdot \left(t \cdot {\sin k}^{2}\right)}{\color{blue}{{\ell}^{2} \cdot \cos k}}} \]
                2. lower-*.f64N/A

                  \[\leadsto \frac{2}{\frac{{k}^{2} \cdot \left(t \cdot {\sin k}^{2}\right)}{\color{blue}{{\ell}^{2}} \cdot \cos k}} \]
                3. lower-pow.f64N/A

                  \[\leadsto \frac{2}{\frac{{k}^{2} \cdot \left(t \cdot {\sin k}^{2}\right)}{{\color{blue}{\ell}}^{2} \cdot \cos k}} \]
                4. lower-*.f64N/A

                  \[\leadsto \frac{2}{\frac{{k}^{2} \cdot \left(t \cdot {\sin k}^{2}\right)}{{\ell}^{\color{blue}{2}} \cdot \cos k}} \]
                5. lower-pow.f64N/A

                  \[\leadsto \frac{2}{\frac{{k}^{2} \cdot \left(t \cdot {\sin k}^{2}\right)}{{\ell}^{2} \cdot \cos k}} \]
                6. lower-sin.f64N/A

                  \[\leadsto \frac{2}{\frac{{k}^{2} \cdot \left(t \cdot {\sin k}^{2}\right)}{{\ell}^{2} \cdot \cos k}} \]
                7. lower-*.f64N/A

                  \[\leadsto \frac{2}{\frac{{k}^{2} \cdot \left(t \cdot {\sin k}^{2}\right)}{{\ell}^{2} \cdot \color{blue}{\cos k}}} \]
                8. lower-pow.f64N/A

                  \[\leadsto \frac{2}{\frac{{k}^{2} \cdot \left(t \cdot {\sin k}^{2}\right)}{{\ell}^{2} \cdot \cos \color{blue}{k}}} \]
                9. lower-cos.f6473.8

                  \[\leadsto \frac{2}{\frac{{k}^{2} \cdot \left(t \cdot {\sin k}^{2}\right)}{{\ell}^{2} \cdot \cos k}} \]
              4. Applied rewrites73.8%

                \[\leadsto \frac{2}{\color{blue}{\frac{{k}^{2} \cdot \left(t \cdot {\sin k}^{2}\right)}{{\ell}^{2} \cdot \cos k}}} \]
              5. Step-by-step derivation
                1. lift-/.f64N/A

                  \[\leadsto \frac{2}{\frac{{k}^{2} \cdot \left(t \cdot {\sin k}^{2}\right)}{\color{blue}{{\ell}^{2} \cdot \cos k}}} \]
                2. lift-*.f64N/A

                  \[\leadsto \frac{2}{\frac{{k}^{2} \cdot \left(t \cdot {\sin k}^{2}\right)}{\color{blue}{{\ell}^{2}} \cdot \cos k}} \]
                3. associate-/l*N/A

                  \[\leadsto \frac{2}{{k}^{2} \cdot \color{blue}{\frac{t \cdot {\sin k}^{2}}{{\ell}^{2} \cdot \cos k}}} \]
                4. lift-pow.f64N/A

                  \[\leadsto \frac{2}{{k}^{2} \cdot \frac{\color{blue}{t \cdot {\sin k}^{2}}}{{\ell}^{2} \cdot \cos k}} \]
                5. unpow2N/A

                  \[\leadsto \frac{2}{\left(k \cdot k\right) \cdot \frac{\color{blue}{t \cdot {\sin k}^{2}}}{{\ell}^{2} \cdot \cos k}} \]
                6. associate-*l*N/A

                  \[\leadsto \frac{2}{k \cdot \color{blue}{\left(k \cdot \frac{t \cdot {\sin k}^{2}}{{\ell}^{2} \cdot \cos k}\right)}} \]
                7. lower-*.f64N/A

                  \[\leadsto \frac{2}{k \cdot \color{blue}{\left(k \cdot \frac{t \cdot {\sin k}^{2}}{{\ell}^{2} \cdot \cos k}\right)}} \]
                8. lower-*.f64N/A

                  \[\leadsto \frac{2}{k \cdot \left(k \cdot \color{blue}{\frac{t \cdot {\sin k}^{2}}{{\ell}^{2} \cdot \cos k}}\right)} \]
                9. lift-*.f64N/A

                  \[\leadsto \frac{2}{k \cdot \left(k \cdot \frac{t \cdot {\sin k}^{2}}{\color{blue}{{\ell}^{2}} \cdot \cos k}\right)} \]
                10. *-commutativeN/A

                  \[\leadsto \frac{2}{k \cdot \left(k \cdot \frac{{\sin k}^{2} \cdot t}{\color{blue}{{\ell}^{2}} \cdot \cos k}\right)} \]
                11. lift-*.f64N/A

                  \[\leadsto \frac{2}{k \cdot \left(k \cdot \frac{{\sin k}^{2} \cdot t}{{\ell}^{2} \cdot \color{blue}{\cos k}}\right)} \]
                12. *-commutativeN/A

                  \[\leadsto \frac{2}{k \cdot \left(k \cdot \frac{{\sin k}^{2} \cdot t}{\cos k \cdot \color{blue}{{\ell}^{2}}}\right)} \]
                13. times-fracN/A

                  \[\leadsto \frac{2}{k \cdot \left(k \cdot \left(\frac{{\sin k}^{2}}{\cos k} \cdot \color{blue}{\frac{t}{{\ell}^{2}}}\right)\right)} \]
                14. lift-pow.f64N/A

                  \[\leadsto \frac{2}{k \cdot \left(k \cdot \left(\frac{{\sin k}^{2}}{\cos k} \cdot \frac{t}{{\ell}^{\color{blue}{2}}}\right)\right)} \]
                15. pow2N/A

                  \[\leadsto \frac{2}{k \cdot \left(k \cdot \left(\frac{{\sin k}^{2}}{\cos k} \cdot \frac{t}{\ell \cdot \color{blue}{\ell}}\right)\right)} \]
                16. lift-*.f64N/A

                  \[\leadsto \frac{2}{k \cdot \left(k \cdot \left(\frac{{\sin k}^{2}}{\cos k} \cdot \frac{t}{\ell \cdot \color{blue}{\ell}}\right)\right)} \]
                17. lift-/.f64N/A

                  \[\leadsto \frac{2}{k \cdot \left(k \cdot \left(\frac{{\sin k}^{2}}{\cos k} \cdot \frac{t}{\color{blue}{\ell \cdot \ell}}\right)\right)} \]
                18. lower-*.f64N/A

                  \[\leadsto \frac{2}{k \cdot \left(k \cdot \left(\frac{{\sin k}^{2}}{\cos k} \cdot \color{blue}{\frac{t}{\ell \cdot \ell}}\right)\right)} \]
              6. Applied rewrites75.4%

                \[\leadsto \frac{2}{k \cdot \color{blue}{\left(k \cdot \left(\left(\tan k \cdot \sin k\right) \cdot \frac{t}{\ell \cdot \ell}\right)\right)}} \]
              7. Step-by-step derivation
                1. lift-*.f64N/A

                  \[\leadsto \frac{2}{k \cdot \left(k \cdot \left(\left(\tan k \cdot \sin k\right) \cdot \color{blue}{\frac{t}{\ell \cdot \ell}}\right)\right)} \]
                2. *-commutativeN/A

                  \[\leadsto \frac{2}{k \cdot \left(k \cdot \left(\frac{t}{\ell \cdot \ell} \cdot \color{blue}{\left(\tan k \cdot \sin k\right)}\right)\right)} \]
                3. lift-/.f64N/A

                  \[\leadsto \frac{2}{k \cdot \left(k \cdot \left(\frac{t}{\ell \cdot \ell} \cdot \left(\color{blue}{\tan k} \cdot \sin k\right)\right)\right)} \]
                4. lift-*.f64N/A

                  \[\leadsto \frac{2}{k \cdot \left(k \cdot \left(\frac{t}{\ell \cdot \ell} \cdot \left(\tan k \cdot \sin k\right)\right)\right)} \]
                5. associate-/r*N/A

                  \[\leadsto \frac{2}{k \cdot \left(k \cdot \left(\frac{\frac{t}{\ell}}{\ell} \cdot \left(\color{blue}{\tan k} \cdot \sin k\right)\right)\right)} \]
                6. associate-*l/N/A

                  \[\leadsto \frac{2}{k \cdot \left(k \cdot \frac{\frac{t}{\ell} \cdot \left(\tan k \cdot \sin k\right)}{\color{blue}{\ell}}\right)} \]
                7. lower-/.f64N/A

                  \[\leadsto \frac{2}{k \cdot \left(k \cdot \frac{\frac{t}{\ell} \cdot \left(\tan k \cdot \sin k\right)}{\color{blue}{\ell}}\right)} \]
                8. lower-*.f64N/A

                  \[\leadsto \frac{2}{k \cdot \left(k \cdot \frac{\frac{t}{\ell} \cdot \left(\tan k \cdot \sin k\right)}{\ell}\right)} \]
                9. lower-/.f6486.5

                  \[\leadsto \frac{2}{k \cdot \left(k \cdot \frac{\frac{t}{\ell} \cdot \left(\tan k \cdot \sin k\right)}{\ell}\right)} \]
                10. lift-*.f64N/A

                  \[\leadsto \frac{2}{k \cdot \left(k \cdot \frac{\frac{t}{\ell} \cdot \left(\tan k \cdot \sin k\right)}{\ell}\right)} \]
                11. *-commutativeN/A

                  \[\leadsto \frac{2}{k \cdot \left(k \cdot \frac{\frac{t}{\ell} \cdot \left(\sin k \cdot \tan k\right)}{\ell}\right)} \]
                12. lower-*.f6486.5

                  \[\leadsto \frac{2}{k \cdot \left(k \cdot \frac{\frac{t}{\ell} \cdot \left(\sin k \cdot \tan k\right)}{\ell}\right)} \]
              8. Applied rewrites86.5%

                \[\leadsto \frac{2}{k \cdot \left(k \cdot \frac{\frac{t}{\ell} \cdot \left(\sin k \cdot \tan k\right)}{\color{blue}{\ell}}\right)} \]
              9. Taylor expanded in k around 0

                \[\leadsto \frac{2}{k \cdot \left(k \cdot \frac{\frac{{k}^{2} \cdot t}{\ell}}{\ell}\right)} \]
              10. Step-by-step derivation
                1. lower-/.f64N/A

                  \[\leadsto \frac{2}{k \cdot \left(k \cdot \frac{\frac{{k}^{2} \cdot t}{\ell}}{\ell}\right)} \]
                2. lower-*.f64N/A

                  \[\leadsto \frac{2}{k \cdot \left(k \cdot \frac{\frac{{k}^{2} \cdot t}{\ell}}{\ell}\right)} \]
                3. lower-pow.f6472.0

                  \[\leadsto \frac{2}{k \cdot \left(k \cdot \frac{\frac{{k}^{2} \cdot t}{\ell}}{\ell}\right)} \]
              11. Applied rewrites72.0%

                \[\leadsto \frac{2}{k \cdot \left(k \cdot \frac{\frac{{k}^{2} \cdot t}{\ell}}{\ell}\right)} \]
              12. Add Preprocessing

              Alternative 17: 70.2% accurate, 3.9× speedup?

              \[\frac{2}{\frac{\left({k}^{3} \cdot t\right) \cdot \frac{k}{\ell}}{\ell}} \]
              (FPCore (t l k)
               :precision binary64
               (/ 2.0 (/ (* (* (pow k 3.0) t) (/ k l)) l)))
              double code(double t, double l, double k) {
              	return 2.0 / (((pow(k, 3.0) * t) * (k / l)) / 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 = 2.0d0 / ((((k ** 3.0d0) * t) * (k / l)) / l)
              end function
              
              public static double code(double t, double l, double k) {
              	return 2.0 / (((Math.pow(k, 3.0) * t) * (k / l)) / l);
              }
              
              def code(t, l, k):
              	return 2.0 / (((math.pow(k, 3.0) * t) * (k / l)) / l)
              
              function code(t, l, k)
              	return Float64(2.0 / Float64(Float64(Float64((k ^ 3.0) * t) * Float64(k / l)) / l))
              end
              
              function tmp = code(t, l, k)
              	tmp = 2.0 / ((((k ^ 3.0) * t) * (k / l)) / l);
              end
              
              code[t_, l_, k_] := N[(2.0 / N[(N[(N[(N[Power[k, 3.0], $MachinePrecision] * t), $MachinePrecision] * N[(k / l), $MachinePrecision]), $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision]
              
              \frac{2}{\frac{\left({k}^{3} \cdot t\right) \cdot \frac{k}{\ell}}{\ell}}
              
              Derivation
              1. Initial program 35.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}{\frac{{k}^{2} \cdot \left(t \cdot {\sin k}^{2}\right)}{{\ell}^{2} \cdot \cos k}}} \]
              3. Step-by-step derivation
                1. lower-/.f64N/A

                  \[\leadsto \frac{2}{\frac{{k}^{2} \cdot \left(t \cdot {\sin k}^{2}\right)}{\color{blue}{{\ell}^{2} \cdot \cos k}}} \]
                2. lower-*.f64N/A

                  \[\leadsto \frac{2}{\frac{{k}^{2} \cdot \left(t \cdot {\sin k}^{2}\right)}{\color{blue}{{\ell}^{2}} \cdot \cos k}} \]
                3. lower-pow.f64N/A

                  \[\leadsto \frac{2}{\frac{{k}^{2} \cdot \left(t \cdot {\sin k}^{2}\right)}{{\color{blue}{\ell}}^{2} \cdot \cos k}} \]
                4. lower-*.f64N/A

                  \[\leadsto \frac{2}{\frac{{k}^{2} \cdot \left(t \cdot {\sin k}^{2}\right)}{{\ell}^{\color{blue}{2}} \cdot \cos k}} \]
                5. lower-pow.f64N/A

                  \[\leadsto \frac{2}{\frac{{k}^{2} \cdot \left(t \cdot {\sin k}^{2}\right)}{{\ell}^{2} \cdot \cos k}} \]
                6. lower-sin.f64N/A

                  \[\leadsto \frac{2}{\frac{{k}^{2} \cdot \left(t \cdot {\sin k}^{2}\right)}{{\ell}^{2} \cdot \cos k}} \]
                7. lower-*.f64N/A

                  \[\leadsto \frac{2}{\frac{{k}^{2} \cdot \left(t \cdot {\sin k}^{2}\right)}{{\ell}^{2} \cdot \color{blue}{\cos k}}} \]
                8. lower-pow.f64N/A

                  \[\leadsto \frac{2}{\frac{{k}^{2} \cdot \left(t \cdot {\sin k}^{2}\right)}{{\ell}^{2} \cdot \cos \color{blue}{k}}} \]
                9. lower-cos.f6473.8

                  \[\leadsto \frac{2}{\frac{{k}^{2} \cdot \left(t \cdot {\sin k}^{2}\right)}{{\ell}^{2} \cdot \cos k}} \]
              4. Applied rewrites73.8%

                \[\leadsto \frac{2}{\color{blue}{\frac{{k}^{2} \cdot \left(t \cdot {\sin k}^{2}\right)}{{\ell}^{2} \cdot \cos k}}} \]
              5. Step-by-step derivation
                1. lift-/.f64N/A

                  \[\leadsto \frac{2}{\frac{{k}^{2} \cdot \left(t \cdot {\sin k}^{2}\right)}{\color{blue}{{\ell}^{2} \cdot \cos k}}} \]
                2. lift-*.f64N/A

                  \[\leadsto \frac{2}{\frac{{k}^{2} \cdot \left(t \cdot {\sin k}^{2}\right)}{\color{blue}{{\ell}^{2}} \cdot \cos k}} \]
                3. lift-*.f64N/A

                  \[\leadsto \frac{2}{\frac{{k}^{2} \cdot \left(t \cdot {\sin k}^{2}\right)}{{\ell}^{2} \cdot \color{blue}{\cos k}}} \]
                4. times-fracN/A

                  \[\leadsto \frac{2}{\frac{{k}^{2}}{{\ell}^{2}} \cdot \color{blue}{\frac{t \cdot {\sin k}^{2}}{\cos k}}} \]
                5. *-commutativeN/A

                  \[\leadsto \frac{2}{\frac{t \cdot {\sin k}^{2}}{\cos k} \cdot \color{blue}{\frac{{k}^{2}}{{\ell}^{2}}}} \]
                6. lower-*.f64N/A

                  \[\leadsto \frac{2}{\frac{t \cdot {\sin k}^{2}}{\cos k} \cdot \color{blue}{\frac{{k}^{2}}{{\ell}^{2}}}} \]
                7. lift-*.f64N/A

                  \[\leadsto \frac{2}{\frac{t \cdot {\sin k}^{2}}{\cos k} \cdot \frac{{\color{blue}{k}}^{2}}{{\ell}^{2}}} \]
                8. associate-/l*N/A

                  \[\leadsto \frac{2}{\left(t \cdot \frac{{\sin k}^{2}}{\cos k}\right) \cdot \frac{\color{blue}{{k}^{2}}}{{\ell}^{2}}} \]
                9. lower-*.f64N/A

                  \[\leadsto \frac{2}{\left(t \cdot \frac{{\sin k}^{2}}{\cos k}\right) \cdot \frac{\color{blue}{{k}^{2}}}{{\ell}^{2}}} \]
                10. lift-pow.f64N/A

                  \[\leadsto \frac{2}{\left(t \cdot \frac{{\sin k}^{2}}{\cos k}\right) \cdot \frac{{k}^{2}}{{\ell}^{2}}} \]
                11. unpow2N/A

                  \[\leadsto \frac{2}{\left(t \cdot \frac{\sin k \cdot \sin k}{\cos k}\right) \cdot \frac{{k}^{2}}{{\ell}^{2}}} \]
                12. associate-*l/N/A

                  \[\leadsto \frac{2}{\left(t \cdot \left(\frac{\sin k}{\cos k} \cdot \sin k\right)\right) \cdot \frac{{k}^{\color{blue}{2}}}{{\ell}^{2}}} \]
                13. lift-sin.f64N/A

                  \[\leadsto \frac{2}{\left(t \cdot \left(\frac{\sin k}{\cos k} \cdot \sin k\right)\right) \cdot \frac{{k}^{2}}{{\ell}^{2}}} \]
                14. lift-cos.f64N/A

                  \[\leadsto \frac{2}{\left(t \cdot \left(\frac{\sin k}{\cos k} \cdot \sin k\right)\right) \cdot \frac{{k}^{2}}{{\ell}^{2}}} \]
                15. tan-quotN/A

                  \[\leadsto \frac{2}{\left(t \cdot \left(\tan k \cdot \sin k\right)\right) \cdot \frac{{k}^{2}}{{\ell}^{2}}} \]
                16. lift-tan.f64N/A

                  \[\leadsto \frac{2}{\left(t \cdot \left(\tan k \cdot \sin k\right)\right) \cdot \frac{{k}^{2}}{{\ell}^{2}}} \]
                17. lower-*.f64N/A

                  \[\leadsto \frac{2}{\left(t \cdot \left(\tan k \cdot \sin k\right)\right) \cdot \frac{{k}^{\color{blue}{2}}}{{\ell}^{2}}} \]
                18. lift-pow.f64N/A

                  \[\leadsto \frac{2}{\left(t \cdot \left(\tan k \cdot \sin k\right)\right) \cdot \frac{{k}^{2}}{{\color{blue}{\ell}}^{2}}} \]
                19. unpow2N/A

                  \[\leadsto \frac{2}{\left(t \cdot \left(\tan k \cdot \sin k\right)\right) \cdot \frac{k \cdot k}{{\color{blue}{\ell}}^{2}}} \]
                20. associate-/l*N/A

                  \[\leadsto \frac{2}{\left(t \cdot \left(\tan k \cdot \sin k\right)\right) \cdot \left(k \cdot \color{blue}{\frac{k}{{\ell}^{2}}}\right)} \]
              6. Applied rewrites77.4%

                \[\leadsto \frac{2}{\left(t \cdot \left(\tan k \cdot \sin k\right)\right) \cdot \color{blue}{\left(k \cdot \frac{k}{\ell \cdot \ell}\right)}} \]
              7. Step-by-step derivation
                1. lift-*.f64N/A

                  \[\leadsto \frac{2}{\left(t \cdot \left(\tan k \cdot \sin k\right)\right) \cdot \color{blue}{\left(k \cdot \frac{k}{\ell \cdot \ell}\right)}} \]
                2. lift-*.f64N/A

                  \[\leadsto \frac{2}{\left(t \cdot \left(\tan k \cdot \sin k\right)\right) \cdot \left(k \cdot \color{blue}{\frac{k}{\ell \cdot \ell}}\right)} \]
                3. associate-*r*N/A

                  \[\leadsto \frac{2}{\left(\left(t \cdot \left(\tan k \cdot \sin k\right)\right) \cdot k\right) \cdot \color{blue}{\frac{k}{\ell \cdot \ell}}} \]
                4. lift-/.f64N/A

                  \[\leadsto \frac{2}{\left(\left(t \cdot \left(\tan k \cdot \sin k\right)\right) \cdot k\right) \cdot \frac{k}{\color{blue}{\ell \cdot \ell}}} \]
                5. lift-*.f64N/A

                  \[\leadsto \frac{2}{\left(\left(t \cdot \left(\tan k \cdot \sin k\right)\right) \cdot k\right) \cdot \frac{k}{\ell \cdot \color{blue}{\ell}}} \]
                6. associate-/r*N/A

                  \[\leadsto \frac{2}{\left(\left(t \cdot \left(\tan k \cdot \sin k\right)\right) \cdot k\right) \cdot \frac{\frac{k}{\ell}}{\color{blue}{\ell}}} \]
                7. associate-*r/N/A

                  \[\leadsto \frac{2}{\frac{\left(\left(t \cdot \left(\tan k \cdot \sin k\right)\right) \cdot k\right) \cdot \frac{k}{\ell}}{\color{blue}{\ell}}} \]
                8. lower-/.f64N/A

                  \[\leadsto \frac{2}{\frac{\left(\left(t \cdot \left(\tan k \cdot \sin k\right)\right) \cdot k\right) \cdot \frac{k}{\ell}}{\color{blue}{\ell}}} \]
                9. lower-*.f64N/A

                  \[\leadsto \frac{2}{\frac{\left(\left(t \cdot \left(\tan k \cdot \sin k\right)\right) \cdot k\right) \cdot \frac{k}{\ell}}{\ell}} \]
                10. lift-*.f64N/A

                  \[\leadsto \frac{2}{\frac{\left(\left(t \cdot \left(\tan k \cdot \sin k\right)\right) \cdot k\right) \cdot \frac{k}{\ell}}{\ell}} \]
                11. lift-*.f64N/A

                  \[\leadsto \frac{2}{\frac{\left(\left(t \cdot \left(\tan k \cdot \sin k\right)\right) \cdot k\right) \cdot \frac{k}{\ell}}{\ell}} \]
                12. associate-*r*N/A

                  \[\leadsto \frac{2}{\frac{\left(\left(\left(t \cdot \tan k\right) \cdot \sin k\right) \cdot k\right) \cdot \frac{k}{\ell}}{\ell}} \]
                13. associate-*l*N/A

                  \[\leadsto \frac{2}{\frac{\left(\left(t \cdot \tan k\right) \cdot \left(\sin k \cdot k\right)\right) \cdot \frac{k}{\ell}}{\ell}} \]
                14. lower-*.f64N/A

                  \[\leadsto \frac{2}{\frac{\left(\left(t \cdot \tan k\right) \cdot \left(\sin k \cdot k\right)\right) \cdot \frac{k}{\ell}}{\ell}} \]
                15. *-commutativeN/A

                  \[\leadsto \frac{2}{\frac{\left(\left(\tan k \cdot t\right) \cdot \left(\sin k \cdot k\right)\right) \cdot \frac{k}{\ell}}{\ell}} \]
                16. lower-*.f64N/A

                  \[\leadsto \frac{2}{\frac{\left(\left(\tan k \cdot t\right) \cdot \left(\sin k \cdot k\right)\right) \cdot \frac{k}{\ell}}{\ell}} \]
                17. lower-*.f64N/A

                  \[\leadsto \frac{2}{\frac{\left(\left(\tan k \cdot t\right) \cdot \left(\sin k \cdot k\right)\right) \cdot \frac{k}{\ell}}{\ell}} \]
                18. lower-/.f6491.0

                  \[\leadsto \frac{2}{\frac{\left(\left(\tan k \cdot t\right) \cdot \left(\sin k \cdot k\right)\right) \cdot \frac{k}{\ell}}{\ell}} \]
              8. Applied rewrites91.0%

                \[\leadsto \frac{2}{\frac{\left(\left(\tan k \cdot t\right) \cdot \left(\sin k \cdot k\right)\right) \cdot \frac{k}{\ell}}{\color{blue}{\ell}}} \]
              9. Taylor expanded in k around 0

                \[\leadsto \frac{2}{\frac{\left({k}^{3} \cdot t\right) \cdot \frac{k}{\ell}}{\ell}} \]
              10. Step-by-step derivation
                1. lower-*.f64N/A

                  \[\leadsto \frac{2}{\frac{\left({k}^{3} \cdot t\right) \cdot \frac{k}{\ell}}{\ell}} \]
                2. lower-pow.f6470.2

                  \[\leadsto \frac{2}{\frac{\left({k}^{3} \cdot t\right) \cdot \frac{k}{\ell}}{\ell}} \]
              11. Applied rewrites70.2%

                \[\leadsto \frac{2}{\frac{\left({k}^{3} \cdot t\right) \cdot \frac{k}{\ell}}{\ell}} \]
              12. Add Preprocessing

              Alternative 18: 69.1% accurate, 4.4× speedup?

              \[\frac{\ell \cdot {k}^{-4}}{t} \cdot \left(\ell + \ell\right) \]
              (FPCore (t l k) :precision binary64 (* (/ (* l (pow k -4.0)) t) (+ l l)))
              double code(double t, double l, double k) {
              	return ((l * pow(k, -4.0)) / t) * (l + 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 ** (-4.0d0))) / t) * (l + l)
              end function
              
              public static double code(double t, double l, double k) {
              	return ((l * Math.pow(k, -4.0)) / t) * (l + l);
              }
              
              def code(t, l, k):
              	return ((l * math.pow(k, -4.0)) / t) * (l + l)
              
              function code(t, l, k)
              	return Float64(Float64(Float64(l * (k ^ -4.0)) / t) * Float64(l + l))
              end
              
              function tmp = code(t, l, k)
              	tmp = ((l * (k ^ -4.0)) / t) * (l + l);
              end
              
              code[t_, l_, k_] := N[(N[(N[(l * N[Power[k, -4.0], $MachinePrecision]), $MachinePrecision] / t), $MachinePrecision] * N[(l + l), $MachinePrecision]), $MachinePrecision]
              
              \frac{\ell \cdot {k}^{-4}}{t} \cdot \left(\ell + \ell\right)
              
              Derivation
              1. Initial program 35.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 k around 0

                \[\leadsto \color{blue}{2 \cdot \frac{{\ell}^{2}}{{k}^{4} \cdot t}} \]
              3. Step-by-step derivation
                1. lower-*.f64N/A

                  \[\leadsto 2 \cdot \color{blue}{\frac{{\ell}^{2}}{{k}^{4} \cdot t}} \]
                2. lower-/.f64N/A

                  \[\leadsto 2 \cdot \frac{{\ell}^{2}}{\color{blue}{{k}^{4} \cdot t}} \]
                3. lower-pow.f64N/A

                  \[\leadsto 2 \cdot \frac{{\ell}^{2}}{\color{blue}{{k}^{4}} \cdot t} \]
                4. lower-*.f64N/A

                  \[\leadsto 2 \cdot \frac{{\ell}^{2}}{{k}^{4} \cdot \color{blue}{t}} \]
                5. lower-pow.f6462.3

                  \[\leadsto 2 \cdot \frac{{\ell}^{2}}{{k}^{4} \cdot t} \]
              4. Applied rewrites62.3%

                \[\leadsto \color{blue}{2 \cdot \frac{{\ell}^{2}}{{k}^{4} \cdot t}} \]
              5. Step-by-step derivation
                1. lift-*.f64N/A

                  \[\leadsto 2 \cdot \color{blue}{\frac{{\ell}^{2}}{{k}^{4} \cdot t}} \]
                2. *-commutativeN/A

                  \[\leadsto \frac{{\ell}^{2}}{{k}^{4} \cdot t} \cdot \color{blue}{2} \]
                3. lower-*.f6462.3

                  \[\leadsto \frac{{\ell}^{2}}{{k}^{4} \cdot t} \cdot \color{blue}{2} \]
                4. lift-/.f64N/A

                  \[\leadsto \frac{{\ell}^{2}}{{k}^{4} \cdot t} \cdot 2 \]
                5. lift-pow.f64N/A

                  \[\leadsto \frac{{\ell}^{2}}{{k}^{4} \cdot t} \cdot 2 \]
                6. pow2N/A

                  \[\leadsto \frac{\ell \cdot \ell}{{k}^{4} \cdot t} \cdot 2 \]
                7. associate-/l*N/A

                  \[\leadsto \left(\ell \cdot \frac{\ell}{{k}^{4} \cdot t}\right) \cdot 2 \]
                8. lower-*.f64N/A

                  \[\leadsto \left(\ell \cdot \frac{\ell}{{k}^{4} \cdot t}\right) \cdot 2 \]
                9. lower-/.f6468.5

                  \[\leadsto \left(\ell \cdot \frac{\ell}{{k}^{4} \cdot t}\right) \cdot 2 \]
              6. Applied rewrites68.5%

                \[\leadsto \left(\ell \cdot \frac{\ell}{{k}^{4} \cdot t}\right) \cdot \color{blue}{2} \]
              7. Step-by-step derivation
                1. lift-*.f64N/A

                  \[\leadsto \left(\ell \cdot \frac{\ell}{{k}^{4} \cdot t}\right) \cdot \color{blue}{2} \]
                2. *-commutativeN/A

                  \[\leadsto 2 \cdot \color{blue}{\left(\ell \cdot \frac{\ell}{{k}^{4} \cdot t}\right)} \]
                3. lift-*.f64N/A

                  \[\leadsto 2 \cdot \left(\ell \cdot \color{blue}{\frac{\ell}{{k}^{4} \cdot t}}\right) \]
                4. lift-/.f64N/A

                  \[\leadsto 2 \cdot \left(\ell \cdot \frac{\ell}{\color{blue}{{k}^{4} \cdot t}}\right) \]
                5. associate-*r/N/A

                  \[\leadsto 2 \cdot \frac{\ell \cdot \ell}{\color{blue}{{k}^{4} \cdot t}} \]
                6. pow2N/A

                  \[\leadsto 2 \cdot \frac{{\ell}^{2}}{\color{blue}{{k}^{4}} \cdot t} \]
                7. lift-pow.f64N/A

                  \[\leadsto 2 \cdot \frac{{\ell}^{2}}{\color{blue}{{k}^{4}} \cdot t} \]
                8. lift-pow.f64N/A

                  \[\leadsto 2 \cdot \frac{{\ell}^{2}}{{k}^{4} \cdot t} \]
                9. exp-to-powN/A

                  \[\leadsto 2 \cdot \frac{{\ell}^{2}}{e^{\log k \cdot 4} \cdot t} \]
                10. lift-log.f64N/A

                  \[\leadsto 2 \cdot \frac{{\ell}^{2}}{e^{\log k \cdot 4} \cdot t} \]
                11. lift-*.f64N/A

                  \[\leadsto 2 \cdot \frac{{\ell}^{2}}{e^{\log k \cdot 4} \cdot t} \]
                12. lift-exp.f64N/A

                  \[\leadsto 2 \cdot \frac{{\ell}^{2}}{e^{\log k \cdot 4} \cdot t} \]
                13. lift-/.f64N/A

                  \[\leadsto 2 \cdot \frac{{\ell}^{2}}{\color{blue}{e^{\log k \cdot 4} \cdot t}} \]
                14. count-2-revN/A

                  \[\leadsto \frac{{\ell}^{2}}{e^{\log k \cdot 4} \cdot t} + \color{blue}{\frac{{\ell}^{2}}{e^{\log k \cdot 4} \cdot t}} \]
              8. Applied rewrites68.5%

                \[\leadsto \frac{\ell}{{k}^{4} \cdot t} \cdot \color{blue}{\left(\ell + \ell\right)} \]
              9. Step-by-step derivation
                1. lift-/.f64N/A

                  \[\leadsto \frac{\ell}{{k}^{4} \cdot t} \cdot \left(\color{blue}{\ell} + \ell\right) \]
                2. lift-*.f64N/A

                  \[\leadsto \frac{\ell}{{k}^{4} \cdot t} \cdot \left(\ell + \ell\right) \]
                3. associate-/r*N/A

                  \[\leadsto \frac{\frac{\ell}{{k}^{4}}}{t} \cdot \left(\color{blue}{\ell} + \ell\right) \]
                4. lower-/.f64N/A

                  \[\leadsto \frac{\frac{\ell}{{k}^{4}}}{t} \cdot \left(\color{blue}{\ell} + \ell\right) \]
                5. mult-flipN/A

                  \[\leadsto \frac{\ell \cdot \frac{1}{{k}^{4}}}{t} \cdot \left(\ell + \ell\right) \]
                6. lower-*.f64N/A

                  \[\leadsto \frac{\ell \cdot \frac{1}{{k}^{4}}}{t} \cdot \left(\ell + \ell\right) \]
                7. lift-pow.f64N/A

                  \[\leadsto \frac{\ell \cdot \frac{1}{{k}^{4}}}{t} \cdot \left(\ell + \ell\right) \]
                8. pow-flipN/A

                  \[\leadsto \frac{\ell \cdot {k}^{\left(\mathsf{neg}\left(4\right)\right)}}{t} \cdot \left(\ell + \ell\right) \]
                9. lower-pow.f64N/A

                  \[\leadsto \frac{\ell \cdot {k}^{\left(\mathsf{neg}\left(4\right)\right)}}{t} \cdot \left(\ell + \ell\right) \]
                10. metadata-eval69.1

                  \[\leadsto \frac{\ell \cdot {k}^{-4}}{t} \cdot \left(\ell + \ell\right) \]
              10. Applied rewrites69.1%

                \[\leadsto \frac{\ell \cdot {k}^{-4}}{t} \cdot \left(\color{blue}{\ell} + \ell\right) \]
              11. Add Preprocessing

              Alternative 19: 68.5% accurate, 4.4× speedup?

              \[\frac{\ell}{{k}^{4} \cdot t} \cdot \left(\ell + \ell\right) \]
              (FPCore (t l k) :precision binary64 (* (/ l (* (pow k 4.0) t)) (+ l l)))
              double code(double t, double l, double k) {
              	return (l / (pow(k, 4.0) * t)) * (l + 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 ** 4.0d0) * t)) * (l + l)
              end function
              
              public static double code(double t, double l, double k) {
              	return (l / (Math.pow(k, 4.0) * t)) * (l + l);
              }
              
              def code(t, l, k):
              	return (l / (math.pow(k, 4.0) * t)) * (l + l)
              
              function code(t, l, k)
              	return Float64(Float64(l / Float64((k ^ 4.0) * t)) * Float64(l + l))
              end
              
              function tmp = code(t, l, k)
              	tmp = (l / ((k ^ 4.0) * t)) * (l + l);
              end
              
              code[t_, l_, k_] := N[(N[(l / N[(N[Power[k, 4.0], $MachinePrecision] * t), $MachinePrecision]), $MachinePrecision] * N[(l + l), $MachinePrecision]), $MachinePrecision]
              
              \frac{\ell}{{k}^{4} \cdot t} \cdot \left(\ell + \ell\right)
              
              Derivation
              1. Initial program 35.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 k around 0

                \[\leadsto \color{blue}{2 \cdot \frac{{\ell}^{2}}{{k}^{4} \cdot t}} \]
              3. Step-by-step derivation
                1. lower-*.f64N/A

                  \[\leadsto 2 \cdot \color{blue}{\frac{{\ell}^{2}}{{k}^{4} \cdot t}} \]
                2. lower-/.f64N/A

                  \[\leadsto 2 \cdot \frac{{\ell}^{2}}{\color{blue}{{k}^{4} \cdot t}} \]
                3. lower-pow.f64N/A

                  \[\leadsto 2 \cdot \frac{{\ell}^{2}}{\color{blue}{{k}^{4}} \cdot t} \]
                4. lower-*.f64N/A

                  \[\leadsto 2 \cdot \frac{{\ell}^{2}}{{k}^{4} \cdot \color{blue}{t}} \]
                5. lower-pow.f6462.3

                  \[\leadsto 2 \cdot \frac{{\ell}^{2}}{{k}^{4} \cdot t} \]
              4. Applied rewrites62.3%

                \[\leadsto \color{blue}{2 \cdot \frac{{\ell}^{2}}{{k}^{4} \cdot t}} \]
              5. Step-by-step derivation
                1. lift-*.f64N/A

                  \[\leadsto 2 \cdot \color{blue}{\frac{{\ell}^{2}}{{k}^{4} \cdot t}} \]
                2. *-commutativeN/A

                  \[\leadsto \frac{{\ell}^{2}}{{k}^{4} \cdot t} \cdot \color{blue}{2} \]
                3. lower-*.f6462.3

                  \[\leadsto \frac{{\ell}^{2}}{{k}^{4} \cdot t} \cdot \color{blue}{2} \]
                4. lift-/.f64N/A

                  \[\leadsto \frac{{\ell}^{2}}{{k}^{4} \cdot t} \cdot 2 \]
                5. lift-pow.f64N/A

                  \[\leadsto \frac{{\ell}^{2}}{{k}^{4} \cdot t} \cdot 2 \]
                6. pow2N/A

                  \[\leadsto \frac{\ell \cdot \ell}{{k}^{4} \cdot t} \cdot 2 \]
                7. associate-/l*N/A

                  \[\leadsto \left(\ell \cdot \frac{\ell}{{k}^{4} \cdot t}\right) \cdot 2 \]
                8. lower-*.f64N/A

                  \[\leadsto \left(\ell \cdot \frac{\ell}{{k}^{4} \cdot t}\right) \cdot 2 \]
                9. lower-/.f6468.5

                  \[\leadsto \left(\ell \cdot \frac{\ell}{{k}^{4} \cdot t}\right) \cdot 2 \]
              6. Applied rewrites68.5%

                \[\leadsto \left(\ell \cdot \frac{\ell}{{k}^{4} \cdot t}\right) \cdot \color{blue}{2} \]
              7. Step-by-step derivation
                1. lift-*.f64N/A

                  \[\leadsto \left(\ell \cdot \frac{\ell}{{k}^{4} \cdot t}\right) \cdot \color{blue}{2} \]
                2. *-commutativeN/A

                  \[\leadsto 2 \cdot \color{blue}{\left(\ell \cdot \frac{\ell}{{k}^{4} \cdot t}\right)} \]
                3. lift-*.f64N/A

                  \[\leadsto 2 \cdot \left(\ell \cdot \color{blue}{\frac{\ell}{{k}^{4} \cdot t}}\right) \]
                4. lift-/.f64N/A

                  \[\leadsto 2 \cdot \left(\ell \cdot \frac{\ell}{\color{blue}{{k}^{4} \cdot t}}\right) \]
                5. associate-*r/N/A

                  \[\leadsto 2 \cdot \frac{\ell \cdot \ell}{\color{blue}{{k}^{4} \cdot t}} \]
                6. pow2N/A

                  \[\leadsto 2 \cdot \frac{{\ell}^{2}}{\color{blue}{{k}^{4}} \cdot t} \]
                7. lift-pow.f64N/A

                  \[\leadsto 2 \cdot \frac{{\ell}^{2}}{\color{blue}{{k}^{4}} \cdot t} \]
                8. lift-pow.f64N/A

                  \[\leadsto 2 \cdot \frac{{\ell}^{2}}{{k}^{4} \cdot t} \]
                9. exp-to-powN/A

                  \[\leadsto 2 \cdot \frac{{\ell}^{2}}{e^{\log k \cdot 4} \cdot t} \]
                10. lift-log.f64N/A

                  \[\leadsto 2 \cdot \frac{{\ell}^{2}}{e^{\log k \cdot 4} \cdot t} \]
                11. lift-*.f64N/A

                  \[\leadsto 2 \cdot \frac{{\ell}^{2}}{e^{\log k \cdot 4} \cdot t} \]
                12. lift-exp.f64N/A

                  \[\leadsto 2 \cdot \frac{{\ell}^{2}}{e^{\log k \cdot 4} \cdot t} \]
                13. lift-/.f64N/A

                  \[\leadsto 2 \cdot \frac{{\ell}^{2}}{\color{blue}{e^{\log k \cdot 4} \cdot t}} \]
                14. count-2-revN/A

                  \[\leadsto \frac{{\ell}^{2}}{e^{\log k \cdot 4} \cdot t} + \color{blue}{\frac{{\ell}^{2}}{e^{\log k \cdot 4} \cdot t}} \]
              8. Applied rewrites68.5%

                \[\leadsto \frac{\ell}{{k}^{4} \cdot t} \cdot \color{blue}{\left(\ell + \ell\right)} \]
              9. Add Preprocessing

              Alternative 20: 68.3% accurate, 4.4× speedup?

              \[\left(\frac{{k}^{-4}}{t} \cdot \ell\right) \cdot \left(\ell + \ell\right) \]
              (FPCore (t l k) :precision binary64 (* (* (/ (pow k -4.0) t) l) (+ l l)))
              double code(double t, double l, double k) {
              	return ((pow(k, -4.0) / t) * l) * (l + 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 = (((k ** (-4.0d0)) / t) * l) * (l + l)
              end function
              
              public static double code(double t, double l, double k) {
              	return ((Math.pow(k, -4.0) / t) * l) * (l + l);
              }
              
              def code(t, l, k):
              	return ((math.pow(k, -4.0) / t) * l) * (l + l)
              
              function code(t, l, k)
              	return Float64(Float64(Float64((k ^ -4.0) / t) * l) * Float64(l + l))
              end
              
              function tmp = code(t, l, k)
              	tmp = (((k ^ -4.0) / t) * l) * (l + l);
              end
              
              code[t_, l_, k_] := N[(N[(N[(N[Power[k, -4.0], $MachinePrecision] / t), $MachinePrecision] * l), $MachinePrecision] * N[(l + l), $MachinePrecision]), $MachinePrecision]
              
              \left(\frac{{k}^{-4}}{t} \cdot \ell\right) \cdot \left(\ell + \ell\right)
              
              Derivation
              1. Initial program 35.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 k around 0

                \[\leadsto \color{blue}{2 \cdot \frac{{\ell}^{2}}{{k}^{4} \cdot t}} \]
              3. Step-by-step derivation
                1. lower-*.f64N/A

                  \[\leadsto 2 \cdot \color{blue}{\frac{{\ell}^{2}}{{k}^{4} \cdot t}} \]
                2. lower-/.f64N/A

                  \[\leadsto 2 \cdot \frac{{\ell}^{2}}{\color{blue}{{k}^{4} \cdot t}} \]
                3. lower-pow.f64N/A

                  \[\leadsto 2 \cdot \frac{{\ell}^{2}}{\color{blue}{{k}^{4}} \cdot t} \]
                4. lower-*.f64N/A

                  \[\leadsto 2 \cdot \frac{{\ell}^{2}}{{k}^{4} \cdot \color{blue}{t}} \]
                5. lower-pow.f6462.3

                  \[\leadsto 2 \cdot \frac{{\ell}^{2}}{{k}^{4} \cdot t} \]
              4. Applied rewrites62.3%

                \[\leadsto \color{blue}{2 \cdot \frac{{\ell}^{2}}{{k}^{4} \cdot t}} \]
              5. Step-by-step derivation
                1. lift-*.f64N/A

                  \[\leadsto 2 \cdot \color{blue}{\frac{{\ell}^{2}}{{k}^{4} \cdot t}} \]
                2. *-commutativeN/A

                  \[\leadsto \frac{{\ell}^{2}}{{k}^{4} \cdot t} \cdot \color{blue}{2} \]
                3. lower-*.f6462.3

                  \[\leadsto \frac{{\ell}^{2}}{{k}^{4} \cdot t} \cdot \color{blue}{2} \]
                4. lift-/.f64N/A

                  \[\leadsto \frac{{\ell}^{2}}{{k}^{4} \cdot t} \cdot 2 \]
                5. lift-pow.f64N/A

                  \[\leadsto \frac{{\ell}^{2}}{{k}^{4} \cdot t} \cdot 2 \]
                6. pow2N/A

                  \[\leadsto \frac{\ell \cdot \ell}{{k}^{4} \cdot t} \cdot 2 \]
                7. associate-/l*N/A

                  \[\leadsto \left(\ell \cdot \frac{\ell}{{k}^{4} \cdot t}\right) \cdot 2 \]
                8. lower-*.f64N/A

                  \[\leadsto \left(\ell \cdot \frac{\ell}{{k}^{4} \cdot t}\right) \cdot 2 \]
                9. lower-/.f6468.5

                  \[\leadsto \left(\ell \cdot \frac{\ell}{{k}^{4} \cdot t}\right) \cdot 2 \]
              6. Applied rewrites68.5%

                \[\leadsto \left(\ell \cdot \frac{\ell}{{k}^{4} \cdot t}\right) \cdot \color{blue}{2} \]
              7. Step-by-step derivation
                1. lift-*.f64N/A

                  \[\leadsto \left(\ell \cdot \frac{\ell}{{k}^{4} \cdot t}\right) \cdot \color{blue}{2} \]
                2. *-commutativeN/A

                  \[\leadsto 2 \cdot \color{blue}{\left(\ell \cdot \frac{\ell}{{k}^{4} \cdot t}\right)} \]
                3. lift-*.f64N/A

                  \[\leadsto 2 \cdot \left(\ell \cdot \color{blue}{\frac{\ell}{{k}^{4} \cdot t}}\right) \]
                4. lift-/.f64N/A

                  \[\leadsto 2 \cdot \left(\ell \cdot \frac{\ell}{\color{blue}{{k}^{4} \cdot t}}\right) \]
                5. associate-*r/N/A

                  \[\leadsto 2 \cdot \frac{\ell \cdot \ell}{\color{blue}{{k}^{4} \cdot t}} \]
                6. pow2N/A

                  \[\leadsto 2 \cdot \frac{{\ell}^{2}}{\color{blue}{{k}^{4}} \cdot t} \]
                7. lift-pow.f64N/A

                  \[\leadsto 2 \cdot \frac{{\ell}^{2}}{\color{blue}{{k}^{4}} \cdot t} \]
                8. lift-pow.f64N/A

                  \[\leadsto 2 \cdot \frac{{\ell}^{2}}{{k}^{4} \cdot t} \]
                9. exp-to-powN/A

                  \[\leadsto 2 \cdot \frac{{\ell}^{2}}{e^{\log k \cdot 4} \cdot t} \]
                10. lift-log.f64N/A

                  \[\leadsto 2 \cdot \frac{{\ell}^{2}}{e^{\log k \cdot 4} \cdot t} \]
                11. lift-*.f64N/A

                  \[\leadsto 2 \cdot \frac{{\ell}^{2}}{e^{\log k \cdot 4} \cdot t} \]
                12. lift-exp.f64N/A

                  \[\leadsto 2 \cdot \frac{{\ell}^{2}}{e^{\log k \cdot 4} \cdot t} \]
                13. lift-/.f64N/A

                  \[\leadsto 2 \cdot \frac{{\ell}^{2}}{\color{blue}{e^{\log k \cdot 4} \cdot t}} \]
                14. count-2-revN/A

                  \[\leadsto \frac{{\ell}^{2}}{e^{\log k \cdot 4} \cdot t} + \color{blue}{\frac{{\ell}^{2}}{e^{\log k \cdot 4} \cdot t}} \]
              8. Applied rewrites68.5%

                \[\leadsto \frac{\ell}{{k}^{4} \cdot t} \cdot \color{blue}{\left(\ell + \ell\right)} \]
              9. Step-by-step derivation
                1. lift-/.f64N/A

                  \[\leadsto \frac{\ell}{{k}^{4} \cdot t} \cdot \left(\color{blue}{\ell} + \ell\right) \]
                2. mult-flipN/A

                  \[\leadsto \left(\ell \cdot \frac{1}{{k}^{4} \cdot t}\right) \cdot \left(\color{blue}{\ell} + \ell\right) \]
                3. *-commutativeN/A

                  \[\leadsto \left(\frac{1}{{k}^{4} \cdot t} \cdot \ell\right) \cdot \left(\color{blue}{\ell} + \ell\right) \]
                4. lower-*.f64N/A

                  \[\leadsto \left(\frac{1}{{k}^{4} \cdot t} \cdot \ell\right) \cdot \left(\color{blue}{\ell} + \ell\right) \]
                5. lift-*.f64N/A

                  \[\leadsto \left(\frac{1}{{k}^{4} \cdot t} \cdot \ell\right) \cdot \left(\ell + \ell\right) \]
                6. associate-/r*N/A

                  \[\leadsto \left(\frac{\frac{1}{{k}^{4}}}{t} \cdot \ell\right) \cdot \left(\ell + \ell\right) \]
                7. lower-/.f64N/A

                  \[\leadsto \left(\frac{\frac{1}{{k}^{4}}}{t} \cdot \ell\right) \cdot \left(\ell + \ell\right) \]
                8. lift-pow.f64N/A

                  \[\leadsto \left(\frac{\frac{1}{{k}^{4}}}{t} \cdot \ell\right) \cdot \left(\ell + \ell\right) \]
                9. pow-flipN/A

                  \[\leadsto \left(\frac{{k}^{\left(\mathsf{neg}\left(4\right)\right)}}{t} \cdot \ell\right) \cdot \left(\ell + \ell\right) \]
                10. lower-pow.f64N/A

                  \[\leadsto \left(\frac{{k}^{\left(\mathsf{neg}\left(4\right)\right)}}{t} \cdot \ell\right) \cdot \left(\ell + \ell\right) \]
                11. metadata-eval68.3

                  \[\leadsto \left(\frac{{k}^{-4}}{t} \cdot \ell\right) \cdot \left(\ell + \ell\right) \]
              10. Applied rewrites68.3%

                \[\leadsto \left(\frac{{k}^{-4}}{t} \cdot \ell\right) \cdot \left(\color{blue}{\ell} + \ell\right) \]
              11. Add Preprocessing

              Reproduce

              ?
              herbie shell --seed 2025178 
              (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))))