Average Error: 47.9 → 3.8
Time: 23.2s
Precision: binary64
\[\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)} \]
\[\frac{\cos k \cdot \frac{\ell}{k}}{{\sin k}^{2} \cdot t} \cdot \left(\left(\ell \cdot 2\right) \cdot \frac{1}{k}\right) \]
(FPCore (t l k)
 :precision binary64
 (/
  2.0
  (*
   (* (* (/ (pow t 3.0) (* l l)) (sin k)) (tan k))
   (- (+ 1.0 (pow (/ k t) 2.0)) 1.0))))
(FPCore (t l k)
 :precision binary64
 (* (/ (* (cos k) (/ l k)) (* (pow (sin k) 2.0) t)) (* (* l 2.0) (/ 1.0 k))))
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));
}
double code(double t, double l, double k) {
	return ((cos(k) * (l / k)) / (pow(sin(k), 2.0) * t)) * ((l * 2.0) * (1.0 / k));
}
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
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)) / ((sin(k) ** 2.0d0) * t)) * ((l * 2.0d0) * (1.0d0 / k))
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));
}
public static double code(double t, double l, double k) {
	return ((Math.cos(k) * (l / k)) / (Math.pow(Math.sin(k), 2.0) * t)) * ((l * 2.0) * (1.0 / k));
}
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))
def code(t, l, k):
	return ((math.cos(k) * (l / k)) / (math.pow(math.sin(k), 2.0) * t)) * ((l * 2.0) * (1.0 / k))
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 code(t, l, k)
	return Float64(Float64(Float64(cos(k) * Float64(l / k)) / Float64((sin(k) ^ 2.0) * t)) * Float64(Float64(l * 2.0) * Float64(1.0 / k)))
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
function tmp = code(t, l, k)
	tmp = ((cos(k) * (l / k)) / ((sin(k) ^ 2.0) * t)) * ((l * 2.0) * (1.0 / k));
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]
code[t_, l_, k_] := N[(N[(N[(N[Cos[k], $MachinePrecision] * N[(l / k), $MachinePrecision]), $MachinePrecision] / N[(N[Power[N[Sin[k], $MachinePrecision], 2.0], $MachinePrecision] * t), $MachinePrecision]), $MachinePrecision] * N[(N[(l * 2.0), $MachinePrecision] * N[(1.0 / k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\frac{2}{\left(\left(\frac{{t}^{3}}{\ell \cdot \ell} \cdot \sin k\right) \cdot \tan k\right) \cdot \left(\left(1 + {\left(\frac{k}{t}\right)}^{2}\right) - 1\right)}
\frac{\cos k \cdot \frac{\ell}{k}}{{\sin k}^{2} \cdot t} \cdot \left(\left(\ell \cdot 2\right) \cdot \frac{1}{k}\right)

Error

Try it out

Your Program's Arguments

Results

Enter valid numbers for all inputs

Derivation

  1. Initial program 47.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. Simplified37.4

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

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

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

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

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

    \[\leadsto \color{blue}{\frac{\cos k \cdot \frac{\ell}{k}}{{\sin k}^{2} \cdot t} \cdot \left(\left(2 \cdot \ell\right) \cdot \frac{1}{k}\right)} \]
  8. Final simplification3.8

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

Reproduce

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