
(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 21 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}
l_m = (fabs.f64 l)
t_m = (fabs.f64 t)
t_s = (copysign.f64 1 t)
(FPCore (t_s t_m l_m k)
:precision binary64
(*
t_s
(if (<= t_m 4e-15)
(/
2.0
(/
(* (pow (/ k (sqrt l_m)) 2.0) (/ (* t_m (pow (sin k) 2.0)) (cos k)))
l_m))
(/
2.0
(pow
(*
(* (cbrt (sin k)) (* t_m (pow (cbrt l_m) -2.0)))
(cbrt (* (tan k) (+ 2.0 (pow (/ k t_m) 2.0)))))
3.0)))))l_m = fabs(l);
t_m = fabs(t);
t_s = copysign(1.0, t);
double code(double t_s, double t_m, double l_m, double k) {
double tmp;
if (t_m <= 4e-15) {
tmp = 2.0 / ((pow((k / sqrt(l_m)), 2.0) * ((t_m * pow(sin(k), 2.0)) / cos(k))) / l_m);
} else {
tmp = 2.0 / pow(((cbrt(sin(k)) * (t_m * pow(cbrt(l_m), -2.0))) * cbrt((tan(k) * (2.0 + pow((k / t_m), 2.0))))), 3.0);
}
return t_s * tmp;
}
l_m = Math.abs(l);
t_m = Math.abs(t);
t_s = Math.copySign(1.0, t);
public static double code(double t_s, double t_m, double l_m, double k) {
double tmp;
if (t_m <= 4e-15) {
tmp = 2.0 / ((Math.pow((k / Math.sqrt(l_m)), 2.0) * ((t_m * Math.pow(Math.sin(k), 2.0)) / Math.cos(k))) / l_m);
} else {
tmp = 2.0 / Math.pow(((Math.cbrt(Math.sin(k)) * (t_m * Math.pow(Math.cbrt(l_m), -2.0))) * Math.cbrt((Math.tan(k) * (2.0 + Math.pow((k / t_m), 2.0))))), 3.0);
}
return t_s * tmp;
}
l_m = abs(l) t_m = abs(t) t_s = copysign(1.0, t) function code(t_s, t_m, l_m, k) tmp = 0.0 if (t_m <= 4e-15) tmp = Float64(2.0 / Float64(Float64((Float64(k / sqrt(l_m)) ^ 2.0) * Float64(Float64(t_m * (sin(k) ^ 2.0)) / cos(k))) / l_m)); else tmp = Float64(2.0 / (Float64(Float64(cbrt(sin(k)) * Float64(t_m * (cbrt(l_m) ^ -2.0))) * cbrt(Float64(tan(k) * Float64(2.0 + (Float64(k / t_m) ^ 2.0))))) ^ 3.0)); end return Float64(t_s * tmp) end
l_m = N[Abs[l], $MachinePrecision]
t_m = N[Abs[t], $MachinePrecision]
t_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[t]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[t$95$s_, t$95$m_, l$95$m_, k_] := N[(t$95$s * If[LessEqual[t$95$m, 4e-15], N[(2.0 / N[(N[(N[Power[N[(k / N[Sqrt[l$95$m], $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision] * N[(N[(t$95$m * N[Power[N[Sin[k], $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision] / N[Cos[k], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / l$95$m), $MachinePrecision]), $MachinePrecision], N[(2.0 / N[Power[N[(N[(N[Power[N[Sin[k], $MachinePrecision], 1/3], $MachinePrecision] * N[(t$95$m * N[Power[N[Power[l$95$m, 1/3], $MachinePrecision], -2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[Power[N[(N[Tan[k], $MachinePrecision] * N[(2.0 + N[Power[N[(k / t$95$m), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 1/3], $MachinePrecision]), $MachinePrecision], 3.0], $MachinePrecision]), $MachinePrecision]]), $MachinePrecision]
\begin{array}{l}
l_m = \left|\ell\right|
\\
t_m = \left|t\right|
\\
t_s = \mathsf{copysign}\left(1, t\right)
\\
t\_s \cdot \begin{array}{l}
\mathbf{if}\;t\_m \leq 4 \cdot 10^{-15}:\\
\;\;\;\;\frac{2}{\frac{{\left(\frac{k}{\sqrt{l\_m}}\right)}^{2} \cdot \frac{t\_m \cdot {\sin k}^{2}}{\cos k}}{l\_m}}\\
\mathbf{else}:\\
\;\;\;\;\frac{2}{{\left(\left(\sqrt[3]{\sin k} \cdot \left(t\_m \cdot {\left(\sqrt[3]{l\_m}\right)}^{-2}\right)\right) \cdot \sqrt[3]{\tan k \cdot \left(2 + {\left(\frac{k}{t\_m}\right)}^{2}\right)}\right)}^{3}}\\
\end{array}
\end{array}
if t < 4.0000000000000003e-15Initial program 45.4%
associate-*l*45.4%
sqr-neg45.4%
sqr-neg45.4%
associate-/r*47.9%
distribute-rgt-in47.9%
unpow247.9%
times-frac33.0%
sqr-neg33.0%
times-frac47.9%
unpow247.9%
distribute-rgt-in47.9%
Simplified47.9%
associate-*l*45.6%
associate-*l/48.2%
associate-*r*48.2%
Applied egg-rr48.2%
Taylor expanded in t around 0 67.3%
times-frac68.5%
Simplified68.5%
add-sqr-sqrt32.1%
sqrt-div32.1%
unpow232.1%
sqrt-prod15.4%
add-sqr-sqrt21.7%
sqrt-div21.7%
unpow221.7%
sqrt-prod17.0%
add-sqr-sqrt33.7%
Applied egg-rr33.7%
unpow233.7%
Simplified33.7%
if 4.0000000000000003e-15 < t Initial program 67.7%
associate-*l*67.7%
sqr-neg67.7%
sqr-neg67.7%
associate-/r*68.6%
distribute-rgt-in68.6%
unpow268.6%
times-frac56.5%
sqr-neg56.5%
times-frac68.6%
unpow268.6%
distribute-rgt-in68.6%
Simplified68.6%
add-cube-cbrt68.4%
pow368.4%
*-commutative68.4%
cbrt-prod68.4%
associate-/l/67.5%
cbrt-div67.5%
rem-cbrt-cube74.7%
cbrt-unprod93.6%
pow293.6%
Applied egg-rr93.6%
add-cube-cbrt93.2%
pow393.3%
div-inv93.3%
pow-flip93.3%
metadata-eval93.3%
Applied egg-rr93.3%
add-cube-cbrt93.4%
pow393.4%
cbrt-prod93.1%
rem-cbrt-cube96.9%
unpow396.9%
add-cube-cbrt97.1%
Applied egg-rr97.1%
Final simplification52.0%
l_m = (fabs.f64 l)
t_m = (fabs.f64 t)
t_s = (copysign.f64 1 t)
(FPCore (t_s t_m l_m k)
:precision binary64
(let* ((t_2 (pow (* (pow t_m 0.75) (sqrt k)) -1.0)))
(*
t_s
(if (<= t_m 2.8e-15)
(/
2.0
(/
(* (pow (/ k (sqrt l_m)) 2.0) (/ (* t_m (pow (sin k) 2.0)) (cos k)))
l_m))
(if (<= t_m 3.5e+101)
(/
2.0
(*
(* (tan k) (+ 2.0 (pow (/ k t_m) 2.0)))
(/ (* (sin k) (/ (pow t_m 3.0) l_m)) l_m)))
(pow (* l_m (* t_2 t_2)) 2.0))))))l_m = fabs(l);
t_m = fabs(t);
t_s = copysign(1.0, t);
double code(double t_s, double t_m, double l_m, double k) {
double t_2 = pow((pow(t_m, 0.75) * sqrt(k)), -1.0);
double tmp;
if (t_m <= 2.8e-15) {
tmp = 2.0 / ((pow((k / sqrt(l_m)), 2.0) * ((t_m * pow(sin(k), 2.0)) / cos(k))) / l_m);
} else if (t_m <= 3.5e+101) {
tmp = 2.0 / ((tan(k) * (2.0 + pow((k / t_m), 2.0))) * ((sin(k) * (pow(t_m, 3.0) / l_m)) / l_m));
} else {
tmp = pow((l_m * (t_2 * t_2)), 2.0);
}
return t_s * tmp;
}
l_m = abs(l)
t_m = abs(t)
t_s = copysign(1.0d0, t)
real(8) function code(t_s, t_m, l_m, k)
real(8), intent (in) :: t_s
real(8), intent (in) :: t_m
real(8), intent (in) :: l_m
real(8), intent (in) :: k
real(8) :: t_2
real(8) :: tmp
t_2 = ((t_m ** 0.75d0) * sqrt(k)) ** (-1.0d0)
if (t_m <= 2.8d-15) then
tmp = 2.0d0 / ((((k / sqrt(l_m)) ** 2.0d0) * ((t_m * (sin(k) ** 2.0d0)) / cos(k))) / l_m)
else if (t_m <= 3.5d+101) then
tmp = 2.0d0 / ((tan(k) * (2.0d0 + ((k / t_m) ** 2.0d0))) * ((sin(k) * ((t_m ** 3.0d0) / l_m)) / l_m))
else
tmp = (l_m * (t_2 * t_2)) ** 2.0d0
end if
code = t_s * tmp
end function
l_m = Math.abs(l);
t_m = Math.abs(t);
t_s = Math.copySign(1.0, t);
public static double code(double t_s, double t_m, double l_m, double k) {
double t_2 = Math.pow((Math.pow(t_m, 0.75) * Math.sqrt(k)), -1.0);
double tmp;
if (t_m <= 2.8e-15) {
tmp = 2.0 / ((Math.pow((k / Math.sqrt(l_m)), 2.0) * ((t_m * Math.pow(Math.sin(k), 2.0)) / Math.cos(k))) / l_m);
} else if (t_m <= 3.5e+101) {
tmp = 2.0 / ((Math.tan(k) * (2.0 + Math.pow((k / t_m), 2.0))) * ((Math.sin(k) * (Math.pow(t_m, 3.0) / l_m)) / l_m));
} else {
tmp = Math.pow((l_m * (t_2 * t_2)), 2.0);
}
return t_s * tmp;
}
l_m = math.fabs(l) t_m = math.fabs(t) t_s = math.copysign(1.0, t) def code(t_s, t_m, l_m, k): t_2 = math.pow((math.pow(t_m, 0.75) * math.sqrt(k)), -1.0) tmp = 0 if t_m <= 2.8e-15: tmp = 2.0 / ((math.pow((k / math.sqrt(l_m)), 2.0) * ((t_m * math.pow(math.sin(k), 2.0)) / math.cos(k))) / l_m) elif t_m <= 3.5e+101: tmp = 2.0 / ((math.tan(k) * (2.0 + math.pow((k / t_m), 2.0))) * ((math.sin(k) * (math.pow(t_m, 3.0) / l_m)) / l_m)) else: tmp = math.pow((l_m * (t_2 * t_2)), 2.0) return t_s * tmp
l_m = abs(l) t_m = abs(t) t_s = copysign(1.0, t) function code(t_s, t_m, l_m, k) t_2 = Float64((t_m ^ 0.75) * sqrt(k)) ^ -1.0 tmp = 0.0 if (t_m <= 2.8e-15) tmp = Float64(2.0 / Float64(Float64((Float64(k / sqrt(l_m)) ^ 2.0) * Float64(Float64(t_m * (sin(k) ^ 2.0)) / cos(k))) / l_m)); elseif (t_m <= 3.5e+101) tmp = Float64(2.0 / Float64(Float64(tan(k) * Float64(2.0 + (Float64(k / t_m) ^ 2.0))) * Float64(Float64(sin(k) * Float64((t_m ^ 3.0) / l_m)) / l_m))); else tmp = Float64(l_m * Float64(t_2 * t_2)) ^ 2.0; end return Float64(t_s * tmp) end
l_m = abs(l); t_m = abs(t); t_s = sign(t) * abs(1.0); function tmp_2 = code(t_s, t_m, l_m, k) t_2 = ((t_m ^ 0.75) * sqrt(k)) ^ -1.0; tmp = 0.0; if (t_m <= 2.8e-15) tmp = 2.0 / ((((k / sqrt(l_m)) ^ 2.0) * ((t_m * (sin(k) ^ 2.0)) / cos(k))) / l_m); elseif (t_m <= 3.5e+101) tmp = 2.0 / ((tan(k) * (2.0 + ((k / t_m) ^ 2.0))) * ((sin(k) * ((t_m ^ 3.0) / l_m)) / l_m)); else tmp = (l_m * (t_2 * t_2)) ^ 2.0; end tmp_2 = t_s * tmp; end
l_m = N[Abs[l], $MachinePrecision]
t_m = N[Abs[t], $MachinePrecision]
t_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[t]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[t$95$s_, t$95$m_, l$95$m_, k_] := Block[{t$95$2 = N[Power[N[(N[Power[t$95$m, 0.75], $MachinePrecision] * N[Sqrt[k], $MachinePrecision]), $MachinePrecision], -1.0], $MachinePrecision]}, N[(t$95$s * If[LessEqual[t$95$m, 2.8e-15], N[(2.0 / N[(N[(N[Power[N[(k / N[Sqrt[l$95$m], $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision] * N[(N[(t$95$m * N[Power[N[Sin[k], $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision] / N[Cos[k], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / l$95$m), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$m, 3.5e+101], N[(2.0 / N[(N[(N[Tan[k], $MachinePrecision] * N[(2.0 + N[Power[N[(k / t$95$m), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(N[(N[Sin[k], $MachinePrecision] * N[(N[Power[t$95$m, 3.0], $MachinePrecision] / l$95$m), $MachinePrecision]), $MachinePrecision] / l$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[Power[N[(l$95$m * N[(t$95$2 * t$95$2), $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision]]]), $MachinePrecision]]
\begin{array}{l}
l_m = \left|\ell\right|
\\
t_m = \left|t\right|
\\
t_s = \mathsf{copysign}\left(1, t\right)
\\
\begin{array}{l}
t_2 := {\left({t\_m}^{0.75} \cdot \sqrt{k}\right)}^{-1}\\
t\_s \cdot \begin{array}{l}
\mathbf{if}\;t\_m \leq 2.8 \cdot 10^{-15}:\\
\;\;\;\;\frac{2}{\frac{{\left(\frac{k}{\sqrt{l\_m}}\right)}^{2} \cdot \frac{t\_m \cdot {\sin k}^{2}}{\cos k}}{l\_m}}\\
\mathbf{elif}\;t\_m \leq 3.5 \cdot 10^{+101}:\\
\;\;\;\;\frac{2}{\left(\tan k \cdot \left(2 + {\left(\frac{k}{t\_m}\right)}^{2}\right)\right) \cdot \frac{\sin k \cdot \frac{{t\_m}^{3}}{l\_m}}{l\_m}}\\
\mathbf{else}:\\
\;\;\;\;{\left(l\_m \cdot \left(t\_2 \cdot t\_2\right)\right)}^{2}\\
\end{array}
\end{array}
\end{array}
if t < 2.80000000000000014e-15Initial program 45.4%
associate-*l*45.4%
sqr-neg45.4%
sqr-neg45.4%
associate-/r*47.9%
distribute-rgt-in47.9%
unpow247.9%
times-frac33.0%
sqr-neg33.0%
times-frac47.9%
unpow247.9%
distribute-rgt-in47.9%
Simplified47.9%
associate-*l*45.6%
associate-*l/48.2%
associate-*r*48.2%
Applied egg-rr48.2%
Taylor expanded in t around 0 67.3%
times-frac68.5%
Simplified68.5%
add-sqr-sqrt32.1%
sqrt-div32.1%
unpow232.1%
sqrt-prod15.4%
add-sqr-sqrt21.7%
sqrt-div21.7%
unpow221.7%
sqrt-prod17.0%
add-sqr-sqrt33.7%
Applied egg-rr33.7%
unpow233.7%
Simplified33.7%
if 2.80000000000000014e-15 < t < 3.50000000000000023e101Initial program 95.7%
associate-*l*95.7%
sqr-neg95.7%
sqr-neg95.7%
associate-/r*95.7%
distribute-rgt-in95.7%
unpow295.7%
times-frac88.6%
sqr-neg88.6%
times-frac95.7%
unpow295.7%
distribute-rgt-in95.7%
Simplified95.7%
associate-*l/95.7%
Applied egg-rr95.7%
if 3.50000000000000023e101 < t Initial program 52.6%
associate-/r*52.6%
sqr-neg52.6%
associate-*l*46.0%
sqr-neg46.0%
associate-/r*47.2%
associate-+l+47.2%
unpow247.2%
times-frac32.4%
sqr-neg32.4%
times-frac47.2%
unpow247.2%
Simplified47.2%
Taylor expanded in k around 0 46.0%
expm1-log1p-u46.0%
expm1-udef46.0%
Applied egg-rr65.6%
expm1-def75.5%
expm1-log1p76.0%
Simplified76.0%
div-inv76.1%
Applied egg-rr76.1%
inv-pow76.1%
add-sqr-sqrt31.5%
unpow-prod-down31.5%
*-commutative31.5%
sqrt-prod31.5%
sqrt-pow131.5%
metadata-eval31.5%
*-commutative31.5%
sqrt-prod31.5%
sqrt-pow134.6%
metadata-eval34.6%
Applied egg-rr34.6%
Final simplification40.1%
l_m = (fabs.f64 l)
t_m = (fabs.f64 t)
t_s = (copysign.f64 1 t)
(FPCore (t_s t_m l_m k)
:precision binary64
(*
t_s
(if (<= t_m 4.8e-15)
(/
2.0
(/
(* (pow (/ k (sqrt l_m)) 2.0) (/ (* t_m (pow (sin k) 2.0)) (cos k)))
l_m))
(/
2.0
(*
(* (tan k) (+ 2.0 (pow (/ k t_m) 2.0)))
(pow (* (cbrt (sin k)) (/ t_m (pow (cbrt l_m) 2.0))) 3.0))))))l_m = fabs(l);
t_m = fabs(t);
t_s = copysign(1.0, t);
double code(double t_s, double t_m, double l_m, double k) {
double tmp;
if (t_m <= 4.8e-15) {
tmp = 2.0 / ((pow((k / sqrt(l_m)), 2.0) * ((t_m * pow(sin(k), 2.0)) / cos(k))) / l_m);
} else {
tmp = 2.0 / ((tan(k) * (2.0 + pow((k / t_m), 2.0))) * pow((cbrt(sin(k)) * (t_m / pow(cbrt(l_m), 2.0))), 3.0));
}
return t_s * tmp;
}
l_m = Math.abs(l);
t_m = Math.abs(t);
t_s = Math.copySign(1.0, t);
public static double code(double t_s, double t_m, double l_m, double k) {
double tmp;
if (t_m <= 4.8e-15) {
tmp = 2.0 / ((Math.pow((k / Math.sqrt(l_m)), 2.0) * ((t_m * Math.pow(Math.sin(k), 2.0)) / Math.cos(k))) / l_m);
} else {
tmp = 2.0 / ((Math.tan(k) * (2.0 + Math.pow((k / t_m), 2.0))) * Math.pow((Math.cbrt(Math.sin(k)) * (t_m / Math.pow(Math.cbrt(l_m), 2.0))), 3.0));
}
return t_s * tmp;
}
l_m = abs(l) t_m = abs(t) t_s = copysign(1.0, t) function code(t_s, t_m, l_m, k) tmp = 0.0 if (t_m <= 4.8e-15) tmp = Float64(2.0 / Float64(Float64((Float64(k / sqrt(l_m)) ^ 2.0) * Float64(Float64(t_m * (sin(k) ^ 2.0)) / cos(k))) / l_m)); else tmp = Float64(2.0 / Float64(Float64(tan(k) * Float64(2.0 + (Float64(k / t_m) ^ 2.0))) * (Float64(cbrt(sin(k)) * Float64(t_m / (cbrt(l_m) ^ 2.0))) ^ 3.0))); end return Float64(t_s * tmp) end
l_m = N[Abs[l], $MachinePrecision]
t_m = N[Abs[t], $MachinePrecision]
t_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[t]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[t$95$s_, t$95$m_, l$95$m_, k_] := N[(t$95$s * If[LessEqual[t$95$m, 4.8e-15], N[(2.0 / N[(N[(N[Power[N[(k / N[Sqrt[l$95$m], $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision] * N[(N[(t$95$m * N[Power[N[Sin[k], $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision] / N[Cos[k], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / l$95$m), $MachinePrecision]), $MachinePrecision], N[(2.0 / N[(N[(N[Tan[k], $MachinePrecision] * N[(2.0 + N[Power[N[(k / t$95$m), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[Power[N[(N[Power[N[Sin[k], $MachinePrecision], 1/3], $MachinePrecision] * N[(t$95$m / N[Power[N[Power[l$95$m, 1/3], $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 3.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]), $MachinePrecision]
\begin{array}{l}
l_m = \left|\ell\right|
\\
t_m = \left|t\right|
\\
t_s = \mathsf{copysign}\left(1, t\right)
\\
t\_s \cdot \begin{array}{l}
\mathbf{if}\;t\_m \leq 4.8 \cdot 10^{-15}:\\
\;\;\;\;\frac{2}{\frac{{\left(\frac{k}{\sqrt{l\_m}}\right)}^{2} \cdot \frac{t\_m \cdot {\sin k}^{2}}{\cos k}}{l\_m}}\\
\mathbf{else}:\\
\;\;\;\;\frac{2}{\left(\tan k \cdot \left(2 + {\left(\frac{k}{t\_m}\right)}^{2}\right)\right) \cdot {\left(\sqrt[3]{\sin k} \cdot \frac{t\_m}{{\left(\sqrt[3]{l\_m}\right)}^{2}}\right)}^{3}}\\
\end{array}
\end{array}
if t < 4.7999999999999999e-15Initial program 45.4%
associate-*l*45.4%
sqr-neg45.4%
sqr-neg45.4%
associate-/r*47.9%
distribute-rgt-in47.9%
unpow247.9%
times-frac33.0%
sqr-neg33.0%
times-frac47.9%
unpow247.9%
distribute-rgt-in47.9%
Simplified47.9%
associate-*l*45.6%
associate-*l/48.2%
associate-*r*48.2%
Applied egg-rr48.2%
Taylor expanded in t around 0 67.3%
times-frac68.5%
Simplified68.5%
add-sqr-sqrt32.1%
sqrt-div32.1%
unpow232.1%
sqrt-prod15.4%
add-sqr-sqrt21.7%
sqrt-div21.7%
unpow221.7%
sqrt-prod17.0%
add-sqr-sqrt33.7%
Applied egg-rr33.7%
unpow233.7%
Simplified33.7%
if 4.7999999999999999e-15 < t Initial program 67.7%
associate-*l*67.7%
sqr-neg67.7%
sqr-neg67.7%
associate-/r*68.6%
distribute-rgt-in68.6%
unpow268.6%
times-frac56.5%
sqr-neg56.5%
times-frac68.6%
unpow268.6%
distribute-rgt-in68.6%
Simplified68.6%
add-cube-cbrt68.4%
pow368.4%
*-commutative68.4%
cbrt-prod68.4%
associate-/l/67.5%
cbrt-div67.5%
rem-cbrt-cube74.7%
cbrt-unprod93.6%
pow293.6%
Applied egg-rr93.6%
Final simplification51.0%
l_m = (fabs.f64 l)
t_m = (fabs.f64 t)
t_s = (copysign.f64 1 t)
(FPCore (t_s t_m l_m k)
:precision binary64
(*
t_s
(if (<= t_m 1.55e-15)
(/
2.0
(/
(* (pow (/ k (sqrt l_m)) 2.0) (/ (* t_m (pow (sin k) 2.0)) (cos k)))
l_m))
(/
2.0
(*
(* (tan k) (+ 2.0 (pow (/ k t_m) 2.0)))
(pow (/ (cbrt (sin k)) (/ (pow (cbrt l_m) 2.0) t_m)) 3.0))))))l_m = fabs(l);
t_m = fabs(t);
t_s = copysign(1.0, t);
double code(double t_s, double t_m, double l_m, double k) {
double tmp;
if (t_m <= 1.55e-15) {
tmp = 2.0 / ((pow((k / sqrt(l_m)), 2.0) * ((t_m * pow(sin(k), 2.0)) / cos(k))) / l_m);
} else {
tmp = 2.0 / ((tan(k) * (2.0 + pow((k / t_m), 2.0))) * pow((cbrt(sin(k)) / (pow(cbrt(l_m), 2.0) / t_m)), 3.0));
}
return t_s * tmp;
}
l_m = Math.abs(l);
t_m = Math.abs(t);
t_s = Math.copySign(1.0, t);
public static double code(double t_s, double t_m, double l_m, double k) {
double tmp;
if (t_m <= 1.55e-15) {
tmp = 2.0 / ((Math.pow((k / Math.sqrt(l_m)), 2.0) * ((t_m * Math.pow(Math.sin(k), 2.0)) / Math.cos(k))) / l_m);
} else {
tmp = 2.0 / ((Math.tan(k) * (2.0 + Math.pow((k / t_m), 2.0))) * Math.pow((Math.cbrt(Math.sin(k)) / (Math.pow(Math.cbrt(l_m), 2.0) / t_m)), 3.0));
}
return t_s * tmp;
}
l_m = abs(l) t_m = abs(t) t_s = copysign(1.0, t) function code(t_s, t_m, l_m, k) tmp = 0.0 if (t_m <= 1.55e-15) tmp = Float64(2.0 / Float64(Float64((Float64(k / sqrt(l_m)) ^ 2.0) * Float64(Float64(t_m * (sin(k) ^ 2.0)) / cos(k))) / l_m)); else tmp = Float64(2.0 / Float64(Float64(tan(k) * Float64(2.0 + (Float64(k / t_m) ^ 2.0))) * (Float64(cbrt(sin(k)) / Float64((cbrt(l_m) ^ 2.0) / t_m)) ^ 3.0))); end return Float64(t_s * tmp) end
l_m = N[Abs[l], $MachinePrecision]
t_m = N[Abs[t], $MachinePrecision]
t_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[t]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[t$95$s_, t$95$m_, l$95$m_, k_] := N[(t$95$s * If[LessEqual[t$95$m, 1.55e-15], N[(2.0 / N[(N[(N[Power[N[(k / N[Sqrt[l$95$m], $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision] * N[(N[(t$95$m * N[Power[N[Sin[k], $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision] / N[Cos[k], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / l$95$m), $MachinePrecision]), $MachinePrecision], N[(2.0 / N[(N[(N[Tan[k], $MachinePrecision] * N[(2.0 + N[Power[N[(k / t$95$m), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[Power[N[(N[Power[N[Sin[k], $MachinePrecision], 1/3], $MachinePrecision] / N[(N[Power[N[Power[l$95$m, 1/3], $MachinePrecision], 2.0], $MachinePrecision] / t$95$m), $MachinePrecision]), $MachinePrecision], 3.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]), $MachinePrecision]
\begin{array}{l}
l_m = \left|\ell\right|
\\
t_m = \left|t\right|
\\
t_s = \mathsf{copysign}\left(1, t\right)
\\
t\_s \cdot \begin{array}{l}
\mathbf{if}\;t\_m \leq 1.55 \cdot 10^{-15}:\\
\;\;\;\;\frac{2}{\frac{{\left(\frac{k}{\sqrt{l\_m}}\right)}^{2} \cdot \frac{t\_m \cdot {\sin k}^{2}}{\cos k}}{l\_m}}\\
\mathbf{else}:\\
\;\;\;\;\frac{2}{\left(\tan k \cdot \left(2 + {\left(\frac{k}{t\_m}\right)}^{2}\right)\right) \cdot {\left(\frac{\sqrt[3]{\sin k}}{\frac{{\left(\sqrt[3]{l\_m}\right)}^{2}}{t\_m}}\right)}^{3}}\\
\end{array}
\end{array}
if t < 1.5499999999999999e-15Initial program 45.4%
associate-*l*45.4%
sqr-neg45.4%
sqr-neg45.4%
associate-/r*47.9%
distribute-rgt-in47.9%
unpow247.9%
times-frac33.0%
sqr-neg33.0%
times-frac47.9%
unpow247.9%
distribute-rgt-in47.9%
Simplified47.9%
associate-*l*45.6%
associate-*l/48.2%
associate-*r*48.2%
Applied egg-rr48.2%
Taylor expanded in t around 0 67.3%
times-frac68.5%
Simplified68.5%
add-sqr-sqrt32.1%
sqrt-div32.1%
unpow232.1%
sqrt-prod15.4%
add-sqr-sqrt21.7%
sqrt-div21.7%
unpow221.7%
sqrt-prod17.0%
add-sqr-sqrt33.7%
Applied egg-rr33.7%
unpow233.7%
Simplified33.7%
if 1.5499999999999999e-15 < t Initial program 67.7%
associate-*l*67.7%
sqr-neg67.7%
sqr-neg67.7%
associate-/r*68.6%
distribute-rgt-in68.6%
unpow268.6%
times-frac56.5%
sqr-neg56.5%
times-frac68.6%
unpow268.6%
distribute-rgt-in68.6%
Simplified68.6%
add-cube-cbrt68.4%
pow368.4%
*-commutative68.4%
cbrt-prod68.4%
associate-/l/67.5%
cbrt-div67.5%
rem-cbrt-cube74.7%
cbrt-unprod93.6%
pow293.6%
Applied egg-rr93.6%
associate-*r/93.7%
Applied egg-rr93.7%
associate-/l*93.7%
Simplified93.7%
Final simplification51.0%
l_m = (fabs.f64 l)
t_m = (fabs.f64 t)
t_s = (copysign.f64 1 t)
(FPCore (t_s t_m l_m k)
:precision binary64
(*
t_s
(if (<= t_m 6.8e-16)
(/
2.0
(/
(* (pow (/ k (sqrt l_m)) 2.0) (/ (* t_m (pow (sin k) 2.0)) (cos k)))
l_m))
(if (<= t_m 5.5e+102)
(/
2.0
(*
(* (tan k) (+ 2.0 (pow (/ k t_m) 2.0)))
(/ (* (sin k) (/ (pow t_m 3.0) l_m)) l_m)))
(pow (* l_m (pow (* (pow t_m 0.75) (sqrt k)) -2.0)) 2.0)))))l_m = fabs(l);
t_m = fabs(t);
t_s = copysign(1.0, t);
double code(double t_s, double t_m, double l_m, double k) {
double tmp;
if (t_m <= 6.8e-16) {
tmp = 2.0 / ((pow((k / sqrt(l_m)), 2.0) * ((t_m * pow(sin(k), 2.0)) / cos(k))) / l_m);
} else if (t_m <= 5.5e+102) {
tmp = 2.0 / ((tan(k) * (2.0 + pow((k / t_m), 2.0))) * ((sin(k) * (pow(t_m, 3.0) / l_m)) / l_m));
} else {
tmp = pow((l_m * pow((pow(t_m, 0.75) * sqrt(k)), -2.0)), 2.0);
}
return t_s * tmp;
}
l_m = abs(l)
t_m = abs(t)
t_s = copysign(1.0d0, t)
real(8) function code(t_s, t_m, l_m, k)
real(8), intent (in) :: t_s
real(8), intent (in) :: t_m
real(8), intent (in) :: l_m
real(8), intent (in) :: k
real(8) :: tmp
if (t_m <= 6.8d-16) then
tmp = 2.0d0 / ((((k / sqrt(l_m)) ** 2.0d0) * ((t_m * (sin(k) ** 2.0d0)) / cos(k))) / l_m)
else if (t_m <= 5.5d+102) then
tmp = 2.0d0 / ((tan(k) * (2.0d0 + ((k / t_m) ** 2.0d0))) * ((sin(k) * ((t_m ** 3.0d0) / l_m)) / l_m))
else
tmp = (l_m * (((t_m ** 0.75d0) * sqrt(k)) ** (-2.0d0))) ** 2.0d0
end if
code = t_s * tmp
end function
l_m = Math.abs(l);
t_m = Math.abs(t);
t_s = Math.copySign(1.0, t);
public static double code(double t_s, double t_m, double l_m, double k) {
double tmp;
if (t_m <= 6.8e-16) {
tmp = 2.0 / ((Math.pow((k / Math.sqrt(l_m)), 2.0) * ((t_m * Math.pow(Math.sin(k), 2.0)) / Math.cos(k))) / l_m);
} else if (t_m <= 5.5e+102) {
tmp = 2.0 / ((Math.tan(k) * (2.0 + Math.pow((k / t_m), 2.0))) * ((Math.sin(k) * (Math.pow(t_m, 3.0) / l_m)) / l_m));
} else {
tmp = Math.pow((l_m * Math.pow((Math.pow(t_m, 0.75) * Math.sqrt(k)), -2.0)), 2.0);
}
return t_s * tmp;
}
l_m = math.fabs(l) t_m = math.fabs(t) t_s = math.copysign(1.0, t) def code(t_s, t_m, l_m, k): tmp = 0 if t_m <= 6.8e-16: tmp = 2.0 / ((math.pow((k / math.sqrt(l_m)), 2.0) * ((t_m * math.pow(math.sin(k), 2.0)) / math.cos(k))) / l_m) elif t_m <= 5.5e+102: tmp = 2.0 / ((math.tan(k) * (2.0 + math.pow((k / t_m), 2.0))) * ((math.sin(k) * (math.pow(t_m, 3.0) / l_m)) / l_m)) else: tmp = math.pow((l_m * math.pow((math.pow(t_m, 0.75) * math.sqrt(k)), -2.0)), 2.0) return t_s * tmp
l_m = abs(l) t_m = abs(t) t_s = copysign(1.0, t) function code(t_s, t_m, l_m, k) tmp = 0.0 if (t_m <= 6.8e-16) tmp = Float64(2.0 / Float64(Float64((Float64(k / sqrt(l_m)) ^ 2.0) * Float64(Float64(t_m * (sin(k) ^ 2.0)) / cos(k))) / l_m)); elseif (t_m <= 5.5e+102) tmp = Float64(2.0 / Float64(Float64(tan(k) * Float64(2.0 + (Float64(k / t_m) ^ 2.0))) * Float64(Float64(sin(k) * Float64((t_m ^ 3.0) / l_m)) / l_m))); else tmp = Float64(l_m * (Float64((t_m ^ 0.75) * sqrt(k)) ^ -2.0)) ^ 2.0; end return Float64(t_s * tmp) end
l_m = abs(l); t_m = abs(t); t_s = sign(t) * abs(1.0); function tmp_2 = code(t_s, t_m, l_m, k) tmp = 0.0; if (t_m <= 6.8e-16) tmp = 2.0 / ((((k / sqrt(l_m)) ^ 2.0) * ((t_m * (sin(k) ^ 2.0)) / cos(k))) / l_m); elseif (t_m <= 5.5e+102) tmp = 2.0 / ((tan(k) * (2.0 + ((k / t_m) ^ 2.0))) * ((sin(k) * ((t_m ^ 3.0) / l_m)) / l_m)); else tmp = (l_m * (((t_m ^ 0.75) * sqrt(k)) ^ -2.0)) ^ 2.0; end tmp_2 = t_s * tmp; end
l_m = N[Abs[l], $MachinePrecision]
t_m = N[Abs[t], $MachinePrecision]
t_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[t]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[t$95$s_, t$95$m_, l$95$m_, k_] := N[(t$95$s * If[LessEqual[t$95$m, 6.8e-16], N[(2.0 / N[(N[(N[Power[N[(k / N[Sqrt[l$95$m], $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision] * N[(N[(t$95$m * N[Power[N[Sin[k], $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision] / N[Cos[k], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / l$95$m), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$m, 5.5e+102], N[(2.0 / N[(N[(N[Tan[k], $MachinePrecision] * N[(2.0 + N[Power[N[(k / t$95$m), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(N[(N[Sin[k], $MachinePrecision] * N[(N[Power[t$95$m, 3.0], $MachinePrecision] / l$95$m), $MachinePrecision]), $MachinePrecision] / l$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[Power[N[(l$95$m * N[Power[N[(N[Power[t$95$m, 0.75], $MachinePrecision] * N[Sqrt[k], $MachinePrecision]), $MachinePrecision], -2.0], $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision]]]), $MachinePrecision]
\begin{array}{l}
l_m = \left|\ell\right|
\\
t_m = \left|t\right|
\\
t_s = \mathsf{copysign}\left(1, t\right)
\\
t\_s \cdot \begin{array}{l}
\mathbf{if}\;t\_m \leq 6.8 \cdot 10^{-16}:\\
\;\;\;\;\frac{2}{\frac{{\left(\frac{k}{\sqrt{l\_m}}\right)}^{2} \cdot \frac{t\_m \cdot {\sin k}^{2}}{\cos k}}{l\_m}}\\
\mathbf{elif}\;t\_m \leq 5.5 \cdot 10^{+102}:\\
\;\;\;\;\frac{2}{\left(\tan k \cdot \left(2 + {\left(\frac{k}{t\_m}\right)}^{2}\right)\right) \cdot \frac{\sin k \cdot \frac{{t\_m}^{3}}{l\_m}}{l\_m}}\\
\mathbf{else}:\\
\;\;\;\;{\left(l\_m \cdot {\left({t\_m}^{0.75} \cdot \sqrt{k}\right)}^{-2}\right)}^{2}\\
\end{array}
\end{array}
if t < 6.8e-16Initial program 45.4%
associate-*l*45.4%
sqr-neg45.4%
sqr-neg45.4%
associate-/r*47.9%
distribute-rgt-in47.9%
unpow247.9%
times-frac33.0%
sqr-neg33.0%
times-frac47.9%
unpow247.9%
distribute-rgt-in47.9%
Simplified47.9%
associate-*l*45.6%
associate-*l/48.2%
associate-*r*48.2%
Applied egg-rr48.2%
Taylor expanded in t around 0 67.3%
times-frac68.5%
Simplified68.5%
add-sqr-sqrt32.1%
sqrt-div32.1%
unpow232.1%
sqrt-prod15.4%
add-sqr-sqrt21.7%
sqrt-div21.7%
unpow221.7%
sqrt-prod17.0%
add-sqr-sqrt33.7%
Applied egg-rr33.7%
unpow233.7%
Simplified33.7%
if 6.8e-16 < t < 5.49999999999999981e102Initial program 95.7%
associate-*l*95.7%
sqr-neg95.7%
sqr-neg95.7%
associate-/r*95.7%
distribute-rgt-in95.7%
unpow295.7%
times-frac88.6%
sqr-neg88.6%
times-frac95.7%
unpow295.7%
distribute-rgt-in95.7%
Simplified95.7%
associate-*l/95.7%
Applied egg-rr95.7%
if 5.49999999999999981e102 < t Initial program 52.6%
associate-/r*52.6%
sqr-neg52.6%
associate-*l*46.0%
sqr-neg46.0%
associate-/r*47.2%
associate-+l+47.2%
unpow247.2%
times-frac32.4%
sqr-neg32.4%
times-frac47.2%
unpow247.2%
Simplified47.2%
Taylor expanded in k around 0 46.0%
expm1-log1p-u46.0%
expm1-udef46.0%
Applied egg-rr65.6%
expm1-def75.5%
expm1-log1p76.0%
Simplified76.0%
div-inv76.1%
Applied egg-rr76.1%
inv-pow76.1%
add-sqr-sqrt31.5%
unpow-prod-down31.5%
*-commutative31.5%
sqrt-prod31.5%
sqrt-pow131.5%
metadata-eval31.5%
*-commutative31.5%
sqrt-prod31.5%
sqrt-pow134.6%
metadata-eval34.6%
Applied egg-rr34.6%
pow-sqr34.5%
metadata-eval34.5%
Simplified34.5%
Final simplification40.1%
l_m = (fabs.f64 l)
t_m = (fabs.f64 t)
t_s = (copysign.f64 1 t)
(FPCore (t_s t_m l_m k)
:precision binary64
(let* ((t_2 (/ t_m (cos k))))
(*
t_s
(if (<= t_m 1.6e-201)
(/ 2.0 (pow (* (/ k (/ l_m (sin k))) (sqrt t_2)) 2.0))
(if (<= t_m 4.6e-15)
(/
2.0
(/ 1.0 (/ l_m (* (/ (pow k 2.0) l_m) (* (pow (sin k) 2.0) t_2)))))
(if (<= t_m 1e+102)
(/
2.0
(*
(* (tan k) (+ 2.0 (pow (/ k t_m) 2.0)))
(/ (* (sin k) (/ (pow t_m 3.0) l_m)) l_m)))
(pow (* l_m (pow (* (pow t_m 0.75) (sqrt k)) -2.0)) 2.0)))))))l_m = fabs(l);
t_m = fabs(t);
t_s = copysign(1.0, t);
double code(double t_s, double t_m, double l_m, double k) {
double t_2 = t_m / cos(k);
double tmp;
if (t_m <= 1.6e-201) {
tmp = 2.0 / pow(((k / (l_m / sin(k))) * sqrt(t_2)), 2.0);
} else if (t_m <= 4.6e-15) {
tmp = 2.0 / (1.0 / (l_m / ((pow(k, 2.0) / l_m) * (pow(sin(k), 2.0) * t_2))));
} else if (t_m <= 1e+102) {
tmp = 2.0 / ((tan(k) * (2.0 + pow((k / t_m), 2.0))) * ((sin(k) * (pow(t_m, 3.0) / l_m)) / l_m));
} else {
tmp = pow((l_m * pow((pow(t_m, 0.75) * sqrt(k)), -2.0)), 2.0);
}
return t_s * tmp;
}
l_m = abs(l)
t_m = abs(t)
t_s = copysign(1.0d0, t)
real(8) function code(t_s, t_m, l_m, k)
real(8), intent (in) :: t_s
real(8), intent (in) :: t_m
real(8), intent (in) :: l_m
real(8), intent (in) :: k
real(8) :: t_2
real(8) :: tmp
t_2 = t_m / cos(k)
if (t_m <= 1.6d-201) then
tmp = 2.0d0 / (((k / (l_m / sin(k))) * sqrt(t_2)) ** 2.0d0)
else if (t_m <= 4.6d-15) then
tmp = 2.0d0 / (1.0d0 / (l_m / (((k ** 2.0d0) / l_m) * ((sin(k) ** 2.0d0) * t_2))))
else if (t_m <= 1d+102) then
tmp = 2.0d0 / ((tan(k) * (2.0d0 + ((k / t_m) ** 2.0d0))) * ((sin(k) * ((t_m ** 3.0d0) / l_m)) / l_m))
else
tmp = (l_m * (((t_m ** 0.75d0) * sqrt(k)) ** (-2.0d0))) ** 2.0d0
end if
code = t_s * tmp
end function
l_m = Math.abs(l);
t_m = Math.abs(t);
t_s = Math.copySign(1.0, t);
public static double code(double t_s, double t_m, double l_m, double k) {
double t_2 = t_m / Math.cos(k);
double tmp;
if (t_m <= 1.6e-201) {
tmp = 2.0 / Math.pow(((k / (l_m / Math.sin(k))) * Math.sqrt(t_2)), 2.0);
} else if (t_m <= 4.6e-15) {
tmp = 2.0 / (1.0 / (l_m / ((Math.pow(k, 2.0) / l_m) * (Math.pow(Math.sin(k), 2.0) * t_2))));
} else if (t_m <= 1e+102) {
tmp = 2.0 / ((Math.tan(k) * (2.0 + Math.pow((k / t_m), 2.0))) * ((Math.sin(k) * (Math.pow(t_m, 3.0) / l_m)) / l_m));
} else {
tmp = Math.pow((l_m * Math.pow((Math.pow(t_m, 0.75) * Math.sqrt(k)), -2.0)), 2.0);
}
return t_s * tmp;
}
l_m = math.fabs(l) t_m = math.fabs(t) t_s = math.copysign(1.0, t) def code(t_s, t_m, l_m, k): t_2 = t_m / math.cos(k) tmp = 0 if t_m <= 1.6e-201: tmp = 2.0 / math.pow(((k / (l_m / math.sin(k))) * math.sqrt(t_2)), 2.0) elif t_m <= 4.6e-15: tmp = 2.0 / (1.0 / (l_m / ((math.pow(k, 2.0) / l_m) * (math.pow(math.sin(k), 2.0) * t_2)))) elif t_m <= 1e+102: tmp = 2.0 / ((math.tan(k) * (2.0 + math.pow((k / t_m), 2.0))) * ((math.sin(k) * (math.pow(t_m, 3.0) / l_m)) / l_m)) else: tmp = math.pow((l_m * math.pow((math.pow(t_m, 0.75) * math.sqrt(k)), -2.0)), 2.0) return t_s * tmp
l_m = abs(l) t_m = abs(t) t_s = copysign(1.0, t) function code(t_s, t_m, l_m, k) t_2 = Float64(t_m / cos(k)) tmp = 0.0 if (t_m <= 1.6e-201) tmp = Float64(2.0 / (Float64(Float64(k / Float64(l_m / sin(k))) * sqrt(t_2)) ^ 2.0)); elseif (t_m <= 4.6e-15) tmp = Float64(2.0 / Float64(1.0 / Float64(l_m / Float64(Float64((k ^ 2.0) / l_m) * Float64((sin(k) ^ 2.0) * t_2))))); elseif (t_m <= 1e+102) tmp = Float64(2.0 / Float64(Float64(tan(k) * Float64(2.0 + (Float64(k / t_m) ^ 2.0))) * Float64(Float64(sin(k) * Float64((t_m ^ 3.0) / l_m)) / l_m))); else tmp = Float64(l_m * (Float64((t_m ^ 0.75) * sqrt(k)) ^ -2.0)) ^ 2.0; end return Float64(t_s * tmp) end
l_m = abs(l); t_m = abs(t); t_s = sign(t) * abs(1.0); function tmp_2 = code(t_s, t_m, l_m, k) t_2 = t_m / cos(k); tmp = 0.0; if (t_m <= 1.6e-201) tmp = 2.0 / (((k / (l_m / sin(k))) * sqrt(t_2)) ^ 2.0); elseif (t_m <= 4.6e-15) tmp = 2.0 / (1.0 / (l_m / (((k ^ 2.0) / l_m) * ((sin(k) ^ 2.0) * t_2)))); elseif (t_m <= 1e+102) tmp = 2.0 / ((tan(k) * (2.0 + ((k / t_m) ^ 2.0))) * ((sin(k) * ((t_m ^ 3.0) / l_m)) / l_m)); else tmp = (l_m * (((t_m ^ 0.75) * sqrt(k)) ^ -2.0)) ^ 2.0; end tmp_2 = t_s * tmp; end
l_m = N[Abs[l], $MachinePrecision]
t_m = N[Abs[t], $MachinePrecision]
t_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[t]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[t$95$s_, t$95$m_, l$95$m_, k_] := Block[{t$95$2 = N[(t$95$m / N[Cos[k], $MachinePrecision]), $MachinePrecision]}, N[(t$95$s * If[LessEqual[t$95$m, 1.6e-201], N[(2.0 / N[Power[N[(N[(k / N[(l$95$m / N[Sin[k], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[Sqrt[t$95$2], $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$m, 4.6e-15], N[(2.0 / N[(1.0 / N[(l$95$m / N[(N[(N[Power[k, 2.0], $MachinePrecision] / l$95$m), $MachinePrecision] * N[(N[Power[N[Sin[k], $MachinePrecision], 2.0], $MachinePrecision] * t$95$2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$m, 1e+102], N[(2.0 / N[(N[(N[Tan[k], $MachinePrecision] * N[(2.0 + N[Power[N[(k / t$95$m), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(N[(N[Sin[k], $MachinePrecision] * N[(N[Power[t$95$m, 3.0], $MachinePrecision] / l$95$m), $MachinePrecision]), $MachinePrecision] / l$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[Power[N[(l$95$m * N[Power[N[(N[Power[t$95$m, 0.75], $MachinePrecision] * N[Sqrt[k], $MachinePrecision]), $MachinePrecision], -2.0], $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision]]]]), $MachinePrecision]]
\begin{array}{l}
l_m = \left|\ell\right|
\\
t_m = \left|t\right|
\\
t_s = \mathsf{copysign}\left(1, t\right)
\\
\begin{array}{l}
t_2 := \frac{t\_m}{\cos k}\\
t\_s \cdot \begin{array}{l}
\mathbf{if}\;t\_m \leq 1.6 \cdot 10^{-201}:\\
\;\;\;\;\frac{2}{{\left(\frac{k}{\frac{l\_m}{\sin k}} \cdot \sqrt{t\_2}\right)}^{2}}\\
\mathbf{elif}\;t\_m \leq 4.6 \cdot 10^{-15}:\\
\;\;\;\;\frac{2}{\frac{1}{\frac{l\_m}{\frac{{k}^{2}}{l\_m} \cdot \left({\sin k}^{2} \cdot t\_2\right)}}}\\
\mathbf{elif}\;t\_m \leq 10^{+102}:\\
\;\;\;\;\frac{2}{\left(\tan k \cdot \left(2 + {\left(\frac{k}{t\_m}\right)}^{2}\right)\right) \cdot \frac{\sin k \cdot \frac{{t\_m}^{3}}{l\_m}}{l\_m}}\\
\mathbf{else}:\\
\;\;\;\;{\left(l\_m \cdot {\left({t\_m}^{0.75} \cdot \sqrt{k}\right)}^{-2}\right)}^{2}\\
\end{array}
\end{array}
\end{array}
if t < 1.6000000000000001e-201Initial program 47.1%
associate-*l*47.1%
sqr-neg47.1%
sqr-neg47.1%
associate-/r*48.9%
distribute-rgt-in48.9%
unpow248.9%
times-frac31.8%
sqr-neg31.8%
times-frac48.9%
unpow248.9%
distribute-rgt-in48.9%
Simplified48.9%
add-sqr-sqrt16.0%
pow216.0%
associate-*l*16.0%
sqrt-prod6.4%
associate-/l/6.4%
sqrt-div6.4%
sqrt-pow17.8%
metadata-eval7.8%
sqrt-unprod5.7%
add-sqr-sqrt7.8%
associate-*r*7.8%
Applied egg-rr7.8%
Taylor expanded in k around inf 36.2%
associate-/l*36.2%
Simplified36.2%
if 1.6000000000000001e-201 < t < 4.59999999999999981e-15Initial program 39.5%
associate-*l*39.5%
sqr-neg39.5%
sqr-neg39.5%
associate-/r*44.7%
distribute-rgt-in44.7%
unpow244.7%
times-frac37.2%
sqr-neg37.2%
times-frac44.7%
unpow244.7%
distribute-rgt-in44.7%
Simplified44.7%
associate-*l*42.4%
associate-*l/47.5%
associate-*r*47.5%
Applied egg-rr47.5%
Taylor expanded in t around 0 77.0%
times-frac77.9%
Simplified77.9%
clear-num78.0%
inv-pow78.0%
associate-/l*77.9%
Applied egg-rr77.9%
unpow-177.9%
associate-/r/78.0%
Simplified78.0%
if 4.59999999999999981e-15 < t < 9.99999999999999977e101Initial program 95.7%
associate-*l*95.7%
sqr-neg95.7%
sqr-neg95.7%
associate-/r*95.7%
distribute-rgt-in95.7%
unpow295.7%
times-frac88.6%
sqr-neg88.6%
times-frac95.7%
unpow295.7%
distribute-rgt-in95.7%
Simplified95.7%
associate-*l/95.7%
Applied egg-rr95.7%
if 9.99999999999999977e101 < t Initial program 52.6%
associate-/r*52.6%
sqr-neg52.6%
associate-*l*46.0%
sqr-neg46.0%
associate-/r*47.2%
associate-+l+47.2%
unpow247.2%
times-frac32.4%
sqr-neg32.4%
times-frac47.2%
unpow247.2%
Simplified47.2%
Taylor expanded in k around 0 46.0%
expm1-log1p-u46.0%
expm1-udef46.0%
Applied egg-rr65.6%
expm1-def75.5%
expm1-log1p76.0%
Simplified76.0%
div-inv76.1%
Applied egg-rr76.1%
inv-pow76.1%
add-sqr-sqrt31.5%
unpow-prod-down31.5%
*-commutative31.5%
sqrt-prod31.5%
sqrt-pow131.5%
metadata-eval31.5%
*-commutative31.5%
sqrt-prod31.5%
sqrt-pow134.6%
metadata-eval34.6%
Applied egg-rr34.6%
pow-sqr34.5%
metadata-eval34.5%
Simplified34.5%
Final simplification48.6%
l_m = (fabs.f64 l)
t_m = (fabs.f64 t)
t_s = (copysign.f64 1 t)
(FPCore (t_s t_m l_m k)
:precision binary64
(let* ((t_2
(/ 2.0 (pow (* (/ k (/ l_m (sin k))) (sqrt (/ t_m (cos k)))) 2.0))))
(*
t_s
(if (<= t_m 2.6e-163)
t_2
(if (<= t_m 3.4e-101)
(/ 2.0 (/ (* (/ (pow k 2.0) l_m) (/ (* t_m (pow k 2.0)) (cos k))) l_m))
(if (<= t_m 8.5e-61)
t_2
(pow (* l_m (pow (* (pow t_m 0.75) (sqrt k)) -2.0)) 2.0)))))))l_m = fabs(l);
t_m = fabs(t);
t_s = copysign(1.0, t);
double code(double t_s, double t_m, double l_m, double k) {
double t_2 = 2.0 / pow(((k / (l_m / sin(k))) * sqrt((t_m / cos(k)))), 2.0);
double tmp;
if (t_m <= 2.6e-163) {
tmp = t_2;
} else if (t_m <= 3.4e-101) {
tmp = 2.0 / (((pow(k, 2.0) / l_m) * ((t_m * pow(k, 2.0)) / cos(k))) / l_m);
} else if (t_m <= 8.5e-61) {
tmp = t_2;
} else {
tmp = pow((l_m * pow((pow(t_m, 0.75) * sqrt(k)), -2.0)), 2.0);
}
return t_s * tmp;
}
l_m = abs(l)
t_m = abs(t)
t_s = copysign(1.0d0, t)
real(8) function code(t_s, t_m, l_m, k)
real(8), intent (in) :: t_s
real(8), intent (in) :: t_m
real(8), intent (in) :: l_m
real(8), intent (in) :: k
real(8) :: t_2
real(8) :: tmp
t_2 = 2.0d0 / (((k / (l_m / sin(k))) * sqrt((t_m / cos(k)))) ** 2.0d0)
if (t_m <= 2.6d-163) then
tmp = t_2
else if (t_m <= 3.4d-101) then
tmp = 2.0d0 / ((((k ** 2.0d0) / l_m) * ((t_m * (k ** 2.0d0)) / cos(k))) / l_m)
else if (t_m <= 8.5d-61) then
tmp = t_2
else
tmp = (l_m * (((t_m ** 0.75d0) * sqrt(k)) ** (-2.0d0))) ** 2.0d0
end if
code = t_s * tmp
end function
l_m = Math.abs(l);
t_m = Math.abs(t);
t_s = Math.copySign(1.0, t);
public static double code(double t_s, double t_m, double l_m, double k) {
double t_2 = 2.0 / Math.pow(((k / (l_m / Math.sin(k))) * Math.sqrt((t_m / Math.cos(k)))), 2.0);
double tmp;
if (t_m <= 2.6e-163) {
tmp = t_2;
} else if (t_m <= 3.4e-101) {
tmp = 2.0 / (((Math.pow(k, 2.0) / l_m) * ((t_m * Math.pow(k, 2.0)) / Math.cos(k))) / l_m);
} else if (t_m <= 8.5e-61) {
tmp = t_2;
} else {
tmp = Math.pow((l_m * Math.pow((Math.pow(t_m, 0.75) * Math.sqrt(k)), -2.0)), 2.0);
}
return t_s * tmp;
}
l_m = math.fabs(l) t_m = math.fabs(t) t_s = math.copysign(1.0, t) def code(t_s, t_m, l_m, k): t_2 = 2.0 / math.pow(((k / (l_m / math.sin(k))) * math.sqrt((t_m / math.cos(k)))), 2.0) tmp = 0 if t_m <= 2.6e-163: tmp = t_2 elif t_m <= 3.4e-101: tmp = 2.0 / (((math.pow(k, 2.0) / l_m) * ((t_m * math.pow(k, 2.0)) / math.cos(k))) / l_m) elif t_m <= 8.5e-61: tmp = t_2 else: tmp = math.pow((l_m * math.pow((math.pow(t_m, 0.75) * math.sqrt(k)), -2.0)), 2.0) return t_s * tmp
l_m = abs(l) t_m = abs(t) t_s = copysign(1.0, t) function code(t_s, t_m, l_m, k) t_2 = Float64(2.0 / (Float64(Float64(k / Float64(l_m / sin(k))) * sqrt(Float64(t_m / cos(k)))) ^ 2.0)) tmp = 0.0 if (t_m <= 2.6e-163) tmp = t_2; elseif (t_m <= 3.4e-101) tmp = Float64(2.0 / Float64(Float64(Float64((k ^ 2.0) / l_m) * Float64(Float64(t_m * (k ^ 2.0)) / cos(k))) / l_m)); elseif (t_m <= 8.5e-61) tmp = t_2; else tmp = Float64(l_m * (Float64((t_m ^ 0.75) * sqrt(k)) ^ -2.0)) ^ 2.0; end return Float64(t_s * tmp) end
l_m = abs(l); t_m = abs(t); t_s = sign(t) * abs(1.0); function tmp_2 = code(t_s, t_m, l_m, k) t_2 = 2.0 / (((k / (l_m / sin(k))) * sqrt((t_m / cos(k)))) ^ 2.0); tmp = 0.0; if (t_m <= 2.6e-163) tmp = t_2; elseif (t_m <= 3.4e-101) tmp = 2.0 / ((((k ^ 2.0) / l_m) * ((t_m * (k ^ 2.0)) / cos(k))) / l_m); elseif (t_m <= 8.5e-61) tmp = t_2; else tmp = (l_m * (((t_m ^ 0.75) * sqrt(k)) ^ -2.0)) ^ 2.0; end tmp_2 = t_s * tmp; end
l_m = N[Abs[l], $MachinePrecision]
t_m = N[Abs[t], $MachinePrecision]
t_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[t]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[t$95$s_, t$95$m_, l$95$m_, k_] := Block[{t$95$2 = N[(2.0 / N[Power[N[(N[(k / N[(l$95$m / N[Sin[k], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[Sqrt[N[(t$95$m / N[Cos[k], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]}, N[(t$95$s * If[LessEqual[t$95$m, 2.6e-163], t$95$2, If[LessEqual[t$95$m, 3.4e-101], N[(2.0 / N[(N[(N[(N[Power[k, 2.0], $MachinePrecision] / l$95$m), $MachinePrecision] * N[(N[(t$95$m * N[Power[k, 2.0], $MachinePrecision]), $MachinePrecision] / N[Cos[k], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / l$95$m), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$m, 8.5e-61], t$95$2, N[Power[N[(l$95$m * N[Power[N[(N[Power[t$95$m, 0.75], $MachinePrecision] * N[Sqrt[k], $MachinePrecision]), $MachinePrecision], -2.0], $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision]]]]), $MachinePrecision]]
\begin{array}{l}
l_m = \left|\ell\right|
\\
t_m = \left|t\right|
\\
t_s = \mathsf{copysign}\left(1, t\right)
\\
\begin{array}{l}
t_2 := \frac{2}{{\left(\frac{k}{\frac{l\_m}{\sin k}} \cdot \sqrt{\frac{t\_m}{\cos k}}\right)}^{2}}\\
t\_s \cdot \begin{array}{l}
\mathbf{if}\;t\_m \leq 2.6 \cdot 10^{-163}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;t\_m \leq 3.4 \cdot 10^{-101}:\\
\;\;\;\;\frac{2}{\frac{\frac{{k}^{2}}{l\_m} \cdot \frac{t\_m \cdot {k}^{2}}{\cos k}}{l\_m}}\\
\mathbf{elif}\;t\_m \leq 8.5 \cdot 10^{-61}:\\
\;\;\;\;t\_2\\
\mathbf{else}:\\
\;\;\;\;{\left(l\_m \cdot {\left({t\_m}^{0.75} \cdot \sqrt{k}\right)}^{-2}\right)}^{2}\\
\end{array}
\end{array}
\end{array}
if t < 2.60000000000000002e-163 or 3.39999999999999989e-101 < t < 8.50000000000000016e-61Initial program 45.9%
associate-*l*45.9%
sqr-neg45.9%
sqr-neg45.9%
associate-/r*48.1%
distribute-rgt-in48.1%
unpow248.1%
times-frac30.9%
sqr-neg30.9%
times-frac48.1%
unpow248.1%
distribute-rgt-in48.1%
Simplified48.1%
add-sqr-sqrt18.7%
pow218.7%
associate-*l*18.1%
sqrt-prod9.6%
associate-/l/9.5%
sqrt-div9.6%
sqrt-pow111.0%
metadata-eval11.0%
sqrt-unprod8.3%
add-sqr-sqrt12.2%
associate-*r*12.2%
Applied egg-rr12.2%
Taylor expanded in k around inf 40.5%
associate-/l*40.5%
Simplified40.5%
if 2.60000000000000002e-163 < t < 3.39999999999999989e-101Initial program 27.3%
associate-*l*27.3%
sqr-neg27.3%
sqr-neg27.3%
associate-/r*37.3%
distribute-rgt-in37.3%
unpow237.3%
times-frac37.3%
sqr-neg37.3%
times-frac37.3%
unpow237.3%
distribute-rgt-in37.3%
Simplified37.3%
associate-*l*37.3%
associate-*l/37.3%
associate-*r*37.3%
Applied egg-rr37.3%
Taylor expanded in t around 0 83.0%
times-frac83.0%
Simplified83.0%
Taylor expanded in k around 0 83.0%
if 8.50000000000000016e-61 < t Initial program 65.9%
associate-/r*65.9%
sqr-neg65.9%
associate-*l*62.3%
sqr-neg62.3%
associate-/r*62.9%
associate-+l+62.9%
unpow262.9%
times-frac52.6%
sqr-neg52.6%
times-frac62.9%
unpow262.9%
Simplified62.9%
Taylor expanded in k around 0 53.8%
expm1-log1p-u53.4%
expm1-udef53.3%
Applied egg-rr64.2%
expm1-def70.9%
expm1-log1p71.5%
Simplified71.5%
div-inv71.6%
Applied egg-rr71.6%
inv-pow71.6%
add-sqr-sqrt32.9%
unpow-prod-down32.9%
*-commutative32.9%
sqrt-prod31.7%
sqrt-pow131.7%
metadata-eval31.7%
*-commutative31.7%
sqrt-prod31.7%
sqrt-pow133.4%
metadata-eval33.4%
Applied egg-rr33.4%
pow-sqr33.4%
metadata-eval33.4%
Simplified33.4%
Final simplification39.9%
l_m = (fabs.f64 l)
t_m = (fabs.f64 t)
t_s = (copysign.f64 1 t)
(FPCore (t_s t_m l_m k)
:precision binary64
(let* ((t_2 (sqrt (/ t_m (cos k)))))
(*
t_s
(if (<= t_m 2.75e-163)
(/ 2.0 (pow (* (/ k (/ l_m (sin k))) t_2) 2.0))
(if (<= t_m 9.6e-96)
(/ 2.0 (/ (* (/ (pow k 2.0) l_m) (/ (* t_m (pow k 2.0)) (cos k))) l_m))
(if (<= t_m 2.6e-62)
(/ 2.0 (pow (* t_2 (/ (* k (sin k)) l_m)) 2.0))
(pow (* l_m (pow (* (pow t_m 0.75) (sqrt k)) -2.0)) 2.0)))))))l_m = fabs(l);
t_m = fabs(t);
t_s = copysign(1.0, t);
double code(double t_s, double t_m, double l_m, double k) {
double t_2 = sqrt((t_m / cos(k)));
double tmp;
if (t_m <= 2.75e-163) {
tmp = 2.0 / pow(((k / (l_m / sin(k))) * t_2), 2.0);
} else if (t_m <= 9.6e-96) {
tmp = 2.0 / (((pow(k, 2.0) / l_m) * ((t_m * pow(k, 2.0)) / cos(k))) / l_m);
} else if (t_m <= 2.6e-62) {
tmp = 2.0 / pow((t_2 * ((k * sin(k)) / l_m)), 2.0);
} else {
tmp = pow((l_m * pow((pow(t_m, 0.75) * sqrt(k)), -2.0)), 2.0);
}
return t_s * tmp;
}
l_m = abs(l)
t_m = abs(t)
t_s = copysign(1.0d0, t)
real(8) function code(t_s, t_m, l_m, k)
real(8), intent (in) :: t_s
real(8), intent (in) :: t_m
real(8), intent (in) :: l_m
real(8), intent (in) :: k
real(8) :: t_2
real(8) :: tmp
t_2 = sqrt((t_m / cos(k)))
if (t_m <= 2.75d-163) then
tmp = 2.0d0 / (((k / (l_m / sin(k))) * t_2) ** 2.0d0)
else if (t_m <= 9.6d-96) then
tmp = 2.0d0 / ((((k ** 2.0d0) / l_m) * ((t_m * (k ** 2.0d0)) / cos(k))) / l_m)
else if (t_m <= 2.6d-62) then
tmp = 2.0d0 / ((t_2 * ((k * sin(k)) / l_m)) ** 2.0d0)
else
tmp = (l_m * (((t_m ** 0.75d0) * sqrt(k)) ** (-2.0d0))) ** 2.0d0
end if
code = t_s * tmp
end function
l_m = Math.abs(l);
t_m = Math.abs(t);
t_s = Math.copySign(1.0, t);
public static double code(double t_s, double t_m, double l_m, double k) {
double t_2 = Math.sqrt((t_m / Math.cos(k)));
double tmp;
if (t_m <= 2.75e-163) {
tmp = 2.0 / Math.pow(((k / (l_m / Math.sin(k))) * t_2), 2.0);
} else if (t_m <= 9.6e-96) {
tmp = 2.0 / (((Math.pow(k, 2.0) / l_m) * ((t_m * Math.pow(k, 2.0)) / Math.cos(k))) / l_m);
} else if (t_m <= 2.6e-62) {
tmp = 2.0 / Math.pow((t_2 * ((k * Math.sin(k)) / l_m)), 2.0);
} else {
tmp = Math.pow((l_m * Math.pow((Math.pow(t_m, 0.75) * Math.sqrt(k)), -2.0)), 2.0);
}
return t_s * tmp;
}
l_m = math.fabs(l) t_m = math.fabs(t) t_s = math.copysign(1.0, t) def code(t_s, t_m, l_m, k): t_2 = math.sqrt((t_m / math.cos(k))) tmp = 0 if t_m <= 2.75e-163: tmp = 2.0 / math.pow(((k / (l_m / math.sin(k))) * t_2), 2.0) elif t_m <= 9.6e-96: tmp = 2.0 / (((math.pow(k, 2.0) / l_m) * ((t_m * math.pow(k, 2.0)) / math.cos(k))) / l_m) elif t_m <= 2.6e-62: tmp = 2.0 / math.pow((t_2 * ((k * math.sin(k)) / l_m)), 2.0) else: tmp = math.pow((l_m * math.pow((math.pow(t_m, 0.75) * math.sqrt(k)), -2.0)), 2.0) return t_s * tmp
l_m = abs(l) t_m = abs(t) t_s = copysign(1.0, t) function code(t_s, t_m, l_m, k) t_2 = sqrt(Float64(t_m / cos(k))) tmp = 0.0 if (t_m <= 2.75e-163) tmp = Float64(2.0 / (Float64(Float64(k / Float64(l_m / sin(k))) * t_2) ^ 2.0)); elseif (t_m <= 9.6e-96) tmp = Float64(2.0 / Float64(Float64(Float64((k ^ 2.0) / l_m) * Float64(Float64(t_m * (k ^ 2.0)) / cos(k))) / l_m)); elseif (t_m <= 2.6e-62) tmp = Float64(2.0 / (Float64(t_2 * Float64(Float64(k * sin(k)) / l_m)) ^ 2.0)); else tmp = Float64(l_m * (Float64((t_m ^ 0.75) * sqrt(k)) ^ -2.0)) ^ 2.0; end return Float64(t_s * tmp) end
l_m = abs(l); t_m = abs(t); t_s = sign(t) * abs(1.0); function tmp_2 = code(t_s, t_m, l_m, k) t_2 = sqrt((t_m / cos(k))); tmp = 0.0; if (t_m <= 2.75e-163) tmp = 2.0 / (((k / (l_m / sin(k))) * t_2) ^ 2.0); elseif (t_m <= 9.6e-96) tmp = 2.0 / ((((k ^ 2.0) / l_m) * ((t_m * (k ^ 2.0)) / cos(k))) / l_m); elseif (t_m <= 2.6e-62) tmp = 2.0 / ((t_2 * ((k * sin(k)) / l_m)) ^ 2.0); else tmp = (l_m * (((t_m ^ 0.75) * sqrt(k)) ^ -2.0)) ^ 2.0; end tmp_2 = t_s * tmp; end
l_m = N[Abs[l], $MachinePrecision]
t_m = N[Abs[t], $MachinePrecision]
t_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[t]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[t$95$s_, t$95$m_, l$95$m_, k_] := Block[{t$95$2 = N[Sqrt[N[(t$95$m / N[Cos[k], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, N[(t$95$s * If[LessEqual[t$95$m, 2.75e-163], N[(2.0 / N[Power[N[(N[(k / N[(l$95$m / N[Sin[k], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * t$95$2), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$m, 9.6e-96], N[(2.0 / N[(N[(N[(N[Power[k, 2.0], $MachinePrecision] / l$95$m), $MachinePrecision] * N[(N[(t$95$m * N[Power[k, 2.0], $MachinePrecision]), $MachinePrecision] / N[Cos[k], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / l$95$m), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$m, 2.6e-62], N[(2.0 / N[Power[N[(t$95$2 * N[(N[(k * N[Sin[k], $MachinePrecision]), $MachinePrecision] / l$95$m), $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision], N[Power[N[(l$95$m * N[Power[N[(N[Power[t$95$m, 0.75], $MachinePrecision] * N[Sqrt[k], $MachinePrecision]), $MachinePrecision], -2.0], $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision]]]]), $MachinePrecision]]
\begin{array}{l}
l_m = \left|\ell\right|
\\
t_m = \left|t\right|
\\
t_s = \mathsf{copysign}\left(1, t\right)
\\
\begin{array}{l}
t_2 := \sqrt{\frac{t\_m}{\cos k}}\\
t\_s \cdot \begin{array}{l}
\mathbf{if}\;t\_m \leq 2.75 \cdot 10^{-163}:\\
\;\;\;\;\frac{2}{{\left(\frac{k}{\frac{l\_m}{\sin k}} \cdot t\_2\right)}^{2}}\\
\mathbf{elif}\;t\_m \leq 9.6 \cdot 10^{-96}:\\
\;\;\;\;\frac{2}{\frac{\frac{{k}^{2}}{l\_m} \cdot \frac{t\_m \cdot {k}^{2}}{\cos k}}{l\_m}}\\
\mathbf{elif}\;t\_m \leq 2.6 \cdot 10^{-62}:\\
\;\;\;\;\frac{2}{{\left(t\_2 \cdot \frac{k \cdot \sin k}{l\_m}\right)}^{2}}\\
\mathbf{else}:\\
\;\;\;\;{\left(l\_m \cdot {\left({t\_m}^{0.75} \cdot \sqrt{k}\right)}^{-2}\right)}^{2}\\
\end{array}
\end{array}
\end{array}
if t < 2.7499999999999999e-163Initial program 46.0%
associate-*l*46.0%
sqr-neg46.0%
sqr-neg46.0%
associate-/r*47.7%
distribute-rgt-in47.7%
unpow247.7%
times-frac29.7%
sqr-neg29.7%
times-frac47.7%
unpow247.7%
distribute-rgt-in47.7%
Simplified47.7%
add-sqr-sqrt17.0%
pow217.0%
associate-*l*16.9%
sqrt-prod8.0%
associate-/l/7.9%
sqrt-div7.9%
sqrt-pow19.3%
metadata-eval9.3%
sqrt-unprod7.3%
add-sqr-sqrt10.6%
associate-*r*10.6%
Applied egg-rr10.6%
Taylor expanded in k around inf 38.4%
associate-/l*38.4%
Simplified38.4%
if 2.7499999999999999e-163 < t < 9.60000000000000076e-96Initial program 33.2%
associate-*l*33.2%
sqr-neg33.2%
sqr-neg33.2%
associate-/r*42.4%
distribute-rgt-in42.4%
unpow242.4%
times-frac42.3%
sqr-neg42.3%
times-frac42.4%
unpow242.4%
distribute-rgt-in42.4%
Simplified42.4%
associate-*l*42.4%
associate-*l/42.4%
associate-*r*42.4%
Applied egg-rr42.4%
Taylor expanded in t around 0 84.3%
times-frac84.3%
Simplified84.3%
Taylor expanded in k around 0 84.3%
if 9.60000000000000076e-96 < t < 2.5999999999999999e-62Initial program 33.7%
associate-*l*33.7%
sqr-neg33.7%
sqr-neg33.7%
associate-/r*49.7%
distribute-rgt-in49.7%
unpow249.7%
times-frac49.7%
sqr-neg49.7%
times-frac49.7%
unpow249.7%
distribute-rgt-in49.7%
Simplified49.7%
add-sqr-sqrt49.7%
pow249.7%
associate-*l*34.2%
sqrt-prod34.2%
associate-/l/33.3%
sqrt-div37.1%
sqrt-pow137.1%
metadata-eval37.1%
sqrt-unprod34.5%
add-sqr-sqrt38.0%
associate-*r*38.0%
Applied egg-rr38.0%
Taylor expanded in k around inf 82.8%
if 2.5999999999999999e-62 < t Initial program 65.9%
associate-/r*65.9%
sqr-neg65.9%
associate-*l*62.3%
sqr-neg62.3%
associate-/r*62.9%
associate-+l+62.9%
unpow262.9%
times-frac52.6%
sqr-neg52.6%
times-frac62.9%
unpow262.9%
Simplified62.9%
Taylor expanded in k around 0 53.8%
expm1-log1p-u53.4%
expm1-udef53.3%
Applied egg-rr64.2%
expm1-def70.9%
expm1-log1p71.5%
Simplified71.5%
div-inv71.6%
Applied egg-rr71.6%
inv-pow71.6%
add-sqr-sqrt32.9%
unpow-prod-down32.9%
*-commutative32.9%
sqrt-prod31.7%
sqrt-pow131.7%
metadata-eval31.7%
*-commutative31.7%
sqrt-prod31.7%
sqrt-pow133.4%
metadata-eval33.4%
Applied egg-rr33.4%
pow-sqr33.4%
metadata-eval33.4%
Simplified33.4%
Final simplification39.9%
l_m = (fabs.f64 l)
t_m = (fabs.f64 t)
t_s = (copysign.f64 1 t)
(FPCore (t_s t_m l_m k)
:precision binary64
(let* ((t_2 (sqrt (/ t_m (cos k)))))
(*
t_s
(if (<= t_m 9.8e-164)
(/ 2.0 (pow (* (/ k (/ l_m (sin k))) t_2) 2.0))
(if (<= t_m 6e-96)
(/ 2.0 (/ (* (/ (pow k 2.0) l_m) (/ (* t_m (pow k 2.0)) (cos k))) l_m))
(if (<= t_m 3.25e-62)
(/ 2.0 (pow (/ (* t_2 (* k (sin k))) l_m) 2.0))
(pow (* l_m (pow (* (pow t_m 0.75) (sqrt k)) -2.0)) 2.0)))))))l_m = fabs(l);
t_m = fabs(t);
t_s = copysign(1.0, t);
double code(double t_s, double t_m, double l_m, double k) {
double t_2 = sqrt((t_m / cos(k)));
double tmp;
if (t_m <= 9.8e-164) {
tmp = 2.0 / pow(((k / (l_m / sin(k))) * t_2), 2.0);
} else if (t_m <= 6e-96) {
tmp = 2.0 / (((pow(k, 2.0) / l_m) * ((t_m * pow(k, 2.0)) / cos(k))) / l_m);
} else if (t_m <= 3.25e-62) {
tmp = 2.0 / pow(((t_2 * (k * sin(k))) / l_m), 2.0);
} else {
tmp = pow((l_m * pow((pow(t_m, 0.75) * sqrt(k)), -2.0)), 2.0);
}
return t_s * tmp;
}
l_m = abs(l)
t_m = abs(t)
t_s = copysign(1.0d0, t)
real(8) function code(t_s, t_m, l_m, k)
real(8), intent (in) :: t_s
real(8), intent (in) :: t_m
real(8), intent (in) :: l_m
real(8), intent (in) :: k
real(8) :: t_2
real(8) :: tmp
t_2 = sqrt((t_m / cos(k)))
if (t_m <= 9.8d-164) then
tmp = 2.0d0 / (((k / (l_m / sin(k))) * t_2) ** 2.0d0)
else if (t_m <= 6d-96) then
tmp = 2.0d0 / ((((k ** 2.0d0) / l_m) * ((t_m * (k ** 2.0d0)) / cos(k))) / l_m)
else if (t_m <= 3.25d-62) then
tmp = 2.0d0 / (((t_2 * (k * sin(k))) / l_m) ** 2.0d0)
else
tmp = (l_m * (((t_m ** 0.75d0) * sqrt(k)) ** (-2.0d0))) ** 2.0d0
end if
code = t_s * tmp
end function
l_m = Math.abs(l);
t_m = Math.abs(t);
t_s = Math.copySign(1.0, t);
public static double code(double t_s, double t_m, double l_m, double k) {
double t_2 = Math.sqrt((t_m / Math.cos(k)));
double tmp;
if (t_m <= 9.8e-164) {
tmp = 2.0 / Math.pow(((k / (l_m / Math.sin(k))) * t_2), 2.0);
} else if (t_m <= 6e-96) {
tmp = 2.0 / (((Math.pow(k, 2.0) / l_m) * ((t_m * Math.pow(k, 2.0)) / Math.cos(k))) / l_m);
} else if (t_m <= 3.25e-62) {
tmp = 2.0 / Math.pow(((t_2 * (k * Math.sin(k))) / l_m), 2.0);
} else {
tmp = Math.pow((l_m * Math.pow((Math.pow(t_m, 0.75) * Math.sqrt(k)), -2.0)), 2.0);
}
return t_s * tmp;
}
l_m = math.fabs(l) t_m = math.fabs(t) t_s = math.copysign(1.0, t) def code(t_s, t_m, l_m, k): t_2 = math.sqrt((t_m / math.cos(k))) tmp = 0 if t_m <= 9.8e-164: tmp = 2.0 / math.pow(((k / (l_m / math.sin(k))) * t_2), 2.0) elif t_m <= 6e-96: tmp = 2.0 / (((math.pow(k, 2.0) / l_m) * ((t_m * math.pow(k, 2.0)) / math.cos(k))) / l_m) elif t_m <= 3.25e-62: tmp = 2.0 / math.pow(((t_2 * (k * math.sin(k))) / l_m), 2.0) else: tmp = math.pow((l_m * math.pow((math.pow(t_m, 0.75) * math.sqrt(k)), -2.0)), 2.0) return t_s * tmp
l_m = abs(l) t_m = abs(t) t_s = copysign(1.0, t) function code(t_s, t_m, l_m, k) t_2 = sqrt(Float64(t_m / cos(k))) tmp = 0.0 if (t_m <= 9.8e-164) tmp = Float64(2.0 / (Float64(Float64(k / Float64(l_m / sin(k))) * t_2) ^ 2.0)); elseif (t_m <= 6e-96) tmp = Float64(2.0 / Float64(Float64(Float64((k ^ 2.0) / l_m) * Float64(Float64(t_m * (k ^ 2.0)) / cos(k))) / l_m)); elseif (t_m <= 3.25e-62) tmp = Float64(2.0 / (Float64(Float64(t_2 * Float64(k * sin(k))) / l_m) ^ 2.0)); else tmp = Float64(l_m * (Float64((t_m ^ 0.75) * sqrt(k)) ^ -2.0)) ^ 2.0; end return Float64(t_s * tmp) end
l_m = abs(l); t_m = abs(t); t_s = sign(t) * abs(1.0); function tmp_2 = code(t_s, t_m, l_m, k) t_2 = sqrt((t_m / cos(k))); tmp = 0.0; if (t_m <= 9.8e-164) tmp = 2.0 / (((k / (l_m / sin(k))) * t_2) ^ 2.0); elseif (t_m <= 6e-96) tmp = 2.0 / ((((k ^ 2.0) / l_m) * ((t_m * (k ^ 2.0)) / cos(k))) / l_m); elseif (t_m <= 3.25e-62) tmp = 2.0 / (((t_2 * (k * sin(k))) / l_m) ^ 2.0); else tmp = (l_m * (((t_m ^ 0.75) * sqrt(k)) ^ -2.0)) ^ 2.0; end tmp_2 = t_s * tmp; end
l_m = N[Abs[l], $MachinePrecision]
t_m = N[Abs[t], $MachinePrecision]
t_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[t]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[t$95$s_, t$95$m_, l$95$m_, k_] := Block[{t$95$2 = N[Sqrt[N[(t$95$m / N[Cos[k], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, N[(t$95$s * If[LessEqual[t$95$m, 9.8e-164], N[(2.0 / N[Power[N[(N[(k / N[(l$95$m / N[Sin[k], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * t$95$2), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$m, 6e-96], N[(2.0 / N[(N[(N[(N[Power[k, 2.0], $MachinePrecision] / l$95$m), $MachinePrecision] * N[(N[(t$95$m * N[Power[k, 2.0], $MachinePrecision]), $MachinePrecision] / N[Cos[k], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / l$95$m), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$m, 3.25e-62], N[(2.0 / N[Power[N[(N[(t$95$2 * N[(k * N[Sin[k], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / l$95$m), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision], N[Power[N[(l$95$m * N[Power[N[(N[Power[t$95$m, 0.75], $MachinePrecision] * N[Sqrt[k], $MachinePrecision]), $MachinePrecision], -2.0], $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision]]]]), $MachinePrecision]]
\begin{array}{l}
l_m = \left|\ell\right|
\\
t_m = \left|t\right|
\\
t_s = \mathsf{copysign}\left(1, t\right)
\\
\begin{array}{l}
t_2 := \sqrt{\frac{t\_m}{\cos k}}\\
t\_s \cdot \begin{array}{l}
\mathbf{if}\;t\_m \leq 9.8 \cdot 10^{-164}:\\
\;\;\;\;\frac{2}{{\left(\frac{k}{\frac{l\_m}{\sin k}} \cdot t\_2\right)}^{2}}\\
\mathbf{elif}\;t\_m \leq 6 \cdot 10^{-96}:\\
\;\;\;\;\frac{2}{\frac{\frac{{k}^{2}}{l\_m} \cdot \frac{t\_m \cdot {k}^{2}}{\cos k}}{l\_m}}\\
\mathbf{elif}\;t\_m \leq 3.25 \cdot 10^{-62}:\\
\;\;\;\;\frac{2}{{\left(\frac{t\_2 \cdot \left(k \cdot \sin k\right)}{l\_m}\right)}^{2}}\\
\mathbf{else}:\\
\;\;\;\;{\left(l\_m \cdot {\left({t\_m}^{0.75} \cdot \sqrt{k}\right)}^{-2}\right)}^{2}\\
\end{array}
\end{array}
\end{array}
if t < 9.7999999999999993e-164Initial program 46.0%
associate-*l*46.0%
sqr-neg46.0%
sqr-neg46.0%
associate-/r*47.7%
distribute-rgt-in47.7%
unpow247.7%
times-frac29.7%
sqr-neg29.7%
times-frac47.7%
unpow247.7%
distribute-rgt-in47.7%
Simplified47.7%
add-sqr-sqrt17.0%
pow217.0%
associate-*l*16.9%
sqrt-prod8.0%
associate-/l/7.9%
sqrt-div7.9%
sqrt-pow19.3%
metadata-eval9.3%
sqrt-unprod7.3%
add-sqr-sqrt10.6%
associate-*r*10.6%
Applied egg-rr10.6%
Taylor expanded in k around inf 38.4%
associate-/l*38.4%
Simplified38.4%
if 9.7999999999999993e-164 < t < 6e-96Initial program 33.2%
associate-*l*33.2%
sqr-neg33.2%
sqr-neg33.2%
associate-/r*42.4%
distribute-rgt-in42.4%
unpow242.4%
times-frac42.3%
sqr-neg42.3%
times-frac42.4%
unpow242.4%
distribute-rgt-in42.4%
Simplified42.4%
associate-*l*42.4%
associate-*l/42.4%
associate-*r*42.4%
Applied egg-rr42.4%
Taylor expanded in t around 0 84.3%
times-frac84.3%
Simplified84.3%
Taylor expanded in k around 0 84.3%
if 6e-96 < t < 3.25000000000000013e-62Initial program 33.7%
associate-*l*33.7%
sqr-neg33.7%
sqr-neg33.7%
associate-/r*49.7%
distribute-rgt-in49.7%
unpow249.7%
times-frac49.7%
sqr-neg49.7%
times-frac49.7%
unpow249.7%
distribute-rgt-in49.7%
Simplified49.7%
add-sqr-sqrt49.7%
pow249.7%
associate-*l*34.2%
sqrt-prod34.2%
associate-/l/33.3%
sqrt-div37.1%
sqrt-pow137.1%
metadata-eval37.1%
sqrt-unprod34.5%
add-sqr-sqrt38.0%
associate-*r*38.0%
Applied egg-rr38.0%
Taylor expanded in k around inf 82.8%
*-commutative82.8%
associate-*r/83.5%
Simplified83.5%
if 3.25000000000000013e-62 < t Initial program 65.9%
associate-/r*65.9%
sqr-neg65.9%
associate-*l*62.3%
sqr-neg62.3%
associate-/r*62.9%
associate-+l+62.9%
unpow262.9%
times-frac52.6%
sqr-neg52.6%
times-frac62.9%
unpow262.9%
Simplified62.9%
Taylor expanded in k around 0 53.8%
expm1-log1p-u53.4%
expm1-udef53.3%
Applied egg-rr64.2%
expm1-def70.9%
expm1-log1p71.5%
Simplified71.5%
div-inv71.6%
Applied egg-rr71.6%
inv-pow71.6%
add-sqr-sqrt32.9%
unpow-prod-down32.9%
*-commutative32.9%
sqrt-prod31.7%
sqrt-pow131.7%
metadata-eval31.7%
*-commutative31.7%
sqrt-prod31.7%
sqrt-pow133.4%
metadata-eval33.4%
Applied egg-rr33.4%
pow-sqr33.4%
metadata-eval33.4%
Simplified33.4%
Final simplification39.9%
l_m = (fabs.f64 l)
t_m = (fabs.f64 t)
t_s = (copysign.f64 1 t)
(FPCore (t_s t_m l_m k)
:precision binary64
(let* ((t_2 (/ t_m (cos k))))
(*
t_s
(if (<= t_m 2.9e-174)
(/ 2.0 (pow (* (/ k (/ l_m (sin k))) (sqrt t_2)) 2.0))
(if (<= t_m 4.6e-15)
(/ 2.0 (* (* (pow (sin k) 2.0) t_2) (/ (/ (pow k 2.0) l_m) l_m)))
(pow (* l_m (pow (* (pow t_m 0.75) (sqrt k)) -2.0)) 2.0))))))l_m = fabs(l);
t_m = fabs(t);
t_s = copysign(1.0, t);
double code(double t_s, double t_m, double l_m, double k) {
double t_2 = t_m / cos(k);
double tmp;
if (t_m <= 2.9e-174) {
tmp = 2.0 / pow(((k / (l_m / sin(k))) * sqrt(t_2)), 2.0);
} else if (t_m <= 4.6e-15) {
tmp = 2.0 / ((pow(sin(k), 2.0) * t_2) * ((pow(k, 2.0) / l_m) / l_m));
} else {
tmp = pow((l_m * pow((pow(t_m, 0.75) * sqrt(k)), -2.0)), 2.0);
}
return t_s * tmp;
}
l_m = abs(l)
t_m = abs(t)
t_s = copysign(1.0d0, t)
real(8) function code(t_s, t_m, l_m, k)
real(8), intent (in) :: t_s
real(8), intent (in) :: t_m
real(8), intent (in) :: l_m
real(8), intent (in) :: k
real(8) :: t_2
real(8) :: tmp
t_2 = t_m / cos(k)
if (t_m <= 2.9d-174) then
tmp = 2.0d0 / (((k / (l_m / sin(k))) * sqrt(t_2)) ** 2.0d0)
else if (t_m <= 4.6d-15) then
tmp = 2.0d0 / (((sin(k) ** 2.0d0) * t_2) * (((k ** 2.0d0) / l_m) / l_m))
else
tmp = (l_m * (((t_m ** 0.75d0) * sqrt(k)) ** (-2.0d0))) ** 2.0d0
end if
code = t_s * tmp
end function
l_m = Math.abs(l);
t_m = Math.abs(t);
t_s = Math.copySign(1.0, t);
public static double code(double t_s, double t_m, double l_m, double k) {
double t_2 = t_m / Math.cos(k);
double tmp;
if (t_m <= 2.9e-174) {
tmp = 2.0 / Math.pow(((k / (l_m / Math.sin(k))) * Math.sqrt(t_2)), 2.0);
} else if (t_m <= 4.6e-15) {
tmp = 2.0 / ((Math.pow(Math.sin(k), 2.0) * t_2) * ((Math.pow(k, 2.0) / l_m) / l_m));
} else {
tmp = Math.pow((l_m * Math.pow((Math.pow(t_m, 0.75) * Math.sqrt(k)), -2.0)), 2.0);
}
return t_s * tmp;
}
l_m = math.fabs(l) t_m = math.fabs(t) t_s = math.copysign(1.0, t) def code(t_s, t_m, l_m, k): t_2 = t_m / math.cos(k) tmp = 0 if t_m <= 2.9e-174: tmp = 2.0 / math.pow(((k / (l_m / math.sin(k))) * math.sqrt(t_2)), 2.0) elif t_m <= 4.6e-15: tmp = 2.0 / ((math.pow(math.sin(k), 2.0) * t_2) * ((math.pow(k, 2.0) / l_m) / l_m)) else: tmp = math.pow((l_m * math.pow((math.pow(t_m, 0.75) * math.sqrt(k)), -2.0)), 2.0) return t_s * tmp
l_m = abs(l) t_m = abs(t) t_s = copysign(1.0, t) function code(t_s, t_m, l_m, k) t_2 = Float64(t_m / cos(k)) tmp = 0.0 if (t_m <= 2.9e-174) tmp = Float64(2.0 / (Float64(Float64(k / Float64(l_m / sin(k))) * sqrt(t_2)) ^ 2.0)); elseif (t_m <= 4.6e-15) tmp = Float64(2.0 / Float64(Float64((sin(k) ^ 2.0) * t_2) * Float64(Float64((k ^ 2.0) / l_m) / l_m))); else tmp = Float64(l_m * (Float64((t_m ^ 0.75) * sqrt(k)) ^ -2.0)) ^ 2.0; end return Float64(t_s * tmp) end
l_m = abs(l); t_m = abs(t); t_s = sign(t) * abs(1.0); function tmp_2 = code(t_s, t_m, l_m, k) t_2 = t_m / cos(k); tmp = 0.0; if (t_m <= 2.9e-174) tmp = 2.0 / (((k / (l_m / sin(k))) * sqrt(t_2)) ^ 2.0); elseif (t_m <= 4.6e-15) tmp = 2.0 / (((sin(k) ^ 2.0) * t_2) * (((k ^ 2.0) / l_m) / l_m)); else tmp = (l_m * (((t_m ^ 0.75) * sqrt(k)) ^ -2.0)) ^ 2.0; end tmp_2 = t_s * tmp; end
l_m = N[Abs[l], $MachinePrecision]
t_m = N[Abs[t], $MachinePrecision]
t_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[t]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[t$95$s_, t$95$m_, l$95$m_, k_] := Block[{t$95$2 = N[(t$95$m / N[Cos[k], $MachinePrecision]), $MachinePrecision]}, N[(t$95$s * If[LessEqual[t$95$m, 2.9e-174], N[(2.0 / N[Power[N[(N[(k / N[(l$95$m / N[Sin[k], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[Sqrt[t$95$2], $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$m, 4.6e-15], N[(2.0 / N[(N[(N[Power[N[Sin[k], $MachinePrecision], 2.0], $MachinePrecision] * t$95$2), $MachinePrecision] * N[(N[(N[Power[k, 2.0], $MachinePrecision] / l$95$m), $MachinePrecision] / l$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[Power[N[(l$95$m * N[Power[N[(N[Power[t$95$m, 0.75], $MachinePrecision] * N[Sqrt[k], $MachinePrecision]), $MachinePrecision], -2.0], $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision]]]), $MachinePrecision]]
\begin{array}{l}
l_m = \left|\ell\right|
\\
t_m = \left|t\right|
\\
t_s = \mathsf{copysign}\left(1, t\right)
\\
\begin{array}{l}
t_2 := \frac{t\_m}{\cos k}\\
t\_s \cdot \begin{array}{l}
\mathbf{if}\;t\_m \leq 2.9 \cdot 10^{-174}:\\
\;\;\;\;\frac{2}{{\left(\frac{k}{\frac{l\_m}{\sin k}} \cdot \sqrt{t\_2}\right)}^{2}}\\
\mathbf{elif}\;t\_m \leq 4.6 \cdot 10^{-15}:\\
\;\;\;\;\frac{2}{\left({\sin k}^{2} \cdot t\_2\right) \cdot \frac{\frac{{k}^{2}}{l\_m}}{l\_m}}\\
\mathbf{else}:\\
\;\;\;\;{\left(l\_m \cdot {\left({t\_m}^{0.75} \cdot \sqrt{k}\right)}^{-2}\right)}^{2}\\
\end{array}
\end{array}
\end{array}
if t < 2.9000000000000001e-174Initial program 46.6%
associate-*l*46.6%
sqr-neg46.6%
sqr-neg46.6%
associate-/r*48.3%
distribute-rgt-in48.3%
unpow248.3%
times-frac30.5%
sqr-neg30.5%
times-frac48.3%
unpow248.3%
distribute-rgt-in48.3%
Simplified48.3%
add-sqr-sqrt16.7%
pow216.7%
associate-*l*16.7%
sqrt-prod7.5%
associate-/l/7.5%
sqrt-div7.5%
sqrt-pow18.9%
metadata-eval8.9%
sqrt-unprod7.5%
add-sqr-sqrt10.2%
associate-*r*10.2%
Applied egg-rr10.2%
Taylor expanded in k around inf 37.4%
associate-/l*37.4%
Simplified37.4%
if 2.9000000000000001e-174 < t < 4.59999999999999981e-15Initial program 40.5%
associate-*l*40.5%
sqr-neg40.5%
sqr-neg40.5%
associate-/r*46.4%
distribute-rgt-in46.4%
unpow246.4%
times-frac43.6%
sqr-neg43.6%
times-frac46.4%
unpow246.4%
distribute-rgt-in46.4%
Simplified46.4%
associate-*l*43.7%
associate-*l/49.8%
associate-*r*49.8%
Applied egg-rr49.8%
Taylor expanded in t around 0 81.5%
times-frac81.4%
Simplified81.4%
expm1-log1p-u66.9%
expm1-udef42.2%
associate-/l*42.2%
associate-/l*42.2%
Applied egg-rr42.2%
expm1-def59.2%
expm1-log1p73.7%
associate-/r/81.5%
associate-/r/81.5%
Simplified81.5%
if 4.59999999999999981e-15 < t Initial program 67.7%
associate-/r*67.7%
sqr-neg67.7%
associate-*l*63.5%
sqr-neg63.5%
associate-/r*64.2%
associate-+l+64.2%
unpow264.2%
times-frac52.2%
sqr-neg52.2%
times-frac64.2%
unpow264.2%
Simplified64.2%
Taylor expanded in k around 0 55.9%
expm1-log1p-u55.5%
expm1-udef55.3%
Applied egg-rr68.0%
expm1-def74.7%
expm1-log1p75.4%
Simplified75.4%
div-inv75.5%
Applied egg-rr75.5%
inv-pow75.5%
add-sqr-sqrt35.6%
unpow-prod-down35.6%
*-commutative35.6%
sqrt-prod35.6%
sqrt-pow135.6%
metadata-eval35.6%
*-commutative35.6%
sqrt-prod35.6%
sqrt-pow137.6%
metadata-eval37.6%
Applied egg-rr37.6%
pow-sqr37.6%
metadata-eval37.6%
Simplified37.6%
Final simplification43.5%
l_m = (fabs.f64 l)
t_m = (fabs.f64 t)
t_s = (copysign.f64 1 t)
(FPCore (t_s t_m l_m k)
:precision binary64
(*
t_s
(if (<= k 1.7e-20)
(pow (* l_m (pow (* (pow t_m 0.75) (sqrt k)) -2.0)) 2.0)
(/
2.0
(/
1.0
(/
l_m
(* (/ (pow k 2.0) l_m) (* (pow (sin k) 2.0) (/ t_m (cos k))))))))))l_m = fabs(l);
t_m = fabs(t);
t_s = copysign(1.0, t);
double code(double t_s, double t_m, double l_m, double k) {
double tmp;
if (k <= 1.7e-20) {
tmp = pow((l_m * pow((pow(t_m, 0.75) * sqrt(k)), -2.0)), 2.0);
} else {
tmp = 2.0 / (1.0 / (l_m / ((pow(k, 2.0) / l_m) * (pow(sin(k), 2.0) * (t_m / cos(k))))));
}
return t_s * tmp;
}
l_m = abs(l)
t_m = abs(t)
t_s = copysign(1.0d0, t)
real(8) function code(t_s, t_m, l_m, k)
real(8), intent (in) :: t_s
real(8), intent (in) :: t_m
real(8), intent (in) :: l_m
real(8), intent (in) :: k
real(8) :: tmp
if (k <= 1.7d-20) then
tmp = (l_m * (((t_m ** 0.75d0) * sqrt(k)) ** (-2.0d0))) ** 2.0d0
else
tmp = 2.0d0 / (1.0d0 / (l_m / (((k ** 2.0d0) / l_m) * ((sin(k) ** 2.0d0) * (t_m / cos(k))))))
end if
code = t_s * tmp
end function
l_m = Math.abs(l);
t_m = Math.abs(t);
t_s = Math.copySign(1.0, t);
public static double code(double t_s, double t_m, double l_m, double k) {
double tmp;
if (k <= 1.7e-20) {
tmp = Math.pow((l_m * Math.pow((Math.pow(t_m, 0.75) * Math.sqrt(k)), -2.0)), 2.0);
} else {
tmp = 2.0 / (1.0 / (l_m / ((Math.pow(k, 2.0) / l_m) * (Math.pow(Math.sin(k), 2.0) * (t_m / Math.cos(k))))));
}
return t_s * tmp;
}
l_m = math.fabs(l) t_m = math.fabs(t) t_s = math.copysign(1.0, t) def code(t_s, t_m, l_m, k): tmp = 0 if k <= 1.7e-20: tmp = math.pow((l_m * math.pow((math.pow(t_m, 0.75) * math.sqrt(k)), -2.0)), 2.0) else: tmp = 2.0 / (1.0 / (l_m / ((math.pow(k, 2.0) / l_m) * (math.pow(math.sin(k), 2.0) * (t_m / math.cos(k)))))) return t_s * tmp
l_m = abs(l) t_m = abs(t) t_s = copysign(1.0, t) function code(t_s, t_m, l_m, k) tmp = 0.0 if (k <= 1.7e-20) tmp = Float64(l_m * (Float64((t_m ^ 0.75) * sqrt(k)) ^ -2.0)) ^ 2.0; else tmp = Float64(2.0 / Float64(1.0 / Float64(l_m / Float64(Float64((k ^ 2.0) / l_m) * Float64((sin(k) ^ 2.0) * Float64(t_m / cos(k))))))); end return Float64(t_s * tmp) end
l_m = abs(l); t_m = abs(t); t_s = sign(t) * abs(1.0); function tmp_2 = code(t_s, t_m, l_m, k) tmp = 0.0; if (k <= 1.7e-20) tmp = (l_m * (((t_m ^ 0.75) * sqrt(k)) ^ -2.0)) ^ 2.0; else tmp = 2.0 / (1.0 / (l_m / (((k ^ 2.0) / l_m) * ((sin(k) ^ 2.0) * (t_m / cos(k)))))); end tmp_2 = t_s * tmp; end
l_m = N[Abs[l], $MachinePrecision]
t_m = N[Abs[t], $MachinePrecision]
t_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[t]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[t$95$s_, t$95$m_, l$95$m_, k_] := N[(t$95$s * If[LessEqual[k, 1.7e-20], N[Power[N[(l$95$m * N[Power[N[(N[Power[t$95$m, 0.75], $MachinePrecision] * N[Sqrt[k], $MachinePrecision]), $MachinePrecision], -2.0], $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision], N[(2.0 / N[(1.0 / N[(l$95$m / N[(N[(N[Power[k, 2.0], $MachinePrecision] / l$95$m), $MachinePrecision] * N[(N[Power[N[Sin[k], $MachinePrecision], 2.0], $MachinePrecision] * N[(t$95$m / N[Cos[k], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]), $MachinePrecision]
\begin{array}{l}
l_m = \left|\ell\right|
\\
t_m = \left|t\right|
\\
t_s = \mathsf{copysign}\left(1, t\right)
\\
t\_s \cdot \begin{array}{l}
\mathbf{if}\;k \leq 1.7 \cdot 10^{-20}:\\
\;\;\;\;{\left(l\_m \cdot {\left({t\_m}^{0.75} \cdot \sqrt{k}\right)}^{-2}\right)}^{2}\\
\mathbf{else}:\\
\;\;\;\;\frac{2}{\frac{1}{\frac{l\_m}{\frac{{k}^{2}}{l\_m} \cdot \left({\sin k}^{2} \cdot \frac{t\_m}{\cos k}\right)}}}\\
\end{array}
\end{array}
if k < 1.6999999999999999e-20Initial program 53.2%
associate-/r*53.2%
sqr-neg53.2%
associate-*l*49.8%
sqr-neg49.8%
associate-/r*51.8%
associate-+l+51.8%
unpow251.8%
times-frac36.9%
sqr-neg36.9%
times-frac51.8%
unpow251.8%
Simplified51.8%
Taylor expanded in k around 0 51.3%
expm1-log1p-u35.6%
expm1-udef35.0%
Applied egg-rr33.4%
expm1-def35.4%
expm1-log1p35.7%
Simplified35.7%
div-inv35.7%
Applied egg-rr35.7%
inv-pow35.7%
add-sqr-sqrt15.7%
unpow-prod-down15.7%
*-commutative15.7%
sqrt-prod11.3%
sqrt-pow111.3%
metadata-eval11.3%
*-commutative11.3%
sqrt-prod11.3%
sqrt-pow112.1%
metadata-eval12.1%
Applied egg-rr12.1%
pow-sqr12.1%
metadata-eval12.1%
Simplified12.1%
if 1.6999999999999999e-20 < k Initial program 48.1%
associate-*l*48.1%
sqr-neg48.1%
sqr-neg48.1%
associate-/r*48.6%
distribute-rgt-in48.6%
unpow248.6%
times-frac36.8%
sqr-neg36.8%
times-frac48.6%
unpow248.6%
distribute-rgt-in48.6%
Simplified48.6%
associate-*l*48.5%
associate-*l/50.1%
associate-*r*50.1%
Applied egg-rr50.1%
Taylor expanded in t around 0 73.0%
times-frac73.0%
Simplified73.0%
clear-num73.0%
inv-pow73.0%
associate-/l*73.0%
Applied egg-rr73.0%
unpow-173.0%
associate-/r/73.1%
Simplified73.1%
Final simplification28.1%
l_m = (fabs.f64 l)
t_m = (fabs.f64 t)
t_s = (copysign.f64 1 t)
(FPCore (t_s t_m l_m k)
:precision binary64
(*
t_s
(if (<= k 1.45e-15)
(pow (* l_m (pow (* (pow t_m 0.75) (sqrt k)) -2.0)) 2.0)
(/
2.0
(/ (* (/ (* t_m (pow k 2.0)) (cos k)) (/ (pow (sin k) 2.0) l_m)) l_m)))))l_m = fabs(l);
t_m = fabs(t);
t_s = copysign(1.0, t);
double code(double t_s, double t_m, double l_m, double k) {
double tmp;
if (k <= 1.45e-15) {
tmp = pow((l_m * pow((pow(t_m, 0.75) * sqrt(k)), -2.0)), 2.0);
} else {
tmp = 2.0 / ((((t_m * pow(k, 2.0)) / cos(k)) * (pow(sin(k), 2.0) / l_m)) / l_m);
}
return t_s * tmp;
}
l_m = abs(l)
t_m = abs(t)
t_s = copysign(1.0d0, t)
real(8) function code(t_s, t_m, l_m, k)
real(8), intent (in) :: t_s
real(8), intent (in) :: t_m
real(8), intent (in) :: l_m
real(8), intent (in) :: k
real(8) :: tmp
if (k <= 1.45d-15) then
tmp = (l_m * (((t_m ** 0.75d0) * sqrt(k)) ** (-2.0d0))) ** 2.0d0
else
tmp = 2.0d0 / ((((t_m * (k ** 2.0d0)) / cos(k)) * ((sin(k) ** 2.0d0) / l_m)) / l_m)
end if
code = t_s * tmp
end function
l_m = Math.abs(l);
t_m = Math.abs(t);
t_s = Math.copySign(1.0, t);
public static double code(double t_s, double t_m, double l_m, double k) {
double tmp;
if (k <= 1.45e-15) {
tmp = Math.pow((l_m * Math.pow((Math.pow(t_m, 0.75) * Math.sqrt(k)), -2.0)), 2.0);
} else {
tmp = 2.0 / ((((t_m * Math.pow(k, 2.0)) / Math.cos(k)) * (Math.pow(Math.sin(k), 2.0) / l_m)) / l_m);
}
return t_s * tmp;
}
l_m = math.fabs(l) t_m = math.fabs(t) t_s = math.copysign(1.0, t) def code(t_s, t_m, l_m, k): tmp = 0 if k <= 1.45e-15: tmp = math.pow((l_m * math.pow((math.pow(t_m, 0.75) * math.sqrt(k)), -2.0)), 2.0) else: tmp = 2.0 / ((((t_m * math.pow(k, 2.0)) / math.cos(k)) * (math.pow(math.sin(k), 2.0) / l_m)) / l_m) return t_s * tmp
l_m = abs(l) t_m = abs(t) t_s = copysign(1.0, t) function code(t_s, t_m, l_m, k) tmp = 0.0 if (k <= 1.45e-15) tmp = Float64(l_m * (Float64((t_m ^ 0.75) * sqrt(k)) ^ -2.0)) ^ 2.0; else tmp = Float64(2.0 / Float64(Float64(Float64(Float64(t_m * (k ^ 2.0)) / cos(k)) * Float64((sin(k) ^ 2.0) / l_m)) / l_m)); end return Float64(t_s * tmp) end
l_m = abs(l); t_m = abs(t); t_s = sign(t) * abs(1.0); function tmp_2 = code(t_s, t_m, l_m, k) tmp = 0.0; if (k <= 1.45e-15) tmp = (l_m * (((t_m ^ 0.75) * sqrt(k)) ^ -2.0)) ^ 2.0; else tmp = 2.0 / ((((t_m * (k ^ 2.0)) / cos(k)) * ((sin(k) ^ 2.0) / l_m)) / l_m); end tmp_2 = t_s * tmp; end
l_m = N[Abs[l], $MachinePrecision]
t_m = N[Abs[t], $MachinePrecision]
t_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[t]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[t$95$s_, t$95$m_, l$95$m_, k_] := N[(t$95$s * If[LessEqual[k, 1.45e-15], N[Power[N[(l$95$m * N[Power[N[(N[Power[t$95$m, 0.75], $MachinePrecision] * N[Sqrt[k], $MachinePrecision]), $MachinePrecision], -2.0], $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision], N[(2.0 / N[(N[(N[(N[(t$95$m * N[Power[k, 2.0], $MachinePrecision]), $MachinePrecision] / N[Cos[k], $MachinePrecision]), $MachinePrecision] * N[(N[Power[N[Sin[k], $MachinePrecision], 2.0], $MachinePrecision] / l$95$m), $MachinePrecision]), $MachinePrecision] / l$95$m), $MachinePrecision]), $MachinePrecision]]), $MachinePrecision]
\begin{array}{l}
l_m = \left|\ell\right|
\\
t_m = \left|t\right|
\\
t_s = \mathsf{copysign}\left(1, t\right)
\\
t\_s \cdot \begin{array}{l}
\mathbf{if}\;k \leq 1.45 \cdot 10^{-15}:\\
\;\;\;\;{\left(l\_m \cdot {\left({t\_m}^{0.75} \cdot \sqrt{k}\right)}^{-2}\right)}^{2}\\
\mathbf{else}:\\
\;\;\;\;\frac{2}{\frac{\frac{t\_m \cdot {k}^{2}}{\cos k} \cdot \frac{{\sin k}^{2}}{l\_m}}{l\_m}}\\
\end{array}
\end{array}
if k < 1.45000000000000009e-15Initial program 53.2%
associate-/r*53.2%
sqr-neg53.2%
associate-*l*49.8%
sqr-neg49.8%
associate-/r*51.8%
associate-+l+51.8%
unpow251.8%
times-frac36.9%
sqr-neg36.9%
times-frac51.8%
unpow251.8%
Simplified51.8%
Taylor expanded in k around 0 51.3%
expm1-log1p-u35.6%
expm1-udef35.0%
Applied egg-rr33.4%
expm1-def35.4%
expm1-log1p35.7%
Simplified35.7%
div-inv35.7%
Applied egg-rr35.7%
inv-pow35.7%
add-sqr-sqrt15.7%
unpow-prod-down15.7%
*-commutative15.7%
sqrt-prod11.3%
sqrt-pow111.3%
metadata-eval11.3%
*-commutative11.3%
sqrt-prod11.3%
sqrt-pow112.1%
metadata-eval12.1%
Applied egg-rr12.1%
pow-sqr12.1%
metadata-eval12.1%
Simplified12.1%
if 1.45000000000000009e-15 < k Initial program 48.1%
associate-*l*48.1%
sqr-neg48.1%
sqr-neg48.1%
associate-/r*48.6%
distribute-rgt-in48.6%
unpow248.6%
times-frac36.8%
sqr-neg36.8%
times-frac48.6%
unpow248.6%
distribute-rgt-in48.6%
Simplified48.6%
associate-*l*48.5%
associate-*l/50.1%
associate-*r*50.1%
Applied egg-rr50.1%
Taylor expanded in t around 0 73.0%
associate-*r*73.0%
*-commutative73.0%
times-frac73.0%
Simplified73.0%
Final simplification28.0%
l_m = (fabs.f64 l)
t_m = (fabs.f64 t)
t_s = (copysign.f64 1 t)
(FPCore (t_s t_m l_m k)
:precision binary64
(*
t_s
(if (<= t_m 1.15e-62)
(/
2.0
(/
(fma
(pow k 6.0)
(/ (* t_m 0.16666666666666666) l_m)
(/ (pow k 4.0) (/ l_m t_m)))
l_m))
(pow (* l_m (pow (* (pow t_m 0.75) (sqrt k)) -2.0)) 2.0))))l_m = fabs(l);
t_m = fabs(t);
t_s = copysign(1.0, t);
double code(double t_s, double t_m, double l_m, double k) {
double tmp;
if (t_m <= 1.15e-62) {
tmp = 2.0 / (fma(pow(k, 6.0), ((t_m * 0.16666666666666666) / l_m), (pow(k, 4.0) / (l_m / t_m))) / l_m);
} else {
tmp = pow((l_m * pow((pow(t_m, 0.75) * sqrt(k)), -2.0)), 2.0);
}
return t_s * tmp;
}
l_m = abs(l) t_m = abs(t) t_s = copysign(1.0, t) function code(t_s, t_m, l_m, k) tmp = 0.0 if (t_m <= 1.15e-62) tmp = Float64(2.0 / Float64(fma((k ^ 6.0), Float64(Float64(t_m * 0.16666666666666666) / l_m), Float64((k ^ 4.0) / Float64(l_m / t_m))) / l_m)); else tmp = Float64(l_m * (Float64((t_m ^ 0.75) * sqrt(k)) ^ -2.0)) ^ 2.0; end return Float64(t_s * tmp) end
l_m = N[Abs[l], $MachinePrecision]
t_m = N[Abs[t], $MachinePrecision]
t_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[t]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[t$95$s_, t$95$m_, l$95$m_, k_] := N[(t$95$s * If[LessEqual[t$95$m, 1.15e-62], N[(2.0 / N[(N[(N[Power[k, 6.0], $MachinePrecision] * N[(N[(t$95$m * 0.16666666666666666), $MachinePrecision] / l$95$m), $MachinePrecision] + N[(N[Power[k, 4.0], $MachinePrecision] / N[(l$95$m / t$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / l$95$m), $MachinePrecision]), $MachinePrecision], N[Power[N[(l$95$m * N[Power[N[(N[Power[t$95$m, 0.75], $MachinePrecision] * N[Sqrt[k], $MachinePrecision]), $MachinePrecision], -2.0], $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision]]), $MachinePrecision]
\begin{array}{l}
l_m = \left|\ell\right|
\\
t_m = \left|t\right|
\\
t_s = \mathsf{copysign}\left(1, t\right)
\\
t\_s \cdot \begin{array}{l}
\mathbf{if}\;t\_m \leq 1.15 \cdot 10^{-62}:\\
\;\;\;\;\frac{2}{\frac{\mathsf{fma}\left({k}^{6}, \frac{t\_m \cdot 0.16666666666666666}{l\_m}, \frac{{k}^{4}}{\frac{l\_m}{t\_m}}\right)}{l\_m}}\\
\mathbf{else}:\\
\;\;\;\;{\left(l\_m \cdot {\left({t\_m}^{0.75} \cdot \sqrt{k}\right)}^{-2}\right)}^{2}\\
\end{array}
\end{array}
if t < 1.15e-62Initial program 44.7%
associate-*l*44.7%
sqr-neg44.7%
sqr-neg44.7%
associate-/r*47.4%
distribute-rgt-in47.4%
unpow247.4%
times-frac31.3%
sqr-neg31.3%
times-frac47.4%
unpow247.4%
distribute-rgt-in47.4%
Simplified47.4%
associate-*l*44.8%
associate-*l/46.6%
associate-*r*46.6%
Applied egg-rr46.6%
Taylor expanded in t around 0 65.8%
times-frac67.2%
Simplified67.2%
Taylor expanded in k around 0 44.7%
fma-def44.7%
distribute-rgt-out--54.2%
metadata-eval54.2%
associate-*l/54.2%
associate-/l*56.9%
Simplified56.9%
if 1.15e-62 < t Initial program 65.9%
associate-/r*65.9%
sqr-neg65.9%
associate-*l*62.3%
sqr-neg62.3%
associate-/r*62.9%
associate-+l+62.9%
unpow262.9%
times-frac52.6%
sqr-neg52.6%
times-frac62.9%
unpow262.9%
Simplified62.9%
Taylor expanded in k around 0 53.8%
expm1-log1p-u53.4%
expm1-udef53.3%
Applied egg-rr64.2%
expm1-def70.9%
expm1-log1p71.5%
Simplified71.5%
div-inv71.6%
Applied egg-rr71.6%
inv-pow71.6%
add-sqr-sqrt32.9%
unpow-prod-down32.9%
*-commutative32.9%
sqrt-prod31.7%
sqrt-pow131.7%
metadata-eval31.7%
*-commutative31.7%
sqrt-prod31.7%
sqrt-pow133.4%
metadata-eval33.4%
Applied egg-rr33.4%
pow-sqr33.4%
metadata-eval33.4%
Simplified33.4%
Final simplification49.0%
l_m = (fabs.f64 l)
t_m = (fabs.f64 t)
t_s = (copysign.f64 1 t)
(FPCore (t_s t_m l_m k)
:precision binary64
(*
t_s
(if (<= t_m 1.2e-62)
(/
2.0
(/
(fma
(pow k 6.0)
(/ (* t_m 0.16666666666666666) l_m)
(/ (pow k 4.0) (/ l_m t_m)))
l_m))
(pow (* l_m (* (pow (pow t_m 1.5) -1.0) (/ 1.0 k))) 2.0))))l_m = fabs(l);
t_m = fabs(t);
t_s = copysign(1.0, t);
double code(double t_s, double t_m, double l_m, double k) {
double tmp;
if (t_m <= 1.2e-62) {
tmp = 2.0 / (fma(pow(k, 6.0), ((t_m * 0.16666666666666666) / l_m), (pow(k, 4.0) / (l_m / t_m))) / l_m);
} else {
tmp = pow((l_m * (pow(pow(t_m, 1.5), -1.0) * (1.0 / k))), 2.0);
}
return t_s * tmp;
}
l_m = abs(l) t_m = abs(t) t_s = copysign(1.0, t) function code(t_s, t_m, l_m, k) tmp = 0.0 if (t_m <= 1.2e-62) tmp = Float64(2.0 / Float64(fma((k ^ 6.0), Float64(Float64(t_m * 0.16666666666666666) / l_m), Float64((k ^ 4.0) / Float64(l_m / t_m))) / l_m)); else tmp = Float64(l_m * Float64(((t_m ^ 1.5) ^ -1.0) * Float64(1.0 / k))) ^ 2.0; end return Float64(t_s * tmp) end
l_m = N[Abs[l], $MachinePrecision]
t_m = N[Abs[t], $MachinePrecision]
t_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[t]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[t$95$s_, t$95$m_, l$95$m_, k_] := N[(t$95$s * If[LessEqual[t$95$m, 1.2e-62], N[(2.0 / N[(N[(N[Power[k, 6.0], $MachinePrecision] * N[(N[(t$95$m * 0.16666666666666666), $MachinePrecision] / l$95$m), $MachinePrecision] + N[(N[Power[k, 4.0], $MachinePrecision] / N[(l$95$m / t$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / l$95$m), $MachinePrecision]), $MachinePrecision], N[Power[N[(l$95$m * N[(N[Power[N[Power[t$95$m, 1.5], $MachinePrecision], -1.0], $MachinePrecision] * N[(1.0 / k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision]]), $MachinePrecision]
\begin{array}{l}
l_m = \left|\ell\right|
\\
t_m = \left|t\right|
\\
t_s = \mathsf{copysign}\left(1, t\right)
\\
t\_s \cdot \begin{array}{l}
\mathbf{if}\;t\_m \leq 1.2 \cdot 10^{-62}:\\
\;\;\;\;\frac{2}{\frac{\mathsf{fma}\left({k}^{6}, \frac{t\_m \cdot 0.16666666666666666}{l\_m}, \frac{{k}^{4}}{\frac{l\_m}{t\_m}}\right)}{l\_m}}\\
\mathbf{else}:\\
\;\;\;\;{\left(l\_m \cdot \left({\left({t\_m}^{1.5}\right)}^{-1} \cdot \frac{1}{k}\right)\right)}^{2}\\
\end{array}
\end{array}
if t < 1.19999999999999992e-62Initial program 44.7%
associate-*l*44.7%
sqr-neg44.7%
sqr-neg44.7%
associate-/r*47.4%
distribute-rgt-in47.4%
unpow247.4%
times-frac31.3%
sqr-neg31.3%
times-frac47.4%
unpow247.4%
distribute-rgt-in47.4%
Simplified47.4%
associate-*l*44.8%
associate-*l/46.6%
associate-*r*46.6%
Applied egg-rr46.6%
Taylor expanded in t around 0 65.8%
times-frac67.2%
Simplified67.2%
Taylor expanded in k around 0 44.7%
fma-def44.7%
distribute-rgt-out--54.2%
metadata-eval54.2%
associate-*l/54.2%
associate-/l*56.9%
Simplified56.9%
if 1.19999999999999992e-62 < t Initial program 65.9%
associate-/r*65.9%
sqr-neg65.9%
associate-*l*62.3%
sqr-neg62.3%
associate-/r*62.9%
associate-+l+62.9%
unpow262.9%
times-frac52.6%
sqr-neg52.6%
times-frac62.9%
unpow262.9%
Simplified62.9%
Taylor expanded in k around 0 53.8%
expm1-log1p-u53.4%
expm1-udef53.3%
Applied egg-rr64.2%
expm1-def70.9%
expm1-log1p71.5%
Simplified71.5%
div-inv71.6%
Applied egg-rr71.6%
inv-pow71.6%
*-commutative71.6%
unpow-prod-down71.6%
inv-pow71.6%
Applied egg-rr71.6%
Final simplification61.9%
l_m = (fabs.f64 l)
t_m = (fabs.f64 t)
t_s = (copysign.f64 1 t)
(FPCore (t_s t_m l_m k)
:precision binary64
(*
t_s
(if (<= t_m 1.45e-58)
(/ 2.0 (/ (* (/ (pow k 2.0) l_m) (/ (* t_m (pow k 2.0)) (cos k))) l_m))
(pow (* l_m (* (pow (pow t_m 1.5) -1.0) (/ 1.0 k))) 2.0))))l_m = fabs(l);
t_m = fabs(t);
t_s = copysign(1.0, t);
double code(double t_s, double t_m, double l_m, double k) {
double tmp;
if (t_m <= 1.45e-58) {
tmp = 2.0 / (((pow(k, 2.0) / l_m) * ((t_m * pow(k, 2.0)) / cos(k))) / l_m);
} else {
tmp = pow((l_m * (pow(pow(t_m, 1.5), -1.0) * (1.0 / k))), 2.0);
}
return t_s * tmp;
}
l_m = abs(l)
t_m = abs(t)
t_s = copysign(1.0d0, t)
real(8) function code(t_s, t_m, l_m, k)
real(8), intent (in) :: t_s
real(8), intent (in) :: t_m
real(8), intent (in) :: l_m
real(8), intent (in) :: k
real(8) :: tmp
if (t_m <= 1.45d-58) then
tmp = 2.0d0 / ((((k ** 2.0d0) / l_m) * ((t_m * (k ** 2.0d0)) / cos(k))) / l_m)
else
tmp = (l_m * (((t_m ** 1.5d0) ** (-1.0d0)) * (1.0d0 / k))) ** 2.0d0
end if
code = t_s * tmp
end function
l_m = Math.abs(l);
t_m = Math.abs(t);
t_s = Math.copySign(1.0, t);
public static double code(double t_s, double t_m, double l_m, double k) {
double tmp;
if (t_m <= 1.45e-58) {
tmp = 2.0 / (((Math.pow(k, 2.0) / l_m) * ((t_m * Math.pow(k, 2.0)) / Math.cos(k))) / l_m);
} else {
tmp = Math.pow((l_m * (Math.pow(Math.pow(t_m, 1.5), -1.0) * (1.0 / k))), 2.0);
}
return t_s * tmp;
}
l_m = math.fabs(l) t_m = math.fabs(t) t_s = math.copysign(1.0, t) def code(t_s, t_m, l_m, k): tmp = 0 if t_m <= 1.45e-58: tmp = 2.0 / (((math.pow(k, 2.0) / l_m) * ((t_m * math.pow(k, 2.0)) / math.cos(k))) / l_m) else: tmp = math.pow((l_m * (math.pow(math.pow(t_m, 1.5), -1.0) * (1.0 / k))), 2.0) return t_s * tmp
l_m = abs(l) t_m = abs(t) t_s = copysign(1.0, t) function code(t_s, t_m, l_m, k) tmp = 0.0 if (t_m <= 1.45e-58) tmp = Float64(2.0 / Float64(Float64(Float64((k ^ 2.0) / l_m) * Float64(Float64(t_m * (k ^ 2.0)) / cos(k))) / l_m)); else tmp = Float64(l_m * Float64(((t_m ^ 1.5) ^ -1.0) * Float64(1.0 / k))) ^ 2.0; end return Float64(t_s * tmp) end
l_m = abs(l); t_m = abs(t); t_s = sign(t) * abs(1.0); function tmp_2 = code(t_s, t_m, l_m, k) tmp = 0.0; if (t_m <= 1.45e-58) tmp = 2.0 / ((((k ^ 2.0) / l_m) * ((t_m * (k ^ 2.0)) / cos(k))) / l_m); else tmp = (l_m * (((t_m ^ 1.5) ^ -1.0) * (1.0 / k))) ^ 2.0; end tmp_2 = t_s * tmp; end
l_m = N[Abs[l], $MachinePrecision]
t_m = N[Abs[t], $MachinePrecision]
t_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[t]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[t$95$s_, t$95$m_, l$95$m_, k_] := N[(t$95$s * If[LessEqual[t$95$m, 1.45e-58], N[(2.0 / N[(N[(N[(N[Power[k, 2.0], $MachinePrecision] / l$95$m), $MachinePrecision] * N[(N[(t$95$m * N[Power[k, 2.0], $MachinePrecision]), $MachinePrecision] / N[Cos[k], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / l$95$m), $MachinePrecision]), $MachinePrecision], N[Power[N[(l$95$m * N[(N[Power[N[Power[t$95$m, 1.5], $MachinePrecision], -1.0], $MachinePrecision] * N[(1.0 / k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision]]), $MachinePrecision]
\begin{array}{l}
l_m = \left|\ell\right|
\\
t_m = \left|t\right|
\\
t_s = \mathsf{copysign}\left(1, t\right)
\\
t\_s \cdot \begin{array}{l}
\mathbf{if}\;t\_m \leq 1.45 \cdot 10^{-58}:\\
\;\;\;\;\frac{2}{\frac{\frac{{k}^{2}}{l\_m} \cdot \frac{t\_m \cdot {k}^{2}}{\cos k}}{l\_m}}\\
\mathbf{else}:\\
\;\;\;\;{\left(l\_m \cdot \left({\left({t\_m}^{1.5}\right)}^{-1} \cdot \frac{1}{k}\right)\right)}^{2}\\
\end{array}
\end{array}
if t < 1.44999999999999995e-58Initial program 45.0%
associate-*l*45.0%
sqr-neg45.0%
sqr-neg45.0%
associate-/r*47.7%
distribute-rgt-in47.7%
unpow247.7%
times-frac31.7%
sqr-neg31.7%
times-frac47.7%
unpow247.7%
distribute-rgt-in47.7%
Simplified47.7%
associate-*l*45.2%
associate-*l/46.9%
associate-*r*46.9%
Applied egg-rr46.9%
Taylor expanded in t around 0 66.0%
times-frac67.4%
Simplified67.4%
Taylor expanded in k around 0 56.4%
if 1.44999999999999995e-58 < t Initial program 65.5%
associate-/r*65.5%
sqr-neg65.5%
associate-*l*61.8%
sqr-neg61.8%
associate-/r*62.5%
associate-+l+62.5%
unpow262.5%
times-frac52.1%
sqr-neg52.1%
times-frac62.5%
unpow262.5%
Simplified62.5%
Taylor expanded in k around 0 54.4%
expm1-log1p-u54.0%
expm1-udef53.9%
Applied egg-rr64.9%
expm1-def71.8%
expm1-log1p72.4%
Simplified72.4%
div-inv72.4%
Applied egg-rr72.4%
inv-pow72.4%
*-commutative72.4%
unpow-prod-down72.4%
inv-pow72.4%
Applied egg-rr72.4%
Final simplification61.8%
l_m = (fabs.f64 l)
t_m = (fabs.f64 t)
t_s = (copysign.f64 1 t)
(FPCore (t_s t_m l_m k)
:precision binary64
(*
t_s
(if (<= t_m 9.5e-63)
(/ 2.0 (/ (/ (pow k 4.0) (/ l_m t_m)) l_m))
(pow (* l_m (* (pow (pow t_m 1.5) -1.0) (/ 1.0 k))) 2.0))))l_m = fabs(l);
t_m = fabs(t);
t_s = copysign(1.0, t);
double code(double t_s, double t_m, double l_m, double k) {
double tmp;
if (t_m <= 9.5e-63) {
tmp = 2.0 / ((pow(k, 4.0) / (l_m / t_m)) / l_m);
} else {
tmp = pow((l_m * (pow(pow(t_m, 1.5), -1.0) * (1.0 / k))), 2.0);
}
return t_s * tmp;
}
l_m = abs(l)
t_m = abs(t)
t_s = copysign(1.0d0, t)
real(8) function code(t_s, t_m, l_m, k)
real(8), intent (in) :: t_s
real(8), intent (in) :: t_m
real(8), intent (in) :: l_m
real(8), intent (in) :: k
real(8) :: tmp
if (t_m <= 9.5d-63) then
tmp = 2.0d0 / (((k ** 4.0d0) / (l_m / t_m)) / l_m)
else
tmp = (l_m * (((t_m ** 1.5d0) ** (-1.0d0)) * (1.0d0 / k))) ** 2.0d0
end if
code = t_s * tmp
end function
l_m = Math.abs(l);
t_m = Math.abs(t);
t_s = Math.copySign(1.0, t);
public static double code(double t_s, double t_m, double l_m, double k) {
double tmp;
if (t_m <= 9.5e-63) {
tmp = 2.0 / ((Math.pow(k, 4.0) / (l_m / t_m)) / l_m);
} else {
tmp = Math.pow((l_m * (Math.pow(Math.pow(t_m, 1.5), -1.0) * (1.0 / k))), 2.0);
}
return t_s * tmp;
}
l_m = math.fabs(l) t_m = math.fabs(t) t_s = math.copysign(1.0, t) def code(t_s, t_m, l_m, k): tmp = 0 if t_m <= 9.5e-63: tmp = 2.0 / ((math.pow(k, 4.0) / (l_m / t_m)) / l_m) else: tmp = math.pow((l_m * (math.pow(math.pow(t_m, 1.5), -1.0) * (1.0 / k))), 2.0) return t_s * tmp
l_m = abs(l) t_m = abs(t) t_s = copysign(1.0, t) function code(t_s, t_m, l_m, k) tmp = 0.0 if (t_m <= 9.5e-63) tmp = Float64(2.0 / Float64(Float64((k ^ 4.0) / Float64(l_m / t_m)) / l_m)); else tmp = Float64(l_m * Float64(((t_m ^ 1.5) ^ -1.0) * Float64(1.0 / k))) ^ 2.0; end return Float64(t_s * tmp) end
l_m = abs(l); t_m = abs(t); t_s = sign(t) * abs(1.0); function tmp_2 = code(t_s, t_m, l_m, k) tmp = 0.0; if (t_m <= 9.5e-63) tmp = 2.0 / (((k ^ 4.0) / (l_m / t_m)) / l_m); else tmp = (l_m * (((t_m ^ 1.5) ^ -1.0) * (1.0 / k))) ^ 2.0; end tmp_2 = t_s * tmp; end
l_m = N[Abs[l], $MachinePrecision]
t_m = N[Abs[t], $MachinePrecision]
t_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[t]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[t$95$s_, t$95$m_, l$95$m_, k_] := N[(t$95$s * If[LessEqual[t$95$m, 9.5e-63], N[(2.0 / N[(N[(N[Power[k, 4.0], $MachinePrecision] / N[(l$95$m / t$95$m), $MachinePrecision]), $MachinePrecision] / l$95$m), $MachinePrecision]), $MachinePrecision], N[Power[N[(l$95$m * N[(N[Power[N[Power[t$95$m, 1.5], $MachinePrecision], -1.0], $MachinePrecision] * N[(1.0 / k), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision]]), $MachinePrecision]
\begin{array}{l}
l_m = \left|\ell\right|
\\
t_m = \left|t\right|
\\
t_s = \mathsf{copysign}\left(1, t\right)
\\
t\_s \cdot \begin{array}{l}
\mathbf{if}\;t\_m \leq 9.5 \cdot 10^{-63}:\\
\;\;\;\;\frac{2}{\frac{\frac{{k}^{4}}{\frac{l\_m}{t\_m}}}{l\_m}}\\
\mathbf{else}:\\
\;\;\;\;{\left(l\_m \cdot \left({\left({t\_m}^{1.5}\right)}^{-1} \cdot \frac{1}{k}\right)\right)}^{2}\\
\end{array}
\end{array}
if t < 9.50000000000000016e-63Initial program 44.7%
associate-*l*44.7%
sqr-neg44.7%
sqr-neg44.7%
associate-/r*47.4%
distribute-rgt-in47.4%
unpow247.4%
times-frac31.3%
sqr-neg31.3%
times-frac47.4%
unpow247.4%
distribute-rgt-in47.4%
Simplified47.4%
associate-*l*44.8%
associate-*l/46.6%
associate-*r*46.6%
Applied egg-rr46.6%
Taylor expanded in t around 0 65.8%
times-frac67.2%
Simplified67.2%
Taylor expanded in k around 0 53.4%
associate-/l*56.0%
Simplified56.0%
if 9.50000000000000016e-63 < t Initial program 65.9%
associate-/r*65.9%
sqr-neg65.9%
associate-*l*62.3%
sqr-neg62.3%
associate-/r*62.9%
associate-+l+62.9%
unpow262.9%
times-frac52.6%
sqr-neg52.6%
times-frac62.9%
unpow262.9%
Simplified62.9%
Taylor expanded in k around 0 53.8%
expm1-log1p-u53.4%
expm1-udef53.3%
Applied egg-rr64.2%
expm1-def70.9%
expm1-log1p71.5%
Simplified71.5%
div-inv71.6%
Applied egg-rr71.6%
inv-pow71.6%
*-commutative71.6%
unpow-prod-down71.6%
inv-pow71.6%
Applied egg-rr71.6%
Final simplification61.3%
l_m = (fabs.f64 l)
t_m = (fabs.f64 t)
t_s = (copysign.f64 1 t)
(FPCore (t_s t_m l_m k)
:precision binary64
(*
t_s
(if (<= t_m 1.1e-62)
(/ 2.0 (/ (/ (pow k 4.0) (/ l_m t_m)) l_m))
(pow (* l_m (/ 1.0 (* k (pow t_m 1.5)))) 2.0))))l_m = fabs(l);
t_m = fabs(t);
t_s = copysign(1.0, t);
double code(double t_s, double t_m, double l_m, double k) {
double tmp;
if (t_m <= 1.1e-62) {
tmp = 2.0 / ((pow(k, 4.0) / (l_m / t_m)) / l_m);
} else {
tmp = pow((l_m * (1.0 / (k * pow(t_m, 1.5)))), 2.0);
}
return t_s * tmp;
}
l_m = abs(l)
t_m = abs(t)
t_s = copysign(1.0d0, t)
real(8) function code(t_s, t_m, l_m, k)
real(8), intent (in) :: t_s
real(8), intent (in) :: t_m
real(8), intent (in) :: l_m
real(8), intent (in) :: k
real(8) :: tmp
if (t_m <= 1.1d-62) then
tmp = 2.0d0 / (((k ** 4.0d0) / (l_m / t_m)) / l_m)
else
tmp = (l_m * (1.0d0 / (k * (t_m ** 1.5d0)))) ** 2.0d0
end if
code = t_s * tmp
end function
l_m = Math.abs(l);
t_m = Math.abs(t);
t_s = Math.copySign(1.0, t);
public static double code(double t_s, double t_m, double l_m, double k) {
double tmp;
if (t_m <= 1.1e-62) {
tmp = 2.0 / ((Math.pow(k, 4.0) / (l_m / t_m)) / l_m);
} else {
tmp = Math.pow((l_m * (1.0 / (k * Math.pow(t_m, 1.5)))), 2.0);
}
return t_s * tmp;
}
l_m = math.fabs(l) t_m = math.fabs(t) t_s = math.copysign(1.0, t) def code(t_s, t_m, l_m, k): tmp = 0 if t_m <= 1.1e-62: tmp = 2.0 / ((math.pow(k, 4.0) / (l_m / t_m)) / l_m) else: tmp = math.pow((l_m * (1.0 / (k * math.pow(t_m, 1.5)))), 2.0) return t_s * tmp
l_m = abs(l) t_m = abs(t) t_s = copysign(1.0, t) function code(t_s, t_m, l_m, k) tmp = 0.0 if (t_m <= 1.1e-62) tmp = Float64(2.0 / Float64(Float64((k ^ 4.0) / Float64(l_m / t_m)) / l_m)); else tmp = Float64(l_m * Float64(1.0 / Float64(k * (t_m ^ 1.5)))) ^ 2.0; end return Float64(t_s * tmp) end
l_m = abs(l); t_m = abs(t); t_s = sign(t) * abs(1.0); function tmp_2 = code(t_s, t_m, l_m, k) tmp = 0.0; if (t_m <= 1.1e-62) tmp = 2.0 / (((k ^ 4.0) / (l_m / t_m)) / l_m); else tmp = (l_m * (1.0 / (k * (t_m ^ 1.5)))) ^ 2.0; end tmp_2 = t_s * tmp; end
l_m = N[Abs[l], $MachinePrecision]
t_m = N[Abs[t], $MachinePrecision]
t_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[t]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[t$95$s_, t$95$m_, l$95$m_, k_] := N[(t$95$s * If[LessEqual[t$95$m, 1.1e-62], N[(2.0 / N[(N[(N[Power[k, 4.0], $MachinePrecision] / N[(l$95$m / t$95$m), $MachinePrecision]), $MachinePrecision] / l$95$m), $MachinePrecision]), $MachinePrecision], N[Power[N[(l$95$m * N[(1.0 / N[(k * N[Power[t$95$m, 1.5], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision]]), $MachinePrecision]
\begin{array}{l}
l_m = \left|\ell\right|
\\
t_m = \left|t\right|
\\
t_s = \mathsf{copysign}\left(1, t\right)
\\
t\_s \cdot \begin{array}{l}
\mathbf{if}\;t\_m \leq 1.1 \cdot 10^{-62}:\\
\;\;\;\;\frac{2}{\frac{\frac{{k}^{4}}{\frac{l\_m}{t\_m}}}{l\_m}}\\
\mathbf{else}:\\
\;\;\;\;{\left(l\_m \cdot \frac{1}{k \cdot {t\_m}^{1.5}}\right)}^{2}\\
\end{array}
\end{array}
if t < 1.10000000000000009e-62Initial program 44.7%
associate-*l*44.7%
sqr-neg44.7%
sqr-neg44.7%
associate-/r*47.4%
distribute-rgt-in47.4%
unpow247.4%
times-frac31.3%
sqr-neg31.3%
times-frac47.4%
unpow247.4%
distribute-rgt-in47.4%
Simplified47.4%
associate-*l*44.8%
associate-*l/46.6%
associate-*r*46.6%
Applied egg-rr46.6%
Taylor expanded in t around 0 65.8%
times-frac67.2%
Simplified67.2%
Taylor expanded in k around 0 53.4%
associate-/l*56.0%
Simplified56.0%
if 1.10000000000000009e-62 < t Initial program 65.9%
associate-/r*65.9%
sqr-neg65.9%
associate-*l*62.3%
sqr-neg62.3%
associate-/r*62.9%
associate-+l+62.9%
unpow262.9%
times-frac52.6%
sqr-neg52.6%
times-frac62.9%
unpow262.9%
Simplified62.9%
Taylor expanded in k around 0 53.8%
expm1-log1p-u53.4%
expm1-udef53.3%
Applied egg-rr64.2%
expm1-def70.9%
expm1-log1p71.5%
Simplified71.5%
div-inv71.6%
Applied egg-rr71.6%
Final simplification61.3%
l_m = (fabs.f64 l)
t_m = (fabs.f64 t)
t_s = (copysign.f64 1 t)
(FPCore (t_s t_m l_m k)
:precision binary64
(*
t_s
(if (<= t_m 1.1e-62)
(/ 2.0 (/ (/ (pow k 4.0) (/ l_m t_m)) l_m))
(pow (* l_m (/ (/ 1.0 k) (pow t_m 1.5))) 2.0))))l_m = fabs(l);
t_m = fabs(t);
t_s = copysign(1.0, t);
double code(double t_s, double t_m, double l_m, double k) {
double tmp;
if (t_m <= 1.1e-62) {
tmp = 2.0 / ((pow(k, 4.0) / (l_m / t_m)) / l_m);
} else {
tmp = pow((l_m * ((1.0 / k) / pow(t_m, 1.5))), 2.0);
}
return t_s * tmp;
}
l_m = abs(l)
t_m = abs(t)
t_s = copysign(1.0d0, t)
real(8) function code(t_s, t_m, l_m, k)
real(8), intent (in) :: t_s
real(8), intent (in) :: t_m
real(8), intent (in) :: l_m
real(8), intent (in) :: k
real(8) :: tmp
if (t_m <= 1.1d-62) then
tmp = 2.0d0 / (((k ** 4.0d0) / (l_m / t_m)) / l_m)
else
tmp = (l_m * ((1.0d0 / k) / (t_m ** 1.5d0))) ** 2.0d0
end if
code = t_s * tmp
end function
l_m = Math.abs(l);
t_m = Math.abs(t);
t_s = Math.copySign(1.0, t);
public static double code(double t_s, double t_m, double l_m, double k) {
double tmp;
if (t_m <= 1.1e-62) {
tmp = 2.0 / ((Math.pow(k, 4.0) / (l_m / t_m)) / l_m);
} else {
tmp = Math.pow((l_m * ((1.0 / k) / Math.pow(t_m, 1.5))), 2.0);
}
return t_s * tmp;
}
l_m = math.fabs(l) t_m = math.fabs(t) t_s = math.copysign(1.0, t) def code(t_s, t_m, l_m, k): tmp = 0 if t_m <= 1.1e-62: tmp = 2.0 / ((math.pow(k, 4.0) / (l_m / t_m)) / l_m) else: tmp = math.pow((l_m * ((1.0 / k) / math.pow(t_m, 1.5))), 2.0) return t_s * tmp
l_m = abs(l) t_m = abs(t) t_s = copysign(1.0, t) function code(t_s, t_m, l_m, k) tmp = 0.0 if (t_m <= 1.1e-62) tmp = Float64(2.0 / Float64(Float64((k ^ 4.0) / Float64(l_m / t_m)) / l_m)); else tmp = Float64(l_m * Float64(Float64(1.0 / k) / (t_m ^ 1.5))) ^ 2.0; end return Float64(t_s * tmp) end
l_m = abs(l); t_m = abs(t); t_s = sign(t) * abs(1.0); function tmp_2 = code(t_s, t_m, l_m, k) tmp = 0.0; if (t_m <= 1.1e-62) tmp = 2.0 / (((k ^ 4.0) / (l_m / t_m)) / l_m); else tmp = (l_m * ((1.0 / k) / (t_m ^ 1.5))) ^ 2.0; end tmp_2 = t_s * tmp; end
l_m = N[Abs[l], $MachinePrecision]
t_m = N[Abs[t], $MachinePrecision]
t_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[t]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[t$95$s_, t$95$m_, l$95$m_, k_] := N[(t$95$s * If[LessEqual[t$95$m, 1.1e-62], N[(2.0 / N[(N[(N[Power[k, 4.0], $MachinePrecision] / N[(l$95$m / t$95$m), $MachinePrecision]), $MachinePrecision] / l$95$m), $MachinePrecision]), $MachinePrecision], N[Power[N[(l$95$m * N[(N[(1.0 / k), $MachinePrecision] / N[Power[t$95$m, 1.5], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision]]), $MachinePrecision]
\begin{array}{l}
l_m = \left|\ell\right|
\\
t_m = \left|t\right|
\\
t_s = \mathsf{copysign}\left(1, t\right)
\\
t\_s \cdot \begin{array}{l}
\mathbf{if}\;t\_m \leq 1.1 \cdot 10^{-62}:\\
\;\;\;\;\frac{2}{\frac{\frac{{k}^{4}}{\frac{l\_m}{t\_m}}}{l\_m}}\\
\mathbf{else}:\\
\;\;\;\;{\left(l\_m \cdot \frac{\frac{1}{k}}{{t\_m}^{1.5}}\right)}^{2}\\
\end{array}
\end{array}
if t < 1.10000000000000009e-62Initial program 44.7%
associate-*l*44.7%
sqr-neg44.7%
sqr-neg44.7%
associate-/r*47.4%
distribute-rgt-in47.4%
unpow247.4%
times-frac31.3%
sqr-neg31.3%
times-frac47.4%
unpow247.4%
distribute-rgt-in47.4%
Simplified47.4%
associate-*l*44.8%
associate-*l/46.6%
associate-*r*46.6%
Applied egg-rr46.6%
Taylor expanded in t around 0 65.8%
times-frac67.2%
Simplified67.2%
Taylor expanded in k around 0 53.4%
associate-/l*56.0%
Simplified56.0%
if 1.10000000000000009e-62 < t Initial program 65.9%
associate-/r*65.9%
sqr-neg65.9%
associate-*l*62.3%
sqr-neg62.3%
associate-/r*62.9%
associate-+l+62.9%
unpow262.9%
times-frac52.6%
sqr-neg52.6%
times-frac62.9%
unpow262.9%
Simplified62.9%
Taylor expanded in k around 0 53.8%
expm1-log1p-u53.4%
expm1-udef53.3%
Applied egg-rr64.2%
expm1-def70.9%
expm1-log1p71.5%
Simplified71.5%
div-inv71.6%
Applied egg-rr71.6%
expm1-log1p-u58.8%
expm1-udef49.8%
associate-/r*49.8%
Applied egg-rr49.8%
expm1-def58.8%
expm1-log1p71.6%
Simplified71.6%
Final simplification61.3%
l_m = (fabs.f64 l)
t_m = (fabs.f64 t)
t_s = (copysign.f64 1 t)
(FPCore (t_s t_m l_m k)
:precision binary64
(*
t_s
(if (<= t_m 1.15e-62)
(/ 2.0 (/ (/ (pow k 4.0) (/ l_m t_m)) l_m))
(pow (/ l_m (* k (pow t_m 1.5))) 2.0))))l_m = fabs(l);
t_m = fabs(t);
t_s = copysign(1.0, t);
double code(double t_s, double t_m, double l_m, double k) {
double tmp;
if (t_m <= 1.15e-62) {
tmp = 2.0 / ((pow(k, 4.0) / (l_m / t_m)) / l_m);
} else {
tmp = pow((l_m / (k * pow(t_m, 1.5))), 2.0);
}
return t_s * tmp;
}
l_m = abs(l)
t_m = abs(t)
t_s = copysign(1.0d0, t)
real(8) function code(t_s, t_m, l_m, k)
real(8), intent (in) :: t_s
real(8), intent (in) :: t_m
real(8), intent (in) :: l_m
real(8), intent (in) :: k
real(8) :: tmp
if (t_m <= 1.15d-62) then
tmp = 2.0d0 / (((k ** 4.0d0) / (l_m / t_m)) / l_m)
else
tmp = (l_m / (k * (t_m ** 1.5d0))) ** 2.0d0
end if
code = t_s * tmp
end function
l_m = Math.abs(l);
t_m = Math.abs(t);
t_s = Math.copySign(1.0, t);
public static double code(double t_s, double t_m, double l_m, double k) {
double tmp;
if (t_m <= 1.15e-62) {
tmp = 2.0 / ((Math.pow(k, 4.0) / (l_m / t_m)) / l_m);
} else {
tmp = Math.pow((l_m / (k * Math.pow(t_m, 1.5))), 2.0);
}
return t_s * tmp;
}
l_m = math.fabs(l) t_m = math.fabs(t) t_s = math.copysign(1.0, t) def code(t_s, t_m, l_m, k): tmp = 0 if t_m <= 1.15e-62: tmp = 2.0 / ((math.pow(k, 4.0) / (l_m / t_m)) / l_m) else: tmp = math.pow((l_m / (k * math.pow(t_m, 1.5))), 2.0) return t_s * tmp
l_m = abs(l) t_m = abs(t) t_s = copysign(1.0, t) function code(t_s, t_m, l_m, k) tmp = 0.0 if (t_m <= 1.15e-62) tmp = Float64(2.0 / Float64(Float64((k ^ 4.0) / Float64(l_m / t_m)) / l_m)); else tmp = Float64(l_m / Float64(k * (t_m ^ 1.5))) ^ 2.0; end return Float64(t_s * tmp) end
l_m = abs(l); t_m = abs(t); t_s = sign(t) * abs(1.0); function tmp_2 = code(t_s, t_m, l_m, k) tmp = 0.0; if (t_m <= 1.15e-62) tmp = 2.0 / (((k ^ 4.0) / (l_m / t_m)) / l_m); else tmp = (l_m / (k * (t_m ^ 1.5))) ^ 2.0; end tmp_2 = t_s * tmp; end
l_m = N[Abs[l], $MachinePrecision]
t_m = N[Abs[t], $MachinePrecision]
t_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[t]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[t$95$s_, t$95$m_, l$95$m_, k_] := N[(t$95$s * If[LessEqual[t$95$m, 1.15e-62], N[(2.0 / N[(N[(N[Power[k, 4.0], $MachinePrecision] / N[(l$95$m / t$95$m), $MachinePrecision]), $MachinePrecision] / l$95$m), $MachinePrecision]), $MachinePrecision], N[Power[N[(l$95$m / N[(k * N[Power[t$95$m, 1.5], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision]]), $MachinePrecision]
\begin{array}{l}
l_m = \left|\ell\right|
\\
t_m = \left|t\right|
\\
t_s = \mathsf{copysign}\left(1, t\right)
\\
t\_s \cdot \begin{array}{l}
\mathbf{if}\;t\_m \leq 1.15 \cdot 10^{-62}:\\
\;\;\;\;\frac{2}{\frac{\frac{{k}^{4}}{\frac{l\_m}{t\_m}}}{l\_m}}\\
\mathbf{else}:\\
\;\;\;\;{\left(\frac{l\_m}{k \cdot {t\_m}^{1.5}}\right)}^{2}\\
\end{array}
\end{array}
if t < 1.15e-62Initial program 44.7%
associate-*l*44.7%
sqr-neg44.7%
sqr-neg44.7%
associate-/r*47.4%
distribute-rgt-in47.4%
unpow247.4%
times-frac31.3%
sqr-neg31.3%
times-frac47.4%
unpow247.4%
distribute-rgt-in47.4%
Simplified47.4%
associate-*l*44.8%
associate-*l/46.6%
associate-*r*46.6%
Applied egg-rr46.6%
Taylor expanded in t around 0 65.8%
times-frac67.2%
Simplified67.2%
Taylor expanded in k around 0 53.4%
associate-/l*56.0%
Simplified56.0%
if 1.15e-62 < t Initial program 65.9%
associate-/r*65.9%
sqr-neg65.9%
associate-*l*62.3%
sqr-neg62.3%
associate-/r*62.9%
associate-+l+62.9%
unpow262.9%
times-frac52.6%
sqr-neg52.6%
times-frac62.9%
unpow262.9%
Simplified62.9%
Taylor expanded in k around 0 53.8%
expm1-log1p-u53.4%
expm1-udef53.3%
Applied egg-rr64.2%
expm1-def70.9%
expm1-log1p71.5%
Simplified71.5%
Final simplification61.3%
l_m = (fabs.f64 l) t_m = (fabs.f64 t) t_s = (copysign.f64 1 t) (FPCore (t_s t_m l_m k) :precision binary64 (* t_s (/ 2.0 (/ (/ (* t_m (pow k 4.0)) l_m) l_m))))
l_m = fabs(l);
t_m = fabs(t);
t_s = copysign(1.0, t);
double code(double t_s, double t_m, double l_m, double k) {
return t_s * (2.0 / (((t_m * pow(k, 4.0)) / l_m) / l_m));
}
l_m = abs(l)
t_m = abs(t)
t_s = copysign(1.0d0, t)
real(8) function code(t_s, t_m, l_m, k)
real(8), intent (in) :: t_s
real(8), intent (in) :: t_m
real(8), intent (in) :: l_m
real(8), intent (in) :: k
code = t_s * (2.0d0 / (((t_m * (k ** 4.0d0)) / l_m) / l_m))
end function
l_m = Math.abs(l);
t_m = Math.abs(t);
t_s = Math.copySign(1.0, t);
public static double code(double t_s, double t_m, double l_m, double k) {
return t_s * (2.0 / (((t_m * Math.pow(k, 4.0)) / l_m) / l_m));
}
l_m = math.fabs(l) t_m = math.fabs(t) t_s = math.copysign(1.0, t) def code(t_s, t_m, l_m, k): return t_s * (2.0 / (((t_m * math.pow(k, 4.0)) / l_m) / l_m))
l_m = abs(l) t_m = abs(t) t_s = copysign(1.0, t) function code(t_s, t_m, l_m, k) return Float64(t_s * Float64(2.0 / Float64(Float64(Float64(t_m * (k ^ 4.0)) / l_m) / l_m))) end
l_m = abs(l); t_m = abs(t); t_s = sign(t) * abs(1.0); function tmp = code(t_s, t_m, l_m, k) tmp = t_s * (2.0 / (((t_m * (k ^ 4.0)) / l_m) / l_m)); end
l_m = N[Abs[l], $MachinePrecision]
t_m = N[Abs[t], $MachinePrecision]
t_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[t]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[t$95$s_, t$95$m_, l$95$m_, k_] := N[(t$95$s * N[(2.0 / N[(N[(N[(t$95$m * N[Power[k, 4.0], $MachinePrecision]), $MachinePrecision] / l$95$m), $MachinePrecision] / l$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
l_m = \left|\ell\right|
\\
t_m = \left|t\right|
\\
t_s = \mathsf{copysign}\left(1, t\right)
\\
t\_s \cdot \frac{2}{\frac{\frac{t\_m \cdot {k}^{4}}{l\_m}}{l\_m}}
\end{array}
Initial program 51.9%
associate-*l*51.9%
sqr-neg51.9%
sqr-neg51.9%
associate-/r*53.9%
distribute-rgt-in53.9%
unpow253.9%
times-frac39.8%
sqr-neg39.8%
times-frac53.9%
unpow253.9%
distribute-rgt-in53.9%
Simplified53.9%
associate-*l*51.0%
associate-*l/52.5%
associate-*r*52.5%
Applied egg-rr52.5%
Taylor expanded in t around 0 63.6%
times-frac64.5%
Simplified64.5%
Taylor expanded in k around 0 52.3%
Final simplification52.3%
l_m = (fabs.f64 l) t_m = (fabs.f64 t) t_s = (copysign.f64 1 t) (FPCore (t_s t_m l_m k) :precision binary64 (* t_s (/ 2.0 (/ (/ (pow k 4.0) (/ l_m t_m)) l_m))))
l_m = fabs(l);
t_m = fabs(t);
t_s = copysign(1.0, t);
double code(double t_s, double t_m, double l_m, double k) {
return t_s * (2.0 / ((pow(k, 4.0) / (l_m / t_m)) / l_m));
}
l_m = abs(l)
t_m = abs(t)
t_s = copysign(1.0d0, t)
real(8) function code(t_s, t_m, l_m, k)
real(8), intent (in) :: t_s
real(8), intent (in) :: t_m
real(8), intent (in) :: l_m
real(8), intent (in) :: k
code = t_s * (2.0d0 / (((k ** 4.0d0) / (l_m / t_m)) / l_m))
end function
l_m = Math.abs(l);
t_m = Math.abs(t);
t_s = Math.copySign(1.0, t);
public static double code(double t_s, double t_m, double l_m, double k) {
return t_s * (2.0 / ((Math.pow(k, 4.0) / (l_m / t_m)) / l_m));
}
l_m = math.fabs(l) t_m = math.fabs(t) t_s = math.copysign(1.0, t) def code(t_s, t_m, l_m, k): return t_s * (2.0 / ((math.pow(k, 4.0) / (l_m / t_m)) / l_m))
l_m = abs(l) t_m = abs(t) t_s = copysign(1.0, t) function code(t_s, t_m, l_m, k) return Float64(t_s * Float64(2.0 / Float64(Float64((k ^ 4.0) / Float64(l_m / t_m)) / l_m))) end
l_m = abs(l); t_m = abs(t); t_s = sign(t) * abs(1.0); function tmp = code(t_s, t_m, l_m, k) tmp = t_s * (2.0 / (((k ^ 4.0) / (l_m / t_m)) / l_m)); end
l_m = N[Abs[l], $MachinePrecision]
t_m = N[Abs[t], $MachinePrecision]
t_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[t]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[t$95$s_, t$95$m_, l$95$m_, k_] := N[(t$95$s * N[(2.0 / N[(N[(N[Power[k, 4.0], $MachinePrecision] / N[(l$95$m / t$95$m), $MachinePrecision]), $MachinePrecision] / l$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
l_m = \left|\ell\right|
\\
t_m = \left|t\right|
\\
t_s = \mathsf{copysign}\left(1, t\right)
\\
t\_s \cdot \frac{2}{\frac{\frac{{k}^{4}}{\frac{l\_m}{t\_m}}}{l\_m}}
\end{array}
Initial program 51.9%
associate-*l*51.9%
sqr-neg51.9%
sqr-neg51.9%
associate-/r*53.9%
distribute-rgt-in53.9%
unpow253.9%
times-frac39.8%
sqr-neg39.8%
times-frac53.9%
unpow253.9%
distribute-rgt-in53.9%
Simplified53.9%
associate-*l*51.0%
associate-*l/52.5%
associate-*r*52.5%
Applied egg-rr52.5%
Taylor expanded in t around 0 63.6%
times-frac64.5%
Simplified64.5%
Taylor expanded in k around 0 52.3%
associate-/l*54.0%
Simplified54.0%
Final simplification54.0%
herbie shell --seed 2024040
(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))))