Toniolo and Linder, Equation (10+)

Percentage Accurate: 54.7% → 83.0%
Time: 7.2s
Alternatives: 5
Speedup: N/A×

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

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

Initial Program: 54.7% 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: 83.0% accurate, N/A× speedup?

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

\\
\begin{array}{l}
t_1 := {\left(t \cdot \sin k\right)}^{1}\\
t_2 := {\sin k}^{2}\\
\mathbf{if}\;\left(\left(\frac{{t}^{3}}{\ell \cdot \ell} \cdot \sin k\right) \cdot \tan k\right) \cdot \left(\left(1 + {\left(\frac{k}{t}\right)}^{2}\right) + 1\right) \leq \infty:\\
\;\;\;\;\frac{2}{\mathsf{fma}\left(\frac{\frac{k \cdot k}{\ell}}{\ell}, \frac{t\_2}{\cos k}, \frac{\mathsf{fma}\left(t\_1, t\_1, t\_1 \cdot t\_1\right)}{\cos k \cdot \left(\ell \cdot \ell\right)}\right) \cdot t}\\

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


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

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

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

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

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

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

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

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

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

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

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

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

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

    if +inf.0 < (*.f64 (*.f64 (*.f64 (/.f64 (pow.f64 t #s(literal 3 binary64)) (*.f64 l l)) (sin.f64 k)) (tan.f64 k)) (+.f64 (+.f64 #s(literal 1 binary64) (pow.f64 (/.f64 k t) #s(literal 2 binary64))) #s(literal 1 binary64)))

    1. Initial program 0.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 rewrites38.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \frac{2}{\left(\frac{k}{\ell} \cdot \frac{k}{\ell}\right) \cdot \frac{t \cdot {\sin k}^{2}}{\cos k}} \]
      13. lift-cos.f6477.1

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

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

Alternative 2: 80.9% accurate, N/A× speedup?

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

\\
\begin{array}{l}
t_1 := \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)\\
t_2 := {\sin k}^{2}\\
\mathbf{if}\;t\_1 \leq 4 \cdot 10^{+214}:\\
\;\;\;\;\frac{\mathsf{fma}\left(\cos k, \ell \cdot \ell, \cos k \cdot \left(\ell \cdot \ell\right)\right)}{\left(\mathsf{fma}\left(\frac{k}{t}, \frac{k}{t}, 2\right) \cdot t\_2\right) \cdot {t}^{3}}\\

\mathbf{elif}\;t\_1 \leq \infty:\\
\;\;\;\;\frac{\ell}{k} \cdot \frac{\frac{\ell}{k}}{{t}^{3}}\\

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


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

    1. Initial program 88.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 l around 0

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

        \[\leadsto \frac{{\ell}^{2} \cdot \cos k}{{t}^{3} \cdot \left({\sin k}^{2} \cdot \left(2 + \frac{{k}^{2}}{{t}^{2}}\right)\right)} + \color{blue}{\frac{{\ell}^{2} \cdot \cos k}{{t}^{3} \cdot \left({\sin k}^{2} \cdot \left(2 + \frac{{k}^{2}}{{t}^{2}}\right)\right)}} \]
      2. div-add-revN/A

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

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

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

    if 3.9999999999999998e214 < (*.f64 (*.f64 (*.f64 (/.f64 (pow.f64 t #s(literal 3 binary64)) (*.f64 l l)) (sin.f64 k)) (tan.f64 k)) (+.f64 (+.f64 #s(literal 1 binary64) (pow.f64 (/.f64 k t) #s(literal 2 binary64))) #s(literal 1 binary64))) < +inf.0

    1. Initial program 72.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 \color{blue}{2 \cdot \frac{{\ell}^{2} \cdot \cos k}{{k}^{2} \cdot \left(t \cdot {\sin k}^{2}\right)}} \]
    4. Step-by-step derivation
      1. count-2-revN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \frac{\frac{\ell \cdot \ell}{k \cdot k}}{{t}^{3}} \]
      5. times-fracN/A

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

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

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

        \[\leadsto \frac{\frac{\ell}{k} \cdot \frac{\ell}{k}}{{t}^{3}} \]
      9. lift-pow.f6483.0

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

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

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

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

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

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

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

        \[\leadsto \frac{\ell}{k} \cdot \frac{\frac{\ell}{k}}{\color{blue}{{t}^{3}}} \]
      7. lift-pow.f6481.6

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

      \[\leadsto \frac{\ell}{k} \cdot \color{blue}{\frac{\frac{\ell}{k}}{{t}^{3}}} \]

    if +inf.0 < (*.f64 (*.f64 (*.f64 (/.f64 (pow.f64 t #s(literal 3 binary64)) (*.f64 l l)) (sin.f64 k)) (tan.f64 k)) (+.f64 (+.f64 #s(literal 1 binary64) (pow.f64 (/.f64 k t) #s(literal 2 binary64))) #s(literal 1 binary64)))

    1. Initial program 0.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 rewrites38.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \frac{2}{\left(\frac{k}{\ell} \cdot \frac{k}{\ell}\right) \cdot \frac{t \cdot {\sin k}^{2}}{\cos k}} \]
      13. lift-cos.f6477.1

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

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

Alternative 3: 76.1% accurate, N/A× speedup?

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

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

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


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

    1. Initial program 81.2%

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

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

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

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

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

    if 2e262 < (/.f64 #s(literal 2 binary64) (*.f64 (*.f64 (*.f64 (/.f64 (pow.f64 t #s(literal 3 binary64)) (*.f64 l l)) (sin.f64 k)) (tan.f64 k)) (+.f64 (+.f64 #s(literal 1 binary64) (pow.f64 (/.f64 k t) #s(literal 2 binary64))) #s(literal 1 binary64))))

    1. Initial program 24.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 rewrites51.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \frac{2}{\left(\frac{k}{\ell} \cdot \frac{k}{\ell}\right) \cdot \frac{t \cdot {\sin k}^{2}}{\cos k}} \]
      13. lift-cos.f6482.2

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

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

Alternative 4: 68.6% accurate, N/A× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;k \leq 2.75 \cdot 10^{-18}:\\
\;\;\;\;\frac{\ell}{k} \cdot \frac{\frac{\ell}{k}}{{t}^{3}}\\

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


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

    1. Initial program 58.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 \color{blue}{2 \cdot \frac{{\ell}^{2} \cdot \cos k}{{k}^{2} \cdot \left(t \cdot {\sin k}^{2}\right)}} \]
    4. Step-by-step derivation
      1. count-2-revN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \frac{\frac{\ell \cdot \ell}{k \cdot k}}{{t}^{3}} \]
      5. times-fracN/A

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

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

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

        \[\leadsto \frac{\frac{\ell}{k} \cdot \frac{\ell}{k}}{{t}^{3}} \]
      9. lift-pow.f6467.7

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

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

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

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

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

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

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

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

        \[\leadsto \frac{\ell}{k} \cdot \frac{\frac{\ell}{k}}{{t}^{\color{blue}{3}}} \]
    10. Applied rewrites68.3%

      \[\leadsto \frac{\ell}{k} \cdot \color{blue}{\frac{\frac{\ell}{k}}{{t}^{3}}} \]

    if 2.75e-18 < k

    1. Initial program 39.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 \color{blue}{2 \cdot \frac{{\ell}^{2} \cdot \cos k}{{k}^{2} \cdot \left(t \cdot {\sin k}^{2}\right)}} \]
    4. Step-by-step derivation
      1. count-2-revN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \frac{\mathsf{fma}\left(\cos k, \ell \cdot \ell, \cos k \cdot \left(\ell \cdot \ell\right)\right)}{\left(k \cdot \left(k \cdot t\right)\right) \cdot {\color{blue}{\sin k}}^{2}} \]
      5. lower-*.f6471.8

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

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

Alternative 5: 62.0% accurate, N/A× speedup?

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

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

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

\\
\frac{\ell}{k} \cdot \frac{\frac{\ell}{k}}{{t}^{3}}
\end{array}
Derivation
  1. Initial program 53.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \frac{\frac{\ell \cdot \ell}{k \cdot k}}{{t}^{3}} \]
    5. times-fracN/A

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

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

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

      \[\leadsto \frac{\frac{\ell}{k} \cdot \frac{\ell}{k}}{{t}^{3}} \]
    9. lift-pow.f6460.1

      \[\leadsto \frac{\frac{\ell}{k} \cdot \frac{\ell}{k}}{{t}^{\color{blue}{3}}} \]
  8. Applied rewrites60.1%

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

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

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

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

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

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

      \[\leadsto \frac{\ell}{k} \cdot \frac{\frac{\ell}{k}}{\color{blue}{{t}^{3}}} \]
    7. lift-pow.f6460.6

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

    \[\leadsto \frac{\ell}{k} \cdot \color{blue}{\frac{\frac{\ell}{k}}{{t}^{3}}} \]
  11. Add Preprocessing

Reproduce

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