Toniolo and Linder, Equation (10-)

Percentage Accurate: 35.1% → 96.0%
Time: 8.1s
Alternatives: 15
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 15 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.1% 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: 96.0% accurate, 1.2× speedup?

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

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


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

    1. Initial program 35.1%

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

        \[\leadsto \color{blue}{\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. lift-*.f64N/A

        \[\leadsto \frac{2}{\color{blue}{\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)}} \]
      3. *-commutativeN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \frac{\ell}{\sin k \cdot \tan k} \cdot \left(\color{blue}{\left(\ell + \ell\right)} \cdot \frac{\frac{t \cdot t}{k \cdot k}}{\left(t \cdot t\right) \cdot t}\right) \]
    6. Applied rewrites84.8%

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

    if 1.9999999999999999e33 < k

    1. Initial program 35.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto 2 \cdot \frac{\left(\cos k \cdot \ell\right) \cdot \ell}{k \cdot \color{blue}{\left(\left(\left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(k + k\right)\right) \cdot t\right) \cdot k\right)}} \]
      12. associate-/l/N/A

        \[\leadsto 2 \cdot \frac{\frac{\left(\cos k \cdot \ell\right) \cdot \ell}{k}}{\color{blue}{\left(\left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(k + k\right)\right) \cdot t\right) \cdot k}} \]
    8. Applied rewrites86.0%

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

Alternative 2: 93.0% accurate, 1.2× speedup?

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

\mathbf{else}:\\
\;\;\;\;\frac{\cos \left(\left|k\right|\right) \cdot \ell}{\left|k\right|} \cdot \frac{\ell + \ell}{\left(\mathsf{fma}\left(\cos \left(\left|k\right| + \left|k\right|\right), -0.5, 0.5\right) \cdot t\right) \cdot \left|k\right|}\\


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

    1. Initial program 35.1%

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

        \[\leadsto \color{blue}{\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. lift-*.f64N/A

        \[\leadsto \frac{2}{\color{blue}{\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)}} \]
      3. *-commutativeN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \frac{\ell}{\sin k \cdot \tan k} \cdot \left(\color{blue}{\left(\ell + \ell\right)} \cdot \frac{\frac{t \cdot t}{k \cdot k}}{\left(t \cdot t\right) \cdot t}\right) \]
    6. Applied rewrites84.8%

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

    if 1.9999999999999999e35 < k

    1. Initial program 35.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto 2 \cdot \left(\ell \cdot \left(\ell \cdot \frac{\cos k}{\left(\left(\left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(k + k\right)\right) \cdot t\right) \cdot k\right) \cdot k}\right)\right) \]
      5. count-2N/A

        \[\leadsto 2 \cdot \left(\ell \cdot \left(\ell \cdot \frac{\cos k}{\left(\left(\left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot k\right)\right) \cdot t\right) \cdot k\right) \cdot k}\right)\right) \]
      6. sqr-sin-a-revN/A

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

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

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

        \[\leadsto 2 \cdot \left(\ell \cdot \left(\ell \cdot \frac{\cos k}{\left(\left({\sin k}^{2} \cdot t\right) \cdot k\right) \cdot k}\right)\right) \]
      10. lower-pow.f6485.3

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 3: 88.3% accurate, 1.2× speedup?

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

\mathbf{else}:\\
\;\;\;\;\left(\left(\ell + \ell\right) \cdot \cos \left(\left|k\right|\right)\right) \cdot \frac{\ell}{\left(\left(\mathsf{fma}\left(\cos \left(\left|k\right| + \left|k\right|\right), -0.5, 0.5\right) \cdot t\right) \cdot \left|k\right|\right) \cdot \left|k\right|}\\


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

    1. Initial program 35.1%

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

        \[\leadsto \color{blue}{\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. lift-*.f64N/A

        \[\leadsto \frac{2}{\color{blue}{\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)}} \]
      3. *-commutativeN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \frac{\ell}{\sin k \cdot \tan k} \cdot \left(\color{blue}{\left(\ell + \ell\right)} \cdot \frac{\frac{t \cdot t}{k \cdot k}}{\left(t \cdot t\right) \cdot t}\right) \]
    6. Applied rewrites84.8%

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

    if 4.9999999999999999e144 < k

    1. Initial program 35.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto 2 \cdot \left(\ell \cdot \left(\ell \cdot \frac{\cos k}{\left(\left(\left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(k + k\right)\right) \cdot t\right) \cdot k\right) \cdot k}\right)\right) \]
      5. count-2N/A

        \[\leadsto 2 \cdot \left(\ell \cdot \left(\ell \cdot \frac{\cos k}{\left(\left(\left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot k\right)\right) \cdot t\right) \cdot k\right) \cdot k}\right)\right) \]
      6. sqr-sin-a-revN/A

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

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

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

        \[\leadsto 2 \cdot \left(\ell \cdot \left(\ell \cdot \frac{\cos k}{\left(\left({\sin k}^{2} \cdot t\right) \cdot k\right) \cdot k}\right)\right) \]
      10. lower-pow.f6485.3

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

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

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

Alternative 4: 88.3% accurate, 1.2× speedup?

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

