Toniolo and Linder, Equation (10-)

Percentage Accurate: 35.6% → 92.4%
Time: 17.2s
Alternatives: 21
Speedup: 18.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));
}
real(8) function code(t, l, k)
    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 21 alternatives:

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

Initial Program: 35.6% accurate, 1.0× speedup?

\[\begin{array}{l} \\ \frac{2}{\left(\left(\frac{{t}^{3}}{\ell \cdot \ell} \cdot \sin k\right) \cdot \tan k\right) \cdot \left(\left(1 + {\left(\frac{k}{t}\right)}^{2}\right) - 1\right)} \end{array} \]
(FPCore (t l k)
 :precision binary64
 (/
  2.0
  (*
   (* (* (/ (pow t 3.0) (* l l)) (sin k)) (tan k))
   (- (+ 1.0 (pow (/ k t) 2.0)) 1.0))))
double code(double t, double l, double k) {
	return 2.0 / ((((pow(t, 3.0) / (l * l)) * sin(k)) * tan(k)) * ((1.0 + pow((k / t), 2.0)) - 1.0));
}
real(8) function code(t, l, k)
    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: 92.4% accurate, 1.3× speedup?

\[\begin{array}{l} \\ \frac{\cos k \cdot \ell}{k} \cdot \frac{\ell + \ell}{{\sin k}^{2} \cdot \left(k \cdot t\right)} \end{array} \]
(FPCore (t l k)
 :precision binary64
 (* (/ (* (cos k) l) k) (/ (+ l l) (* (pow (sin k) 2.0) (* k t)))))
double code(double t, double l, double k) {
	return ((cos(k) * l) / k) * ((l + l) / (pow(sin(k), 2.0) * (k * t)));
}
real(8) function code(t, l, k)
    real(8), intent (in) :: t
    real(8), intent (in) :: l
    real(8), intent (in) :: k
    code = ((cos(k) * l) / k) * ((l + l) / ((sin(k) ** 2.0d0) * (k * t)))
end function
public static double code(double t, double l, double k) {
	return ((Math.cos(k) * l) / k) * ((l + l) / (Math.pow(Math.sin(k), 2.0) * (k * t)));
}
def code(t, l, k):
	return ((math.cos(k) * l) / k) * ((l + l) / (math.pow(math.sin(k), 2.0) * (k * t)))
function code(t, l, k)
	return Float64(Float64(Float64(cos(k) * l) / k) * Float64(Float64(l + l) / Float64((sin(k) ^ 2.0) * Float64(k * t))))
end
function tmp = code(t, l, k)
	tmp = ((cos(k) * l) / k) * ((l + l) / ((sin(k) ^ 2.0) * (k * t)));
end
code[t_, l_, k_] := N[(N[(N[(N[Cos[k], $MachinePrecision] * l), $MachinePrecision] / k), $MachinePrecision] * N[(N[(l + l), $MachinePrecision] / N[(N[Power[N[Sin[k], $MachinePrecision], 2.0], $MachinePrecision] * N[(k * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}

\\
\frac{\cos k \cdot \ell}{k} \cdot \frac{\ell + \ell}{{\sin k}^{2} \cdot \left(k \cdot t\right)}
\end{array}
Derivation
  1. Initial program 39.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 \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. associate-*r/N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 2: 92.4% accurate, 1.3× speedup?

\[\begin{array}{l} \\ \frac{\ell + \ell}{{\sin k}^{2} \cdot \left(k \cdot t\right)} \cdot \left(\ell \cdot \frac{\cos k}{k}\right) \end{array} \]
(FPCore (t l k)
 :precision binary64
 (* (/ (+ l l) (* (pow (sin k) 2.0) (* k t))) (* l (/ (cos k) k))))
double code(double t, double l, double k) {
	return ((l + l) / (pow(sin(k), 2.0) * (k * t))) * (l * (cos(k) / k));
}
real(8) function code(t, l, k)
    real(8), intent (in) :: t
    real(8), intent (in) :: l
    real(8), intent (in) :: k
    code = ((l + l) / ((sin(k) ** 2.0d0) * (k * t))) * (l * (cos(k) / k))
end function
public static double code(double t, double l, double k) {
	return ((l + l) / (Math.pow(Math.sin(k), 2.0) * (k * t))) * (l * (Math.cos(k) / k));
}
def code(t, l, k):
	return ((l + l) / (math.pow(math.sin(k), 2.0) * (k * t))) * (l * (math.cos(k) / k))
function code(t, l, k)
	return Float64(Float64(Float64(l + l) / Float64((sin(k) ^ 2.0) * Float64(k * t))) * Float64(l * Float64(cos(k) / k)))
end
function tmp = code(t, l, k)
	tmp = ((l + l) / ((sin(k) ^ 2.0) * (k * t))) * (l * (cos(k) / k));
end
code[t_, l_, k_] := N[(N[(N[(l + l), $MachinePrecision] / N[(N[Power[N[Sin[k], $MachinePrecision], 2.0], $MachinePrecision] * N[(k * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(l * N[(N[Cos[k], $MachinePrecision] / k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}

\\
\frac{\ell + \ell}{{\sin k}^{2} \cdot \left(k \cdot t\right)} \cdot \left(\ell \cdot \frac{\cos k}{k}\right)
\end{array}
Derivation
  1. Initial program 35.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. associate-*r/N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \frac{\ell + \ell}{{\sin k}^{2} \cdot \left(k \cdot t\right)} \cdot \left(\ell \cdot \frac{\cos k}{k}\right) \]
  13. Add Preprocessing

Reproduce

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