
(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:
Herbie found 13 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(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}
NOTE: k should be positive before calling this function
(FPCore (t l k)
:precision binary64
(let* ((t_1 (pow (sin k) 2.0)))
(if (<= k 8e+100)
(/ 2.0 (/ (* (/ (pow k 2.0) l) (* (/ t (cos k)) t_1)) l))
(* 2.0 (* (/ (pow (/ l k) 2.0) t) (/ (cos k) t_1))))))k = abs(k);
double code(double t, double l, double k) {
double t_1 = pow(sin(k), 2.0);
double tmp;
if (k <= 8e+100) {
tmp = 2.0 / (((pow(k, 2.0) / l) * ((t / cos(k)) * t_1)) / l);
} else {
tmp = 2.0 * ((pow((l / k), 2.0) / t) * (cos(k) / t_1));
}
return tmp;
}
NOTE: k should be positive before calling this function
real(8) function code(t, l, k)
real(8), intent (in) :: t
real(8), intent (in) :: l
real(8), intent (in) :: k
real(8) :: t_1
real(8) :: tmp
t_1 = sin(k) ** 2.0d0
if (k <= 8d+100) then
tmp = 2.0d0 / ((((k ** 2.0d0) / l) * ((t / cos(k)) * t_1)) / l)
else
tmp = 2.0d0 * ((((l / k) ** 2.0d0) / t) * (cos(k) / t_1))
end if
code = tmp
end function
k = Math.abs(k);
public static double code(double t, double l, double k) {
double t_1 = Math.pow(Math.sin(k), 2.0);
double tmp;
if (k <= 8e+100) {
tmp = 2.0 / (((Math.pow(k, 2.0) / l) * ((t / Math.cos(k)) * t_1)) / l);
} else {
tmp = 2.0 * ((Math.pow((l / k), 2.0) / t) * (Math.cos(k) / t_1));
}
return tmp;
}
k = abs(k) def code(t, l, k): t_1 = math.pow(math.sin(k), 2.0) tmp = 0 if k <= 8e+100: tmp = 2.0 / (((math.pow(k, 2.0) / l) * ((t / math.cos(k)) * t_1)) / l) else: tmp = 2.0 * ((math.pow((l / k), 2.0) / t) * (math.cos(k) / t_1)) return tmp
k = abs(k) function code(t, l, k) t_1 = sin(k) ^ 2.0 tmp = 0.0 if (k <= 8e+100) tmp = Float64(2.0 / Float64(Float64(Float64((k ^ 2.0) / l) * Float64(Float64(t / cos(k)) * t_1)) / l)); else tmp = Float64(2.0 * Float64(Float64((Float64(l / k) ^ 2.0) / t) * Float64(cos(k) / t_1))); end return tmp end
k = abs(k) function tmp_2 = code(t, l, k) t_1 = sin(k) ^ 2.0; tmp = 0.0; if (k <= 8e+100) tmp = 2.0 / ((((k ^ 2.0) / l) * ((t / cos(k)) * t_1)) / l); else tmp = 2.0 * ((((l / k) ^ 2.0) / t) * (cos(k) / t_1)); end tmp_2 = tmp; end
NOTE: k should be positive before calling this function
code[t_, l_, k_] := Block[{t$95$1 = N[Power[N[Sin[k], $MachinePrecision], 2.0], $MachinePrecision]}, If[LessEqual[k, 8e+100], N[(2.0 / N[(N[(N[(N[Power[k, 2.0], $MachinePrecision] / l), $MachinePrecision] * N[(N[(t / N[Cos[k], $MachinePrecision]), $MachinePrecision] * t$95$1), $MachinePrecision]), $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision], N[(2.0 * N[(N[(N[Power[N[(l / k), $MachinePrecision], 2.0], $MachinePrecision] / t), $MachinePrecision] * N[(N[Cos[k], $MachinePrecision] / t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
k = |k|\\
\\
\begin{array}{l}
t_1 := {\sin k}^{2}\\
\mathbf{if}\;k \leq 8 \cdot 10^{+100}:\\
\;\;\;\;\frac{2}{\frac{\frac{{k}^{2}}{\ell} \cdot \left(\frac{t}{\cos k} \cdot t_1\right)}{\ell}}\\
\mathbf{else}:\\
\;\;\;\;2 \cdot \left(\frac{{\left(\frac{\ell}{k}\right)}^{2}}{t} \cdot \frac{\cos k}{t_1}\right)\\
\end{array}
\end{array}
if k < 8.00000000000000013e100Initial program 34.5%
Simplified41.2%
associate-*l/40.7%
associate-/r*46.1%
associate-*r*46.1%
*-commutative46.1%
Applied egg-rr46.1%
Taylor expanded in t around 0 83.2%
times-frac88.3%
Simplified88.3%
Taylor expanded in k around inf 83.2%
associate-/l*88.3%
times-frac85.7%
associate-/r/88.3%
associate-/l*83.1%
associate-*l/88.3%
associate-/r/88.3%
Simplified88.3%
if 8.00000000000000013e100 < k Initial program 42.1%
associate-/r*41.9%
associate-*l/41.9%
associate--l+41.9%
Simplified41.9%
*-un-lft-identity41.9%
add-sqr-sqrt41.9%
times-frac41.9%
associate-+r-41.9%
add-exp-log41.7%
log1p-udef41.7%
expm1-udef41.7%
expm1-log1p-u41.9%
sqrt-pow141.8%
metadata-eval41.8%
pow141.8%
clear-num41.8%
Applied egg-rr51.7%
associate-/l*51.7%
associate-/l/51.7%
*-commutative51.7%
Simplified51.7%
Taylor expanded in t around 0 66.1%
associate-*r*66.1%
times-frac66.1%
associate-/r*68.1%
unpow268.1%
unpow268.1%
times-frac92.7%
unpow292.7%
Simplified92.7%
Final simplification89.0%
NOTE: k should be positive before calling this function
(FPCore (t l k)
:precision binary64
(let* ((t_1 (pow (sin k) 2.0)))
(if (<= (* l l) 1e-266)
(/ 2.0 (/ (* (* t (/ (pow k 2.0) (cos k))) (/ t_1 l)) l))
(* 2.0 (* (/ (pow (/ l k) 2.0) t) (/ (cos k) t_1))))))k = abs(k);
double code(double t, double l, double k) {
double t_1 = pow(sin(k), 2.0);
double tmp;
if ((l * l) <= 1e-266) {
tmp = 2.0 / (((t * (pow(k, 2.0) / cos(k))) * (t_1 / l)) / l);
} else {
tmp = 2.0 * ((pow((l / k), 2.0) / t) * (cos(k) / t_1));
}
return tmp;
}
NOTE: k should be positive before calling this function
real(8) function code(t, l, k)
real(8), intent (in) :: t
real(8), intent (in) :: l
real(8), intent (in) :: k
real(8) :: t_1
real(8) :: tmp
t_1 = sin(k) ** 2.0d0
if ((l * l) <= 1d-266) then
tmp = 2.0d0 / (((t * ((k ** 2.0d0) / cos(k))) * (t_1 / l)) / l)
else
tmp = 2.0d0 * ((((l / k) ** 2.0d0) / t) * (cos(k) / t_1))
end if
code = tmp
end function
k = Math.abs(k);
public static double code(double t, double l, double k) {
double t_1 = Math.pow(Math.sin(k), 2.0);
double tmp;
if ((l * l) <= 1e-266) {
tmp = 2.0 / (((t * (Math.pow(k, 2.0) / Math.cos(k))) * (t_1 / l)) / l);
} else {
tmp = 2.0 * ((Math.pow((l / k), 2.0) / t) * (Math.cos(k) / t_1));
}
return tmp;
}
k = abs(k) def code(t, l, k): t_1 = math.pow(math.sin(k), 2.0) tmp = 0 if (l * l) <= 1e-266: tmp = 2.0 / (((t * (math.pow(k, 2.0) / math.cos(k))) * (t_1 / l)) / l) else: tmp = 2.0 * ((math.pow((l / k), 2.0) / t) * (math.cos(k) / t_1)) return tmp
k = abs(k) function code(t, l, k) t_1 = sin(k) ^ 2.0 tmp = 0.0 if (Float64(l * l) <= 1e-266) tmp = Float64(2.0 / Float64(Float64(Float64(t * Float64((k ^ 2.0) / cos(k))) * Float64(t_1 / l)) / l)); else tmp = Float64(2.0 * Float64(Float64((Float64(l / k) ^ 2.0) / t) * Float64(cos(k) / t_1))); end return tmp end
k = abs(k) function tmp_2 = code(t, l, k) t_1 = sin(k) ^ 2.0; tmp = 0.0; if ((l * l) <= 1e-266) tmp = 2.0 / (((t * ((k ^ 2.0) / cos(k))) * (t_1 / l)) / l); else tmp = 2.0 * ((((l / k) ^ 2.0) / t) * (cos(k) / t_1)); end tmp_2 = tmp; end
NOTE: k should be positive before calling this function
code[t_, l_, k_] := Block[{t$95$1 = N[Power[N[Sin[k], $MachinePrecision], 2.0], $MachinePrecision]}, If[LessEqual[N[(l * l), $MachinePrecision], 1e-266], N[(2.0 / N[(N[(N[(t * N[(N[Power[k, 2.0], $MachinePrecision] / N[Cos[k], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(t$95$1 / l), $MachinePrecision]), $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision], N[(2.0 * N[(N[(N[Power[N[(l / k), $MachinePrecision], 2.0], $MachinePrecision] / t), $MachinePrecision] * N[(N[Cos[k], $MachinePrecision] / t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
k = |k|\\
\\
\begin{array}{l}
t_1 := {\sin k}^{2}\\
\mathbf{if}\;\ell \cdot \ell \leq 10^{-266}:\\
\;\;\;\;\frac{2}{\frac{\left(t \cdot \frac{{k}^{2}}{\cos k}\right) \cdot \frac{t_1}{\ell}}{\ell}}\\
\mathbf{else}:\\
\;\;\;\;2 \cdot \left(\frac{{\left(\frac{\ell}{k}\right)}^{2}}{t} \cdot \frac{\cos k}{t_1}\right)\\
\end{array}
\end{array}
if (*.f64 l l) < 9.9999999999999998e-267Initial program 30.1%
Simplified40.1%
associate-*l/40.1%
associate-/r*52.9%
associate-*r*52.9%
*-commutative52.9%
Applied egg-rr52.9%
Taylor expanded in t around 0 79.5%
associate-*r*79.5%
*-commutative79.5%
times-frac85.4%
associate-/l*85.4%
associate-/r/85.4%
Simplified85.4%
if 9.9999999999999998e-267 < (*.f64 l l) Initial program 38.4%
associate-/r*38.3%
associate-*l/38.3%
associate--l+38.3%
Simplified38.3%
*-un-lft-identity38.3%
add-sqr-sqrt38.3%
times-frac38.3%
associate-+r-38.3%
add-exp-log38.2%
log1p-udef38.2%
expm1-udef38.2%
expm1-log1p-u38.3%
sqrt-pow128.1%
metadata-eval28.1%
pow128.1%
clear-num28.1%
Applied egg-rr53.9%
associate-/l*53.9%
associate-/l/53.9%
*-commutative53.9%
Simplified53.9%
Taylor expanded in t around 0 78.9%
associate-*r*78.9%
times-frac79.8%
associate-/r*81.5%
unpow281.5%
unpow281.5%
times-frac95.1%
unpow295.1%
Simplified95.1%
Final simplification92.1%
NOTE: k should be positive before calling this function (FPCore (t l k) :precision binary64 (if (<= (* l l) 5e-110) (/ 2.0 (/ (pow k 2.0) (* (pow (/ l (sin k)) 2.0) (/ (cos k) t)))) (* 2.0 (* (/ (pow (/ l k) 2.0) t) (/ (cos k) (pow (sin k) 2.0))))))
k = abs(k);
double code(double t, double l, double k) {
double tmp;
if ((l * l) <= 5e-110) {
tmp = 2.0 / (pow(k, 2.0) / (pow((l / sin(k)), 2.0) * (cos(k) / t)));
} else {
tmp = 2.0 * ((pow((l / k), 2.0) / t) * (cos(k) / pow(sin(k), 2.0)));
}
return tmp;
}
NOTE: k should be positive before calling this function
real(8) function code(t, l, k)
real(8), intent (in) :: t
real(8), intent (in) :: l
real(8), intent (in) :: k
real(8) :: tmp
if ((l * l) <= 5d-110) then
tmp = 2.0d0 / ((k ** 2.0d0) / (((l / sin(k)) ** 2.0d0) * (cos(k) / t)))
else
tmp = 2.0d0 * ((((l / k) ** 2.0d0) / t) * (cos(k) / (sin(k) ** 2.0d0)))
end if
code = tmp
end function
k = Math.abs(k);
public static double code(double t, double l, double k) {
double tmp;
if ((l * l) <= 5e-110) {
tmp = 2.0 / (Math.pow(k, 2.0) / (Math.pow((l / Math.sin(k)), 2.0) * (Math.cos(k) / t)));
} else {
tmp = 2.0 * ((Math.pow((l / k), 2.0) / t) * (Math.cos(k) / Math.pow(Math.sin(k), 2.0)));
}
return tmp;
}
k = abs(k) def code(t, l, k): tmp = 0 if (l * l) <= 5e-110: tmp = 2.0 / (math.pow(k, 2.0) / (math.pow((l / math.sin(k)), 2.0) * (math.cos(k) / t))) else: tmp = 2.0 * ((math.pow((l / k), 2.0) / t) * (math.cos(k) / math.pow(math.sin(k), 2.0))) return tmp
k = abs(k) function code(t, l, k) tmp = 0.0 if (Float64(l * l) <= 5e-110) tmp = Float64(2.0 / Float64((k ^ 2.0) / Float64((Float64(l / sin(k)) ^ 2.0) * Float64(cos(k) / t)))); else tmp = Float64(2.0 * Float64(Float64((Float64(l / k) ^ 2.0) / t) * Float64(cos(k) / (sin(k) ^ 2.0)))); end return tmp end
k = abs(k) function tmp_2 = code(t, l, k) tmp = 0.0; if ((l * l) <= 5e-110) tmp = 2.0 / ((k ^ 2.0) / (((l / sin(k)) ^ 2.0) * (cos(k) / t))); else tmp = 2.0 * ((((l / k) ^ 2.0) / t) * (cos(k) / (sin(k) ^ 2.0))); end tmp_2 = tmp; end
NOTE: k should be positive before calling this function code[t_, l_, k_] := If[LessEqual[N[(l * l), $MachinePrecision], 5e-110], N[(2.0 / N[(N[Power[k, 2.0], $MachinePrecision] / N[(N[Power[N[(l / N[Sin[k], $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision] * N[(N[Cos[k], $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(2.0 * N[(N[(N[Power[N[(l / k), $MachinePrecision], 2.0], $MachinePrecision] / t), $MachinePrecision] * N[(N[Cos[k], $MachinePrecision] / N[Power[N[Sin[k], $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
k = |k|\\
\\
\begin{array}{l}
\mathbf{if}\;\ell \cdot \ell \leq 5 \cdot 10^{-110}:\\
\;\;\;\;\frac{2}{\frac{{k}^{2}}{{\left(\frac{\ell}{\sin k}\right)}^{2} \cdot \frac{\cos k}{t}}}\\
\mathbf{else}:\\
\;\;\;\;2 \cdot \left(\frac{{\left(\frac{\ell}{k}\right)}^{2}}{t} \cdot \frac{\cos k}{{\sin k}^{2}}\right)\\
\end{array}
\end{array}
if (*.f64 l l) < 5e-110Initial program 33.0%
Simplified43.5%
associate-*l/43.5%
associate-/r*53.4%
associate-*r*53.4%
*-commutative53.4%
Applied egg-rr53.4%
Taylor expanded in t around 0 62.3%
associate-/l*64.7%
*-commutative64.7%
times-frac66.6%
unpow266.6%
unpow266.6%
times-frac83.9%
*-lft-identity83.9%
associate-*l/83.9%
*-lft-identity83.9%
associate-*l/83.8%
unpow283.8%
associate-*l/83.9%
*-lft-identity83.9%
Simplified83.9%
if 5e-110 < (*.f64 l l) Initial program 37.7%
associate-/r*37.6%
associate-*l/37.6%
associate--l+37.6%
Simplified37.6%
*-un-lft-identity37.6%
add-sqr-sqrt37.6%
times-frac37.6%
associate-+r-37.6%
add-exp-log37.5%
log1p-udef37.5%
expm1-udef37.5%
expm1-log1p-u37.6%
sqrt-pow126.6%
metadata-eval26.6%
pow126.6%
clear-num26.6%
Applied egg-rr52.4%
associate-/l*52.4%
associate-/l/52.4%
*-commutative52.4%
Simplified52.4%
Taylor expanded in t around 0 77.4%
associate-*r*77.4%
times-frac77.5%
associate-/r*80.0%
unpow280.0%
unpow280.0%
times-frac95.8%
unpow295.8%
Simplified95.8%
Final simplification91.0%
NOTE: k should be positive before calling this function (FPCore (t l k) :precision binary64 (* 2.0 (* (cos k) (* (pow (/ l (sin k)) 2.0) (/ (pow k -2.0) t)))))
k = abs(k);
double code(double t, double l, double k) {
return 2.0 * (cos(k) * (pow((l / sin(k)), 2.0) * (pow(k, -2.0) / t)));
}
NOTE: k should be positive before calling this function
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 * (cos(k) * (((l / sin(k)) ** 2.0d0) * ((k ** (-2.0d0)) / t)))
end function
k = Math.abs(k);
public static double code(double t, double l, double k) {
return 2.0 * (Math.cos(k) * (Math.pow((l / Math.sin(k)), 2.0) * (Math.pow(k, -2.0) / t)));
}
k = abs(k) def code(t, l, k): return 2.0 * (math.cos(k) * (math.pow((l / math.sin(k)), 2.0) * (math.pow(k, -2.0) / t)))
k = abs(k) function code(t, l, k) return Float64(2.0 * Float64(cos(k) * Float64((Float64(l / sin(k)) ^ 2.0) * Float64((k ^ -2.0) / t)))) end
k = abs(k) function tmp = code(t, l, k) tmp = 2.0 * (cos(k) * (((l / sin(k)) ^ 2.0) * ((k ^ -2.0) / t))); end
NOTE: k should be positive before calling this function code[t_, l_, k_] := N[(2.0 * N[(N[Cos[k], $MachinePrecision] * N[(N[Power[N[(l / N[Sin[k], $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision] * N[(N[Power[k, -2.0], $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
k = |k|\\
\\
2 \cdot \left(\cos k \cdot \left({\left(\frac{\ell}{\sin k}\right)}^{2} \cdot \frac{{k}^{-2}}{t}\right)\right)
\end{array}
Initial program 35.8%
associate-/r*35.8%
associate-*l/35.7%
associate--l+35.7%
Simplified35.7%
Taylor expanded in t around 0 71.3%
*-commutative71.3%
associate-*r*71.3%
times-frac72.0%
Simplified72.0%
add-sqr-sqrt72.0%
pow272.0%
div-inv72.0%
sqrt-prod72.0%
pow272.0%
sqrt-prod41.6%
add-sqr-sqrt79.1%
pow-flip79.1%
metadata-eval79.1%
Applied egg-rr79.1%
expm1-log1p-u47.9%
expm1-udef40.6%
div-inv40.6%
associate-/r*40.6%
pow-flip40.6%
metadata-eval40.6%
*-commutative40.6%
unpow-prod-down39.4%
pow239.4%
add-sqr-sqrt39.4%
Applied egg-rr39.4%
expm1-def45.6%
expm1-log1p72.0%
associate-*l*72.0%
metadata-eval72.0%
pow-sqr72.0%
unpow-172.0%
unpow-172.0%
unpow272.0%
swap-sqr79.1%
unpow279.1%
associate-*l/79.1%
*-lft-identity79.1%
Simplified79.1%
Final simplification79.1%
NOTE: k should be positive before calling this function (FPCore (t l k) :precision binary64 (* 2.0 (* (pow (/ l (sin k)) 2.0) (/ (cos k) (* (pow k 2.0) t)))))
k = abs(k);
double code(double t, double l, double k) {
return 2.0 * (pow((l / sin(k)), 2.0) * (cos(k) / (pow(k, 2.0) * t)));
}
NOTE: k should be positive before calling this function
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 * (((l / sin(k)) ** 2.0d0) * (cos(k) / ((k ** 2.0d0) * t)))
end function
k = Math.abs(k);
public static double code(double t, double l, double k) {
return 2.0 * (Math.pow((l / Math.sin(k)), 2.0) * (Math.cos(k) / (Math.pow(k, 2.0) * t)));
}
k = abs(k) def code(t, l, k): return 2.0 * (math.pow((l / math.sin(k)), 2.0) * (math.cos(k) / (math.pow(k, 2.0) * t)))
k = abs(k) function code(t, l, k) return Float64(2.0 * Float64((Float64(l / sin(k)) ^ 2.0) * Float64(cos(k) / Float64((k ^ 2.0) * t)))) end
k = abs(k) function tmp = code(t, l, k) tmp = 2.0 * (((l / sin(k)) ^ 2.0) * (cos(k) / ((k ^ 2.0) * t))); end
NOTE: k should be positive before calling this function code[t_, l_, k_] := N[(2.0 * N[(N[Power[N[(l / N[Sin[k], $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision] * N[(N[Cos[k], $MachinePrecision] / N[(N[Power[k, 2.0], $MachinePrecision] * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
k = |k|\\
\\
2 \cdot \left({\left(\frac{\ell}{\sin k}\right)}^{2} \cdot \frac{\cos k}{{k}^{2} \cdot t}\right)
\end{array}
Initial program 35.8%
associate-/r*35.8%
associate-*l/35.7%
associate--l+35.7%
Simplified35.7%
Taylor expanded in t around 0 71.3%
*-commutative71.3%
associate-*r*71.3%
times-frac72.0%
Simplified72.0%
add-sqr-sqrt72.0%
pow272.0%
div-inv72.0%
sqrt-prod72.0%
pow272.0%
sqrt-prod41.6%
add-sqr-sqrt79.1%
pow-flip79.1%
metadata-eval79.1%
Applied egg-rr79.1%
Taylor expanded in l around 0 72.0%
unpow272.0%
unpow272.0%
times-frac79.2%
*-lft-identity79.2%
associate-*l/79.2%
*-lft-identity79.2%
associate-*l/79.1%
unpow279.1%
associate-*l/79.2%
*-lft-identity79.2%
Simplified79.2%
Final simplification79.2%
NOTE: k should be positive before calling this function (FPCore (t l k) :precision binary64 (* 2.0 (* (/ (pow (/ l k) 2.0) t) (/ (cos k) (pow (sin k) 2.0)))))
k = abs(k);
double code(double t, double l, double k) {
return 2.0 * ((pow((l / k), 2.0) / t) * (cos(k) / pow(sin(k), 2.0)));
}
NOTE: k should be positive before calling this function
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 * ((((l / k) ** 2.0d0) / t) * (cos(k) / (sin(k) ** 2.0d0)))
end function
k = Math.abs(k);
public static double code(double t, double l, double k) {
return 2.0 * ((Math.pow((l / k), 2.0) / t) * (Math.cos(k) / Math.pow(Math.sin(k), 2.0)));
}
k = abs(k) def code(t, l, k): return 2.0 * ((math.pow((l / k), 2.0) / t) * (math.cos(k) / math.pow(math.sin(k), 2.0)))
k = abs(k) function code(t, l, k) return Float64(2.0 * Float64(Float64((Float64(l / k) ^ 2.0) / t) * Float64(cos(k) / (sin(k) ^ 2.0)))) end
k = abs(k) function tmp = code(t, l, k) tmp = 2.0 * ((((l / k) ^ 2.0) / t) * (cos(k) / (sin(k) ^ 2.0))); end
NOTE: k should be positive before calling this function code[t_, l_, k_] := N[(2.0 * N[(N[(N[Power[N[(l / k), $MachinePrecision], 2.0], $MachinePrecision] / t), $MachinePrecision] * N[(N[Cos[k], $MachinePrecision] / N[Power[N[Sin[k], $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
k = |k|\\
\\
2 \cdot \left(\frac{{\left(\frac{\ell}{k}\right)}^{2}}{t} \cdot \frac{\cos k}{{\sin k}^{2}}\right)
\end{array}
Initial program 35.8%
associate-/r*35.8%
associate-*l/35.7%
associate--l+35.7%
Simplified35.7%
*-un-lft-identity35.7%
add-sqr-sqrt35.7%
times-frac35.7%
associate-+r-35.7%
add-exp-log35.6%
log1p-udef35.6%
expm1-udef35.6%
expm1-log1p-u35.7%
sqrt-pow128.7%
metadata-eval28.7%
pow128.7%
clear-num28.7%
Applied egg-rr49.7%
associate-/l*49.7%
associate-/l/49.7%
*-commutative49.7%
Simplified49.7%
Taylor expanded in t around 0 71.3%
associate-*r*71.3%
times-frac72.3%
associate-/r*73.0%
unpow273.0%
unpow273.0%
times-frac89.2%
unpow289.2%
Simplified89.2%
Final simplification89.2%
NOTE: k should be positive before calling this function (FPCore (t l k) :precision binary64 (if (<= (* l l) 1e-209) (/ 2.0 (* t (pow (/ (pow k 2.0) l) 2.0))) (* 2.0 (/ (* (cos k) (pow (/ l k) 2.0)) (* (pow k 2.0) t)))))
k = abs(k);
double code(double t, double l, double k) {
double tmp;
if ((l * l) <= 1e-209) {
tmp = 2.0 / (t * pow((pow(k, 2.0) / l), 2.0));
} else {
tmp = 2.0 * ((cos(k) * pow((l / k), 2.0)) / (pow(k, 2.0) * t));
}
return tmp;
}
NOTE: k should be positive before calling this function
real(8) function code(t, l, k)
real(8), intent (in) :: t
real(8), intent (in) :: l
real(8), intent (in) :: k
real(8) :: tmp
if ((l * l) <= 1d-209) then
tmp = 2.0d0 / (t * (((k ** 2.0d0) / l) ** 2.0d0))
else
tmp = 2.0d0 * ((cos(k) * ((l / k) ** 2.0d0)) / ((k ** 2.0d0) * t))
end if
code = tmp
end function
k = Math.abs(k);
public static double code(double t, double l, double k) {
double tmp;
if ((l * l) <= 1e-209) {
tmp = 2.0 / (t * Math.pow((Math.pow(k, 2.0) / l), 2.0));
} else {
tmp = 2.0 * ((Math.cos(k) * Math.pow((l / k), 2.0)) / (Math.pow(k, 2.0) * t));
}
return tmp;
}
k = abs(k) def code(t, l, k): tmp = 0 if (l * l) <= 1e-209: tmp = 2.0 / (t * math.pow((math.pow(k, 2.0) / l), 2.0)) else: tmp = 2.0 * ((math.cos(k) * math.pow((l / k), 2.0)) / (math.pow(k, 2.0) * t)) return tmp
k = abs(k) function code(t, l, k) tmp = 0.0 if (Float64(l * l) <= 1e-209) tmp = Float64(2.0 / Float64(t * (Float64((k ^ 2.0) / l) ^ 2.0))); else tmp = Float64(2.0 * Float64(Float64(cos(k) * (Float64(l / k) ^ 2.0)) / Float64((k ^ 2.0) * t))); end return tmp end
k = abs(k) function tmp_2 = code(t, l, k) tmp = 0.0; if ((l * l) <= 1e-209) tmp = 2.0 / (t * (((k ^ 2.0) / l) ^ 2.0)); else tmp = 2.0 * ((cos(k) * ((l / k) ^ 2.0)) / ((k ^ 2.0) * t)); end tmp_2 = tmp; end
NOTE: k should be positive before calling this function code[t_, l_, k_] := If[LessEqual[N[(l * l), $MachinePrecision], 1e-209], N[(2.0 / N[(t * N[Power[N[(N[Power[k, 2.0], $MachinePrecision] / l), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(2.0 * N[(N[(N[Cos[k], $MachinePrecision] * N[Power[N[(l / k), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision] / N[(N[Power[k, 2.0], $MachinePrecision] * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
k = |k|\\
\\
\begin{array}{l}
\mathbf{if}\;\ell \cdot \ell \leq 10^{-209}:\\
\;\;\;\;\frac{2}{t \cdot {\left(\frac{{k}^{2}}{\ell}\right)}^{2}}\\
\mathbf{else}:\\
\;\;\;\;2 \cdot \frac{\cos k \cdot {\left(\frac{\ell}{k}\right)}^{2}}{{k}^{2} \cdot t}\\
\end{array}
\end{array}
if (*.f64 l l) < 1e-209Initial program 29.8%
Simplified40.0%
associate-*l/40.0%
associate-/r*51.6%
associate-*r*51.6%
*-commutative51.6%
Applied egg-rr51.6%
Taylor expanded in k around 0 69.7%
associate-/l*68.1%
associate-/r/73.0%
Simplified73.0%
expm1-log1p-u43.2%
expm1-udef28.0%
associate-/l*26.7%
Applied egg-rr26.7%
expm1-def39.4%
expm1-log1p69.1%
*-rgt-identity69.1%
associate-*r/69.1%
*-commutative69.1%
associate-*r/68.1%
associate-/l*69.7%
*-commutative69.7%
associate-*r/73.0%
*-commutative73.0%
associate-*l*70.9%
associate-*r/70.9%
*-rgt-identity70.9%
*-rgt-identity70.9%
associate-*r/70.9%
*-commutative70.9%
metadata-eval70.9%
pow-sqr70.8%
associate-*r*77.6%
*-commutative77.6%
associate-*r/77.6%
*-rgt-identity77.6%
associate-*r/80.0%
Simplified80.0%
if 1e-209 < (*.f64 l l) Initial program 38.9%
associate-/r*38.9%
associate-*l/38.9%
associate--l+38.9%
Simplified38.9%
Taylor expanded in t around 0 79.0%
*-commutative79.0%
associate-*r*79.0%
times-frac79.6%
Simplified79.6%
add-sqr-sqrt79.6%
pow279.6%
div-inv79.6%
sqrt-prod79.5%
pow279.5%
sqrt-prod43.6%
add-sqr-sqrt79.5%
pow-flip79.5%
metadata-eval79.5%
Applied egg-rr79.5%
Taylor expanded in k around 0 70.9%
associate-*l/70.9%
un-div-inv70.9%
Applied egg-rr70.9%
Final simplification74.0%
NOTE: k should be positive before calling this function (FPCore (t l k) :precision binary64 (/ 2.0 (/ (* (/ (pow k 2.0) l) (/ (* (pow k 2.0) t) (cos k))) l)))
k = abs(k);
double code(double t, double l, double k) {
return 2.0 / (((pow(k, 2.0) / l) * ((pow(k, 2.0) * t) / cos(k))) / l);
}
NOTE: k should be positive before calling this function
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 / ((((k ** 2.0d0) / l) * (((k ** 2.0d0) * t) / cos(k))) / l)
end function
k = Math.abs(k);
public static double code(double t, double l, double k) {
return 2.0 / (((Math.pow(k, 2.0) / l) * ((Math.pow(k, 2.0) * t) / Math.cos(k))) / l);
}
k = abs(k) def code(t, l, k): return 2.0 / (((math.pow(k, 2.0) / l) * ((math.pow(k, 2.0) * t) / math.cos(k))) / l)
k = abs(k) function code(t, l, k) return Float64(2.0 / Float64(Float64(Float64((k ^ 2.0) / l) * Float64(Float64((k ^ 2.0) * t) / cos(k))) / l)) end
k = abs(k) function tmp = code(t, l, k) tmp = 2.0 / ((((k ^ 2.0) / l) * (((k ^ 2.0) * t) / cos(k))) / l); end
NOTE: k should be positive before calling this function code[t_, l_, k_] := N[(2.0 / N[(N[(N[(N[Power[k, 2.0], $MachinePrecision] / l), $MachinePrecision] * N[(N[(N[Power[k, 2.0], $MachinePrecision] * t), $MachinePrecision] / N[Cos[k], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
k = |k|\\
\\
\frac{2}{\frac{\frac{{k}^{2}}{\ell} \cdot \frac{{k}^{2} \cdot t}{\cos k}}{\ell}}
\end{array}
Initial program 35.8%
Simplified42.9%
associate-*l/42.2%
associate-/r*47.1%
associate-*r*47.1%
*-commutative47.1%
Applied egg-rr47.1%
Taylor expanded in t around 0 81.1%
times-frac86.1%
Simplified86.1%
Taylor expanded in k around 0 73.1%
Final simplification73.1%
NOTE: k should be positive before calling this function (FPCore (t l k) :precision binary64 (if (<= l 7.2e-102) (/ 2.0 (* t (pow (/ (pow k 2.0) l) 2.0))) (* 2.0 (* (/ (cos k) (* (pow k 2.0) t)) (* (/ l k) (/ l k))))))
k = abs(k);
double code(double t, double l, double k) {
double tmp;
if (l <= 7.2e-102) {
tmp = 2.0 / (t * pow((pow(k, 2.0) / l), 2.0));
} else {
tmp = 2.0 * ((cos(k) / (pow(k, 2.0) * t)) * ((l / k) * (l / k)));
}
return tmp;
}
NOTE: k should be positive before calling this function
real(8) function code(t, l, k)
real(8), intent (in) :: t
real(8), intent (in) :: l
real(8), intent (in) :: k
real(8) :: tmp
if (l <= 7.2d-102) then
tmp = 2.0d0 / (t * (((k ** 2.0d0) / l) ** 2.0d0))
else
tmp = 2.0d0 * ((cos(k) / ((k ** 2.0d0) * t)) * ((l / k) * (l / k)))
end if
code = tmp
end function
k = Math.abs(k);
public static double code(double t, double l, double k) {
double tmp;
if (l <= 7.2e-102) {
tmp = 2.0 / (t * Math.pow((Math.pow(k, 2.0) / l), 2.0));
} else {
tmp = 2.0 * ((Math.cos(k) / (Math.pow(k, 2.0) * t)) * ((l / k) * (l / k)));
}
return tmp;
}
k = abs(k) def code(t, l, k): tmp = 0 if l <= 7.2e-102: tmp = 2.0 / (t * math.pow((math.pow(k, 2.0) / l), 2.0)) else: tmp = 2.0 * ((math.cos(k) / (math.pow(k, 2.0) * t)) * ((l / k) * (l / k))) return tmp
k = abs(k) function code(t, l, k) tmp = 0.0 if (l <= 7.2e-102) tmp = Float64(2.0 / Float64(t * (Float64((k ^ 2.0) / l) ^ 2.0))); else tmp = Float64(2.0 * Float64(Float64(cos(k) / Float64((k ^ 2.0) * t)) * Float64(Float64(l / k) * Float64(l / k)))); end return tmp end
k = abs(k) function tmp_2 = code(t, l, k) tmp = 0.0; if (l <= 7.2e-102) tmp = 2.0 / (t * (((k ^ 2.0) / l) ^ 2.0)); else tmp = 2.0 * ((cos(k) / ((k ^ 2.0) * t)) * ((l / k) * (l / k))); end tmp_2 = tmp; end
NOTE: k should be positive before calling this function code[t_, l_, k_] := If[LessEqual[l, 7.2e-102], N[(2.0 / N[(t * N[Power[N[(N[Power[k, 2.0], $MachinePrecision] / l), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(2.0 * N[(N[(N[Cos[k], $MachinePrecision] / N[(N[Power[k, 2.0], $MachinePrecision] * t), $MachinePrecision]), $MachinePrecision] * N[(N[(l / k), $MachinePrecision] * N[(l / k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
k = |k|\\
\\
\begin{array}{l}
\mathbf{if}\;\ell \leq 7.2 \cdot 10^{-102}:\\
\;\;\;\;\frac{2}{t \cdot {\left(\frac{{k}^{2}}{\ell}\right)}^{2}}\\
\mathbf{else}:\\
\;\;\;\;2 \cdot \left(\frac{\cos k}{{k}^{2} \cdot t} \cdot \left(\frac{\ell}{k} \cdot \frac{\ell}{k}\right)\right)\\
\end{array}
\end{array}
if l < 7.2e-102Initial program 34.2%
Simplified42.0%
associate-*l/41.5%
associate-/r*48.8%
associate-*r*48.8%
*-commutative48.8%
Applied egg-rr48.8%
Taylor expanded in k around 0 68.5%
associate-/l*67.6%
associate-/r/69.7%
Simplified69.7%
expm1-log1p-u49.7%
expm1-udef25.1%
associate-/l*24.4%
Applied egg-rr24.4%
expm1-def47.7%
expm1-log1p67.6%
*-rgt-identity67.6%
associate-*r/67.6%
*-commutative67.6%
associate-*r/67.6%
associate-/l*68.5%
*-commutative68.5%
associate-*r/69.7%
*-commutative69.7%
associate-*l*68.0%
associate-*r/68.1%
*-rgt-identity68.1%
*-rgt-identity68.1%
associate-*r/68.0%
*-commutative68.0%
metadata-eval68.0%
pow-sqr68.0%
associate-*r*72.7%
*-commutative72.7%
associate-*r/72.7%
*-rgt-identity72.7%
associate-*r/74.8%
Simplified74.8%
if 7.2e-102 < l Initial program 38.8%
associate-/r*38.7%
associate-*l/38.7%
associate--l+38.7%
Simplified38.7%
Taylor expanded in t around 0 83.3%
*-commutative83.3%
associate-*r*83.3%
times-frac83.4%
Simplified83.4%
add-sqr-sqrt83.3%
pow283.3%
div-inv83.3%
sqrt-prod83.3%
pow283.3%
sqrt-prod83.2%
add-sqr-sqrt83.3%
pow-flip83.2%
metadata-eval83.2%
Applied egg-rr83.2%
Taylor expanded in k around 0 69.8%
unpow269.8%
un-div-inv69.8%
un-div-inv69.8%
Applied egg-rr69.8%
Final simplification73.0%
NOTE: k should be positive before calling this function (FPCore (t l k) :precision binary64 (/ 2.0 (* t (pow (/ (pow k 2.0) l) 2.0))))
k = abs(k);
double code(double t, double l, double k) {
return 2.0 / (t * pow((pow(k, 2.0) / l), 2.0));
}
NOTE: k should be positive before calling this function
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 * (((k ** 2.0d0) / l) ** 2.0d0))
end function
k = Math.abs(k);
public static double code(double t, double l, double k) {
return 2.0 / (t * Math.pow((Math.pow(k, 2.0) / l), 2.0));
}
k = abs(k) def code(t, l, k): return 2.0 / (t * math.pow((math.pow(k, 2.0) / l), 2.0))
k = abs(k) function code(t, l, k) return Float64(2.0 / Float64(t * (Float64((k ^ 2.0) / l) ^ 2.0))) end
k = abs(k) function tmp = code(t, l, k) tmp = 2.0 / (t * (((k ^ 2.0) / l) ^ 2.0)); end
NOTE: k should be positive before calling this function code[t_, l_, k_] := N[(2.0 / N[(t * N[Power[N[(N[Power[k, 2.0], $MachinePrecision] / l), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
k = |k|\\
\\
\frac{2}{t \cdot {\left(\frac{{k}^{2}}{\ell}\right)}^{2}}
\end{array}
Initial program 35.8%
Simplified42.9%
associate-*l/42.2%
associate-/r*47.1%
associate-*r*47.1%
*-commutative47.1%
Applied egg-rr47.1%
Taylor expanded in k around 0 67.8%
associate-/l*67.2%
associate-/r/68.6%
Simplified68.6%
expm1-log1p-u54.6%
expm1-udef27.3%
associate-/l*26.8%
Applied egg-rr26.8%
expm1-def53.2%
expm1-log1p67.3%
*-rgt-identity67.3%
associate-*r/67.2%
*-commutative67.2%
associate-*r/67.2%
associate-/l*67.8%
*-commutative67.8%
associate-*r/68.6%
*-commutative68.6%
associate-*l*67.4%
associate-*r/67.4%
*-rgt-identity67.4%
*-rgt-identity67.4%
associate-*r/67.4%
*-commutative67.4%
metadata-eval67.4%
pow-sqr67.3%
associate-*r*70.4%
*-commutative70.4%
associate-*r/70.4%
*-rgt-identity70.4%
associate-*r/71.8%
Simplified71.8%
Final simplification71.8%
NOTE: k should be positive before calling this function (FPCore (t l k) :precision binary64 (* l (/ 2.0 (* t (/ (pow k 4.0) l)))))
k = abs(k);
double code(double t, double l, double k) {
return l * (2.0 / (t * (pow(k, 4.0) / l)));
}
NOTE: k should be positive before calling this function
real(8) function code(t, l, k)
real(8), intent (in) :: t
real(8), intent (in) :: l
real(8), intent (in) :: k
code = l * (2.0d0 / (t * ((k ** 4.0d0) / l)))
end function
k = Math.abs(k);
public static double code(double t, double l, double k) {
return l * (2.0 / (t * (Math.pow(k, 4.0) / l)));
}
k = abs(k) def code(t, l, k): return l * (2.0 / (t * (math.pow(k, 4.0) / l)))
k = abs(k) function code(t, l, k) return Float64(l * Float64(2.0 / Float64(t * Float64((k ^ 4.0) / l)))) end
k = abs(k) function tmp = code(t, l, k) tmp = l * (2.0 / (t * ((k ^ 4.0) / l))); end
NOTE: k should be positive before calling this function code[t_, l_, k_] := N[(l * N[(2.0 / N[(t * N[(N[Power[k, 4.0], $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
k = |k|\\
\\
\ell \cdot \frac{2}{t \cdot \frac{{k}^{4}}{\ell}}
\end{array}
Initial program 35.8%
Simplified42.9%
associate-*l/42.2%
associate-/r*47.1%
associate-*r*47.1%
*-commutative47.1%
Applied egg-rr47.1%
Taylor expanded in k around 0 67.8%
associate-/l*67.2%
associate-/r/68.6%
Simplified68.6%
associate-/r/68.6%
*-commutative68.6%
Applied egg-rr68.6%
Final simplification68.6%
NOTE: k should be positive before calling this function (FPCore (t l k) :precision binary64 (/ 2.0 (/ (* t (/ (pow k 4.0) l)) l)))
k = abs(k);
double code(double t, double l, double k) {
return 2.0 / ((t * (pow(k, 4.0) / l)) / l);
}
NOTE: k should be positive before calling this function
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 * ((k ** 4.0d0) / l)) / l)
end function
k = Math.abs(k);
public static double code(double t, double l, double k) {
return 2.0 / ((t * (Math.pow(k, 4.0) / l)) / l);
}
k = abs(k) def code(t, l, k): return 2.0 / ((t * (math.pow(k, 4.0) / l)) / l)
k = abs(k) function code(t, l, k) return Float64(2.0 / Float64(Float64(t * Float64((k ^ 4.0) / l)) / l)) end
k = abs(k) function tmp = code(t, l, k) tmp = 2.0 / ((t * ((k ^ 4.0) / l)) / l); end
NOTE: k should be positive before calling this function code[t_, l_, k_] := N[(2.0 / N[(N[(t * N[(N[Power[k, 4.0], $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
k = |k|\\
\\
\frac{2}{\frac{t \cdot \frac{{k}^{4}}{\ell}}{\ell}}
\end{array}
Initial program 35.8%
Simplified42.9%
associate-*l/42.2%
associate-/r*47.1%
associate-*r*47.1%
*-commutative47.1%
Applied egg-rr47.1%
Taylor expanded in k around 0 67.8%
associate-/l*67.2%
associate-/r/68.6%
Simplified68.6%
Final simplification68.6%
NOTE: k should be positive before calling this function (FPCore (t l k) :precision binary64 (* (/ (pow (/ l k) 2.0) t) -0.3333333333333333))
k = abs(k);
double code(double t, double l, double k) {
return (pow((l / k), 2.0) / t) * -0.3333333333333333;
}
NOTE: k should be positive before calling this function
real(8) function code(t, l, k)
real(8), intent (in) :: t
real(8), intent (in) :: l
real(8), intent (in) :: k
code = (((l / k) ** 2.0d0) / t) * (-0.3333333333333333d0)
end function
k = Math.abs(k);
public static double code(double t, double l, double k) {
return (Math.pow((l / k), 2.0) / t) * -0.3333333333333333;
}
k = abs(k) def code(t, l, k): return (math.pow((l / k), 2.0) / t) * -0.3333333333333333
k = abs(k) function code(t, l, k) return Float64(Float64((Float64(l / k) ^ 2.0) / t) * -0.3333333333333333) end
k = abs(k) function tmp = code(t, l, k) tmp = (((l / k) ^ 2.0) / t) * -0.3333333333333333; end
NOTE: k should be positive before calling this function code[t_, l_, k_] := N[(N[(N[Power[N[(l / k), $MachinePrecision], 2.0], $MachinePrecision] / t), $MachinePrecision] * -0.3333333333333333), $MachinePrecision]
\begin{array}{l}
k = |k|\\
\\
\frac{{\left(\frac{\ell}{k}\right)}^{2}}{t} \cdot -0.3333333333333333
\end{array}
Initial program 35.8%
associate-/r*35.8%
associate-*l/35.7%
associate--l+35.7%
Simplified35.7%
Taylor expanded in k around 0 31.0%
Taylor expanded in k around inf 25.4%
add-cube-cbrt25.4%
pow325.4%
Applied egg-rr25.4%
rem-cube-cbrt25.4%
expm1-log1p-u24.9%
expm1-udef24.6%
Applied egg-rr24.6%
expm1-def24.9%
expm1-log1p25.4%
associate-/r*25.4%
unpow225.4%
unpow225.4%
times-frac26.7%
unpow226.7%
Simplified26.7%
Final simplification26.7%
herbie shell --seed 2023313
(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))))