Toniolo and Linder, Equation (10+)

Percentage Accurate: 55.4% → 82.8%
Time: 8.0s
Alternatives: 18
Speedup: 12.5×

Specification

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

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

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

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

Sampling outcomes in binary64 precision:

Local Percentage Accuracy vs ?

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

Accuracy vs Speed?

Herbie found 18 alternatives:

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

Initial Program: 55.4% accurate, 1.0× speedup?

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

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

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

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

Alternative 1: 82.8% accurate, 1.2× speedup?

\[\begin{array}{l} t\_m = \left|t\right| \\ t\_s = \mathsf{copysign}\left(1, t\right) \\ t\_s \cdot \begin{array}{l} \mathbf{if}\;t\_m \leq 4.8 \cdot 10^{-109}:\\ \;\;\;\;\frac{2}{\frac{\frac{{\left(\sin k \cdot k\right)}^{2}}{\ell} \cdot \frac{t\_m}{\ell}}{\cos k}}\\ \mathbf{elif}\;t\_m \leq 1.4 \cdot 10^{+125}:\\ \;\;\;\;\frac{2}{\left(\frac{\left(t\_m \cdot t\_m\right) \cdot \frac{t\_m}{\ell}}{\ell} \cdot \sin k\right) \cdot \left(\tan k \cdot \left(\left({\left(\frac{k}{t\_m}\right)}^{2} + 1\right) + 1\right)\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{2}{\frac{\frac{{\left(\sin k \cdot t\_m\right)}^{2} \cdot 2}{\ell} \cdot \frac{t\_m}{\ell}}{\cos k}}\\ \end{array} \end{array} \]
t\_m = (fabs.f64 t)
t\_s = (copysign.f64 #s(literal 1 binary64) t)
(FPCore (t_s t_m l k)
 :precision binary64
 (*
  t_s
  (if (<= t_m 4.8e-109)
    (/ 2.0 (/ (* (/ (pow (* (sin k) k) 2.0) l) (/ t_m l)) (cos k)))
    (if (<= t_m 1.4e+125)
      (/
       2.0
       (*
        (* (/ (* (* t_m t_m) (/ t_m l)) l) (sin k))
        (* (tan k) (+ (+ (pow (/ k t_m) 2.0) 1.0) 1.0))))
      (/
       2.0
       (/ (* (/ (* (pow (* (sin k) t_m) 2.0) 2.0) l) (/ t_m l)) (cos k)))))))
t\_m = fabs(t);
t\_s = copysign(1.0, t);
double code(double t_s, double t_m, double l, double k) {
	double tmp;
	if (t_m <= 4.8e-109) {
		tmp = 2.0 / (((pow((sin(k) * k), 2.0) / l) * (t_m / l)) / cos(k));
	} else if (t_m <= 1.4e+125) {
		tmp = 2.0 / (((((t_m * t_m) * (t_m / l)) / l) * sin(k)) * (tan(k) * ((pow((k / t_m), 2.0) + 1.0) + 1.0)));
	} else {
		tmp = 2.0 / ((((pow((sin(k) * t_m), 2.0) * 2.0) / l) * (t_m / l)) / cos(k));
	}
	return t_s * tmp;
}
t\_m =     private
t\_s =     private
module fmin_fmax_functions
    implicit none
    private
    public fmax
    public fmin

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

real(8) function code(t_s, t_m, l, k)
use fmin_fmax_functions
    real(8), intent (in) :: t_s
    real(8), intent (in) :: t_m
    real(8), intent (in) :: l
    real(8), intent (in) :: k
    real(8) :: tmp
    if (t_m <= 4.8d-109) then
        tmp = 2.0d0 / (((((sin(k) * k) ** 2.0d0) / l) * (t_m / l)) / cos(k))
    else if (t_m <= 1.4d+125) then
        tmp = 2.0d0 / (((((t_m * t_m) * (t_m / l)) / l) * sin(k)) * (tan(k) * ((((k / t_m) ** 2.0d0) + 1.0d0) + 1.0d0)))
    else
        tmp = 2.0d0 / ((((((sin(k) * t_m) ** 2.0d0) * 2.0d0) / l) * (t_m / l)) / cos(k))
    end if
    code = t_s * tmp
end function
t\_m = Math.abs(t);
t\_s = Math.copySign(1.0, t);
public static double code(double t_s, double t_m, double l, double k) {
	double tmp;
	if (t_m <= 4.8e-109) {
		tmp = 2.0 / (((Math.pow((Math.sin(k) * k), 2.0) / l) * (t_m / l)) / Math.cos(k));
	} else if (t_m <= 1.4e+125) {
		tmp = 2.0 / (((((t_m * t_m) * (t_m / l)) / l) * Math.sin(k)) * (Math.tan(k) * ((Math.pow((k / t_m), 2.0) + 1.0) + 1.0)));
	} else {
		tmp = 2.0 / ((((Math.pow((Math.sin(k) * t_m), 2.0) * 2.0) / l) * (t_m / l)) / Math.cos(k));
	}
	return t_s * tmp;
}
t\_m = math.fabs(t)
t\_s = math.copysign(1.0, t)
def code(t_s, t_m, l, k):
	tmp = 0
	if t_m <= 4.8e-109:
		tmp = 2.0 / (((math.pow((math.sin(k) * k), 2.0) / l) * (t_m / l)) / math.cos(k))
	elif t_m <= 1.4e+125:
		tmp = 2.0 / (((((t_m * t_m) * (t_m / l)) / l) * math.sin(k)) * (math.tan(k) * ((math.pow((k / t_m), 2.0) + 1.0) + 1.0)))
	else:
		tmp = 2.0 / ((((math.pow((math.sin(k) * t_m), 2.0) * 2.0) / l) * (t_m / l)) / math.cos(k))
	return t_s * tmp
t\_m = abs(t)
t\_s = copysign(1.0, t)
function code(t_s, t_m, l, k)
	tmp = 0.0
	if (t_m <= 4.8e-109)
		tmp = Float64(2.0 / Float64(Float64(Float64((Float64(sin(k) * k) ^ 2.0) / l) * Float64(t_m / l)) / cos(k)));
	elseif (t_m <= 1.4e+125)
		tmp = Float64(2.0 / Float64(Float64(Float64(Float64(Float64(t_m * t_m) * Float64(t_m / l)) / l) * sin(k)) * Float64(tan(k) * Float64(Float64((Float64(k / t_m) ^ 2.0) + 1.0) + 1.0))));
	else
		tmp = Float64(2.0 / Float64(Float64(Float64(Float64((Float64(sin(k) * t_m) ^ 2.0) * 2.0) / l) * Float64(t_m / l)) / cos(k)));
	end
	return Float64(t_s * tmp)
end
t\_m = abs(t);
t\_s = sign(t) * abs(1.0);
function tmp_2 = code(t_s, t_m, l, k)
	tmp = 0.0;
	if (t_m <= 4.8e-109)
		tmp = 2.0 / (((((sin(k) * k) ^ 2.0) / l) * (t_m / l)) / cos(k));
	elseif (t_m <= 1.4e+125)
		tmp = 2.0 / (((((t_m * t_m) * (t_m / l)) / l) * sin(k)) * (tan(k) * ((((k / t_m) ^ 2.0) + 1.0) + 1.0)));
	else
		tmp = 2.0 / ((((((sin(k) * t_m) ^ 2.0) * 2.0) / l) * (t_m / l)) / cos(k));
	end
	tmp_2 = t_s * tmp;
end
t\_m = N[Abs[t], $MachinePrecision]
t\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[t]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[t$95$s_, t$95$m_, l_, k_] := N[(t$95$s * If[LessEqual[t$95$m, 4.8e-109], N[(2.0 / N[(N[(N[(N[Power[N[(N[Sin[k], $MachinePrecision] * k), $MachinePrecision], 2.0], $MachinePrecision] / l), $MachinePrecision] * N[(t$95$m / l), $MachinePrecision]), $MachinePrecision] / N[Cos[k], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$m, 1.4e+125], N[(2.0 / N[(N[(N[(N[(N[(t$95$m * t$95$m), $MachinePrecision] * N[(t$95$m / l), $MachinePrecision]), $MachinePrecision] / l), $MachinePrecision] * N[Sin[k], $MachinePrecision]), $MachinePrecision] * N[(N[Tan[k], $MachinePrecision] * N[(N[(N[Power[N[(k / t$95$m), $MachinePrecision], 2.0], $MachinePrecision] + 1.0), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(2.0 / N[(N[(N[(N[(N[Power[N[(N[Sin[k], $MachinePrecision] * t$95$m), $MachinePrecision], 2.0], $MachinePrecision] * 2.0), $MachinePrecision] / l), $MachinePrecision] * N[(t$95$m / l), $MachinePrecision]), $MachinePrecision] / N[Cos[k], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]), $MachinePrecision]
\begin{array}{l}
t\_m = \left|t\right|
\\
t\_s = \mathsf{copysign}\left(1, t\right)

\\
t\_s \cdot \begin{array}{l}
\mathbf{if}\;t\_m \leq 4.8 \cdot 10^{-109}:\\
\;\;\;\;\frac{2}{\frac{\frac{{\left(\sin k \cdot k\right)}^{2}}{\ell} \cdot \frac{t\_m}{\ell}}{\cos k}}\\

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

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


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

    1. Initial program 51.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \frac{2}{\frac{\frac{{k}^{2} \cdot {\sin k}^{2}}{\ell} \cdot \frac{t}{\ell}}{\cos k}} \]
    10. Step-by-step derivation
      1. unpow-prod-downN/A

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

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

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

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

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

        \[\leadsto \frac{2}{\frac{\frac{{\sin k}^{2} \cdot {k}^{2}}{\ell} \cdot \frac{t}{\ell}}{\cos k}} \]
      7. unpow-prod-downN/A

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

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

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

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

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

    if 4.79999999999999977e-109 < t < 1.4e125

    1. Initial program 80.1%

      \[\frac{2}{\left(\left(\frac{{t}^{3}}{\ell \cdot \ell} \cdot \sin k\right) \cdot \tan k\right) \cdot \left(\left(1 + {\left(\frac{k}{t}\right)}^{2}\right) + 1\right)} \]
    2. Add Preprocessing
    3. Applied rewrites83.5%

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

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

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

        \[\leadsto \frac{2}{\left(\frac{\frac{\color{blue}{\left(t \cdot t\right)} \cdot t}{\ell}}{\ell} \cdot \sin k\right) \cdot \left(\tan k \cdot \left(\left({\left(\frac{k}{t}\right)}^{2} + 1\right) + 1\right)\right)} \]
      4. lift-*.f6483.4

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

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

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

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

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

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

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

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

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

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

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

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

    if 1.4e125 < t

    1. Initial program 70.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 2: 84.5% accurate, 0.8× speedup?

\[\begin{array}{l} t\_m = \left|t\right| \\ t\_s = \mathsf{copysign}\left(1, t\right) \\ t\_s \cdot \frac{2}{\frac{\frac{\mathsf{fma}\left({\left(\sin k \cdot t\_m\right)}^{2}, 2, {\sin k}^{2} \cdot \left(k \cdot k\right)\right)}{\ell} \cdot \frac{t\_m}{\ell}}{\cos k}} \end{array} \]
t\_m = (fabs.f64 t)
t\_s = (copysign.f64 #s(literal 1 binary64) t)
(FPCore (t_s t_m l k)
 :precision binary64
 (*
  t_s
  (/
   2.0
   (/
    (*
     (/ (fma (pow (* (sin k) t_m) 2.0) 2.0 (* (pow (sin k) 2.0) (* k k))) l)
     (/ t_m l))
    (cos k)))))
t\_m = fabs(t);
t\_s = copysign(1.0, t);
double code(double t_s, double t_m, double l, double k) {
	return t_s * (2.0 / (((fma(pow((sin(k) * t_m), 2.0), 2.0, (pow(sin(k), 2.0) * (k * k))) / l) * (t_m / l)) / cos(k)));
}
t\_m = abs(t)
t\_s = copysign(1.0, t)
function code(t_s, t_m, l, k)
	return Float64(t_s * Float64(2.0 / Float64(Float64(Float64(fma((Float64(sin(k) * t_m) ^ 2.0), 2.0, Float64((sin(k) ^ 2.0) * Float64(k * k))) / l) * Float64(t_m / l)) / cos(k))))
end
t\_m = N[Abs[t], $MachinePrecision]
t\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[t]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[t$95$s_, t$95$m_, l_, k_] := N[(t$95$s * N[(2.0 / N[(N[(N[(N[(N[Power[N[(N[Sin[k], $MachinePrecision] * t$95$m), $MachinePrecision], 2.0], $MachinePrecision] * 2.0 + N[(N[Power[N[Sin[k], $MachinePrecision], 2.0], $MachinePrecision] * N[(k * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / l), $MachinePrecision] * N[(t$95$m / l), $MachinePrecision]), $MachinePrecision] / N[Cos[k], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
t\_m = \left|t\right|
\\
t\_s = \mathsf{copysign}\left(1, t\right)

\\
t\_s \cdot \frac{2}{\frac{\frac{\mathsf{fma}\left({\left(\sin k \cdot t\_m\right)}^{2}, 2, {\sin k}^{2} \cdot \left(k \cdot k\right)\right)}{\ell} \cdot \frac{t\_m}{\ell}}{\cos k}}
\end{array}
Derivation
  1. Initial program 61.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 3: 84.5% accurate, 0.8× speedup?

\[\begin{array}{l} t\_m = \left|t\right| \\ t\_s = \mathsf{copysign}\left(1, t\right) \\ t\_s \cdot \frac{2}{\frac{\frac{\mathsf{fma}\left({\left(\sin k \cdot t\_m\right)}^{2}, 2, {\left(\sin k \cdot k\right)}^{2}\right)}{\ell} \cdot \frac{t\_m}{\ell}}{\cos k}} \end{array} \]
t\_m = (fabs.f64 t)
t\_s = (copysign.f64 #s(literal 1 binary64) t)
(FPCore (t_s t_m l k)
 :precision binary64
 (*
  t_s
  (/
   2.0
   (/
    (*
     (/ (fma (pow (* (sin k) t_m) 2.0) 2.0 (pow (* (sin k) k) 2.0)) l)
     (/ t_m l))
    (cos k)))))
t\_m = fabs(t);
t\_s = copysign(1.0, t);
double code(double t_s, double t_m, double l, double k) {
	return t_s * (2.0 / (((fma(pow((sin(k) * t_m), 2.0), 2.0, pow((sin(k) * k), 2.0)) / l) * (t_m / l)) / cos(k)));
}
t\_m = abs(t)
t\_s = copysign(1.0, t)
function code(t_s, t_m, l, k)
	return Float64(t_s * Float64(2.0 / Float64(Float64(Float64(fma((Float64(sin(k) * t_m) ^ 2.0), 2.0, (Float64(sin(k) * k) ^ 2.0)) / l) * Float64(t_m / l)) / cos(k))))
end
t\_m = N[Abs[t], $MachinePrecision]
t\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[t]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[t$95$s_, t$95$m_, l_, k_] := N[(t$95$s * N[(2.0 / N[(N[(N[(N[(N[Power[N[(N[Sin[k], $MachinePrecision] * t$95$m), $MachinePrecision], 2.0], $MachinePrecision] * 2.0 + N[Power[N[(N[Sin[k], $MachinePrecision] * k), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision] / l), $MachinePrecision] * N[(t$95$m / l), $MachinePrecision]), $MachinePrecision] / N[Cos[k], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
t\_m = \left|t\right|
\\
t\_s = \mathsf{copysign}\left(1, t\right)

\\
t\_s \cdot \frac{2}{\frac{\frac{\mathsf{fma}\left({\left(\sin k \cdot t\_m\right)}^{2}, 2, {\left(\sin k \cdot k\right)}^{2}\right)}{\ell} \cdot \frac{t\_m}{\ell}}{\cos k}}
\end{array}
Derivation
  1. Initial program 61.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 4: 82.1% accurate, 1.3× speedup?

\[\begin{array}{l} t\_m = \left|t\right| \\ t\_s = \mathsf{copysign}\left(1, t\right) \\ t\_s \cdot \begin{array}{l} \mathbf{if}\;t\_m \leq 7.5 \cdot 10^{-109}:\\ \;\;\;\;\frac{2}{\frac{\frac{{\left(\sin k \cdot k\right)}^{2}}{\ell} \cdot \frac{t\_m}{\ell}}{\cos k}}\\ \mathbf{elif}\;t\_m \leq 1.05 \cdot 10^{+90}:\\ \;\;\;\;\frac{2}{\left(\frac{\frac{\left(t\_m \cdot t\_m\right) \cdot t\_m}{\ell}}{\ell} \cdot \sin k\right) \cdot \left(\tan k \cdot \mathsf{fma}\left(\frac{k}{t\_m}, \frac{k}{t\_m}, 2\right)\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{2}{\frac{\frac{{\left(k \cdot t\_m\right)}^{2} \cdot 2}{\ell} \cdot \frac{t\_m}{\ell}}{\cos k}}\\ \end{array} \end{array} \]
t\_m = (fabs.f64 t)
t\_s = (copysign.f64 #s(literal 1 binary64) t)
(FPCore (t_s t_m l k)
 :precision binary64
 (*
  t_s
  (if (<= t_m 7.5e-109)
    (/ 2.0 (/ (* (/ (pow (* (sin k) k) 2.0) l) (/ t_m l)) (cos k)))
    (if (<= t_m 1.05e+90)
      (/
       2.0
       (*
        (* (/ (/ (* (* t_m t_m) t_m) l) l) (sin k))
        (* (tan k) (fma (/ k t_m) (/ k t_m) 2.0))))
      (/ 2.0 (/ (* (/ (* (pow (* k t_m) 2.0) 2.0) l) (/ t_m l)) (cos k)))))))
t\_m = fabs(t);
t\_s = copysign(1.0, t);
double code(double t_s, double t_m, double l, double k) {
	double tmp;
	if (t_m <= 7.5e-109) {
		tmp = 2.0 / (((pow((sin(k) * k), 2.0) / l) * (t_m / l)) / cos(k));
	} else if (t_m <= 1.05e+90) {
		tmp = 2.0 / ((((((t_m * t_m) * t_m) / l) / l) * sin(k)) * (tan(k) * fma((k / t_m), (k / t_m), 2.0)));
	} else {
		tmp = 2.0 / ((((pow((k * t_m), 2.0) * 2.0) / l) * (t_m / l)) / cos(k));
	}
	return t_s * tmp;
}
t\_m = abs(t)
t\_s = copysign(1.0, t)
function code(t_s, t_m, l, k)
	tmp = 0.0
	if (t_m <= 7.5e-109)
		tmp = Float64(2.0 / Float64(Float64(Float64((Float64(sin(k) * k) ^ 2.0) / l) * Float64(t_m / l)) / cos(k)));
	elseif (t_m <= 1.05e+90)
		tmp = Float64(2.0 / Float64(Float64(Float64(Float64(Float64(Float64(t_m * t_m) * t_m) / l) / l) * sin(k)) * Float64(tan(k) * fma(Float64(k / t_m), Float64(k / t_m), 2.0))));
	else
		tmp = Float64(2.0 / Float64(Float64(Float64(Float64((Float64(k * t_m) ^ 2.0) * 2.0) / l) * Float64(t_m / l)) / cos(k)));
	end
	return Float64(t_s * tmp)
end
t\_m = N[Abs[t], $MachinePrecision]
t\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[t]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[t$95$s_, t$95$m_, l_, k_] := N[(t$95$s * If[LessEqual[t$95$m, 7.5e-109], N[(2.0 / N[(N[(N[(N[Power[N[(N[Sin[k], $MachinePrecision] * k), $MachinePrecision], 2.0], $MachinePrecision] / l), $MachinePrecision] * N[(t$95$m / l), $MachinePrecision]), $MachinePrecision] / N[Cos[k], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$m, 1.05e+90], N[(2.0 / N[(N[(N[(N[(N[(N[(t$95$m * t$95$m), $MachinePrecision] * t$95$m), $MachinePrecision] / l), $MachinePrecision] / l), $MachinePrecision] * N[Sin[k], $MachinePrecision]), $MachinePrecision] * N[(N[Tan[k], $MachinePrecision] * N[(N[(k / t$95$m), $MachinePrecision] * N[(k / t$95$m), $MachinePrecision] + 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(2.0 / N[(N[(N[(N[(N[Power[N[(k * t$95$m), $MachinePrecision], 2.0], $MachinePrecision] * 2.0), $MachinePrecision] / l), $MachinePrecision] * N[(t$95$m / l), $MachinePrecision]), $MachinePrecision] / N[Cos[k], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]), $MachinePrecision]
\begin{array}{l}
t\_m = \left|t\right|
\\
t\_s = \mathsf{copysign}\left(1, t\right)

\\
t\_s \cdot \begin{array}{l}
\mathbf{if}\;t\_m \leq 7.5 \cdot 10^{-109}:\\
\;\;\;\;\frac{2}{\frac{\frac{{\left(\sin k \cdot k\right)}^{2}}{\ell} \cdot \frac{t\_m}{\ell}}{\cos k}}\\

\mathbf{elif}\;t\_m \leq 1.05 \cdot 10^{+90}:\\
\;\;\;\;\frac{2}{\left(\frac{\frac{\left(t\_m \cdot t\_m\right) \cdot t\_m}{\ell}}{\ell} \cdot \sin k\right) \cdot \left(\tan k \cdot \mathsf{fma}\left(\frac{k}{t\_m}, \frac{k}{t\_m}, 2\right)\right)}\\

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


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

    1. Initial program 51.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \frac{2}{\frac{\frac{{k}^{2} \cdot {\sin k}^{2}}{\ell} \cdot \frac{t}{\ell}}{\cos k}} \]
    10. Step-by-step derivation
      1. unpow-prod-downN/A

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

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

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

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

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

        \[\leadsto \frac{2}{\frac{\frac{{\sin k}^{2} \cdot {k}^{2}}{\ell} \cdot \frac{t}{\ell}}{\cos k}} \]
      7. unpow-prod-downN/A

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

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

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

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

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

    if 7.49999999999999982e-109 < t < 1.0499999999999999e90

    1. Initial program 84.3%

      \[\frac{2}{\left(\left(\frac{{t}^{3}}{\ell \cdot \ell} \cdot \sin k\right) \cdot \tan k\right) \cdot \left(\left(1 + {\left(\frac{k}{t}\right)}^{2}\right) + 1\right)} \]
    2. Add Preprocessing
    3. Applied rewrites88.1%

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

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

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

        \[\leadsto \frac{2}{\left(\frac{\frac{\color{blue}{\left(t \cdot t\right)} \cdot t}{\ell}}{\ell} \cdot \sin k\right) \cdot \left(\tan k \cdot \left(\left({\left(\frac{k}{t}\right)}^{2} + 1\right) + 1\right)\right)} \]
      4. lift-*.f6488.1

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \frac{2}{\left(\frac{\frac{\left(t \cdot t\right) \cdot t}{\ell}}{\ell} \cdot \sin k\right) \cdot \left(\tan k \cdot \mathsf{fma}\left(\color{blue}{\frac{k}{t}}, \frac{k}{t}, 2\right)\right)} \]
      10. lift-/.f6488.1

        \[\leadsto \frac{2}{\left(\frac{\frac{\left(t \cdot t\right) \cdot t}{\ell}}{\ell} \cdot \sin k\right) \cdot \left(\tan k \cdot \mathsf{fma}\left(\frac{k}{t}, \color{blue}{\frac{k}{t}}, 2\right)\right)} \]
    7. Applied rewrites88.1%

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

    if 1.0499999999999999e90 < t

    1. Initial program 67.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 5: 79.7% accurate, 1.5× speedup?

\[\begin{array}{l} t\_m = \left|t\right| \\ t\_s = \mathsf{copysign}\left(1, t\right) \\ \begin{array}{l} t_2 := \frac{t\_m \cdot t\_m}{\ell}\\ t\_s \cdot \begin{array}{l} \mathbf{if}\;t\_m \leq 7.5 \cdot 10^{-109}:\\ \;\;\;\;\frac{2}{\frac{\left(\mathsf{fma}\left(\mathsf{fma}\left(t\_2, -0.6666666666666666, {\ell}^{-1}\right), k \cdot k, t\_2 \cdot 2\right) \cdot \left(k \cdot k\right)\right) \cdot \frac{t\_m}{\ell}}{\cos k}}\\ \mathbf{elif}\;t\_m \leq 1.05 \cdot 10^{+90}:\\ \;\;\;\;\frac{2}{\left(\frac{\frac{\left(t\_m \cdot t\_m\right) \cdot t\_m}{\ell}}{\ell} \cdot \sin k\right) \cdot \left(\tan k \cdot \mathsf{fma}\left(\frac{k}{t\_m}, \frac{k}{t\_m}, 2\right)\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{2}{\frac{\frac{{\left(k \cdot t\_m\right)}^{2} \cdot 2}{\ell} \cdot \frac{t\_m}{\ell}}{\cos k}}\\ \end{array} \end{array} \end{array} \]
t\_m = (fabs.f64 t)
t\_s = (copysign.f64 #s(literal 1 binary64) t)
(FPCore (t_s t_m l k)
 :precision binary64
 (let* ((t_2 (/ (* t_m t_m) l)))
   (*
    t_s
    (if (<= t_m 7.5e-109)
      (/
       2.0
       (/
        (*
         (*
          (fma (fma t_2 -0.6666666666666666 (pow l -1.0)) (* k k) (* t_2 2.0))
          (* k k))
         (/ t_m l))
        (cos k)))
      (if (<= t_m 1.05e+90)
        (/
         2.0
         (*
          (* (/ (/ (* (* t_m t_m) t_m) l) l) (sin k))
          (* (tan k) (fma (/ k t_m) (/ k t_m) 2.0))))
        (/
         2.0
         (/ (* (/ (* (pow (* k t_m) 2.0) 2.0) l) (/ t_m l)) (cos k))))))))
t\_m = fabs(t);
t\_s = copysign(1.0, t);
double code(double t_s, double t_m, double l, double k) {
	double t_2 = (t_m * t_m) / l;
	double tmp;
	if (t_m <= 7.5e-109) {
		tmp = 2.0 / (((fma(fma(t_2, -0.6666666666666666, pow(l, -1.0)), (k * k), (t_2 * 2.0)) * (k * k)) * (t_m / l)) / cos(k));
	} else if (t_m <= 1.05e+90) {
		tmp = 2.0 / ((((((t_m * t_m) * t_m) / l) / l) * sin(k)) * (tan(k) * fma((k / t_m), (k / t_m), 2.0)));
	} else {
		tmp = 2.0 / ((((pow((k * t_m), 2.0) * 2.0) / l) * (t_m / l)) / cos(k));
	}
	return t_s * tmp;
}
t\_m = abs(t)
t\_s = copysign(1.0, t)
function code(t_s, t_m, l, k)
	t_2 = Float64(Float64(t_m * t_m) / l)
	tmp = 0.0
	if (t_m <= 7.5e-109)
		tmp = Float64(2.0 / Float64(Float64(Float64(fma(fma(t_2, -0.6666666666666666, (l ^ -1.0)), Float64(k * k), Float64(t_2 * 2.0)) * Float64(k * k)) * Float64(t_m / l)) / cos(k)));
	elseif (t_m <= 1.05e+90)
		tmp = Float64(2.0 / Float64(Float64(Float64(Float64(Float64(Float64(t_m * t_m) * t_m) / l) / l) * sin(k)) * Float64(tan(k) * fma(Float64(k / t_m), Float64(k / t_m), 2.0))));
	else
		tmp = Float64(2.0 / Float64(Float64(Float64(Float64((Float64(k * t_m) ^ 2.0) * 2.0) / l) * Float64(t_m / l)) / cos(k)));
	end
	return Float64(t_s * tmp)
end
t\_m = N[Abs[t], $MachinePrecision]
t\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[t]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[t$95$s_, t$95$m_, l_, k_] := Block[{t$95$2 = N[(N[(t$95$m * t$95$m), $MachinePrecision] / l), $MachinePrecision]}, N[(t$95$s * If[LessEqual[t$95$m, 7.5e-109], N[(2.0 / N[(N[(N[(N[(N[(t$95$2 * -0.6666666666666666 + N[Power[l, -1.0], $MachinePrecision]), $MachinePrecision] * N[(k * k), $MachinePrecision] + N[(t$95$2 * 2.0), $MachinePrecision]), $MachinePrecision] * N[(k * k), $MachinePrecision]), $MachinePrecision] * N[(t$95$m / l), $MachinePrecision]), $MachinePrecision] / N[Cos[k], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$m, 1.05e+90], N[(2.0 / N[(N[(N[(N[(N[(N[(t$95$m * t$95$m), $MachinePrecision] * t$95$m), $MachinePrecision] / l), $MachinePrecision] / l), $MachinePrecision] * N[Sin[k], $MachinePrecision]), $MachinePrecision] * N[(N[Tan[k], $MachinePrecision] * N[(N[(k / t$95$m), $MachinePrecision] * N[(k / t$95$m), $MachinePrecision] + 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(2.0 / N[(N[(N[(N[(N[Power[N[(k * t$95$m), $MachinePrecision], 2.0], $MachinePrecision] * 2.0), $MachinePrecision] / l), $MachinePrecision] * N[(t$95$m / l), $MachinePrecision]), $MachinePrecision] / N[Cos[k], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]), $MachinePrecision]]
\begin{array}{l}
t\_m = \left|t\right|
\\
t\_s = \mathsf{copysign}\left(1, t\right)

\\
\begin{array}{l}
t_2 := \frac{t\_m \cdot t\_m}{\ell}\\
t\_s \cdot \begin{array}{l}
\mathbf{if}\;t\_m \leq 7.5 \cdot 10^{-109}:\\
\;\;\;\;\frac{2}{\frac{\left(\mathsf{fma}\left(\mathsf{fma}\left(t\_2, -0.6666666666666666, {\ell}^{-1}\right), k \cdot k, t\_2 \cdot 2\right) \cdot \left(k \cdot k\right)\right) \cdot \frac{t\_m}{\ell}}{\cos k}}\\

\mathbf{elif}\;t\_m \leq 1.05 \cdot 10^{+90}:\\
\;\;\;\;\frac{2}{\left(\frac{\frac{\left(t\_m \cdot t\_m\right) \cdot t\_m}{\ell}}{\ell} \cdot \sin k\right) \cdot \left(\tan k \cdot \mathsf{fma}\left(\frac{k}{t\_m}, \frac{k}{t\_m}, 2\right)\right)}\\

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


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

    1. Initial program 51.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 7.49999999999999982e-109 < t < 1.0499999999999999e90

    1. Initial program 84.3%

      \[\frac{2}{\left(\left(\frac{{t}^{3}}{\ell \cdot \ell} \cdot \sin k\right) \cdot \tan k\right) \cdot \left(\left(1 + {\left(\frac{k}{t}\right)}^{2}\right) + 1\right)} \]
    2. Add Preprocessing
    3. Applied rewrites88.1%

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

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

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

        \[\leadsto \frac{2}{\left(\frac{\frac{\color{blue}{\left(t \cdot t\right)} \cdot t}{\ell}}{\ell} \cdot \sin k\right) \cdot \left(\tan k \cdot \left(\left({\left(\frac{k}{t}\right)}^{2} + 1\right) + 1\right)\right)} \]
      4. lift-*.f6488.1

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \frac{2}{\left(\frac{\frac{\left(t \cdot t\right) \cdot t}{\ell}}{\ell} \cdot \sin k\right) \cdot \left(\tan k \cdot \mathsf{fma}\left(\color{blue}{\frac{k}{t}}, \frac{k}{t}, 2\right)\right)} \]
      10. lift-/.f6488.1

        \[\leadsto \frac{2}{\left(\frac{\frac{\left(t \cdot t\right) \cdot t}{\ell}}{\ell} \cdot \sin k\right) \cdot \left(\tan k \cdot \mathsf{fma}\left(\frac{k}{t}, \color{blue}{\frac{k}{t}}, 2\right)\right)} \]
    7. Applied rewrites88.1%

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

    if 1.0499999999999999e90 < t

    1. Initial program 67.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 6: 78.3% accurate, 1.5× speedup?

\[\begin{array}{l} t\_m = \left|t\right| \\ t\_s = \mathsf{copysign}\left(1, t\right) \\ t\_s \cdot \begin{array}{l} \mathbf{if}\;t\_m \leq 7.5 \cdot 10^{-109}:\\ \;\;\;\;\frac{2}{\frac{\frac{\mathsf{fma}\left(\mathsf{fma}\left(t\_m \cdot t\_m, -0.6666666666666666, 1\right) \cdot k, k, \left(t\_m \cdot t\_m\right) \cdot 2\right) \cdot \left(k \cdot k\right)}{\ell} \cdot \frac{t\_m}{\ell}}{\cos k}}\\ \mathbf{elif}\;t\_m \leq 1.05 \cdot 10^{+90}:\\ \;\;\;\;\frac{2}{\left(\frac{\frac{\left(t\_m \cdot t\_m\right) \cdot t\_m}{\ell}}{\ell} \cdot \sin k\right) \cdot \left(\tan k \cdot \mathsf{fma}\left(\frac{k}{t\_m}, \frac{k}{t\_m}, 2\right)\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{2}{\frac{\frac{{\left(k \cdot t\_m\right)}^{2} \cdot 2}{\ell} \cdot \frac{t\_m}{\ell}}{\cos k}}\\ \end{array} \end{array} \]
t\_m = (fabs.f64 t)
t\_s = (copysign.f64 #s(literal 1 binary64) t)
(FPCore (t_s t_m l k)
 :precision binary64
 (*
  t_s
  (if (<= t_m 7.5e-109)
    (/
     2.0
     (/
      (*
       (/
        (*
         (fma
          (* (fma (* t_m t_m) -0.6666666666666666 1.0) k)
          k
          (* (* t_m t_m) 2.0))
         (* k k))
        l)
       (/ t_m l))
      (cos k)))
    (if (<= t_m 1.05e+90)
      (/
       2.0
       (*
        (* (/ (/ (* (* t_m t_m) t_m) l) l) (sin k))
        (* (tan k) (fma (/ k t_m) (/ k t_m) 2.0))))
      (/ 2.0 (/ (* (/ (* (pow (* k t_m) 2.0) 2.0) l) (/ t_m l)) (cos k)))))))
t\_m = fabs(t);
t\_s = copysign(1.0, t);
double code(double t_s, double t_m, double l, double k) {
	double tmp;
	if (t_m <= 7.5e-109) {
		tmp = 2.0 / ((((fma((fma((t_m * t_m), -0.6666666666666666, 1.0) * k), k, ((t_m * t_m) * 2.0)) * (k * k)) / l) * (t_m / l)) / cos(k));
	} else if (t_m <= 1.05e+90) {
		tmp = 2.0 / ((((((t_m * t_m) * t_m) / l) / l) * sin(k)) * (tan(k) * fma((k / t_m), (k / t_m), 2.0)));
	} else {
		tmp = 2.0 / ((((pow((k * t_m), 2.0) * 2.0) / l) * (t_m / l)) / cos(k));
	}
	return t_s * tmp;
}
t\_m = abs(t)
t\_s = copysign(1.0, t)
function code(t_s, t_m, l, k)
	tmp = 0.0
	if (t_m <= 7.5e-109)
		tmp = Float64(2.0 / Float64(Float64(Float64(Float64(fma(Float64(fma(Float64(t_m * t_m), -0.6666666666666666, 1.0) * k), k, Float64(Float64(t_m * t_m) * 2.0)) * Float64(k * k)) / l) * Float64(t_m / l)) / cos(k)));
	elseif (t_m <= 1.05e+90)
		tmp = Float64(2.0 / Float64(Float64(Float64(Float64(Float64(Float64(t_m * t_m) * t_m) / l) / l) * sin(k)) * Float64(tan(k) * fma(Float64(k / t_m), Float64(k / t_m), 2.0))));
	else
		tmp = Float64(2.0 / Float64(Float64(Float64(Float64((Float64(k * t_m) ^ 2.0) * 2.0) / l) * Float64(t_m / l)) / cos(k)));
	end
	return Float64(t_s * tmp)
end
t\_m = N[Abs[t], $MachinePrecision]
t\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[t]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[t$95$s_, t$95$m_, l_, k_] := N[(t$95$s * If[LessEqual[t$95$m, 7.5e-109], N[(2.0 / N[(N[(N[(N[(N[(N[(N[(N[(t$95$m * t$95$m), $MachinePrecision] * -0.6666666666666666 + 1.0), $MachinePrecision] * k), $MachinePrecision] * k + N[(N[(t$95$m * t$95$m), $MachinePrecision] * 2.0), $MachinePrecision]), $MachinePrecision] * N[(k * k), $MachinePrecision]), $MachinePrecision] / l), $MachinePrecision] * N[(t$95$m / l), $MachinePrecision]), $MachinePrecision] / N[Cos[k], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$m, 1.05e+90], N[(2.0 / N[(N[(N[(N[(N[(N[(t$95$m * t$95$m), $MachinePrecision] * t$95$m), $MachinePrecision] / l), $MachinePrecision] / l), $MachinePrecision] * N[Sin[k], $MachinePrecision]), $MachinePrecision] * N[(N[Tan[k], $MachinePrecision] * N[(N[(k / t$95$m), $MachinePrecision] * N[(k / t$95$m), $MachinePrecision] + 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(2.0 / N[(N[(N[(N[(N[Power[N[(k * t$95$m), $MachinePrecision], 2.0], $MachinePrecision] * 2.0), $MachinePrecision] / l), $MachinePrecision] * N[(t$95$m / l), $MachinePrecision]), $MachinePrecision] / N[Cos[k], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]), $MachinePrecision]
\begin{array}{l}
t\_m = \left|t\right|
\\
t\_s = \mathsf{copysign}\left(1, t\right)

\\
t\_s \cdot \begin{array}{l}
\mathbf{if}\;t\_m \leq 7.5 \cdot 10^{-109}:\\
\;\;\;\;\frac{2}{\frac{\frac{\mathsf{fma}\left(\mathsf{fma}\left(t\_m \cdot t\_m, -0.6666666666666666, 1\right) \cdot k, k, \left(t\_m \cdot t\_m\right) \cdot 2\right) \cdot \left(k \cdot k\right)}{\ell} \cdot \frac{t\_m}{\ell}}{\cos k}}\\

\mathbf{elif}\;t\_m \leq 1.05 \cdot 10^{+90}:\\
\;\;\;\;\frac{2}{\left(\frac{\frac{\left(t\_m \cdot t\_m\right) \cdot t\_m}{\ell}}{\ell} \cdot \sin k\right) \cdot \left(\tan k \cdot \mathsf{fma}\left(\frac{k}{t\_m}, \frac{k}{t\_m}, 2\right)\right)}\\

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


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

    1. Initial program 51.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \frac{2}{\frac{\frac{\left(\mathsf{fma}\left(\mathsf{fma}\left(\frac{-2}{3}, t \cdot t, 1\right), k \cdot k, \left(t \cdot t\right) \cdot 2\right) \cdot \left(k \cdot k\right)\right) \cdot t}{\ell \cdot \ell}}{\cos k}} \]
      4. times-fracN/A

        \[\leadsto \frac{2}{\frac{\frac{\mathsf{fma}\left(\mathsf{fma}\left(\frac{-2}{3}, t \cdot t, 1\right), k \cdot k, \left(t \cdot t\right) \cdot 2\right) \cdot \left(k \cdot k\right)}{\ell} \cdot \frac{t}{\ell}}{\cos \color{blue}{k}}} \]
      5. lower-*.f64N/A

        \[\leadsto \frac{2}{\frac{\frac{\mathsf{fma}\left(\mathsf{fma}\left(\frac{-2}{3}, t \cdot t, 1\right), k \cdot k, \left(t \cdot t\right) \cdot 2\right) \cdot \left(k \cdot k\right)}{\ell} \cdot \frac{t}{\ell}}{\cos \color{blue}{k}}} \]
    11. Applied rewrites54.4%

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

    if 7.49999999999999982e-109 < t < 1.0499999999999999e90

    1. Initial program 84.3%

      \[\frac{2}{\left(\left(\frac{{t}^{3}}{\ell \cdot \ell} \cdot \sin k\right) \cdot \tan k\right) \cdot \left(\left(1 + {\left(\frac{k}{t}\right)}^{2}\right) + 1\right)} \]
    2. Add Preprocessing
    3. Applied rewrites88.1%

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

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

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

        \[\leadsto \frac{2}{\left(\frac{\frac{\color{blue}{\left(t \cdot t\right)} \cdot t}{\ell}}{\ell} \cdot \sin k\right) \cdot \left(\tan k \cdot \left(\left({\left(\frac{k}{t}\right)}^{2} + 1\right) + 1\right)\right)} \]
      4. lift-*.f6488.1

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \frac{2}{\left(\frac{\frac{\left(t \cdot t\right) \cdot t}{\ell}}{\ell} \cdot \sin k\right) \cdot \left(\tan k \cdot \mathsf{fma}\left(\color{blue}{\frac{k}{t}}, \frac{k}{t}, 2\right)\right)} \]
      10. lift-/.f6488.1

        \[\leadsto \frac{2}{\left(\frac{\frac{\left(t \cdot t\right) \cdot t}{\ell}}{\ell} \cdot \sin k\right) \cdot \left(\tan k \cdot \mathsf{fma}\left(\frac{k}{t}, \color{blue}{\frac{k}{t}}, 2\right)\right)} \]
    7. Applied rewrites88.1%

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

    if 1.0499999999999999e90 < t

    1. Initial program 67.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 7: 78.0% accurate, 1.6× speedup?

\[\begin{array}{l} t\_m = \left|t\right| \\ t\_s = \mathsf{copysign}\left(1, t\right) \\ t\_s \cdot \begin{array}{l} \mathbf{if}\;t\_m \leq 7.5 \cdot 10^{-109}:\\ \;\;\;\;\frac{2}{\frac{\frac{\mathsf{fma}\left(\mathsf{fma}\left(t\_m \cdot t\_m, -0.6666666666666666, 1\right) \cdot k, k, \left(t\_m \cdot t\_m\right) \cdot 2\right) \cdot \left(k \cdot k\right)}{\ell} \cdot \frac{t\_m}{\ell}}{\cos k}}\\ \mathbf{elif}\;t\_m \leq 1.05 \cdot 10^{+90}:\\ \;\;\;\;\frac{2}{\left(\frac{\frac{\left(t\_m \cdot t\_m\right) \cdot t\_m}{\ell}}{\ell} \cdot \sin k\right) \cdot \left(\tan k \cdot \left(\frac{k \cdot k}{t\_m \cdot t\_m} + 2\right)\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{2}{\frac{\frac{{\left(k \cdot t\_m\right)}^{2} \cdot 2}{\ell} \cdot \frac{t\_m}{\ell}}{\cos k}}\\ \end{array} \end{array} \]
t\_m = (fabs.f64 t)
t\_s = (copysign.f64 #s(literal 1 binary64) t)
(FPCore (t_s t_m l k)
 :precision binary64
 (*
  t_s
  (if (<= t_m 7.5e-109)
    (/
     2.0
     (/
      (*
       (/
        (*
         (fma
          (* (fma (* t_m t_m) -0.6666666666666666 1.0) k)
          k
          (* (* t_m t_m) 2.0))
         (* k k))
        l)
       (/ t_m l))
      (cos k)))
    (if (<= t_m 1.05e+90)
      (/
       2.0
       (*
        (* (/ (/ (* (* t_m t_m) t_m) l) l) (sin k))
        (* (tan k) (+ (/ (* k k) (* t_m t_m)) 2.0))))
      (/ 2.0 (/ (* (/ (* (pow (* k t_m) 2.0) 2.0) l) (/ t_m l)) (cos k)))))))
t\_m = fabs(t);
t\_s = copysign(1.0, t);
double code(double t_s, double t_m, double l, double k) {
	double tmp;
	if (t_m <= 7.5e-109) {
		tmp = 2.0 / ((((fma((fma((t_m * t_m), -0.6666666666666666, 1.0) * k), k, ((t_m * t_m) * 2.0)) * (k * k)) / l) * (t_m / l)) / cos(k));
	} else if (t_m <= 1.05e+90) {
		tmp = 2.0 / ((((((t_m * t_m) * t_m) / l) / l) * sin(k)) * (tan(k) * (((k * k) / (t_m * t_m)) + 2.0)));
	} else {
		tmp = 2.0 / ((((pow((k * t_m), 2.0) * 2.0) / l) * (t_m / l)) / cos(k));
	}
	return t_s * tmp;
}
t\_m = abs(t)
t\_s = copysign(1.0, t)
function code(t_s, t_m, l, k)
	tmp = 0.0
	if (t_m <= 7.5e-109)
		tmp = Float64(2.0 / Float64(Float64(Float64(Float64(fma(Float64(fma(Float64(t_m * t_m), -0.6666666666666666, 1.0) * k), k, Float64(Float64(t_m * t_m) * 2.0)) * Float64(k * k)) / l) * Float64(t_m / l)) / cos(k)));
	elseif (t_m <= 1.05e+90)
		tmp = Float64(2.0 / Float64(Float64(Float64(Float64(Float64(Float64(t_m * t_m) * t_m) / l) / l) * sin(k)) * Float64(tan(k) * Float64(Float64(Float64(k * k) / Float64(t_m * t_m)) + 2.0))));
	else
		tmp = Float64(2.0 / Float64(Float64(Float64(Float64((Float64(k * t_m) ^ 2.0) * 2.0) / l) * Float64(t_m / l)) / cos(k)));
	end
	return Float64(t_s * tmp)
end
t\_m = N[Abs[t], $MachinePrecision]
t\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[t]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[t$95$s_, t$95$m_, l_, k_] := N[(t$95$s * If[LessEqual[t$95$m, 7.5e-109], N[(2.0 / N[(N[(N[(N[(N[(N[(N[(N[(t$95$m * t$95$m), $MachinePrecision] * -0.6666666666666666 + 1.0), $MachinePrecision] * k), $MachinePrecision] * k + N[(N[(t$95$m * t$95$m), $MachinePrecision] * 2.0), $MachinePrecision]), $MachinePrecision] * N[(k * k), $MachinePrecision]), $MachinePrecision] / l), $MachinePrecision] * N[(t$95$m / l), $MachinePrecision]), $MachinePrecision] / N[Cos[k], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$m, 1.05e+90], N[(2.0 / N[(N[(N[(N[(N[(N[(t$95$m * t$95$m), $MachinePrecision] * t$95$m), $MachinePrecision] / l), $MachinePrecision] / l), $MachinePrecision] * N[Sin[k], $MachinePrecision]), $MachinePrecision] * N[(N[Tan[k], $MachinePrecision] * N[(N[(N[(k * k), $MachinePrecision] / N[(t$95$m * t$95$m), $MachinePrecision]), $MachinePrecision] + 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(2.0 / N[(N[(N[(N[(N[Power[N[(k * t$95$m), $MachinePrecision], 2.0], $MachinePrecision] * 2.0), $MachinePrecision] / l), $MachinePrecision] * N[(t$95$m / l), $MachinePrecision]), $MachinePrecision] / N[Cos[k], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]), $MachinePrecision]
\begin{array}{l}
t\_m = \left|t\right|
\\
t\_s = \mathsf{copysign}\left(1, t\right)

\\
t\_s \cdot \begin{array}{l}
\mathbf{if}\;t\_m \leq 7.5 \cdot 10^{-109}:\\
\;\;\;\;\frac{2}{\frac{\frac{\mathsf{fma}\left(\mathsf{fma}\left(t\_m \cdot t\_m, -0.6666666666666666, 1\right) \cdot k, k, \left(t\_m \cdot t\_m\right) \cdot 2\right) \cdot \left(k \cdot k\right)}{\ell} \cdot \frac{t\_m}{\ell}}{\cos k}}\\

\mathbf{elif}\;t\_m \leq 1.05 \cdot 10^{+90}:\\
\;\;\;\;\frac{2}{\left(\frac{\frac{\left(t\_m \cdot t\_m\right) \cdot t\_m}{\ell}}{\ell} \cdot \sin k\right) \cdot \left(\tan k \cdot \left(\frac{k \cdot k}{t\_m \cdot t\_m} + 2\right)\right)}\\

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


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

    1. Initial program 51.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \frac{2}{\frac{\frac{\left(\mathsf{fma}\left(\mathsf{fma}\left(\frac{-2}{3}, t \cdot t, 1\right), k \cdot k, \left(t \cdot t\right) \cdot 2\right) \cdot \left(k \cdot k\right)\right) \cdot t}{\ell \cdot \ell}}{\cos k}} \]
      4. times-fracN/A

        \[\leadsto \frac{2}{\frac{\frac{\mathsf{fma}\left(\mathsf{fma}\left(\frac{-2}{3}, t \cdot t, 1\right), k \cdot k, \left(t \cdot t\right) \cdot 2\right) \cdot \left(k \cdot k\right)}{\ell} \cdot \frac{t}{\ell}}{\cos \color{blue}{k}}} \]
      5. lower-*.f64N/A

        \[\leadsto \frac{2}{\frac{\frac{\mathsf{fma}\left(\mathsf{fma}\left(\frac{-2}{3}, t \cdot t, 1\right), k \cdot k, \left(t \cdot t\right) \cdot 2\right) \cdot \left(k \cdot k\right)}{\ell} \cdot \frac{t}{\ell}}{\cos \color{blue}{k}}} \]
    11. Applied rewrites54.4%

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

    if 7.49999999999999982e-109 < t < 1.0499999999999999e90

    1. Initial program 84.3%

      \[\frac{2}{\left(\left(\frac{{t}^{3}}{\ell \cdot \ell} \cdot \sin k\right) \cdot \tan k\right) \cdot \left(\left(1 + {\left(\frac{k}{t}\right)}^{2}\right) + 1\right)} \]
    2. Add Preprocessing
    3. Applied rewrites88.1%

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

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

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

        \[\leadsto \frac{2}{\left(\frac{\frac{\color{blue}{\left(t \cdot t\right)} \cdot t}{\ell}}{\ell} \cdot \sin k\right) \cdot \left(\tan k \cdot \left(\left({\left(\frac{k}{t}\right)}^{2} + 1\right) + 1\right)\right)} \]
      4. lift-*.f6488.1

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

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

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

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

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

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

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

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

        \[\leadsto \frac{2}{\left(\frac{\frac{\left(t \cdot t\right) \cdot t}{\ell}}{\ell} \cdot \sin k\right) \cdot \left(\tan k \cdot \left(\frac{k \cdot k}{t \cdot t} + 2\right)\right)} \]
      7. lift-*.f6486.3

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

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

    if 1.0499999999999999e90 < t

    1. Initial program 67.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 8: 76.9% accurate, 1.6× speedup?

\[\begin{array}{l} t\_m = \left|t\right| \\ t\_s = \mathsf{copysign}\left(1, t\right) \\ t\_s \cdot \begin{array}{l} \mathbf{if}\;t\_m \leq 5.2 \cdot 10^{-83}:\\ \;\;\;\;\frac{2}{\frac{\frac{\mathsf{fma}\left(\mathsf{fma}\left(t\_m \cdot t\_m, -0.6666666666666666, 1\right) \cdot k, k, \left(t\_m \cdot t\_m\right) \cdot 2\right) \cdot \left(k \cdot k\right)}{\ell} \cdot \frac{t\_m}{\ell}}{\cos k}}\\ \mathbf{elif}\;t\_m \leq 1.05 \cdot 10^{+90}:\\ \;\;\;\;\frac{2}{\left(\left(\frac{\left(t\_m \cdot t\_m\right) \cdot t\_m}{\ell \cdot \ell} \cdot \sin k\right) \cdot \tan k\right) \cdot \mathsf{fma}\left(\frac{k}{t\_m}, \frac{k}{t\_m}, 2\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{2}{\frac{\frac{{\left(k \cdot t\_m\right)}^{2} \cdot 2}{\ell} \cdot \frac{t\_m}{\ell}}{\cos k}}\\ \end{array} \end{array} \]
t\_m = (fabs.f64 t)
t\_s = (copysign.f64 #s(literal 1 binary64) t)
(FPCore (t_s t_m l k)
 :precision binary64
 (*
  t_s
  (if (<= t_m 5.2e-83)
    (/
     2.0
     (/
      (*
       (/
        (*
         (fma
          (* (fma (* t_m t_m) -0.6666666666666666 1.0) k)
          k
          (* (* t_m t_m) 2.0))
         (* k k))
        l)
       (/ t_m l))
      (cos k)))
    (if (<= t_m 1.05e+90)
      (/
       2.0
       (*
        (* (* (/ (* (* t_m t_m) t_m) (* l l)) (sin k)) (tan k))
        (fma (/ k t_m) (/ k t_m) 2.0)))
      (/ 2.0 (/ (* (/ (* (pow (* k t_m) 2.0) 2.0) l) (/ t_m l)) (cos k)))))))
t\_m = fabs(t);
t\_s = copysign(1.0, t);
double code(double t_s, double t_m, double l, double k) {
	double tmp;
	if (t_m <= 5.2e-83) {
		tmp = 2.0 / ((((fma((fma((t_m * t_m), -0.6666666666666666, 1.0) * k), k, ((t_m * t_m) * 2.0)) * (k * k)) / l) * (t_m / l)) / cos(k));
	} else if (t_m <= 1.05e+90) {
		tmp = 2.0 / ((((((t_m * t_m) * t_m) / (l * l)) * sin(k)) * tan(k)) * fma((k / t_m), (k / t_m), 2.0));
	} else {
		tmp = 2.0 / ((((pow((k * t_m), 2.0) * 2.0) / l) * (t_m / l)) / cos(k));
	}
	return t_s * tmp;
}
t\_m = abs(t)
t\_s = copysign(1.0, t)
function code(t_s, t_m, l, k)
	tmp = 0.0
	if (t_m <= 5.2e-83)
		tmp = Float64(2.0 / Float64(Float64(Float64(Float64(fma(Float64(fma(Float64(t_m * t_m), -0.6666666666666666, 1.0) * k), k, Float64(Float64(t_m * t_m) * 2.0)) * Float64(k * k)) / l) * Float64(t_m / l)) / cos(k)));
	elseif (t_m <= 1.05e+90)
		tmp = Float64(2.0 / Float64(Float64(Float64(Float64(Float64(Float64(t_m * t_m) * t_m) / Float64(l * l)) * sin(k)) * tan(k)) * fma(Float64(k / t_m), Float64(k / t_m), 2.0)));
	else
		tmp = Float64(2.0 / Float64(Float64(Float64(Float64((Float64(k * t_m) ^ 2.0) * 2.0) / l) * Float64(t_m / l)) / cos(k)));
	end
	return Float64(t_s * tmp)
end
t\_m = N[Abs[t], $MachinePrecision]
t\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[t]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[t$95$s_, t$95$m_, l_, k_] := N[(t$95$s * If[LessEqual[t$95$m, 5.2e-83], N[(2.0 / N[(N[(N[(N[(N[(N[(N[(N[(t$95$m * t$95$m), $MachinePrecision] * -0.6666666666666666 + 1.0), $MachinePrecision] * k), $MachinePrecision] * k + N[(N[(t$95$m * t$95$m), $MachinePrecision] * 2.0), $MachinePrecision]), $MachinePrecision] * N[(k * k), $MachinePrecision]), $MachinePrecision] / l), $MachinePrecision] * N[(t$95$m / l), $MachinePrecision]), $MachinePrecision] / N[Cos[k], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$m, 1.05e+90], N[(2.0 / N[(N[(N[(N[(N[(N[(t$95$m * t$95$m), $MachinePrecision] * t$95$m), $MachinePrecision] / N[(l * l), $MachinePrecision]), $MachinePrecision] * N[Sin[k], $MachinePrecision]), $MachinePrecision] * N[Tan[k], $MachinePrecision]), $MachinePrecision] * N[(N[(k / t$95$m), $MachinePrecision] * N[(k / t$95$m), $MachinePrecision] + 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(2.0 / N[(N[(N[(N[(N[Power[N[(k * t$95$m), $MachinePrecision], 2.0], $MachinePrecision] * 2.0), $MachinePrecision] / l), $MachinePrecision] * N[(t$95$m / l), $MachinePrecision]), $MachinePrecision] / N[Cos[k], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]), $MachinePrecision]
\begin{array}{l}
t\_m = \left|t\right|
\\
t\_s = \mathsf{copysign}\left(1, t\right)

\\
t\_s \cdot \begin{array}{l}
\mathbf{if}\;t\_m \leq 5.2 \cdot 10^{-83}:\\
\;\;\;\;\frac{2}{\frac{\frac{\mathsf{fma}\left(\mathsf{fma}\left(t\_m \cdot t\_m, -0.6666666666666666, 1\right) \cdot k, k, \left(t\_m \cdot t\_m\right) \cdot 2\right) \cdot \left(k \cdot k\right)}{\ell} \cdot \frac{t\_m}{\ell}}{\cos k}}\\

\mathbf{elif}\;t\_m \leq 1.05 \cdot 10^{+90}:\\
\;\;\;\;\frac{2}{\left(\left(\frac{\left(t\_m \cdot t\_m\right) \cdot t\_m}{\ell \cdot \ell} \cdot \sin k\right) \cdot \tan k\right) \cdot \mathsf{fma}\left(\frac{k}{t\_m}, \frac{k}{t\_m}, 2\right)}\\

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


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

    1. Initial program 53.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \frac{2}{\frac{\frac{\left(\mathsf{fma}\left(\mathsf{fma}\left(\frac{-2}{3}, t \cdot t, 1\right), k \cdot k, \left(t \cdot t\right) \cdot 2\right) \cdot \left(k \cdot k\right)\right) \cdot t}{\ell \cdot \ell}}{\cos k}} \]
      4. times-fracN/A

        \[\leadsto \frac{2}{\frac{\frac{\mathsf{fma}\left(\mathsf{fma}\left(\frac{-2}{3}, t \cdot t, 1\right), k \cdot k, \left(t \cdot t\right) \cdot 2\right) \cdot \left(k \cdot k\right)}{\ell} \cdot \frac{t}{\ell}}{\cos \color{blue}{k}}} \]
      5. lower-*.f64N/A

        \[\leadsto \frac{2}{\frac{\frac{\mathsf{fma}\left(\mathsf{fma}\left(\frac{-2}{3}, t \cdot t, 1\right), k \cdot k, \left(t \cdot t\right) \cdot 2\right) \cdot \left(k \cdot k\right)}{\ell} \cdot \frac{t}{\ell}}{\cos \color{blue}{k}}} \]
    11. Applied rewrites55.5%

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

    if 5.20000000000000018e-83 < t < 1.0499999999999999e90

    1. Initial program 84.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \frac{2}{\left(\left(\frac{\left(t \cdot t\right) \cdot t}{\ell \cdot \ell} \cdot \sin k\right) \cdot \tan k\right) \cdot \mathsf{fma}\left(\color{blue}{\frac{k}{t}}, \frac{k}{t}, 2\right)} \]
      11. lift-/.f6484.3

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

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

    if 1.0499999999999999e90 < t

    1. Initial program 67.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 9: 76.8% accurate, 1.6× speedup?

\[\begin{array}{l} t\_m = \left|t\right| \\ t\_s = \mathsf{copysign}\left(1, t\right) \\ t\_s \cdot \begin{array}{l} \mathbf{if}\;t\_m \leq 5.2 \cdot 10^{-83}:\\ \;\;\;\;\frac{2}{\frac{\frac{\mathsf{fma}\left(\mathsf{fma}\left(t\_m \cdot t\_m, -0.6666666666666666, 1\right) \cdot k, k, \left(t\_m \cdot t\_m\right) \cdot 2\right) \cdot \left(k \cdot k\right)}{\ell} \cdot \frac{t\_m}{\ell}}{\cos k}}\\ \mathbf{elif}\;t\_m \leq 1.05 \cdot 10^{+90}:\\ \;\;\;\;\frac{2}{\left(\left(\frac{\left(t\_m \cdot t\_m\right) \cdot t\_m}{\ell \cdot \ell} \cdot \sin k\right) \cdot \tan k\right) \cdot \left(\left(1 + \frac{k \cdot k}{t\_m \cdot t\_m}\right) + 1\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{2}{\frac{\frac{{\left(k \cdot t\_m\right)}^{2} \cdot 2}{\ell} \cdot \frac{t\_m}{\ell}}{\cos k}}\\ \end{array} \end{array} \]
t\_m = (fabs.f64 t)
t\_s = (copysign.f64 #s(literal 1 binary64) t)
(FPCore (t_s t_m l k)
 :precision binary64
 (*
  t_s
  (if (<= t_m 5.2e-83)
    (/
     2.0
     (/
      (*
       (/
        (*
         (fma
          (* (fma (* t_m t_m) -0.6666666666666666 1.0) k)
          k
          (* (* t_m t_m) 2.0))
         (* k k))
        l)
       (/ t_m l))
      (cos k)))
    (if (<= t_m 1.05e+90)
      (/
       2.0
       (*
        (* (* (/ (* (* t_m t_m) t_m) (* l l)) (sin k)) (tan k))
        (+ (+ 1.0 (/ (* k k) (* t_m t_m))) 1.0)))
      (/ 2.0 (/ (* (/ (* (pow (* k t_m) 2.0) 2.0) l) (/ t_m l)) (cos k)))))))
t\_m = fabs(t);
t\_s = copysign(1.0, t);
double code(double t_s, double t_m, double l, double k) {
	double tmp;
	if (t_m <= 5.2e-83) {
		tmp = 2.0 / ((((fma((fma((t_m * t_m), -0.6666666666666666, 1.0) * k), k, ((t_m * t_m) * 2.0)) * (k * k)) / l) * (t_m / l)) / cos(k));
	} else if (t_m <= 1.05e+90) {
		tmp = 2.0 / ((((((t_m * t_m) * t_m) / (l * l)) * sin(k)) * tan(k)) * ((1.0 + ((k * k) / (t_m * t_m))) + 1.0));
	} else {
		tmp = 2.0 / ((((pow((k * t_m), 2.0) * 2.0) / l) * (t_m / l)) / cos(k));
	}
	return t_s * tmp;
}
t\_m = abs(t)
t\_s = copysign(1.0, t)
function code(t_s, t_m, l, k)
	tmp = 0.0
	if (t_m <= 5.2e-83)
		tmp = Float64(2.0 / Float64(Float64(Float64(Float64(fma(Float64(fma(Float64(t_m * t_m), -0.6666666666666666, 1.0) * k), k, Float64(Float64(t_m * t_m) * 2.0)) * Float64(k * k)) / l) * Float64(t_m / l)) / cos(k)));
	elseif (t_m <= 1.05e+90)
		tmp = Float64(2.0 / Float64(Float64(Float64(Float64(Float64(Float64(t_m * t_m) * t_m) / Float64(l * l)) * sin(k)) * tan(k)) * Float64(Float64(1.0 + Float64(Float64(k * k) / Float64(t_m * t_m))) + 1.0)));
	else
		tmp = Float64(2.0 / Float64(Float64(Float64(Float64((Float64(k * t_m) ^ 2.0) * 2.0) / l) * Float64(t_m / l)) / cos(k)));
	end
	return Float64(t_s * tmp)
end
t\_m = N[Abs[t], $MachinePrecision]
t\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[t]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[t$95$s_, t$95$m_, l_, k_] := N[(t$95$s * If[LessEqual[t$95$m, 5.2e-83], N[(2.0 / N[(N[(N[(N[(N[(N[(N[(N[(t$95$m * t$95$m), $MachinePrecision] * -0.6666666666666666 + 1.0), $MachinePrecision] * k), $MachinePrecision] * k + N[(N[(t$95$m * t$95$m), $MachinePrecision] * 2.0), $MachinePrecision]), $MachinePrecision] * N[(k * k), $MachinePrecision]), $MachinePrecision] / l), $MachinePrecision] * N[(t$95$m / l), $MachinePrecision]), $MachinePrecision] / N[Cos[k], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$m, 1.05e+90], N[(2.0 / N[(N[(N[(N[(N[(N[(t$95$m * t$95$m), $MachinePrecision] * t$95$m), $MachinePrecision] / N[(l * l), $MachinePrecision]), $MachinePrecision] * N[Sin[k], $MachinePrecision]), $MachinePrecision] * N[Tan[k], $MachinePrecision]), $MachinePrecision] * N[(N[(1.0 + N[(N[(k * k), $MachinePrecision] / N[(t$95$m * t$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(2.0 / N[(N[(N[(N[(N[Power[N[(k * t$95$m), $MachinePrecision], 2.0], $MachinePrecision] * 2.0), $MachinePrecision] / l), $MachinePrecision] * N[(t$95$m / l), $MachinePrecision]), $MachinePrecision] / N[Cos[k], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]), $MachinePrecision]
\begin{array}{l}
t\_m = \left|t\right|
\\
t\_s = \mathsf{copysign}\left(1, t\right)

\\
t\_s \cdot \begin{array}{l}
\mathbf{if}\;t\_m \leq 5.2 \cdot 10^{-83}:\\
\;\;\;\;\frac{2}{\frac{\frac{\mathsf{fma}\left(\mathsf{fma}\left(t\_m \cdot t\_m, -0.6666666666666666, 1\right) \cdot k, k, \left(t\_m \cdot t\_m\right) \cdot 2\right) \cdot \left(k \cdot k\right)}{\ell} \cdot \frac{t\_m}{\ell}}{\cos k}}\\

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

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


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

    1. Initial program 53.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \frac{2}{\frac{\frac{\left(\mathsf{fma}\left(\mathsf{fma}\left(\frac{-2}{3}, t \cdot t, 1\right), k \cdot k, \left(t \cdot t\right) \cdot 2\right) \cdot \left(k \cdot k\right)\right) \cdot t}{\ell \cdot \ell}}{\cos k}} \]
      4. times-fracN/A

        \[\leadsto \frac{2}{\frac{\frac{\mathsf{fma}\left(\mathsf{fma}\left(\frac{-2}{3}, t \cdot t, 1\right), k \cdot k, \left(t \cdot t\right) \cdot 2\right) \cdot \left(k \cdot k\right)}{\ell} \cdot \frac{t}{\ell}}{\cos \color{blue}{k}}} \]
      5. lower-*.f64N/A

        \[\leadsto \frac{2}{\frac{\frac{\mathsf{fma}\left(\mathsf{fma}\left(\frac{-2}{3}, t \cdot t, 1\right), k \cdot k, \left(t \cdot t\right) \cdot 2\right) \cdot \left(k \cdot k\right)}{\ell} \cdot \frac{t}{\ell}}{\cos \color{blue}{k}}} \]
    11. Applied rewrites55.5%

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

    if 5.20000000000000018e-83 < t < 1.0499999999999999e90

    1. Initial program 84.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 1.0499999999999999e90 < t

    1. Initial program 67.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 10: 75.2% accurate, 1.7× speedup?

\[\begin{array}{l} t\_m = \left|t\right| \\ t\_s = \mathsf{copysign}\left(1, t\right) \\ t\_s \cdot \begin{array}{l} \mathbf{if}\;t\_m \leq 4 \cdot 10^{-44}:\\ \;\;\;\;\frac{2}{\frac{\frac{\mathsf{fma}\left(\mathsf{fma}\left(t\_m \cdot t\_m, -0.6666666666666666, 1\right) \cdot k, k, \left(t\_m \cdot t\_m\right) \cdot 2\right) \cdot \left(k \cdot k\right)}{\ell} \cdot \frac{t\_m}{\ell}}{\cos k}}\\ \mathbf{else}:\\ \;\;\;\;\frac{2}{\frac{\frac{{\left(k \cdot t\_m\right)}^{2} \cdot 2}{\ell} \cdot \frac{t\_m}{\ell}}{\cos k}}\\ \end{array} \end{array} \]
t\_m = (fabs.f64 t)
t\_s = (copysign.f64 #s(literal 1 binary64) t)
(FPCore (t_s t_m l k)
 :precision binary64
 (*
  t_s
  (if (<= t_m 4e-44)
    (/
     2.0
     (/
      (*
       (/
        (*
         (fma
          (* (fma (* t_m t_m) -0.6666666666666666 1.0) k)
          k
          (* (* t_m t_m) 2.0))
         (* k k))
        l)
       (/ t_m l))
      (cos k)))
    (/ 2.0 (/ (* (/ (* (pow (* k t_m) 2.0) 2.0) l) (/ t_m l)) (cos k))))))
t\_m = fabs(t);
t\_s = copysign(1.0, t);
double code(double t_s, double t_m, double l, double k) {
	double tmp;
	if (t_m <= 4e-44) {
		tmp = 2.0 / ((((fma((fma((t_m * t_m), -0.6666666666666666, 1.0) * k), k, ((t_m * t_m) * 2.0)) * (k * k)) / l) * (t_m / l)) / cos(k));
	} else {
		tmp = 2.0 / ((((pow((k * t_m), 2.0) * 2.0) / l) * (t_m / l)) / cos(k));
	}
	return t_s * tmp;
}
t\_m = abs(t)
t\_s = copysign(1.0, t)
function code(t_s, t_m, l, k)
	tmp = 0.0
	if (t_m <= 4e-44)
		tmp = Float64(2.0 / Float64(Float64(Float64(Float64(fma(Float64(fma(Float64(t_m * t_m), -0.6666666666666666, 1.0) * k), k, Float64(Float64(t_m * t_m) * 2.0)) * Float64(k * k)) / l) * Float64(t_m / l)) / cos(k)));
	else
		tmp = Float64(2.0 / Float64(Float64(Float64(Float64((Float64(k * t_m) ^ 2.0) * 2.0) / l) * Float64(t_m / l)) / cos(k)));
	end
	return Float64(t_s * tmp)
end
t\_m = N[Abs[t], $MachinePrecision]
t\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[t]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[t$95$s_, t$95$m_, l_, k_] := N[(t$95$s * If[LessEqual[t$95$m, 4e-44], N[(2.0 / N[(N[(N[(N[(N[(N[(N[(N[(t$95$m * t$95$m), $MachinePrecision] * -0.6666666666666666 + 1.0), $MachinePrecision] * k), $MachinePrecision] * k + N[(N[(t$95$m * t$95$m), $MachinePrecision] * 2.0), $MachinePrecision]), $MachinePrecision] * N[(k * k), $MachinePrecision]), $MachinePrecision] / l), $MachinePrecision] * N[(t$95$m / l), $MachinePrecision]), $MachinePrecision] / N[Cos[k], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(2.0 / N[(N[(N[(N[(N[Power[N[(k * t$95$m), $MachinePrecision], 2.0], $MachinePrecision] * 2.0), $MachinePrecision] / l), $MachinePrecision] * N[(t$95$m / l), $MachinePrecision]), $MachinePrecision] / N[Cos[k], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]), $MachinePrecision]
\begin{array}{l}
t\_m = \left|t\right|
\\
t\_s = \mathsf{copysign}\left(1, t\right)

\\
t\_s \cdot \begin{array}{l}
\mathbf{if}\;t\_m \leq 4 \cdot 10^{-44}:\\
\;\;\;\;\frac{2}{\frac{\frac{\mathsf{fma}\left(\mathsf{fma}\left(t\_m \cdot t\_m, -0.6666666666666666, 1\right) \cdot k, k, \left(t\_m \cdot t\_m\right) \cdot 2\right) \cdot \left(k \cdot k\right)}{\ell} \cdot \frac{t\_m}{\ell}}{\cos k}}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t < 3.99999999999999981e-44

    1. Initial program 55.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \frac{2}{\frac{\frac{\left(\mathsf{fma}\left(\mathsf{fma}\left(\frac{-2}{3}, t \cdot t, 1\right), k \cdot k, \left(t \cdot t\right) \cdot 2\right) \cdot \left(k \cdot k\right)\right) \cdot t}{\ell \cdot \ell}}{\cos k}} \]
      4. times-fracN/A

        \[\leadsto \frac{2}{\frac{\frac{\mathsf{fma}\left(\mathsf{fma}\left(\frac{-2}{3}, t \cdot t, 1\right), k \cdot k, \left(t \cdot t\right) \cdot 2\right) \cdot \left(k \cdot k\right)}{\ell} \cdot \frac{t}{\ell}}{\cos \color{blue}{k}}} \]
      5. lower-*.f64N/A

        \[\leadsto \frac{2}{\frac{\frac{\mathsf{fma}\left(\mathsf{fma}\left(\frac{-2}{3}, t \cdot t, 1\right), k \cdot k, \left(t \cdot t\right) \cdot 2\right) \cdot \left(k \cdot k\right)}{\ell} \cdot \frac{t}{\ell}}{\cos \color{blue}{k}}} \]
    11. Applied rewrites56.8%

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

    if 3.99999999999999981e-44 < t

    1. Initial program 74.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 11: 70.5% accurate, 2.3× speedup?

\[\begin{array}{l} t\_m = \left|t\right| \\ t\_s = \mathsf{copysign}\left(1, t\right) \\ t\_s \cdot \begin{array}{l} \mathbf{if}\;t\_m \leq 3.3:\\ \;\;\;\;\frac{2}{\frac{\frac{\mathsf{fma}\left(\mathsf{fma}\left(t\_m \cdot t\_m, -0.6666666666666666, 1\right) \cdot k, k, \left(t\_m \cdot t\_m\right) \cdot 2\right) \cdot \left(k \cdot k\right)}{\ell} \cdot \frac{t\_m}{\ell}}{\cos k}}\\ \mathbf{else}:\\ \;\;\;\;\frac{\ell \cdot \ell}{{\left(k \cdot t\_m\right)}^{2} \cdot t\_m}\\ \end{array} \end{array} \]
t\_m = (fabs.f64 t)
t\_s = (copysign.f64 #s(literal 1 binary64) t)
(FPCore (t_s t_m l k)
 :precision binary64
 (*
  t_s
  (if (<= t_m 3.3)
    (/
     2.0
     (/
      (*
       (/
        (*
         (fma
          (* (fma (* t_m t_m) -0.6666666666666666 1.0) k)
          k
          (* (* t_m t_m) 2.0))
         (* k k))
        l)
       (/ t_m l))
      (cos k)))
    (/ (* l l) (* (pow (* k t_m) 2.0) t_m)))))
t\_m = fabs(t);
t\_s = copysign(1.0, t);
double code(double t_s, double t_m, double l, double k) {
	double tmp;
	if (t_m <= 3.3) {
		tmp = 2.0 / ((((fma((fma((t_m * t_m), -0.6666666666666666, 1.0) * k), k, ((t_m * t_m) * 2.0)) * (k * k)) / l) * (t_m / l)) / cos(k));
	} else {
		tmp = (l * l) / (pow((k * t_m), 2.0) * t_m);
	}
	return t_s * tmp;
}
t\_m = abs(t)
t\_s = copysign(1.0, t)
function code(t_s, t_m, l, k)
	tmp = 0.0
	if (t_m <= 3.3)
		tmp = Float64(2.0 / Float64(Float64(Float64(Float64(fma(Float64(fma(Float64(t_m * t_m), -0.6666666666666666, 1.0) * k), k, Float64(Float64(t_m * t_m) * 2.0)) * Float64(k * k)) / l) * Float64(t_m / l)) / cos(k)));
	else
		tmp = Float64(Float64(l * l) / Float64((Float64(k * t_m) ^ 2.0) * t_m));
	end
	return Float64(t_s * tmp)
end
t\_m = N[Abs[t], $MachinePrecision]
t\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[t]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[t$95$s_, t$95$m_, l_, k_] := N[(t$95$s * If[LessEqual[t$95$m, 3.3], N[(2.0 / N[(N[(N[(N[(N[(N[(N[(N[(t$95$m * t$95$m), $MachinePrecision] * -0.6666666666666666 + 1.0), $MachinePrecision] * k), $MachinePrecision] * k + N[(N[(t$95$m * t$95$m), $MachinePrecision] * 2.0), $MachinePrecision]), $MachinePrecision] * N[(k * k), $MachinePrecision]), $MachinePrecision] / l), $MachinePrecision] * N[(t$95$m / l), $MachinePrecision]), $MachinePrecision] / N[Cos[k], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(l * l), $MachinePrecision] / N[(N[Power[N[(k * t$95$m), $MachinePrecision], 2.0], $MachinePrecision] * t$95$m), $MachinePrecision]), $MachinePrecision]]), $MachinePrecision]
\begin{array}{l}
t\_m = \left|t\right|
\\
t\_s = \mathsf{copysign}\left(1, t\right)

\\
t\_s \cdot \begin{array}{l}
\mathbf{if}\;t\_m \leq 3.3:\\
\;\;\;\;\frac{2}{\frac{\frac{\mathsf{fma}\left(\mathsf{fma}\left(t\_m \cdot t\_m, -0.6666666666666666, 1\right) \cdot k, k, \left(t\_m \cdot t\_m\right) \cdot 2\right) \cdot \left(k \cdot k\right)}{\ell} \cdot \frac{t\_m}{\ell}}{\cos k}}\\

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


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

    1. Initial program 55.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \frac{2}{\frac{\frac{\left(\mathsf{fma}\left(\mathsf{fma}\left(\frac{-2}{3}, t \cdot t, 1\right), k \cdot k, \left(t \cdot t\right) \cdot 2\right) \cdot \left(k \cdot k\right)\right) \cdot t}{\ell \cdot \ell}}{\cos k}} \]
      4. times-fracN/A

        \[\leadsto \frac{2}{\frac{\frac{\mathsf{fma}\left(\mathsf{fma}\left(\frac{-2}{3}, t \cdot t, 1\right), k \cdot k, \left(t \cdot t\right) \cdot 2\right) \cdot \left(k \cdot k\right)}{\ell} \cdot \frac{t}{\ell}}{\cos \color{blue}{k}}} \]
      5. lower-*.f64N/A

        \[\leadsto \frac{2}{\frac{\frac{\mathsf{fma}\left(\mathsf{fma}\left(\frac{-2}{3}, t \cdot t, 1\right), k \cdot k, \left(t \cdot t\right) \cdot 2\right) \cdot \left(k \cdot k\right)}{\ell} \cdot \frac{t}{\ell}}{\cos \color{blue}{k}}} \]
    11. Applied rewrites56.9%

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

    if 3.2999999999999998 < t

    1. Initial program 75.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \frac{\ell \cdot \ell}{{\left(k \cdot t\right)}^{2} \cdot t} \]
      11. lower-*.f6478.8

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

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

Alternative 12: 63.4% accurate, 2.8× speedup?

\[\begin{array}{l} t\_m = \left|t\right| \\ t\_s = \mathsf{copysign}\left(1, t\right) \\ t\_s \cdot \begin{array}{l} \mathbf{if}\;k \leq 1.72 \cdot 10^{+50}:\\ \;\;\;\;\frac{2}{\left(\left(\left(\frac{t\_m \cdot t\_m}{\ell} \cdot \frac{t\_m}{\ell}\right) \cdot \sin k\right) \cdot k\right) \cdot 2}\\ \mathbf{else}:\\ \;\;\;\;\frac{2}{\frac{\left(k \cdot k\right) \cdot t\_m}{\ell \cdot \ell} \cdot \left(k \cdot k\right)}\\ \end{array} \end{array} \]
t\_m = (fabs.f64 t)
t\_s = (copysign.f64 #s(literal 1 binary64) t)
(FPCore (t_s t_m l k)
 :precision binary64
 (*
  t_s
  (if (<= k 1.72e+50)
    (/ 2.0 (* (* (* (* (/ (* t_m t_m) l) (/ t_m l)) (sin k)) k) 2.0))
    (/ 2.0 (* (/ (* (* k k) t_m) (* l l)) (* k k))))))
t\_m = fabs(t);
t\_s = copysign(1.0, t);
double code(double t_s, double t_m, double l, double k) {
	double tmp;
	if (k <= 1.72e+50) {
		tmp = 2.0 / ((((((t_m * t_m) / l) * (t_m / l)) * sin(k)) * k) * 2.0);
	} else {
		tmp = 2.0 / ((((k * k) * t_m) / (l * l)) * (k * k));
	}
	return t_s * tmp;
}
t\_m =     private
t\_s =     private
module fmin_fmax_functions
    implicit none
    private
    public fmax
    public fmin

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

real(8) function code(t_s, t_m, l, k)
use fmin_fmax_functions
    real(8), intent (in) :: t_s
    real(8), intent (in) :: t_m
    real(8), intent (in) :: l
    real(8), intent (in) :: k
    real(8) :: tmp
    if (k <= 1.72d+50) then
        tmp = 2.0d0 / ((((((t_m * t_m) / l) * (t_m / l)) * sin(k)) * k) * 2.0d0)
    else
        tmp = 2.0d0 / ((((k * k) * t_m) / (l * l)) * (k * k))
    end if
    code = t_s * tmp
end function
t\_m = Math.abs(t);
t\_s = Math.copySign(1.0, t);
public static double code(double t_s, double t_m, double l, double k) {
	double tmp;
	if (k <= 1.72e+50) {
		tmp = 2.0 / ((((((t_m * t_m) / l) * (t_m / l)) * Math.sin(k)) * k) * 2.0);
	} else {
		tmp = 2.0 / ((((k * k) * t_m) / (l * l)) * (k * k));
	}
	return t_s * tmp;
}
t\_m = math.fabs(t)
t\_s = math.copysign(1.0, t)
def code(t_s, t_m, l, k):
	tmp = 0
	if k <= 1.72e+50:
		tmp = 2.0 / ((((((t_m * t_m) / l) * (t_m / l)) * math.sin(k)) * k) * 2.0)
	else:
		tmp = 2.0 / ((((k * k) * t_m) / (l * l)) * (k * k))
	return t_s * tmp
t\_m = abs(t)
t\_s = copysign(1.0, t)
function code(t_s, t_m, l, k)
	tmp = 0.0
	if (k <= 1.72e+50)
		tmp = Float64(2.0 / Float64(Float64(Float64(Float64(Float64(Float64(t_m * t_m) / l) * Float64(t_m / l)) * sin(k)) * k) * 2.0));
	else
		tmp = Float64(2.0 / Float64(Float64(Float64(Float64(k * k) * t_m) / Float64(l * l)) * Float64(k * k)));
	end
	return Float64(t_s * tmp)
end
t\_m = abs(t);
t\_s = sign(t) * abs(1.0);
function tmp_2 = code(t_s, t_m, l, k)
	tmp = 0.0;
	if (k <= 1.72e+50)
		tmp = 2.0 / ((((((t_m * t_m) / l) * (t_m / l)) * sin(k)) * k) * 2.0);
	else
		tmp = 2.0 / ((((k * k) * t_m) / (l * l)) * (k * k));
	end
	tmp_2 = t_s * tmp;
end
t\_m = N[Abs[t], $MachinePrecision]
t\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[t]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[t$95$s_, t$95$m_, l_, k_] := N[(t$95$s * If[LessEqual[k, 1.72e+50], N[(2.0 / N[(N[(N[(N[(N[(N[(t$95$m * t$95$m), $MachinePrecision] / l), $MachinePrecision] * N[(t$95$m / l), $MachinePrecision]), $MachinePrecision] * N[Sin[k], $MachinePrecision]), $MachinePrecision] * k), $MachinePrecision] * 2.0), $MachinePrecision]), $MachinePrecision], N[(2.0 / N[(N[(N[(N[(k * k), $MachinePrecision] * t$95$m), $MachinePrecision] / N[(l * l), $MachinePrecision]), $MachinePrecision] * N[(k * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]), $MachinePrecision]
\begin{array}{l}
t\_m = \left|t\right|
\\
t\_s = \mathsf{copysign}\left(1, t\right)

\\
t\_s \cdot \begin{array}{l}
\mathbf{if}\;k \leq 1.72 \cdot 10^{+50}:\\
\;\;\;\;\frac{2}{\left(\left(\left(\frac{t\_m \cdot t\_m}{\ell} \cdot \frac{t\_m}{\ell}\right) \cdot \sin k\right) \cdot k\right) \cdot 2}\\

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


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

    1. Initial program 61.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        if 1.72e50 < k

        1. Initial program 60.6%

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

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

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

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

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

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

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

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

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

          \[\leadsto \frac{2}{\frac{\left(k \cdot k\right) \cdot t}{\ell \cdot \ell} \cdot \left(k \cdot k\right)} \]
      4. Recombined 2 regimes into one program.
      5. Final simplification68.4%

        \[\leadsto \begin{array}{l} \mathbf{if}\;k \leq 1.72 \cdot 10^{+50}:\\ \;\;\;\;\frac{2}{\left(\left(\left(\frac{t \cdot t}{\ell} \cdot \frac{t}{\ell}\right) \cdot \sin k\right) \cdot k\right) \cdot 2}\\ \mathbf{else}:\\ \;\;\;\;\frac{2}{\frac{\left(k \cdot k\right) \cdot t}{\ell \cdot \ell} \cdot \left(k \cdot k\right)}\\ \end{array} \]
      6. Add Preprocessing

      Alternative 13: 66.7% accurate, 3.4× speedup?

      \[\begin{array}{l} t\_m = \left|t\right| \\ t\_s = \mathsf{copysign}\left(1, t\right) \\ t\_s \cdot \begin{array}{l} \mathbf{if}\;t\_m \leq 0.49:\\ \;\;\;\;\frac{2}{\left(\left(k \cdot k\right) \cdot \frac{t\_m}{\ell \cdot \ell}\right) \cdot \left(k \cdot k\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{\ell \cdot \ell}{{\left(k \cdot t\_m\right)}^{2} \cdot t\_m}\\ \end{array} \end{array} \]
      t\_m = (fabs.f64 t)
      t\_s = (copysign.f64 #s(literal 1 binary64) t)
      (FPCore (t_s t_m l k)
       :precision binary64
       (*
        t_s
        (if (<= t_m 0.49)
          (/ 2.0 (* (* (* k k) (/ t_m (* l l))) (* k k)))
          (/ (* l l) (* (pow (* k t_m) 2.0) t_m)))))
      t\_m = fabs(t);
      t\_s = copysign(1.0, t);
      double code(double t_s, double t_m, double l, double k) {
      	double tmp;
      	if (t_m <= 0.49) {
      		tmp = 2.0 / (((k * k) * (t_m / (l * l))) * (k * k));
      	} else {
      		tmp = (l * l) / (pow((k * t_m), 2.0) * t_m);
      	}
      	return t_s * tmp;
      }
      
      t\_m =     private
      t\_s =     private
      module fmin_fmax_functions
          implicit none
          private
          public fmax
          public fmin
      
          interface fmax
              module procedure fmax88
              module procedure fmax44
              module procedure fmax84
              module procedure fmax48
          end interface
          interface fmin
              module procedure fmin88
              module procedure fmin44
              module procedure fmin84
              module procedure fmin48
          end interface
      contains
          real(8) function fmax88(x, y) result (res)
              real(8), intent (in) :: x
              real(8), intent (in) :: y
              res = merge(y, merge(x, max(x, y), y /= y), x /= x)
          end function
          real(4) function fmax44(x, y) result (res)
              real(4), intent (in) :: x
              real(4), intent (in) :: y
              res = merge(y, merge(x, max(x, y), y /= y), x /= x)
          end function
          real(8) function fmax84(x, y) result(res)
              real(8), intent (in) :: x
              real(4), intent (in) :: y
              res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
          end function
          real(8) function fmax48(x, y) result(res)
              real(4), intent (in) :: x
              real(8), intent (in) :: y
              res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
          end function
          real(8) function fmin88(x, y) result (res)
              real(8), intent (in) :: x
              real(8), intent (in) :: y
              res = merge(y, merge(x, min(x, y), y /= y), x /= x)
          end function
          real(4) function fmin44(x, y) result (res)
              real(4), intent (in) :: x
              real(4), intent (in) :: y
              res = merge(y, merge(x, min(x, y), y /= y), x /= x)
          end function
          real(8) function fmin84(x, y) result(res)
              real(8), intent (in) :: x
              real(4), intent (in) :: y
              res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
          end function
          real(8) function fmin48(x, y) result(res)
              real(4), intent (in) :: x
              real(8), intent (in) :: y
              res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
          end function
      end module
      
      real(8) function code(t_s, t_m, l, k)
      use fmin_fmax_functions
          real(8), intent (in) :: t_s
          real(8), intent (in) :: t_m
          real(8), intent (in) :: l
          real(8), intent (in) :: k
          real(8) :: tmp
          if (t_m <= 0.49d0) then
              tmp = 2.0d0 / (((k * k) * (t_m / (l * l))) * (k * k))
          else
              tmp = (l * l) / (((k * t_m) ** 2.0d0) * t_m)
          end if
          code = t_s * tmp
      end function
      
      t\_m = Math.abs(t);
      t\_s = Math.copySign(1.0, t);
      public static double code(double t_s, double t_m, double l, double k) {
      	double tmp;
      	if (t_m <= 0.49) {
      		tmp = 2.0 / (((k * k) * (t_m / (l * l))) * (k * k));
      	} else {
      		tmp = (l * l) / (Math.pow((k * t_m), 2.0) * t_m);
      	}
      	return t_s * tmp;
      }
      
      t\_m = math.fabs(t)
      t\_s = math.copysign(1.0, t)
      def code(t_s, t_m, l, k):
      	tmp = 0
      	if t_m <= 0.49:
      		tmp = 2.0 / (((k * k) * (t_m / (l * l))) * (k * k))
      	else:
      		tmp = (l * l) / (math.pow((k * t_m), 2.0) * t_m)
      	return t_s * tmp
      
      t\_m = abs(t)
      t\_s = copysign(1.0, t)
      function code(t_s, t_m, l, k)
      	tmp = 0.0
      	if (t_m <= 0.49)
      		tmp = Float64(2.0 / Float64(Float64(Float64(k * k) * Float64(t_m / Float64(l * l))) * Float64(k * k)));
      	else
      		tmp = Float64(Float64(l * l) / Float64((Float64(k * t_m) ^ 2.0) * t_m));
      	end
      	return Float64(t_s * tmp)
      end
      
      t\_m = abs(t);
      t\_s = sign(t) * abs(1.0);
      function tmp_2 = code(t_s, t_m, l, k)
      	tmp = 0.0;
      	if (t_m <= 0.49)
      		tmp = 2.0 / (((k * k) * (t_m / (l * l))) * (k * k));
      	else
      		tmp = (l * l) / (((k * t_m) ^ 2.0) * t_m);
      	end
      	tmp_2 = t_s * tmp;
      end
      
      t\_m = N[Abs[t], $MachinePrecision]
      t\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[t]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
      code[t$95$s_, t$95$m_, l_, k_] := N[(t$95$s * If[LessEqual[t$95$m, 0.49], N[(2.0 / N[(N[(N[(k * k), $MachinePrecision] * N[(t$95$m / N[(l * l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(k * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(l * l), $MachinePrecision] / N[(N[Power[N[(k * t$95$m), $MachinePrecision], 2.0], $MachinePrecision] * t$95$m), $MachinePrecision]), $MachinePrecision]]), $MachinePrecision]
      
      \begin{array}{l}
      t\_m = \left|t\right|
      \\
      t\_s = \mathsf{copysign}\left(1, t\right)
      
      \\
      t\_s \cdot \begin{array}{l}
      \mathbf{if}\;t\_m \leq 0.49:\\
      \;\;\;\;\frac{2}{\left(\left(k \cdot k\right) \cdot \frac{t\_m}{\ell \cdot \ell}\right) \cdot \left(k \cdot k\right)}\\
      
      \mathbf{else}:\\
      \;\;\;\;\frac{\ell \cdot \ell}{{\left(k \cdot t\_m\right)}^{2} \cdot t\_m}\\
      
      
      \end{array}
      \end{array}
      
      Derivation
      1. Split input into 2 regimes
      2. if t < 0.48999999999999999

        1. Initial program 55.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        if 0.48999999999999999 < t

        1. Initial program 75.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

            \[\leadsto \frac{\ell \cdot \ell}{{\left(k \cdot t\right)}^{2} \cdot t} \]
          11. lower-*.f6478.8

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

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

      Alternative 14: 62.6% accurate, 3.4× speedup?

      \[\begin{array}{l} t\_m = \left|t\right| \\ t\_s = \mathsf{copysign}\left(1, t\right) \\ t\_s \cdot \begin{array}{l} \mathbf{if}\;k \leq 1.1 \cdot 10^{-97}:\\ \;\;\;\;\ell \cdot \frac{\ell}{k \cdot \left(k \cdot {t\_m}^{3}\right)}\\ \mathbf{elif}\;k \leq 1.9 \cdot 10^{+71}:\\ \;\;\;\;\frac{2}{\frac{\mathsf{fma}\left(\mathsf{fma}\left(k \cdot k, 0.3333333333333333, 2\right), t\_m \cdot t\_m, k \cdot k\right) \cdot t\_m}{\ell \cdot \ell} \cdot \left(k \cdot k\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{2}{\frac{\left(k \cdot k\right) \cdot t\_m}{\ell \cdot \ell} \cdot \left(k \cdot k\right)}\\ \end{array} \end{array} \]
      t\_m = (fabs.f64 t)
      t\_s = (copysign.f64 #s(literal 1 binary64) t)
      (FPCore (t_s t_m l k)
       :precision binary64
       (*
        t_s
        (if (<= k 1.1e-97)
          (* l (/ l (* k (* k (pow t_m 3.0)))))
          (if (<= k 1.9e+71)
            (/
             2.0
             (*
              (/
               (* (fma (fma (* k k) 0.3333333333333333 2.0) (* t_m t_m) (* k k)) t_m)
               (* l l))
              (* k k)))
            (/ 2.0 (* (/ (* (* k k) t_m) (* l l)) (* k k)))))))
      t\_m = fabs(t);
      t\_s = copysign(1.0, t);
      double code(double t_s, double t_m, double l, double k) {
      	double tmp;
      	if (k <= 1.1e-97) {
      		tmp = l * (l / (k * (k * pow(t_m, 3.0))));
      	} else if (k <= 1.9e+71) {
      		tmp = 2.0 / (((fma(fma((k * k), 0.3333333333333333, 2.0), (t_m * t_m), (k * k)) * t_m) / (l * l)) * (k * k));
      	} else {
      		tmp = 2.0 / ((((k * k) * t_m) / (l * l)) * (k * k));
      	}
      	return t_s * tmp;
      }
      
      t\_m = abs(t)
      t\_s = copysign(1.0, t)
      function code(t_s, t_m, l, k)
      	tmp = 0.0
      	if (k <= 1.1e-97)
      		tmp = Float64(l * Float64(l / Float64(k * Float64(k * (t_m ^ 3.0)))));
      	elseif (k <= 1.9e+71)
      		tmp = Float64(2.0 / Float64(Float64(Float64(fma(fma(Float64(k * k), 0.3333333333333333, 2.0), Float64(t_m * t_m), Float64(k * k)) * t_m) / Float64(l * l)) * Float64(k * k)));
      	else
      		tmp = Float64(2.0 / Float64(Float64(Float64(Float64(k * k) * t_m) / Float64(l * l)) * Float64(k * k)));
      	end
      	return Float64(t_s * tmp)
      end
      
      t\_m = N[Abs[t], $MachinePrecision]
      t\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[t]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
      code[t$95$s_, t$95$m_, l_, k_] := N[(t$95$s * If[LessEqual[k, 1.1e-97], N[(l * N[(l / N[(k * N[(k * N[Power[t$95$m, 3.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[k, 1.9e+71], N[(2.0 / N[(N[(N[(N[(N[(N[(k * k), $MachinePrecision] * 0.3333333333333333 + 2.0), $MachinePrecision] * N[(t$95$m * t$95$m), $MachinePrecision] + N[(k * k), $MachinePrecision]), $MachinePrecision] * t$95$m), $MachinePrecision] / N[(l * l), $MachinePrecision]), $MachinePrecision] * N[(k * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(2.0 / N[(N[(N[(N[(k * k), $MachinePrecision] * t$95$m), $MachinePrecision] / N[(l * l), $MachinePrecision]), $MachinePrecision] * N[(k * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]), $MachinePrecision]
      
      \begin{array}{l}
      t\_m = \left|t\right|
      \\
      t\_s = \mathsf{copysign}\left(1, t\right)
      
      \\
      t\_s \cdot \begin{array}{l}
      \mathbf{if}\;k \leq 1.1 \cdot 10^{-97}:\\
      \;\;\;\;\ell \cdot \frac{\ell}{k \cdot \left(k \cdot {t\_m}^{3}\right)}\\
      
      \mathbf{elif}\;k \leq 1.9 \cdot 10^{+71}:\\
      \;\;\;\;\frac{2}{\frac{\mathsf{fma}\left(\mathsf{fma}\left(k \cdot k, 0.3333333333333333, 2\right), t\_m \cdot t\_m, k \cdot k\right) \cdot t\_m}{\ell \cdot \ell} \cdot \left(k \cdot k\right)}\\
      
      \mathbf{else}:\\
      \;\;\;\;\frac{2}{\frac{\left(k \cdot k\right) \cdot t\_m}{\ell \cdot \ell} \cdot \left(k \cdot k\right)}\\
      
      
      \end{array}
      \end{array}
      
      Derivation
      1. Split input into 3 regimes
      2. if k < 1.0999999999999999e-97

        1. Initial program 61.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

            \[\leadsto \ell \cdot \frac{\ell}{\left(k \cdot k\right) \cdot \color{blue}{{t}^{3}}} \]
          13. lift-*.f6458.2

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

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

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

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

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

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

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

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

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

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

        if 1.0999999999999999e-97 < k < 1.9e71

        1. Initial program 67.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

            \[\leadsto \frac{2}{\frac{\mathsf{fma}\left(\mathsf{fma}\left(k \cdot k, \frac{1}{3}, 2\right), t \cdot t, k \cdot k\right) \cdot t}{\ell \cdot \ell} \cdot \left(k \cdot k\right)} \]
          13. lift-*.f6479.7

            \[\leadsto \frac{2}{\frac{\mathsf{fma}\left(\mathsf{fma}\left(k \cdot k, 0.3333333333333333, 2\right), t \cdot t, k \cdot k\right) \cdot t}{\ell \cdot \ell} \cdot \left(k \cdot k\right)} \]
        8. Applied rewrites79.7%

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

        if 1.9e71 < k

        1. Initial program 57.9%

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

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

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

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

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

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

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

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

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

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

      Alternative 15: 58.3% accurate, 5.6× speedup?

      \[\begin{array}{l} t\_m = \left|t\right| \\ t\_s = \mathsf{copysign}\left(1, t\right) \\ t\_s \cdot \begin{array}{l} \mathbf{if}\;k \leq 1.1 \cdot 10^{-97}:\\ \;\;\;\;\ell \cdot \frac{\ell}{\left(k \cdot k\right) \cdot \left(\left(t\_m \cdot t\_m\right) \cdot t\_m\right)}\\ \mathbf{elif}\;k \leq 9 \cdot 10^{+72}:\\ \;\;\;\;\frac{2}{\frac{\mathsf{fma}\left(\mathsf{fma}\left(k \cdot k, 0.3333333333333333, 2\right), t\_m \cdot t\_m, k \cdot k\right) \cdot t\_m}{\ell \cdot \ell} \cdot \left(k \cdot k\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{2}{\frac{\left(k \cdot k\right) \cdot t\_m}{\ell \cdot \ell} \cdot \left(k \cdot k\right)}\\ \end{array} \end{array} \]
      t\_m = (fabs.f64 t)
      t\_s = (copysign.f64 #s(literal 1 binary64) t)
      (FPCore (t_s t_m l k)
       :precision binary64
       (*
        t_s
        (if (<= k 1.1e-97)
          (* l (/ l (* (* k k) (* (* t_m t_m) t_m))))
          (if (<= k 9e+72)
            (/
             2.0
             (*
              (/
               (* (fma (fma (* k k) 0.3333333333333333 2.0) (* t_m t_m) (* k k)) t_m)
               (* l l))
              (* k k)))
            (/ 2.0 (* (/ (* (* k k) t_m) (* l l)) (* k k)))))))
      t\_m = fabs(t);
      t\_s = copysign(1.0, t);
      double code(double t_s, double t_m, double l, double k) {
      	double tmp;
      	if (k <= 1.1e-97) {
      		tmp = l * (l / ((k * k) * ((t_m * t_m) * t_m)));
      	} else if (k <= 9e+72) {
      		tmp = 2.0 / (((fma(fma((k * k), 0.3333333333333333, 2.0), (t_m * t_m), (k * k)) * t_m) / (l * l)) * (k * k));
      	} else {
      		tmp = 2.0 / ((((k * k) * t_m) / (l * l)) * (k * k));
      	}
      	return t_s * tmp;
      }
      
      t\_m = abs(t)
      t\_s = copysign(1.0, t)
      function code(t_s, t_m, l, k)
      	tmp = 0.0
      	if (k <= 1.1e-97)
      		tmp = Float64(l * Float64(l / Float64(Float64(k * k) * Float64(Float64(t_m * t_m) * t_m))));
      	elseif (k <= 9e+72)
      		tmp = Float64(2.0 / Float64(Float64(Float64(fma(fma(Float64(k * k), 0.3333333333333333, 2.0), Float64(t_m * t_m), Float64(k * k)) * t_m) / Float64(l * l)) * Float64(k * k)));
      	else
      		tmp = Float64(2.0 / Float64(Float64(Float64(Float64(k * k) * t_m) / Float64(l * l)) * Float64(k * k)));
      	end
      	return Float64(t_s * tmp)
      end
      
      t\_m = N[Abs[t], $MachinePrecision]
      t\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[t]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
      code[t$95$s_, t$95$m_, l_, k_] := N[(t$95$s * If[LessEqual[k, 1.1e-97], N[(l * N[(l / N[(N[(k * k), $MachinePrecision] * N[(N[(t$95$m * t$95$m), $MachinePrecision] * t$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[k, 9e+72], N[(2.0 / N[(N[(N[(N[(N[(N[(k * k), $MachinePrecision] * 0.3333333333333333 + 2.0), $MachinePrecision] * N[(t$95$m * t$95$m), $MachinePrecision] + N[(k * k), $MachinePrecision]), $MachinePrecision] * t$95$m), $MachinePrecision] / N[(l * l), $MachinePrecision]), $MachinePrecision] * N[(k * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(2.0 / N[(N[(N[(N[(k * k), $MachinePrecision] * t$95$m), $MachinePrecision] / N[(l * l), $MachinePrecision]), $MachinePrecision] * N[(k * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]), $MachinePrecision]
      
      \begin{array}{l}
      t\_m = \left|t\right|
      \\
      t\_s = \mathsf{copysign}\left(1, t\right)
      
      \\
      t\_s \cdot \begin{array}{l}
      \mathbf{if}\;k \leq 1.1 \cdot 10^{-97}:\\
      \;\;\;\;\ell \cdot \frac{\ell}{\left(k \cdot k\right) \cdot \left(\left(t\_m \cdot t\_m\right) \cdot t\_m\right)}\\
      
      \mathbf{elif}\;k \leq 9 \cdot 10^{+72}:\\
      \;\;\;\;\frac{2}{\frac{\mathsf{fma}\left(\mathsf{fma}\left(k \cdot k, 0.3333333333333333, 2\right), t\_m \cdot t\_m, k \cdot k\right) \cdot t\_m}{\ell \cdot \ell} \cdot \left(k \cdot k\right)}\\
      
      \mathbf{else}:\\
      \;\;\;\;\frac{2}{\frac{\left(k \cdot k\right) \cdot t\_m}{\ell \cdot \ell} \cdot \left(k \cdot k\right)}\\
      
      
      \end{array}
      \end{array}
      
      Derivation
      1. Split input into 3 regimes
      2. if k < 1.0999999999999999e-97

        1. Initial program 61.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

            \[\leadsto \ell \cdot \frac{\ell}{\left(k \cdot k\right) \cdot \color{blue}{{t}^{3}}} \]
          13. lift-*.f6458.2

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

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

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

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

            \[\leadsto \ell \cdot \frac{\ell}{\left(k \cdot k\right) \cdot \left(\left(t \cdot t\right) \cdot \color{blue}{t}\right)} \]
          4. lift-*.f6458.2

            \[\leadsto \ell \cdot \frac{\ell}{\left(k \cdot k\right) \cdot \left(\left(t \cdot t\right) \cdot t\right)} \]
        9. Applied rewrites58.2%

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

        if 1.0999999999999999e-97 < k < 8.9999999999999997e72

        1. Initial program 67.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

            \[\leadsto \frac{2}{\frac{\mathsf{fma}\left(\mathsf{fma}\left(k \cdot k, \frac{1}{3}, 2\right), t \cdot t, k \cdot k\right) \cdot t}{\ell \cdot \ell} \cdot \left(k \cdot k\right)} \]
          13. lift-*.f6479.7

            \[\leadsto \frac{2}{\frac{\mathsf{fma}\left(\mathsf{fma}\left(k \cdot k, 0.3333333333333333, 2\right), t \cdot t, k \cdot k\right) \cdot t}{\ell \cdot \ell} \cdot \left(k \cdot k\right)} \]
        8. Applied rewrites79.7%

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

        if 8.9999999999999997e72 < k

        1. Initial program 57.9%

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

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

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

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

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

          \[\leadsto \frac{2}{\frac{{k}^{2} \cdot t}{\ell \cdot \ell} \cdot \left(k \cdot k\right)} \]
        7. Step-by-step derivation
          1. lower-*.f64N/A

            \[\leadsto \frac{2}{\frac{{k}^{2} \cdot t}{\ell \cdot \ell} \cdot \left(k \cdot k\right)} \]
          2. pow2N/A

            \[\leadsto \frac{2}{\frac{\left(k \cdot k\right) \cdot t}{\ell \cdot \ell} \cdot \left(k \cdot k\right)} \]
          3. lift-*.f6463.1

            \[\leadsto \frac{2}{\frac{\left(k \cdot k\right) \cdot t}{\ell \cdot \ell} \cdot \left(k \cdot k\right)} \]
        8. Applied rewrites63.1%

          \[\leadsto \frac{2}{\frac{\left(k \cdot k\right) \cdot t}{\ell \cdot \ell} \cdot \left(k \cdot k\right)} \]
      3. Recombined 3 regimes into one program.
      4. Add Preprocessing

      Alternative 16: 57.7% accurate, 8.6× speedup?

      \[\begin{array}{l} t\_m = \left|t\right| \\ t\_s = \mathsf{copysign}\left(1, t\right) \\ t\_s \cdot \begin{array}{l} \mathbf{if}\;k \leq 5.8 \cdot 10^{+14}:\\ \;\;\;\;\ell \cdot \frac{\ell}{\left(k \cdot k\right) \cdot \left(\left(t\_m \cdot t\_m\right) \cdot t\_m\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{2}{\frac{\left(k \cdot k\right) \cdot t\_m}{\ell \cdot \ell} \cdot \left(k \cdot k\right)}\\ \end{array} \end{array} \]
      t\_m = (fabs.f64 t)
      t\_s = (copysign.f64 #s(literal 1 binary64) t)
      (FPCore (t_s t_m l k)
       :precision binary64
       (*
        t_s
        (if (<= k 5.8e+14)
          (* l (/ l (* (* k k) (* (* t_m t_m) t_m))))
          (/ 2.0 (* (/ (* (* k k) t_m) (* l l)) (* k k))))))
      t\_m = fabs(t);
      t\_s = copysign(1.0, t);
      double code(double t_s, double t_m, double l, double k) {
      	double tmp;
      	if (k <= 5.8e+14) {
      		tmp = l * (l / ((k * k) * ((t_m * t_m) * t_m)));
      	} else {
      		tmp = 2.0 / ((((k * k) * t_m) / (l * l)) * (k * k));
      	}
      	return t_s * tmp;
      }
      
      t\_m =     private
      t\_s =     private
      module fmin_fmax_functions
          implicit none
          private
          public fmax
          public fmin
      
          interface fmax
              module procedure fmax88
              module procedure fmax44
              module procedure fmax84
              module procedure fmax48
          end interface
          interface fmin
              module procedure fmin88
              module procedure fmin44
              module procedure fmin84
              module procedure fmin48
          end interface
      contains
          real(8) function fmax88(x, y) result (res)
              real(8), intent (in) :: x
              real(8), intent (in) :: y
              res = merge(y, merge(x, max(x, y), y /= y), x /= x)
          end function
          real(4) function fmax44(x, y) result (res)
              real(4), intent (in) :: x
              real(4), intent (in) :: y
              res = merge(y, merge(x, max(x, y), y /= y), x /= x)
          end function
          real(8) function fmax84(x, y) result(res)
              real(8), intent (in) :: x
              real(4), intent (in) :: y
              res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
          end function
          real(8) function fmax48(x, y) result(res)
              real(4), intent (in) :: x
              real(8), intent (in) :: y
              res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
          end function
          real(8) function fmin88(x, y) result (res)
              real(8), intent (in) :: x
              real(8), intent (in) :: y
              res = merge(y, merge(x, min(x, y), y /= y), x /= x)
          end function
          real(4) function fmin44(x, y) result (res)
              real(4), intent (in) :: x
              real(4), intent (in) :: y
              res = merge(y, merge(x, min(x, y), y /= y), x /= x)
          end function
          real(8) function fmin84(x, y) result(res)
              real(8), intent (in) :: x
              real(4), intent (in) :: y
              res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
          end function
          real(8) function fmin48(x, y) result(res)
              real(4), intent (in) :: x
              real(8), intent (in) :: y
              res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
          end function
      end module
      
      real(8) function code(t_s, t_m, l, k)
      use fmin_fmax_functions
          real(8), intent (in) :: t_s
          real(8), intent (in) :: t_m
          real(8), intent (in) :: l
          real(8), intent (in) :: k
          real(8) :: tmp
          if (k <= 5.8d+14) then
              tmp = l * (l / ((k * k) * ((t_m * t_m) * t_m)))
          else
              tmp = 2.0d0 / ((((k * k) * t_m) / (l * l)) * (k * k))
          end if
          code = t_s * tmp
      end function
      
      t\_m = Math.abs(t);
      t\_s = Math.copySign(1.0, t);
      public static double code(double t_s, double t_m, double l, double k) {
      	double tmp;
      	if (k <= 5.8e+14) {
      		tmp = l * (l / ((k * k) * ((t_m * t_m) * t_m)));
      	} else {
      		tmp = 2.0 / ((((k * k) * t_m) / (l * l)) * (k * k));
      	}
      	return t_s * tmp;
      }
      
      t\_m = math.fabs(t)
      t\_s = math.copysign(1.0, t)
      def code(t_s, t_m, l, k):
      	tmp = 0
      	if k <= 5.8e+14:
      		tmp = l * (l / ((k * k) * ((t_m * t_m) * t_m)))
      	else:
      		tmp = 2.0 / ((((k * k) * t_m) / (l * l)) * (k * k))
      	return t_s * tmp
      
      t\_m = abs(t)
      t\_s = copysign(1.0, t)
      function code(t_s, t_m, l, k)
      	tmp = 0.0
      	if (k <= 5.8e+14)
      		tmp = Float64(l * Float64(l / Float64(Float64(k * k) * Float64(Float64(t_m * t_m) * t_m))));
      	else
      		tmp = Float64(2.0 / Float64(Float64(Float64(Float64(k * k) * t_m) / Float64(l * l)) * Float64(k * k)));
      	end
      	return Float64(t_s * tmp)
      end
      
      t\_m = abs(t);
      t\_s = sign(t) * abs(1.0);
      function tmp_2 = code(t_s, t_m, l, k)
      	tmp = 0.0;
      	if (k <= 5.8e+14)
      		tmp = l * (l / ((k * k) * ((t_m * t_m) * t_m)));
      	else
      		tmp = 2.0 / ((((k * k) * t_m) / (l * l)) * (k * k));
      	end
      	tmp_2 = t_s * tmp;
      end
      
      t\_m = N[Abs[t], $MachinePrecision]
      t\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[t]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
      code[t$95$s_, t$95$m_, l_, k_] := N[(t$95$s * If[LessEqual[k, 5.8e+14], N[(l * N[(l / N[(N[(k * k), $MachinePrecision] * N[(N[(t$95$m * t$95$m), $MachinePrecision] * t$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(2.0 / N[(N[(N[(N[(k * k), $MachinePrecision] * t$95$m), $MachinePrecision] / N[(l * l), $MachinePrecision]), $MachinePrecision] * N[(k * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]), $MachinePrecision]
      
      \begin{array}{l}
      t\_m = \left|t\right|
      \\
      t\_s = \mathsf{copysign}\left(1, t\right)
      
      \\
      t\_s \cdot \begin{array}{l}
      \mathbf{if}\;k \leq 5.8 \cdot 10^{+14}:\\
      \;\;\;\;\ell \cdot \frac{\ell}{\left(k \cdot k\right) \cdot \left(\left(t\_m \cdot t\_m\right) \cdot t\_m\right)}\\
      
      \mathbf{else}:\\
      \;\;\;\;\frac{2}{\frac{\left(k \cdot k\right) \cdot t\_m}{\ell \cdot \ell} \cdot \left(k \cdot k\right)}\\
      
      
      \end{array}
      \end{array}
      
      Derivation
      1. Split input into 2 regimes
      2. if k < 5.8e14

        1. Initial program 62.1%

          \[\frac{2}{\left(\left(\frac{{t}^{3}}{\ell \cdot \ell} \cdot \sin k\right) \cdot \tan k\right) \cdot \left(\left(1 + {\left(\frac{k}{t}\right)}^{2}\right) + 1\right)} \]
        2. Add Preprocessing
        3. Taylor expanded in k around 0

          \[\leadsto \color{blue}{\frac{{\ell}^{2}}{{k}^{2} \cdot {t}^{3}}} \]
        4. Step-by-step derivation
          1. lower-/.f64N/A

            \[\leadsto \frac{{\ell}^{2}}{\color{blue}{{k}^{2} \cdot {t}^{3}}} \]
          2. pow2N/A

            \[\leadsto \frac{\ell \cdot \ell}{\color{blue}{{k}^{2}} \cdot {t}^{3}} \]
          3. lift-*.f64N/A

            \[\leadsto \frac{\ell \cdot \ell}{\color{blue}{{k}^{2}} \cdot {t}^{3}} \]
          4. lower-*.f64N/A

            \[\leadsto \frac{\ell \cdot \ell}{{k}^{2} \cdot \color{blue}{{t}^{3}}} \]
          5. unpow2N/A

            \[\leadsto \frac{\ell \cdot \ell}{\left(k \cdot k\right) \cdot {\color{blue}{t}}^{3}} \]
          6. lower-*.f64N/A

            \[\leadsto \frac{\ell \cdot \ell}{\left(k \cdot k\right) \cdot {\color{blue}{t}}^{3}} \]
          7. lift-pow.f6454.6

            \[\leadsto \frac{\ell \cdot \ell}{\left(k \cdot k\right) \cdot {t}^{\color{blue}{3}}} \]
        5. Applied rewrites54.6%

          \[\leadsto \color{blue}{\frac{\ell \cdot \ell}{\left(k \cdot k\right) \cdot {t}^{3}}} \]
        6. Step-by-step derivation
          1. lift-*.f64N/A

            \[\leadsto \frac{\ell \cdot \ell}{\color{blue}{\left(k \cdot k\right)} \cdot {t}^{3}} \]
          2. lift-/.f64N/A

            \[\leadsto \frac{\ell \cdot \ell}{\color{blue}{\left(k \cdot k\right) \cdot {t}^{3}}} \]
          3. associate-/l*N/A

            \[\leadsto \ell \cdot \color{blue}{\frac{\ell}{\left(k \cdot k\right) \cdot {t}^{3}}} \]
          4. lower-*.f64N/A

            \[\leadsto \ell \cdot \color{blue}{\frac{\ell}{\left(k \cdot k\right) \cdot {t}^{3}}} \]
          5. lift-*.f64N/A

            \[\leadsto \ell \cdot \frac{\ell}{\left(k \cdot k\right) \cdot {\color{blue}{t}}^{3}} \]
          6. lift-*.f64N/A

            \[\leadsto \ell \cdot \frac{\ell}{\left(k \cdot k\right) \cdot \color{blue}{{t}^{3}}} \]
          7. pow2N/A

            \[\leadsto \ell \cdot \frac{\ell}{{k}^{2} \cdot {\color{blue}{t}}^{3}} \]
          8. lift-pow.f64N/A

            \[\leadsto \ell \cdot \frac{\ell}{{k}^{2} \cdot {t}^{\color{blue}{3}}} \]
          9. lower-/.f64N/A

            \[\leadsto \ell \cdot \frac{\ell}{\color{blue}{{k}^{2} \cdot {t}^{3}}} \]
          10. pow2N/A

            \[\leadsto \ell \cdot \frac{\ell}{\left(k \cdot k\right) \cdot {\color{blue}{t}}^{3}} \]
          11. lift-pow.f64N/A

            \[\leadsto \ell \cdot \frac{\ell}{\left(k \cdot k\right) \cdot {t}^{\color{blue}{3}}} \]
          12. lift-*.f64N/A

            \[\leadsto \ell \cdot \frac{\ell}{\left(k \cdot k\right) \cdot \color{blue}{{t}^{3}}} \]
          13. lift-*.f6459.3

            \[\leadsto \ell \cdot \frac{\ell}{\left(k \cdot k\right) \cdot {\color{blue}{t}}^{3}} \]
        7. Applied rewrites59.3%

          \[\leadsto \ell \cdot \color{blue}{\frac{\ell}{\left(k \cdot k\right) \cdot {t}^{3}}} \]
        8. Step-by-step derivation
          1. lift-pow.f64N/A

            \[\leadsto \ell \cdot \frac{\ell}{\left(k \cdot k\right) \cdot {t}^{\color{blue}{3}}} \]
          2. pow3N/A

            \[\leadsto \ell \cdot \frac{\ell}{\left(k \cdot k\right) \cdot \left(\left(t \cdot t\right) \cdot \color{blue}{t}\right)} \]
          3. lift-*.f64N/A

            \[\leadsto \ell \cdot \frac{\ell}{\left(k \cdot k\right) \cdot \left(\left(t \cdot t\right) \cdot \color{blue}{t}\right)} \]
          4. lift-*.f6459.3

            \[\leadsto \ell \cdot \frac{\ell}{\left(k \cdot k\right) \cdot \left(\left(t \cdot t\right) \cdot t\right)} \]
        9. Applied rewrites59.3%

          \[\leadsto \ell \cdot \frac{\ell}{\left(k \cdot k\right) \cdot \left(\left(t \cdot t\right) \cdot \color{blue}{t}\right)} \]

        if 5.8e14 < k

        1. Initial program 59.6%

          \[\frac{2}{\left(\left(\frac{{t}^{3}}{\ell \cdot \ell} \cdot \sin k\right) \cdot \tan k\right) \cdot \left(\left(1 + {\left(\frac{k}{t}\right)}^{2}\right) + 1\right)} \]
        2. Add Preprocessing
        3. Taylor expanded in k around 0

          \[\leadsto \frac{2}{\color{blue}{{k}^{2} \cdot \left(2 \cdot \frac{{t}^{3}}{{\ell}^{2}} + \frac{{k}^{2} \cdot \left({t}^{3} \cdot \left(\frac{1}{3} + \frac{1}{{t}^{2}}\right)\right)}{{\ell}^{2}}\right)}} \]
        4. Step-by-step derivation
          1. *-commutativeN/A

            \[\leadsto \frac{2}{\left(2 \cdot \frac{{t}^{3}}{{\ell}^{2}} + \frac{{k}^{2} \cdot \left({t}^{3} \cdot \left(\frac{1}{3} + \frac{1}{{t}^{2}}\right)\right)}{{\ell}^{2}}\right) \cdot \color{blue}{{k}^{2}}} \]
          2. lower-*.f64N/A

            \[\leadsto \frac{2}{\left(2 \cdot \frac{{t}^{3}}{{\ell}^{2}} + \frac{{k}^{2} \cdot \left({t}^{3} \cdot \left(\frac{1}{3} + \frac{1}{{t}^{2}}\right)\right)}{{\ell}^{2}}\right) \cdot \color{blue}{{k}^{2}}} \]
        5. Applied rewrites65.5%

          \[\leadsto \frac{2}{\color{blue}{\frac{\mathsf{fma}\left(\mathsf{fma}\left(0.3333333333333333, {t}^{3}, t\right), k \cdot k, 2 \cdot {t}^{3}\right)}{\ell \cdot \ell} \cdot \left(k \cdot k\right)}} \]
        6. Taylor expanded in t around 0

          \[\leadsto \frac{2}{\frac{{k}^{2} \cdot t}{\ell \cdot \ell} \cdot \left(k \cdot k\right)} \]
        7. Step-by-step derivation
          1. lower-*.f64N/A

            \[\leadsto \frac{2}{\frac{{k}^{2} \cdot t}{\ell \cdot \ell} \cdot \left(k \cdot k\right)} \]
          2. pow2N/A

            \[\leadsto \frac{2}{\frac{\left(k \cdot k\right) \cdot t}{\ell \cdot \ell} \cdot \left(k \cdot k\right)} \]
          3. lift-*.f6464.0

            \[\leadsto \frac{2}{\frac{\left(k \cdot k\right) \cdot t}{\ell \cdot \ell} \cdot \left(k \cdot k\right)} \]
        8. Applied rewrites64.0%

          \[\leadsto \frac{2}{\frac{\left(k \cdot k\right) \cdot t}{\ell \cdot \ell} \cdot \left(k \cdot k\right)} \]
      3. Recombined 2 regimes into one program.
      4. Add Preprocessing

      Alternative 17: 57.6% accurate, 8.6× speedup?

      \[\begin{array}{l} t\_m = \left|t\right| \\ t\_s = \mathsf{copysign}\left(1, t\right) \\ t\_s \cdot \begin{array}{l} \mathbf{if}\;k \leq 6 \cdot 10^{+14}:\\ \;\;\;\;\ell \cdot \frac{\ell}{\left(k \cdot k\right) \cdot \left(\left(t\_m \cdot t\_m\right) \cdot t\_m\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{2}{\left(\left(k \cdot k\right) \cdot \frac{t\_m}{\ell \cdot \ell}\right) \cdot \left(k \cdot k\right)}\\ \end{array} \end{array} \]
      t\_m = (fabs.f64 t)
      t\_s = (copysign.f64 #s(literal 1 binary64) t)
      (FPCore (t_s t_m l k)
       :precision binary64
       (*
        t_s
        (if (<= k 6e+14)
          (* l (/ l (* (* k k) (* (* t_m t_m) t_m))))
          (/ 2.0 (* (* (* k k) (/ t_m (* l l))) (* k k))))))
      t\_m = fabs(t);
      t\_s = copysign(1.0, t);
      double code(double t_s, double t_m, double l, double k) {
      	double tmp;
      	if (k <= 6e+14) {
      		tmp = l * (l / ((k * k) * ((t_m * t_m) * t_m)));
      	} else {
      		tmp = 2.0 / (((k * k) * (t_m / (l * l))) * (k * k));
      	}
      	return t_s * tmp;
      }
      
      t\_m =     private
      t\_s =     private
      module fmin_fmax_functions
          implicit none
          private
          public fmax
          public fmin
      
          interface fmax
              module procedure fmax88
              module procedure fmax44
              module procedure fmax84
              module procedure fmax48
          end interface
          interface fmin
              module procedure fmin88
              module procedure fmin44
              module procedure fmin84
              module procedure fmin48
          end interface
      contains
          real(8) function fmax88(x, y) result (res)
              real(8), intent (in) :: x
              real(8), intent (in) :: y
              res = merge(y, merge(x, max(x, y), y /= y), x /= x)
          end function
          real(4) function fmax44(x, y) result (res)
              real(4), intent (in) :: x
              real(4), intent (in) :: y
              res = merge(y, merge(x, max(x, y), y /= y), x /= x)
          end function
          real(8) function fmax84(x, y) result(res)
              real(8), intent (in) :: x
              real(4), intent (in) :: y
              res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
          end function
          real(8) function fmax48(x, y) result(res)
              real(4), intent (in) :: x
              real(8), intent (in) :: y
              res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
          end function
          real(8) function fmin88(x, y) result (res)
              real(8), intent (in) :: x
              real(8), intent (in) :: y
              res = merge(y, merge(x, min(x, y), y /= y), x /= x)
          end function
          real(4) function fmin44(x, y) result (res)
              real(4), intent (in) :: x
              real(4), intent (in) :: y
              res = merge(y, merge(x, min(x, y), y /= y), x /= x)
          end function
          real(8) function fmin84(x, y) result(res)
              real(8), intent (in) :: x
              real(4), intent (in) :: y
              res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
          end function
          real(8) function fmin48(x, y) result(res)
              real(4), intent (in) :: x
              real(8), intent (in) :: y
              res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
          end function
      end module
      
      real(8) function code(t_s, t_m, l, k)
      use fmin_fmax_functions
          real(8), intent (in) :: t_s
          real(8), intent (in) :: t_m
          real(8), intent (in) :: l
          real(8), intent (in) :: k
          real(8) :: tmp
          if (k <= 6d+14) then
              tmp = l * (l / ((k * k) * ((t_m * t_m) * t_m)))
          else
              tmp = 2.0d0 / (((k * k) * (t_m / (l * l))) * (k * k))
          end if
          code = t_s * tmp
      end function
      
      t\_m = Math.abs(t);
      t\_s = Math.copySign(1.0, t);
      public static double code(double t_s, double t_m, double l, double k) {
      	double tmp;
      	if (k <= 6e+14) {
      		tmp = l * (l / ((k * k) * ((t_m * t_m) * t_m)));
      	} else {
      		tmp = 2.0 / (((k * k) * (t_m / (l * l))) * (k * k));
      	}
      	return t_s * tmp;
      }
      
      t\_m = math.fabs(t)
      t\_s = math.copysign(1.0, t)
      def code(t_s, t_m, l, k):
      	tmp = 0
      	if k <= 6e+14:
      		tmp = l * (l / ((k * k) * ((t_m * t_m) * t_m)))
      	else:
      		tmp = 2.0 / (((k * k) * (t_m / (l * l))) * (k * k))
      	return t_s * tmp
      
      t\_m = abs(t)
      t\_s = copysign(1.0, t)
      function code(t_s, t_m, l, k)
      	tmp = 0.0
      	if (k <= 6e+14)
      		tmp = Float64(l * Float64(l / Float64(Float64(k * k) * Float64(Float64(t_m * t_m) * t_m))));
      	else
      		tmp = Float64(2.0 / Float64(Float64(Float64(k * k) * Float64(t_m / Float64(l * l))) * Float64(k * k)));
      	end
      	return Float64(t_s * tmp)
      end
      
      t\_m = abs(t);
      t\_s = sign(t) * abs(1.0);
      function tmp_2 = code(t_s, t_m, l, k)
      	tmp = 0.0;
      	if (k <= 6e+14)
      		tmp = l * (l / ((k * k) * ((t_m * t_m) * t_m)));
      	else
      		tmp = 2.0 / (((k * k) * (t_m / (l * l))) * (k * k));
      	end
      	tmp_2 = t_s * tmp;
      end
      
      t\_m = N[Abs[t], $MachinePrecision]
      t\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[t]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
      code[t$95$s_, t$95$m_, l_, k_] := N[(t$95$s * If[LessEqual[k, 6e+14], N[(l * N[(l / N[(N[(k * k), $MachinePrecision] * N[(N[(t$95$m * t$95$m), $MachinePrecision] * t$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(2.0 / N[(N[(N[(k * k), $MachinePrecision] * N[(t$95$m / N[(l * l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(k * k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]), $MachinePrecision]
      
      \begin{array}{l}
      t\_m = \left|t\right|
      \\
      t\_s = \mathsf{copysign}\left(1, t\right)
      
      \\
      t\_s \cdot \begin{array}{l}
      \mathbf{if}\;k \leq 6 \cdot 10^{+14}:\\
      \;\;\;\;\ell \cdot \frac{\ell}{\left(k \cdot k\right) \cdot \left(\left(t\_m \cdot t\_m\right) \cdot t\_m\right)}\\
      
      \mathbf{else}:\\
      \;\;\;\;\frac{2}{\left(\left(k \cdot k\right) \cdot \frac{t\_m}{\ell \cdot \ell}\right) \cdot \left(k \cdot k\right)}\\
      
      
      \end{array}
      \end{array}
      
      Derivation
      1. Split input into 2 regimes
      2. if k < 6e14

        1. Initial program 62.1%

          \[\frac{2}{\left(\left(\frac{{t}^{3}}{\ell \cdot \ell} \cdot \sin k\right) \cdot \tan k\right) \cdot \left(\left(1 + {\left(\frac{k}{t}\right)}^{2}\right) + 1\right)} \]
        2. Add Preprocessing
        3. Taylor expanded in k around 0

          \[\leadsto \color{blue}{\frac{{\ell}^{2}}{{k}^{2} \cdot {t}^{3}}} \]
        4. Step-by-step derivation
          1. lower-/.f64N/A

            \[\leadsto \frac{{\ell}^{2}}{\color{blue}{{k}^{2} \cdot {t}^{3}}} \]
          2. pow2N/A

            \[\leadsto \frac{\ell \cdot \ell}{\color{blue}{{k}^{2}} \cdot {t}^{3}} \]
          3. lift-*.f64N/A

            \[\leadsto \frac{\ell \cdot \ell}{\color{blue}{{k}^{2}} \cdot {t}^{3}} \]
          4. lower-*.f64N/A

            \[\leadsto \frac{\ell \cdot \ell}{{k}^{2} \cdot \color{blue}{{t}^{3}}} \]
          5. unpow2N/A

            \[\leadsto \frac{\ell \cdot \ell}{\left(k \cdot k\right) \cdot {\color{blue}{t}}^{3}} \]
          6. lower-*.f64N/A

            \[\leadsto \frac{\ell \cdot \ell}{\left(k \cdot k\right) \cdot {\color{blue}{t}}^{3}} \]
          7. lift-pow.f6454.6

            \[\leadsto \frac{\ell \cdot \ell}{\left(k \cdot k\right) \cdot {t}^{\color{blue}{3}}} \]
        5. Applied rewrites54.6%

          \[\leadsto \color{blue}{\frac{\ell \cdot \ell}{\left(k \cdot k\right) \cdot {t}^{3}}} \]
        6. Step-by-step derivation
          1. lift-*.f64N/A

            \[\leadsto \frac{\ell \cdot \ell}{\color{blue}{\left(k \cdot k\right)} \cdot {t}^{3}} \]
          2. lift-/.f64N/A

            \[\leadsto \frac{\ell \cdot \ell}{\color{blue}{\left(k \cdot k\right) \cdot {t}^{3}}} \]
          3. associate-/l*N/A

            \[\leadsto \ell \cdot \color{blue}{\frac{\ell}{\left(k \cdot k\right) \cdot {t}^{3}}} \]
          4. lower-*.f64N/A

            \[\leadsto \ell \cdot \color{blue}{\frac{\ell}{\left(k \cdot k\right) \cdot {t}^{3}}} \]
          5. lift-*.f64N/A

            \[\leadsto \ell \cdot \frac{\ell}{\left(k \cdot k\right) \cdot {\color{blue}{t}}^{3}} \]
          6. lift-*.f64N/A

            \[\leadsto \ell \cdot \frac{\ell}{\left(k \cdot k\right) \cdot \color{blue}{{t}^{3}}} \]
          7. pow2N/A

            \[\leadsto \ell \cdot \frac{\ell}{{k}^{2} \cdot {\color{blue}{t}}^{3}} \]
          8. lift-pow.f64N/A

            \[\leadsto \ell \cdot \frac{\ell}{{k}^{2} \cdot {t}^{\color{blue}{3}}} \]
          9. lower-/.f64N/A

            \[\leadsto \ell \cdot \frac{\ell}{\color{blue}{{k}^{2} \cdot {t}^{3}}} \]
          10. pow2N/A

            \[\leadsto \ell \cdot \frac{\ell}{\left(k \cdot k\right) \cdot {\color{blue}{t}}^{3}} \]
          11. lift-pow.f64N/A

            \[\leadsto \ell \cdot \frac{\ell}{\left(k \cdot k\right) \cdot {t}^{\color{blue}{3}}} \]
          12. lift-*.f64N/A

            \[\leadsto \ell \cdot \frac{\ell}{\left(k \cdot k\right) \cdot \color{blue}{{t}^{3}}} \]
          13. lift-*.f6459.3

            \[\leadsto \ell \cdot \frac{\ell}{\left(k \cdot k\right) \cdot {\color{blue}{t}}^{3}} \]
        7. Applied rewrites59.3%

          \[\leadsto \ell \cdot \color{blue}{\frac{\ell}{\left(k \cdot k\right) \cdot {t}^{3}}} \]
        8. Step-by-step derivation
          1. lift-pow.f64N/A

            \[\leadsto \ell \cdot \frac{\ell}{\left(k \cdot k\right) \cdot {t}^{\color{blue}{3}}} \]
          2. pow3N/A

            \[\leadsto \ell \cdot \frac{\ell}{\left(k \cdot k\right) \cdot \left(\left(t \cdot t\right) \cdot \color{blue}{t}\right)} \]
          3. lift-*.f64N/A

            \[\leadsto \ell \cdot \frac{\ell}{\left(k \cdot k\right) \cdot \left(\left(t \cdot t\right) \cdot \color{blue}{t}\right)} \]
          4. lift-*.f6459.3

            \[\leadsto \ell \cdot \frac{\ell}{\left(k \cdot k\right) \cdot \left(\left(t \cdot t\right) \cdot t\right)} \]
        9. Applied rewrites59.3%

          \[\leadsto \ell \cdot \frac{\ell}{\left(k \cdot k\right) \cdot \left(\left(t \cdot t\right) \cdot \color{blue}{t}\right)} \]

        if 6e14 < k

        1. Initial program 59.6%

          \[\frac{2}{\left(\left(\frac{{t}^{3}}{\ell \cdot \ell} \cdot \sin k\right) \cdot \tan k\right) \cdot \left(\left(1 + {\left(\frac{k}{t}\right)}^{2}\right) + 1\right)} \]
        2. Add Preprocessing
        3. Taylor expanded in k around 0

          \[\leadsto \frac{2}{\color{blue}{{k}^{2} \cdot \left(2 \cdot \frac{{t}^{3}}{{\ell}^{2}} + \frac{{k}^{2} \cdot \left({t}^{3} \cdot \left(\frac{1}{3} + \frac{1}{{t}^{2}}\right)\right)}{{\ell}^{2}}\right)}} \]
        4. Step-by-step derivation
          1. *-commutativeN/A

            \[\leadsto \frac{2}{\left(2 \cdot \frac{{t}^{3}}{{\ell}^{2}} + \frac{{k}^{2} \cdot \left({t}^{3} \cdot \left(\frac{1}{3} + \frac{1}{{t}^{2}}\right)\right)}{{\ell}^{2}}\right) \cdot \color{blue}{{k}^{2}}} \]
          2. lower-*.f64N/A

            \[\leadsto \frac{2}{\left(2 \cdot \frac{{t}^{3}}{{\ell}^{2}} + \frac{{k}^{2} \cdot \left({t}^{3} \cdot \left(\frac{1}{3} + \frac{1}{{t}^{2}}\right)\right)}{{\ell}^{2}}\right) \cdot \color{blue}{{k}^{2}}} \]
        5. Applied rewrites65.5%

          \[\leadsto \frac{2}{\color{blue}{\frac{\mathsf{fma}\left(\mathsf{fma}\left(0.3333333333333333, {t}^{3}, t\right), k \cdot k, 2 \cdot {t}^{3}\right)}{\ell \cdot \ell} \cdot \left(k \cdot k\right)}} \]
        6. Taylor expanded in t around 0

          \[\leadsto \frac{2}{\frac{{k}^{2} \cdot t}{{\ell}^{2}} \cdot \left(\color{blue}{k} \cdot k\right)} \]
        7. Step-by-step derivation
          1. associate-/l*N/A

            \[\leadsto \frac{2}{\left({k}^{2} \cdot \frac{t}{{\ell}^{2}}\right) \cdot \left(k \cdot k\right)} \]
          2. lower-*.f64N/A

            \[\leadsto \frac{2}{\left({k}^{2} \cdot \frac{t}{{\ell}^{2}}\right) \cdot \left(k \cdot k\right)} \]
          3. pow2N/A

            \[\leadsto \frac{2}{\left(\left(k \cdot k\right) \cdot \frac{t}{{\ell}^{2}}\right) \cdot \left(k \cdot k\right)} \]
          4. lift-*.f64N/A

            \[\leadsto \frac{2}{\left(\left(k \cdot k\right) \cdot \frac{t}{{\ell}^{2}}\right) \cdot \left(k \cdot k\right)} \]
          5. lower-/.f64N/A

            \[\leadsto \frac{2}{\left(\left(k \cdot k\right) \cdot \frac{t}{{\ell}^{2}}\right) \cdot \left(k \cdot k\right)} \]
          6. pow2N/A

            \[\leadsto \frac{2}{\left(\left(k \cdot k\right) \cdot \frac{t}{\ell \cdot \ell}\right) \cdot \left(k \cdot k\right)} \]
          7. lift-*.f6463.9

            \[\leadsto \frac{2}{\left(\left(k \cdot k\right) \cdot \frac{t}{\ell \cdot \ell}\right) \cdot \left(k \cdot k\right)} \]
        8. Applied rewrites63.9%

          \[\leadsto \frac{2}{\left(\left(k \cdot k\right) \cdot \frac{t}{\ell \cdot \ell}\right) \cdot \left(\color{blue}{k} \cdot k\right)} \]
      3. Recombined 2 regimes into one program.
      4. Add Preprocessing

      Alternative 18: 55.4% accurate, 12.5× speedup?

      \[\begin{array}{l} t\_m = \left|t\right| \\ t\_s = \mathsf{copysign}\left(1, t\right) \\ t\_s \cdot \left(\ell \cdot \frac{\ell}{\left(k \cdot k\right) \cdot \left(\left(t\_m \cdot t\_m\right) \cdot t\_m\right)}\right) \end{array} \]
      t\_m = (fabs.f64 t)
      t\_s = (copysign.f64 #s(literal 1 binary64) t)
      (FPCore (t_s t_m l k)
       :precision binary64
       (* t_s (* l (/ l (* (* k k) (* (* t_m t_m) t_m))))))
      t\_m = fabs(t);
      t\_s = copysign(1.0, t);
      double code(double t_s, double t_m, double l, double k) {
      	return t_s * (l * (l / ((k * k) * ((t_m * t_m) * t_m))));
      }
      
      t\_m =     private
      t\_s =     private
      module fmin_fmax_functions
          implicit none
          private
          public fmax
          public fmin
      
          interface fmax
              module procedure fmax88
              module procedure fmax44
              module procedure fmax84
              module procedure fmax48
          end interface
          interface fmin
              module procedure fmin88
              module procedure fmin44
              module procedure fmin84
              module procedure fmin48
          end interface
      contains
          real(8) function fmax88(x, y) result (res)
              real(8), intent (in) :: x
              real(8), intent (in) :: y
              res = merge(y, merge(x, max(x, y), y /= y), x /= x)
          end function
          real(4) function fmax44(x, y) result (res)
              real(4), intent (in) :: x
              real(4), intent (in) :: y
              res = merge(y, merge(x, max(x, y), y /= y), x /= x)
          end function
          real(8) function fmax84(x, y) result(res)
              real(8), intent (in) :: x
              real(4), intent (in) :: y
              res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
          end function
          real(8) function fmax48(x, y) result(res)
              real(4), intent (in) :: x
              real(8), intent (in) :: y
              res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
          end function
          real(8) function fmin88(x, y) result (res)
              real(8), intent (in) :: x
              real(8), intent (in) :: y
              res = merge(y, merge(x, min(x, y), y /= y), x /= x)
          end function
          real(4) function fmin44(x, y) result (res)
              real(4), intent (in) :: x
              real(4), intent (in) :: y
              res = merge(y, merge(x, min(x, y), y /= y), x /= x)
          end function
          real(8) function fmin84(x, y) result(res)
              real(8), intent (in) :: x
              real(4), intent (in) :: y
              res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
          end function
          real(8) function fmin48(x, y) result(res)
              real(4), intent (in) :: x
              real(8), intent (in) :: y
              res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
          end function
      end module
      
      real(8) function code(t_s, t_m, l, k)
      use fmin_fmax_functions
          real(8), intent (in) :: t_s
          real(8), intent (in) :: t_m
          real(8), intent (in) :: l
          real(8), intent (in) :: k
          code = t_s * (l * (l / ((k * k) * ((t_m * t_m) * t_m))))
      end function
      
      t\_m = Math.abs(t);
      t\_s = Math.copySign(1.0, t);
      public static double code(double t_s, double t_m, double l, double k) {
      	return t_s * (l * (l / ((k * k) * ((t_m * t_m) * t_m))));
      }
      
      t\_m = math.fabs(t)
      t\_s = math.copysign(1.0, t)
      def code(t_s, t_m, l, k):
      	return t_s * (l * (l / ((k * k) * ((t_m * t_m) * t_m))))
      
      t\_m = abs(t)
      t\_s = copysign(1.0, t)
      function code(t_s, t_m, l, k)
      	return Float64(t_s * Float64(l * Float64(l / Float64(Float64(k * k) * Float64(Float64(t_m * t_m) * t_m)))))
      end
      
      t\_m = abs(t);
      t\_s = sign(t) * abs(1.0);
      function tmp = code(t_s, t_m, l, k)
      	tmp = t_s * (l * (l / ((k * k) * ((t_m * t_m) * t_m))));
      end
      
      t\_m = N[Abs[t], $MachinePrecision]
      t\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[t]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
      code[t$95$s_, t$95$m_, l_, k_] := N[(t$95$s * N[(l * N[(l / N[(N[(k * k), $MachinePrecision] * N[(N[(t$95$m * t$95$m), $MachinePrecision] * t$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
      
      \begin{array}{l}
      t\_m = \left|t\right|
      \\
      t\_s = \mathsf{copysign}\left(1, t\right)
      
      \\
      t\_s \cdot \left(\ell \cdot \frac{\ell}{\left(k \cdot k\right) \cdot \left(\left(t\_m \cdot t\_m\right) \cdot t\_m\right)}\right)
      \end{array}
      
      Derivation
      1. Initial program 61.5%

        \[\frac{2}{\left(\left(\frac{{t}^{3}}{\ell \cdot \ell} \cdot \sin k\right) \cdot \tan k\right) \cdot \left(\left(1 + {\left(\frac{k}{t}\right)}^{2}\right) + 1\right)} \]
      2. Add Preprocessing
      3. Taylor expanded in k around 0

        \[\leadsto \color{blue}{\frac{{\ell}^{2}}{{k}^{2} \cdot {t}^{3}}} \]
      4. Step-by-step derivation
        1. lower-/.f64N/A

          \[\leadsto \frac{{\ell}^{2}}{\color{blue}{{k}^{2} \cdot {t}^{3}}} \]
        2. pow2N/A

          \[\leadsto \frac{\ell \cdot \ell}{\color{blue}{{k}^{2}} \cdot {t}^{3}} \]
        3. lift-*.f64N/A

          \[\leadsto \frac{\ell \cdot \ell}{\color{blue}{{k}^{2}} \cdot {t}^{3}} \]
        4. lower-*.f64N/A

          \[\leadsto \frac{\ell \cdot \ell}{{k}^{2} \cdot \color{blue}{{t}^{3}}} \]
        5. unpow2N/A

          \[\leadsto \frac{\ell \cdot \ell}{\left(k \cdot k\right) \cdot {\color{blue}{t}}^{3}} \]
        6. lower-*.f64N/A

          \[\leadsto \frac{\ell \cdot \ell}{\left(k \cdot k\right) \cdot {\color{blue}{t}}^{3}} \]
        7. lift-pow.f6455.1

          \[\leadsto \frac{\ell \cdot \ell}{\left(k \cdot k\right) \cdot {t}^{\color{blue}{3}}} \]
      5. Applied rewrites55.1%

        \[\leadsto \color{blue}{\frac{\ell \cdot \ell}{\left(k \cdot k\right) \cdot {t}^{3}}} \]
      6. Step-by-step derivation
        1. lift-*.f64N/A

          \[\leadsto \frac{\ell \cdot \ell}{\color{blue}{\left(k \cdot k\right)} \cdot {t}^{3}} \]
        2. lift-/.f64N/A

          \[\leadsto \frac{\ell \cdot \ell}{\color{blue}{\left(k \cdot k\right) \cdot {t}^{3}}} \]
        3. associate-/l*N/A

          \[\leadsto \ell \cdot \color{blue}{\frac{\ell}{\left(k \cdot k\right) \cdot {t}^{3}}} \]
        4. lower-*.f64N/A

          \[\leadsto \ell \cdot \color{blue}{\frac{\ell}{\left(k \cdot k\right) \cdot {t}^{3}}} \]
        5. lift-*.f64N/A

          \[\leadsto \ell \cdot \frac{\ell}{\left(k \cdot k\right) \cdot {\color{blue}{t}}^{3}} \]
        6. lift-*.f64N/A

          \[\leadsto \ell \cdot \frac{\ell}{\left(k \cdot k\right) \cdot \color{blue}{{t}^{3}}} \]
        7. pow2N/A

          \[\leadsto \ell \cdot \frac{\ell}{{k}^{2} \cdot {\color{blue}{t}}^{3}} \]
        8. lift-pow.f64N/A

          \[\leadsto \ell \cdot \frac{\ell}{{k}^{2} \cdot {t}^{\color{blue}{3}}} \]
        9. lower-/.f64N/A

          \[\leadsto \ell \cdot \frac{\ell}{\color{blue}{{k}^{2} \cdot {t}^{3}}} \]
        10. pow2N/A

          \[\leadsto \ell \cdot \frac{\ell}{\left(k \cdot k\right) \cdot {\color{blue}{t}}^{3}} \]
        11. lift-pow.f64N/A

          \[\leadsto \ell \cdot \frac{\ell}{\left(k \cdot k\right) \cdot {t}^{\color{blue}{3}}} \]
        12. lift-*.f64N/A

          \[\leadsto \ell \cdot \frac{\ell}{\left(k \cdot k\right) \cdot \color{blue}{{t}^{3}}} \]
        13. lift-*.f6459.2

          \[\leadsto \ell \cdot \frac{\ell}{\left(k \cdot k\right) \cdot {\color{blue}{t}}^{3}} \]
      7. Applied rewrites59.2%

        \[\leadsto \ell \cdot \color{blue}{\frac{\ell}{\left(k \cdot k\right) \cdot {t}^{3}}} \]
      8. Step-by-step derivation
        1. lift-pow.f64N/A

          \[\leadsto \ell \cdot \frac{\ell}{\left(k \cdot k\right) \cdot {t}^{\color{blue}{3}}} \]
        2. pow3N/A

          \[\leadsto \ell \cdot \frac{\ell}{\left(k \cdot k\right) \cdot \left(\left(t \cdot t\right) \cdot \color{blue}{t}\right)} \]
        3. lift-*.f64N/A

          \[\leadsto \ell \cdot \frac{\ell}{\left(k \cdot k\right) \cdot \left(\left(t \cdot t\right) \cdot \color{blue}{t}\right)} \]
        4. lift-*.f6459.2

          \[\leadsto \ell \cdot \frac{\ell}{\left(k \cdot k\right) \cdot \left(\left(t \cdot t\right) \cdot t\right)} \]
      9. Applied rewrites59.2%

        \[\leadsto \ell \cdot \frac{\ell}{\left(k \cdot k\right) \cdot \left(\left(t \cdot t\right) \cdot \color{blue}{t}\right)} \]
      10. Add Preprocessing

      Reproduce

      ?
      herbie shell --seed 2025027 
      (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))))