\mathbf{else}:\\
\;\;\;\;\left(\frac{\ell}{\left(\left(\mathsf{fma}\left(\cos \left(\left|k\right| + \left|k\right|\right), -0.5, 0.5\right) \cdot t\right) \cdot \left|k\right|\right) \cdot \left|k\right|} \cdot \cos \left(\left|k\right|\right)\right) \cdot \left(\ell + \ell\right)\\


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

    1. Initial program 35.1%

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

        \[\leadsto \color{blue}{\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. lift-*.f64N/A

        \[\leadsto \frac{2}{\color{blue}{\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)}} \]
      3. *-commutativeN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \frac{\ell}{\sin k \cdot \tan k} \cdot \left(\color{blue}{\left(\ell + \ell\right)} \cdot \frac{\frac{t \cdot t}{k \cdot k}}{\left(t \cdot t\right) \cdot t}\right) \]
    6. Applied rewrites84.8%

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

    if 4.9999999999999999e144 < k

    1. Initial program 35.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto 2 \cdot \left(\ell \cdot \left(\ell \cdot \frac{\cos k}{\left(\left(\left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(k + k\right)\right) \cdot t\right) \cdot k\right) \cdot k}\right)\right) \]
      5. count-2N/A

        \[\leadsto 2 \cdot \left(\ell \cdot \left(\ell \cdot \frac{\cos k}{\left(\left(\left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot k\right)\right) \cdot t\right) \cdot k\right) \cdot k}\right)\right) \]
      6. sqr-sin-a-revN/A

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

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

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

        \[\leadsto 2 \cdot \left(\ell \cdot \left(\ell \cdot \frac{\cos k}{\left(\left({\sin k}^{2} \cdot t\right) \cdot k\right) \cdot k}\right)\right) \]
      10. lower-pow.f6485.3

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

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

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

Alternative 5: 84.8% accurate, 1.4× speedup?

\[\frac{\ell}{\sin k \cdot \tan k} \cdot \left(\left(\ell + \ell\right) \cdot \frac{\frac{1}{t}}{k \cdot k}\right) \]
(FPCore (t l k)
 :precision binary64
 (* (/ l (* (sin k) (tan k))) (* (+ l l) (/ (/ 1.0 t) (* k k)))))
double code(double t, double l, double k) {
	return (l / (sin(k) * tan(k))) * ((l + l) * ((1.0 / t) / (k * k)));
}
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 / (sin(k) * tan(k))) * ((l + l) * ((1.0d0 / t) / (k * k)))
end function
public static double code(double t, double l, double k) {
	return (l / (Math.sin(k) * Math.tan(k))) * ((l + l) * ((1.0 / t) / (k * k)));
}
def code(t, l, k):
	return (l / (math.sin(k) * math.tan(k))) * ((l + l) * ((1.0 / t) / (k * k)))
function code(t, l, k)
	return Float64(Float64(l / Float64(sin(k) * tan(k))) * Float64(Float64(l + l) * Float64(Float64(1.0 / t) / Float64(k * k))))
end
function tmp = code(t, l, k)
	tmp = (l / (sin(k) * tan(k))) * ((l + l) * ((1.0 / t) / (k * k)));
end
code[t_, l_, k_] := N[(N[(l / N[(N[Sin[k], $MachinePrecision] * N[Tan[k], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(N[(l + l), $MachinePrecision] * N[(N[(1.0 / t), $MachinePrecision] / N[(k * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\frac{\ell}{\sin k \cdot \tan k} \cdot \left(\left(\ell + \ell\right) \cdot \frac{\frac{1}{t}}{k \cdot k}\right)
Derivation
  1. Initial program 35.1%

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

      \[\leadsto \color{blue}{\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. lift-*.f64N/A

      \[\leadsto \frac{2}{\color{blue}{\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)}} \]
    3. *-commutativeN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \frac{\ell}{\sin k \cdot \tan k} \cdot \left(\color{blue}{\left(\ell + \ell\right)} \cdot \frac{\frac{t \cdot t}{k \cdot k}}{\left(t \cdot t\right) \cdot t}\right) \]
  6. Applied rewrites84.8%

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

Alternative 6: 84.1% accurate, 1.4× speedup?

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

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

real(8) function code(t, l, k)
use fmin_fmax_functions
    real(8), intent (in) :: t
    real(8), intent (in) :: l
    real(8), intent (in) :: k
    code = l * (((l + l) * ((1.0d0 / t) / (k * k))) / (sin(k) * tan(k)))
end function
public static double code(double t, double l, double k) {
	return l * (((l + l) * ((1.0 / t) / (k * k))) / (Math.sin(k) * Math.tan(k)));
}
def code(t, l, k):
	return l * (((l + l) * ((1.0 / t) / (k * k))) / (math.sin(k) * math.tan(k)))
function code(t, l, k)
	return Float64(l * Float64(Float64(Float64(l + l) * Float64(Float64(1.0 / t) / Float64(k * k))) / Float64(sin(k) * tan(k))))
end
function tmp = code(t, l, k)
	tmp = l * (((l + l) * ((1.0 / t) / (k * k))) / (sin(k) * tan(k)));
end
code[t_, l_, k_] := N[(l * N[(N[(N[(l + l), $MachinePrecision] * N[(N[(1.0 / t), $MachinePrecision] / N[(k * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(N[Sin[k], $MachinePrecision] * N[Tan[k], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\ell \cdot \frac{\left(\ell + \ell\right) \cdot \frac{\frac{1}{t}}{k \cdot k}}{\sin k \cdot \tan k}
Derivation
  1. Initial program 35.1%

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

      \[\leadsto \color{blue}{\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. lift-*.f64N/A

      \[\leadsto \frac{2}{\color{blue}{\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)}} \]
    3. *-commutativeN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 7: 73.3% accurate, 1.8× speedup?

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

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


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

    1. Initial program 35.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto 2 \cdot \left(\ell \cdot \left(\ell \cdot \frac{\cos k}{\left({k}^{3} \cdot t\right) \cdot k}\right)\right) \]
      2. lower-pow.f6469.6

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

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

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

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

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

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

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

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

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

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

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

    if 9.0000000000000004e53 < k

    1. Initial program 35.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto 2 \cdot \color{blue}{\left(\ell \cdot \left(\ell \cdot \frac{\cos k}{\left(\left(\left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(k + k\right)\right) \cdot t\right) \cdot k\right) \cdot k}\right)\right)} \]
      2. count-2-revN/A

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

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

        \[\leadsto \ell \cdot \left(\ell \cdot \frac{\cos k}{\left(\left(\left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(k + k\right)\right) \cdot t\right) \cdot k\right) \cdot k}\right) + \ell \cdot \color{blue}{\left(\ell \cdot \frac{\cos k}{\left(\left(\left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(k + k\right)\right) \cdot t\right) \cdot k\right) \cdot k}\right)} \]
      5. distribute-rgt-outN/A

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

        \[\leadsto \left(\ell \cdot \frac{\cos k}{\left(\left(\left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(k + k\right)\right) \cdot t\right) \cdot k\right) \cdot k}\right) \cdot \color{blue}{\left(\ell + \ell\right)} \]
    8. Applied rewrites78.0%

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

      \[\leadsto \frac{1 \cdot \ell}{\left(\left(\mathsf{fma}\left(\cos \left(k + k\right), \frac{-1}{2}, \frac{1}{2}\right) \cdot t\right) \cdot k\right) \cdot k} \cdot \left(\ell + \ell\right) \]
    10. Step-by-step derivation
      1. Applied rewrites64.1%

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

    Alternative 8: 72.1% accurate, 2.0× speedup?

    \[\begin{array}{l} \mathbf{if}\;\left|\ell\right| \leq 1.65 \cdot 10^{+215}:\\ \;\;\;\;2 \cdot \left(\left|\ell\right| \cdot \left(\left|\ell\right| \cdot \frac{1}{\left({k}^{3} \cdot t\right) \cdot k}\right)\right)\\ \mathbf{else}:\\ \;\;\;\;2 \cdot \left(\left|\ell\right| \cdot \left(\left|\ell\right| \cdot \frac{\cos k}{\left(\left(\left(0.5 - 0.5\right) \cdot t\right) \cdot k\right) \cdot k}\right)\right)\\ \end{array} \]
    (FPCore (t l k)
     :precision binary64
     (if (<= (fabs l) 1.65e+215)
       (* 2.0 (* (fabs l) (* (fabs l) (/ 1.0 (* (* (pow k 3.0) t) k)))))
       (*
        2.0
        (* (fabs l) (* (fabs l) (/ (cos k) (* (* (* (- 0.5 0.5) t) k) k)))))))
    double code(double t, double l, double k) {
    	double tmp;
    	if (fabs(l) <= 1.65e+215) {
    		tmp = 2.0 * (fabs(l) * (fabs(l) * (1.0 / ((pow(k, 3.0) * t) * k))));
    	} else {
    		tmp = 2.0 * (fabs(l) * (fabs(l) * (cos(k) / ((((0.5 - 0.5) * t) * k) * k))));
    	}
    	return tmp;
    }
    
    module fmin_fmax_functions
        implicit none
        private
        public fmax
        public fmin
    
        interface fmax
            module procedure fmax88
            module procedure fmax44
            module procedure fmax84
            module procedure fmax48
        end interface
        interface fmin
            module procedure fmin88
            module procedure fmin44
            module procedure fmin84
            module procedure fmin48
        end interface
    contains
        real(8) function fmax88(x, y) result (res)
            real(8), intent (in) :: x
            real(8), intent (in) :: y
            res = merge(y, merge(x, max(x, y), y /= y), x /= x)
        end function
        real(4) function fmax44(x, y) result (res)
            real(4), intent (in) :: x
            real(4), intent (in) :: y
            res = merge(y, merge(x, max(x, y), y /= y), x /= x)
        end function
        real(8) function fmax84(x, y) result(res)
            real(8), intent (in) :: x
            real(4), intent (in) :: y
            res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
        end function
        real(8) function fmax48(x, y) result(res)
            real(4), intent (in) :: x
            real(8), intent (in) :: y
            res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
        end function
        real(8) function fmin88(x, y) result (res)
            real(8), intent (in) :: x
            real(8), intent (in) :: y
            res = merge(y, merge(x, min(x, y), y /= y), x /= x)
        end function
        real(4) function fmin44(x, y) result (res)
            real(4), intent (in) :: x
            real(4), intent (in) :: y
            res = merge(y, merge(x, min(x, y), y /= y), x /= x)
        end function
        real(8) function fmin84(x, y) result(res)
            real(8), intent (in) :: x
            real(4), intent (in) :: y
            res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
        end function
        real(8) function fmin48(x, y) result(res)
            real(4), intent (in) :: x
            real(8), intent (in) :: y
            res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
        end function
    end module
    
    real(8) function code(t, l, k)
    use fmin_fmax_functions
        real(8), intent (in) :: t
        real(8), intent (in) :: l
        real(8), intent (in) :: k
        real(8) :: tmp
        if (abs(l) <= 1.65d+215) then
            tmp = 2.0d0 * (abs(l) * (abs(l) * (1.0d0 / (((k ** 3.0d0) * t) * k))))
        else
            tmp = 2.0d0 * (abs(l) * (abs(l) * (cos(k) / ((((0.5d0 - 0.5d0) * t) * k) * k))))
        end if
        code = tmp
    end function
    
    public static double code(double t, double l, double k) {
    	double tmp;
    	if (Math.abs(l) <= 1.65e+215) {
    		tmp = 2.0 * (Math.abs(l) * (Math.abs(l) * (1.0 / ((Math.pow(k, 3.0) * t) * k))));
    	} else {
    		tmp = 2.0 * (Math.abs(l) * (Math.abs(l) * (Math.cos(k) / ((((0.5 - 0.5) * t) * k) * k))));
    	}
    	return tmp;
    }
    
    def code(t, l, k):
    	tmp = 0
    	if math.fabs(l) <= 1.65e+215:
    		tmp = 2.0 * (math.fabs(l) * (math.fabs(l) * (1.0 / ((math.pow(k, 3.0) * t) * k))))
    	else:
    		tmp = 2.0 * (math.fabs(l) * (math.fabs(l) * (math.cos(k) / ((((0.5 - 0.5) * t) * k) * k))))
    	return tmp
    
    function code(t, l, k)
    	tmp = 0.0
    	if (abs(l) <= 1.65e+215)
    		tmp = Float64(2.0 * Float64(abs(l) * Float64(abs(l) * Float64(1.0 / Float64(Float64((k ^ 3.0) * t) * k)))));
    	else
    		tmp = Float64(2.0 * Float64(abs(l) * Float64(abs(l) * Float64(cos(k) / Float64(Float64(Float64(Float64(0.5 - 0.5) * t) * k) * k)))));
    	end
    	return tmp
    end
    
    function tmp_2 = code(t, l, k)
    	tmp = 0.0;
    	if (abs(l) <= 1.65e+215)
    		tmp = 2.0 * (abs(l) * (abs(l) * (1.0 / (((k ^ 3.0) * t) * k))));
    	else
    		tmp = 2.0 * (abs(l) * (abs(l) * (cos(k) / ((((0.5 - 0.5) * t) * k) * k))));
    	end
    	tmp_2 = tmp;
    end
    
    code[t_, l_, k_] := If[LessEqual[N[Abs[l], $MachinePrecision], 1.65e+215], N[(2.0 * N[(N[Abs[l], $MachinePrecision] * N[(N[Abs[l], $MachinePrecision] * N[(1.0 / N[(N[(N[Power[k, 3.0], $MachinePrecision] * t), $MachinePrecision] * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(2.0 * N[(N[Abs[l], $MachinePrecision] * N[(N[Abs[l], $MachinePrecision] * N[(N[Cos[k], $MachinePrecision] / N[(N[(N[(N[(0.5 - 0.5), $MachinePrecision] * t), $MachinePrecision] * k), $MachinePrecision] * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
    
    \begin{array}{l}
    \mathbf{if}\;\left|\ell\right| \leq 1.65 \cdot 10^{+215}:\\
    \;\;\;\;2 \cdot \left(\left|\ell\right| \cdot \left(\left|\ell\right| \cdot \frac{1}{\left({k}^{3} \cdot t\right) \cdot k}\right)\right)\\
    
    \mathbf{else}:\\
    \;\;\;\;2 \cdot \left(\left|\ell\right| \cdot \left(\left|\ell\right| \cdot \frac{\cos k}{\left(\left(\left(0.5 - 0.5\right) \cdot t\right) \cdot k\right) \cdot k}\right)\right)\\
    
    
    \end{array}
    
    Derivation
    1. Split input into 2 regimes
    2. if l < 1.6499999999999999e215

      1. Initial program 35.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

          \[\leadsto 2 \cdot \left(\ell \cdot \left(\ell \cdot \frac{\cos k}{\left({k}^{3} \cdot t\right) \cdot k}\right)\right) \]
        2. lower-pow.f6469.6

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

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

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

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

        if 1.6499999999999999e215 < l

        1. Initial program 35.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        Alternative 9: 71.3% accurate, 1.8× speedup?

        \[2 \cdot \left(\ell \cdot \left(\ell \cdot \frac{1}{\left(\left({\sin k}^{2} \cdot t\right) \cdot k\right) \cdot k}\right)\right) \]
        (FPCore (t l k)
         :precision binary64
         (* 2.0 (* l (* l (/ 1.0 (* (* (* (pow (sin k) 2.0) t) k) k))))))
        double code(double t, double l, double k) {
        	return 2.0 * (l * (l * (1.0 / (((pow(sin(k), 2.0) * t) * k) * k))));
        }
        
        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 * (l * (l * (1.0d0 / ((((sin(k) ** 2.0d0) * t) * k) * k))))
        end function
        
        public static double code(double t, double l, double k) {
        	return 2.0 * (l * (l * (1.0 / (((Math.pow(Math.sin(k), 2.0) * t) * k) * k))));
        }
        
        def code(t, l, k):
        	return 2.0 * (l * (l * (1.0 / (((math.pow(math.sin(k), 2.0) * t) * k) * k))))
        
        function code(t, l, k)
        	return Float64(2.0 * Float64(l * Float64(l * Float64(1.0 / Float64(Float64(Float64((sin(k) ^ 2.0) * t) * k) * k)))))
        end
        
        function tmp = code(t, l, k)
        	tmp = 2.0 * (l * (l * (1.0 / ((((sin(k) ^ 2.0) * t) * k) * k))));
        end
        
        code[t_, l_, k_] := N[(2.0 * N[(l * N[(l * N[(1.0 / N[(N[(N[(N[Power[N[Sin[k], $MachinePrecision], 2.0], $MachinePrecision] * t), $MachinePrecision] * k), $MachinePrecision] * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
        
        2 \cdot \left(\ell \cdot \left(\ell \cdot \frac{1}{\left(\left({\sin k}^{2} \cdot t\right) \cdot k\right) \cdot k}\right)\right)
        
        Derivation
        1. Initial program 35.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

            \[\leadsto 2 \cdot \left(\ell \cdot \left(\ell \cdot \frac{\cos k}{\left(\left(\left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(k + k\right)\right) \cdot t\right) \cdot k\right) \cdot k}\right)\right) \]
          5. count-2N/A

            \[\leadsto 2 \cdot \left(\ell \cdot \left(\ell \cdot \frac{\cos k}{\left(\left(\left(\frac{1}{2} - \frac{1}{2} \cdot \cos \left(2 \cdot k\right)\right) \cdot t\right) \cdot k\right) \cdot k}\right)\right) \]
          6. sqr-sin-a-revN/A

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

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

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

            \[\leadsto 2 \cdot \left(\ell \cdot \left(\ell \cdot \frac{\cos k}{\left(\left({\sin k}^{2} \cdot t\right) \cdot k\right) \cdot k}\right)\right) \]
          10. lower-pow.f6485.3

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

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

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

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

          Alternative 10: 70.6% accurate, 2.2× speedup?

          \[2 \cdot \left(\ell \cdot \frac{\frac{\cos k \cdot \ell}{\left(t \cdot \left(k \cdot k\right)\right) \cdot k}}{k}\right) \]
          (FPCore (t l k)
           :precision binary64
           (* 2.0 (* l (/ (/ (* (cos k) l) (* (* t (* k k)) k)) k))))
          double code(double t, double l, double k) {
          	return 2.0 * (l * (((cos(k) * l) / ((t * (k * k)) * k)) / k));
          }
          
          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 * (l * (((cos(k) * l) / ((t * (k * k)) * k)) / k))
          end function
          
          public static double code(double t, double l, double k) {
          	return 2.0 * (l * (((Math.cos(k) * l) / ((t * (k * k)) * k)) / k));
          }
          
          def code(t, l, k):
          	return 2.0 * (l * (((math.cos(k) * l) / ((t * (k * k)) * k)) / k))
          
          function code(t, l, k)
          	return Float64(2.0 * Float64(l * Float64(Float64(Float64(cos(k) * l) / Float64(Float64(t * Float64(k * k)) * k)) / k)))
          end
          
          function tmp = code(t, l, k)
          	tmp = 2.0 * (l * (((cos(k) * l) / ((t * (k * k)) * k)) / k));
          end
          
          code[t_, l_, k_] := N[(2.0 * N[(l * N[(N[(N[(N[Cos[k], $MachinePrecision] * l), $MachinePrecision] / N[(N[(t * N[(k * k), $MachinePrecision]), $MachinePrecision] * k), $MachinePrecision]), $MachinePrecision] / k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
          
          2 \cdot \left(\ell \cdot \frac{\frac{\cos k \cdot \ell}{\left(t \cdot \left(k \cdot k\right)\right) \cdot k}}{k}\right)
          
          Derivation
          1. Initial program 35.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

              \[\leadsto 2 \cdot \left(\ell \cdot \left(\ell \cdot \frac{\cos k}{\left({k}^{3} \cdot t\right) \cdot k}\right)\right) \]
            2. lower-pow.f6469.6

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

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

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

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

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

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

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

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

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

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

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

          Alternative 11: 68.6% accurate, 3.6× speedup?

          \[2 \cdot \left(\ell \cdot \left(\ell \cdot \frac{1}{\left({k}^{3} \cdot t\right) \cdot k}\right)\right) \]
          (FPCore (t l k)
           :precision binary64
           (* 2.0 (* l (* l (/ 1.0 (* (* (pow k 3.0) t) k))))))
          double code(double t, double l, double k) {
          	return 2.0 * (l * (l * (1.0 / ((pow(k, 3.0) * t) * k))));
          }
          
          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 * (l * (l * (1.0d0 / (((k ** 3.0d0) * t) * k))))
          end function
          
          public static double code(double t, double l, double k) {
          	return 2.0 * (l * (l * (1.0 / ((Math.pow(k, 3.0) * t) * k))));
          }
          
          def code(t, l, k):
          	return 2.0 * (l * (l * (1.0 / ((math.pow(k, 3.0) * t) * k))))
          
          function code(t, l, k)
          	return Float64(2.0 * Float64(l * Float64(l * Float64(1.0 / Float64(Float64((k ^ 3.0) * t) * k)))))
          end
          
          function tmp = code(t, l, k)
          	tmp = 2.0 * (l * (l * (1.0 / (((k ^ 3.0) * t) * k))));
          end
          
          code[t_, l_, k_] := N[(2.0 * N[(l * N[(l * N[(1.0 / N[(N[(N[Power[k, 3.0], $MachinePrecision] * t), $MachinePrecision] * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
          
          2 \cdot \left(\ell \cdot \left(\ell \cdot \frac{1}{\left({k}^{3} \cdot t\right) \cdot k}\right)\right)
          
          Derivation
          1. Initial program 35.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

              \[\leadsto 2 \cdot \left(\ell \cdot \left(\ell \cdot \frac{\cos k}{\left({k}^{3} \cdot t\right) \cdot k}\right)\right) \]
            2. lower-pow.f6469.6

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

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

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

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

            Alternative 12: 68.6% accurate, 4.3× speedup?

            \[\left(\ell \cdot \frac{\frac{\ell}{{k}^{4}}}{t}\right) \cdot 2 \]
            (FPCore (t l k) :precision binary64 (* (* l (/ (/ l (pow k 4.0)) t)) 2.0))
            double code(double t, double l, double k) {
            	return (l * ((l / pow(k, 4.0)) / t)) * 2.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 = (l * ((l / (k ** 4.0d0)) / t)) * 2.0d0
            end function
            
            public static double code(double t, double l, double k) {
            	return (l * ((l / Math.pow(k, 4.0)) / t)) * 2.0;
            }
            
            def code(t, l, k):
            	return (l * ((l / math.pow(k, 4.0)) / t)) * 2.0
            
            function code(t, l, k)
            	return Float64(Float64(l * Float64(Float64(l / (k ^ 4.0)) / t)) * 2.0)
            end
            
            function tmp = code(t, l, k)
            	tmp = (l * ((l / (k ^ 4.0)) / t)) * 2.0;
            end
            
            code[t_, l_, k_] := N[(N[(l * N[(N[(l / N[Power[k, 4.0], $MachinePrecision]), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision] * 2.0), $MachinePrecision]
            
            \left(\ell \cdot \frac{\frac{\ell}{{k}^{4}}}{t}\right) \cdot 2
            
            Derivation
            1. Initial program 35.1%

              \[\frac{2}{\left(\left(\frac{{t}^{3}}{\ell \cdot \ell} \cdot \sin k\right) \cdot \tan k\right) \cdot \left(\left(1 + {\left(\frac{k}{t}\right)}^{2}\right) - 1\right)} \]
            2. 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.f6461.9

                \[\leadsto 2 \cdot \frac{{\ell}^{2}}{{k}^{4} \cdot t} \]
            4. Applied rewrites61.9%

              \[\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-*.f6461.9

                \[\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-/.f6467.7

                \[\leadsto \left(\ell \cdot \frac{\ell}{{k}^{4} \cdot t}\right) \cdot 2 \]
            6. Applied rewrites67.7%

              \[\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 2 \]
              2. div-flipN/A

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

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

                \[\leadsto \left(\ell \cdot \frac{1}{\frac{{k}^{4} \cdot t}{\ell}}\right) \cdot 2 \]
              5. exp-to-powN/A

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

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

                \[\leadsto \left(\ell \cdot \frac{1}{\frac{e^{\log k \cdot 4} \cdot t}{\ell}}\right) \cdot 2 \]
              8. lift-exp.f64N/A

                \[\leadsto \left(\ell \cdot \frac{1}{\frac{e^{\log k \cdot 4} \cdot t}{\ell}}\right) \cdot 2 \]
              9. lower-unsound-/.f6433.7

                \[\leadsto \left(\ell \cdot \frac{1}{\frac{e^{\log k \cdot 4} \cdot t}{\ell}}\right) \cdot 2 \]
              10. lift-exp.f64N/A

                \[\leadsto \left(\ell \cdot \frac{1}{\frac{e^{\log k \cdot 4} \cdot t}{\ell}}\right) \cdot 2 \]
              11. lift-*.f64N/A

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

                \[\leadsto \left(\ell \cdot \frac{1}{\frac{e^{\log k \cdot 4} \cdot t}{\ell}}\right) \cdot 2 \]
              13. exp-to-powN/A

                \[\leadsto \left(\ell \cdot \frac{1}{\frac{{k}^{4} \cdot t}{\ell}}\right) \cdot 2 \]
              14. lift-pow.f6467.7

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

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

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

                \[\leadsto \left(\ell \cdot \frac{1}{\frac{{k}^{4} \cdot t}{\ell}}\right) \cdot 2 \]
              3. div-flip-revN/A

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

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

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

                \[\leadsto \left(\ell \cdot \frac{\frac{\ell}{{k}^{4}}}{t}\right) \cdot 2 \]
              7. lower-/.f6468.6

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

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

            Alternative 13: 68.5% accurate, 4.4× speedup?

            \[\frac{\left(\ell + \ell\right) \cdot {k}^{-4}}{t} \cdot \ell \]
            (FPCore (t l k) :precision binary64 (* (/ (* (+ l l) (pow k -4.0)) t) l))
            double code(double t, double l, double k) {
            	return (((l + l) * pow(k, -4.0)) / t) * 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 + l) * (k ** (-4.0d0))) / t) * l
            end function
            
            public static double code(double t, double l, double k) {
            	return (((l + l) * Math.pow(k, -4.0)) / t) * l;
            }
            
            def code(t, l, k):
            	return (((l + l) * math.pow(k, -4.0)) / t) * l
            
            function code(t, l, k)
            	return Float64(Float64(Float64(Float64(l + l) * (k ^ -4.0)) / t) * l)
            end
            
            function tmp = code(t, l, k)
            	tmp = (((l + l) * (k ^ -4.0)) / t) * l;
            end
            
            code[t_, l_, k_] := N[(N[(N[(N[(l + l), $MachinePrecision] * N[Power[k, -4.0], $MachinePrecision]), $MachinePrecision] / t), $MachinePrecision] * l), $MachinePrecision]
            
            \frac{\left(\ell + \ell\right) \cdot {k}^{-4}}{t} \cdot \ell
            
            Derivation
            1. Initial program 35.1%

              \[\frac{2}{\left(\left(\frac{{t}^{3}}{\ell \cdot \ell} \cdot \sin k\right) \cdot \tan k\right) \cdot \left(\left(1 + {\left(\frac{k}{t}\right)}^{2}\right) - 1\right)} \]
            2. 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.f6461.9

                \[\leadsto 2 \cdot \frac{{\ell}^{2}}{{k}^{4} \cdot t} \]
            4. Applied rewrites61.9%

              \[\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-*.f6461.9

                \[\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-/.f6467.7

                \[\leadsto \left(\ell \cdot \frac{\ell}{{k}^{4} \cdot t}\right) \cdot 2 \]
            6. Applied rewrites67.7%

              \[\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. lift-*.f64N/A

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

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

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

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

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

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

                \[\leadsto \frac{\ell + \ell}{{k}^{4} \cdot t} \cdot \ell \]
              3. associate-/r*N/A

                \[\leadsto \frac{\frac{\ell + \ell}{{k}^{4}}}{t} \cdot \ell \]
              4. lower-/.f64N/A

                \[\leadsto \frac{\frac{\ell + \ell}{{k}^{4}}}{t} \cdot \ell \]
              5. mult-flipN/A

                \[\leadsto \frac{\left(\ell + \ell\right) \cdot \frac{1}{{k}^{4}}}{t} \cdot \ell \]
              6. inv-powN/A

                \[\leadsto \frac{\left(\ell + \ell\right) \cdot {\left({k}^{4}\right)}^{-1}}{t} \cdot \ell \]
              7. lower-pow.f32N/A

                \[\leadsto \frac{\left(\ell + \ell\right) \cdot {\left({k}^{4}\right)}^{-1}}{t} \cdot \ell \]
              8. lower-unsound-pow.f32N/A

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

                \[\leadsto \frac{\left(\ell + \ell\right) \cdot {\left({k}^{4}\right)}^{-1}}{t} \cdot \ell \]
              10. lower-unsound-pow.f3261.4

                \[\leadsto \frac{\left(\ell + \ell\right) \cdot \left( {\left( \left({k}^{4}\right) \right)_{\text{binary64}}}^{-1} \right)_{\text{binary32}}}{t} \cdot \ell \]
              11. lower-pow.f32N/A

                \[\leadsto \frac{\left(\ell + \ell\right) \cdot {\left({k}^{4}\right)}^{-1}}{t} \cdot \ell \]
              12. inv-powN/A

                \[\leadsto \frac{\left(\ell + \ell\right) \cdot \frac{1}{{k}^{4}}}{t} \cdot \ell \]
              13. lift-pow.f64N/A

                \[\leadsto \frac{\left(\ell + \ell\right) \cdot \frac{1}{{k}^{4}}}{t} \cdot \ell \]
              14. pow-flipN/A

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

                \[\leadsto \frac{\left(\ell + \ell\right) \cdot {k}^{\left(\mathsf{neg}\left(4\right)\right)}}{t} \cdot \ell \]
              16. metadata-eval68.5

                \[\leadsto \frac{\left(\ell + \ell\right) \cdot {k}^{-4}}{t} \cdot \ell \]
            10. Applied rewrites68.5%

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

            Alternative 14: 67.6% accurate, 4.4× speedup?

            \[\left(\frac{{k}^{-4}}{t} \cdot \left(\ell + \ell\right)\right) \cdot \ell \]
            (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) * Float64(l + 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] * N[(l + l), $MachinePrecision]), $MachinePrecision] * l), $MachinePrecision]
            
            \left(\frac{{k}^{-4}}{t} \cdot \left(\ell + \ell\right)\right) \cdot \ell
            
            Derivation
            1. Initial program 35.1%

              \[\frac{2}{\left(\left(\frac{{t}^{3}}{\ell \cdot \ell} \cdot \sin k\right) \cdot \tan k\right) \cdot \left(\left(1 + {\left(\frac{k}{t}\right)}^{2}\right) - 1\right)} \]
            2. 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.f6461.9

                \[\leadsto 2 \cdot \frac{{\ell}^{2}}{{k}^{4} \cdot t} \]
            4. Applied rewrites61.9%

              \[\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-*.f6461.9

                \[\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-/.f6467.7

                \[\leadsto \left(\ell \cdot \frac{\ell}{{k}^{4} \cdot t}\right) \cdot 2 \]
            6. Applied rewrites67.7%

              \[\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. lift-*.f64N/A

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

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

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

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

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

                \[\leadsto \frac{\ell + \ell}{{k}^{4} \cdot t} \cdot \ell \]
              2. mult-flipN/A

                \[\leadsto \left(\left(\ell + \ell\right) \cdot \frac{1}{{k}^{4} \cdot t}\right) \cdot \ell \]
              3. *-commutativeN/A

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

                \[\leadsto \left(\frac{1}{{k}^{4} \cdot t} \cdot \left(\ell + \ell\right)\right) \cdot \ell \]
              5. lift-*.f64N/A

                \[\leadsto \left(\frac{1}{{k}^{4} \cdot t} \cdot \left(\ell + \ell\right)\right) \cdot \ell \]
              6. associate-/r*N/A

                \[\leadsto \left(\frac{\frac{1}{{k}^{4}}}{t} \cdot \left(\ell + \ell\right)\right) \cdot \ell \]
              7. inv-powN/A

                \[\leadsto \left(\frac{{\left({k}^{4}\right)}^{-1}}{t} \cdot \left(\ell + \ell\right)\right) \cdot \ell \]
              8. lower-pow.f32N/A

                \[\leadsto \left(\frac{{\left({k}^{4}\right)}^{-1}}{t} \cdot \left(\ell + \ell\right)\right) \cdot \ell \]
              9. lower-unsound-pow.f32N/A

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

                \[\leadsto \left(\frac{{\left({k}^{4}\right)}^{-1}}{t} \cdot \left(\ell + \ell\right)\right) \cdot \ell \]
              11. lower-unsound-pow.f3261.4

                \[\leadsto \left(\frac{\left( {\left( \left({k}^{4}\right) \right)_{\text{binary64}}}^{-1} \right)_{\text{binary32}}}{t} \cdot \left(\ell + \ell\right)\right) \cdot \ell \]
              12. lower-pow.f32N/A

                \[\leadsto \left(\frac{{\left({k}^{4}\right)}^{-1}}{t} \cdot \left(\ell + \ell\right)\right) \cdot \ell \]
              13. inv-powN/A

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

                \[\leadsto \left(\frac{\frac{1}{{k}^{4}}}{t} \cdot \left(\ell + \ell\right)\right) \cdot \ell \]
              15. pow-flipN/A

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

                \[\leadsto \left(\frac{{k}^{\left(\mathsf{neg}\left(4\right)\right)}}{t} \cdot \left(\ell + \ell\right)\right) \cdot \ell \]
              17. metadata-eval67.6

                \[\leadsto \left(\frac{{k}^{-4}}{t} \cdot \left(\ell + \ell\right)\right) \cdot \ell \]
            10. Applied rewrites67.6%

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

            Alternative 15: 67.0% accurate, 4.4× speedup?

            \[\left(\left(\ell + \ell\right) \cdot {k}^{-4}\right) \cdot \frac{\ell}{t} \]
            (FPCore (t l k) :precision binary64 (* (* (+ l l) (pow k -4.0)) (/ l t)))
            double code(double t, double l, double k) {
            	return ((l + l) * pow(k, -4.0)) * (l / t);
            }
            
            module fmin_fmax_functions
                implicit none
                private
                public fmax
                public fmin
            
                interface fmax
                    module procedure fmax88
                    module procedure fmax44
                    module procedure fmax84
                    module procedure fmax48
                end interface
                interface fmin
                    module procedure fmin88
                    module procedure fmin44
                    module procedure fmin84
                    module procedure fmin48
                end interface
            contains
                real(8) function fmax88(x, y) result (res)
                    real(8), intent (in) :: x
                    real(8), intent (in) :: y
                    res = merge(y, merge(x, max(x, y), y /= y), x /= x)
                end function
                real(4) function fmax44(x, y) result (res)
                    real(4), intent (in) :: x
                    real(4), intent (in) :: y
                    res = merge(y, merge(x, max(x, y), y /= y), x /= x)
                end function
                real(8) function fmax84(x, y) result(res)
                    real(8), intent (in) :: x
                    real(4), intent (in) :: y
                    res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
                end function
                real(8) function fmax48(x, y) result(res)
                    real(4), intent (in) :: x
                    real(8), intent (in) :: y
                    res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
                end function
                real(8) function fmin88(x, y) result (res)
                    real(8), intent (in) :: x
                    real(8), intent (in) :: y
                    res = merge(y, merge(x, min(x, y), y /= y), x /= x)
                end function
                real(4) function fmin44(x, y) result (res)
                    real(4), intent (in) :: x
                    real(4), intent (in) :: y
                    res = merge(y, merge(x, min(x, y), y /= y), x /= x)
                end function
                real(8) function fmin84(x, y) result(res)
                    real(8), intent (in) :: x
                    real(4), intent (in) :: y
                    res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
                end function
                real(8) function fmin48(x, y) result(res)
                    real(4), intent (in) :: x
                    real(8), intent (in) :: y
                    res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
                end function
            end module
            
            real(8) function code(t, l, k)
            use fmin_fmax_functions
                real(8), intent (in) :: t
                real(8), intent (in) :: l
                real(8), intent (in) :: k
                code = ((l + l) * (k ** (-4.0d0))) * (l / t)
            end function
            
            public static double code(double t, double l, double k) {
            	return ((l + l) * Math.pow(k, -4.0)) * (l / t);
            }
            
            def code(t, l, k):
            	return ((l + l) * math.pow(k, -4.0)) * (l / t)
            
            function code(t, l, k)
            	return Float64(Float64(Float64(l + l) * (k ^ -4.0)) * Float64(l / t))
            end
            
            function tmp = code(t, l, k)
            	tmp = ((l + l) * (k ^ -4.0)) * (l / t);
            end
            
            code[t_, l_, k_] := N[(N[(N[(l + l), $MachinePrecision] * N[Power[k, -4.0], $MachinePrecision]), $MachinePrecision] * N[(l / t), $MachinePrecision]), $MachinePrecision]
            
            \left(\left(\ell + \ell\right) \cdot {k}^{-4}\right) \cdot \frac{\ell}{t}
            
            Derivation
            1. Initial program 35.1%

              \[\frac{2}{\left(\left(\frac{{t}^{3}}{\ell \cdot \ell} \cdot \sin k\right) \cdot \tan k\right) \cdot \left(\left(1 + {\left(\frac{k}{t}\right)}^{2}\right) - 1\right)} \]
            2. 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.f6461.9

                \[\leadsto 2 \cdot \frac{{\ell}^{2}}{{k}^{4} \cdot t} \]
            4. Applied rewrites61.9%

              \[\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-*.f6461.9

                \[\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-/.f6467.7

                \[\leadsto \left(\ell \cdot \frac{\ell}{{k}^{4} \cdot t}\right) \cdot 2 \]
            6. Applied rewrites67.7%

              \[\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. lift-*.f64N/A

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

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

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

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

              \[\leadsto \frac{\ell + \ell}{{k}^{4} \cdot t} \cdot \color{blue}{\ell} \]
            9. Step-by-step derivation
              1. lift-*.f64N/A

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

                \[\leadsto \frac{\ell + \ell}{{k}^{4} \cdot t} \cdot \ell \]
              3. associate-*l/N/A

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

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

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

                \[\leadsto \frac{\ell + \ell}{{k}^{4}} \cdot \color{blue}{\frac{\ell}{t}} \]
              7. mult-flipN/A

                \[\leadsto \left(\left(\ell + \ell\right) \cdot \frac{1}{{k}^{4}}\right) \cdot \frac{\color{blue}{\ell}}{t} \]
              8. inv-powN/A

                \[\leadsto \left(\left(\ell + \ell\right) \cdot {\left({k}^{4}\right)}^{-1}\right) \cdot \frac{\ell}{t} \]
              9. lower-pow.f32N/A

                \[\leadsto \left(\left(\ell + \ell\right) \cdot {\left({k}^{4}\right)}^{-1}\right) \cdot \frac{\ell}{t} \]
              10. lower-unsound-pow.f32N/A

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

                \[\leadsto \left(\left(\ell + \ell\right) \cdot {\left({k}^{4}\right)}^{-1}\right) \cdot \frac{\color{blue}{\ell}}{t} \]
              12. lower-unsound-pow.f32N/A

                \[\leadsto \left(\left(\ell + \ell\right) \cdot {\left({k}^{4}\right)}^{-1}\right) \cdot \frac{\ell}{t} \]
              13. lower-pow.f32N/A

                \[\leadsto \left(\left(\ell + \ell\right) \cdot {\left({k}^{4}\right)}^{-1}\right) \cdot \frac{\ell}{t} \]
              14. inv-powN/A

                \[\leadsto \left(\left(\ell + \ell\right) \cdot \frac{1}{{k}^{4}}\right) \cdot \frac{\ell}{t} \]
              15. lift-pow.f64N/A

                \[\leadsto \left(\left(\ell + \ell\right) \cdot \frac{1}{{k}^{4}}\right) \cdot \frac{\ell}{t} \]
              16. pow-flipN/A

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

                \[\leadsto \left(\left(\ell + \ell\right) \cdot {k}^{\left(\mathsf{neg}\left(4\right)\right)}\right) \cdot \frac{\ell}{t} \]
              18. metadata-evalN/A

                \[\leadsto \left(\left(\ell + \ell\right) \cdot {k}^{-4}\right) \cdot \frac{\ell}{t} \]
              19. lower-/.f6467.0

                \[\leadsto \left(\left(\ell + \ell\right) \cdot {k}^{-4}\right) \cdot \frac{\ell}{\color{blue}{t}} \]
            10. Applied rewrites67.0%

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

            Reproduce

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