
(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 10 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}
t_m = (fabs.f64 t)
t_s = (copysign.f64 1 t)
(FPCore (t_s t_m l k)
:precision binary64
(*
t_s
(if (<= t_m 7.5e+19)
(* 2.0 (* (pow (* (/ k l) (sin k)) -2.0) (/ 1.0 (/ t_m (cos k)))))
(if (<= t_m 1.25e+103)
(*
(* l (/ 2.0 (* (tan k) (* (sin k) (pow t_m 3.0)))))
(/ l (+ 2.0 (pow (/ k t_m) 2.0))))
(pow (/ (/ (pow (cbrt l) 2.0) t_m) (pow (cbrt k) 2.0)) 3.0)))))t_m = fabs(t);
t_s = copysign(1.0, t);
double code(double t_s, double t_m, double l, double k) {
double tmp;
if (t_m <= 7.5e+19) {
tmp = 2.0 * (pow(((k / l) * sin(k)), -2.0) * (1.0 / (t_m / cos(k))));
} else if (t_m <= 1.25e+103) {
tmp = (l * (2.0 / (tan(k) * (sin(k) * pow(t_m, 3.0))))) * (l / (2.0 + pow((k / t_m), 2.0)));
} else {
tmp = pow(((pow(cbrt(l), 2.0) / t_m) / pow(cbrt(k), 2.0)), 3.0);
}
return t_s * tmp;
}
t_m = Math.abs(t);
t_s = Math.copySign(1.0, t);
public static double code(double t_s, double t_m, double l, double k) {
double tmp;
if (t_m <= 7.5e+19) {
tmp = 2.0 * (Math.pow(((k / l) * Math.sin(k)), -2.0) * (1.0 / (t_m / Math.cos(k))));
} else if (t_m <= 1.25e+103) {
tmp = (l * (2.0 / (Math.tan(k) * (Math.sin(k) * Math.pow(t_m, 3.0))))) * (l / (2.0 + Math.pow((k / t_m), 2.0)));
} else {
tmp = Math.pow(((Math.pow(Math.cbrt(l), 2.0) / t_m) / Math.pow(Math.cbrt(k), 2.0)), 3.0);
}
return t_s * tmp;
}
t_m = abs(t) t_s = copysign(1.0, t) function code(t_s, t_m, l, k) tmp = 0.0 if (t_m <= 7.5e+19) tmp = Float64(2.0 * Float64((Float64(Float64(k / l) * sin(k)) ^ -2.0) * Float64(1.0 / Float64(t_m / cos(k))))); elseif (t_m <= 1.25e+103) tmp = Float64(Float64(l * Float64(2.0 / Float64(tan(k) * Float64(sin(k) * (t_m ^ 3.0))))) * Float64(l / Float64(2.0 + (Float64(k / t_m) ^ 2.0)))); else tmp = Float64(Float64((cbrt(l) ^ 2.0) / t_m) / (cbrt(k) ^ 2.0)) ^ 3.0; end return Float64(t_s * tmp) end
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_, k_] := N[(t$95$s * If[LessEqual[t$95$m, 7.5e+19], N[(2.0 * N[(N[Power[N[(N[(k / l), $MachinePrecision] * N[Sin[k], $MachinePrecision]), $MachinePrecision], -2.0], $MachinePrecision] * N[(1.0 / N[(t$95$m / N[Cos[k], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$m, 1.25e+103], N[(N[(l * N[(2.0 / N[(N[Tan[k], $MachinePrecision] * N[(N[Sin[k], $MachinePrecision] * N[Power[t$95$m, 3.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(l / N[(2.0 + N[Power[N[(k / t$95$m), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[Power[N[(N[(N[Power[N[Power[l, 1/3], $MachinePrecision], 2.0], $MachinePrecision] / t$95$m), $MachinePrecision] / N[Power[N[Power[k, 1/3], $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision], 3.0], $MachinePrecision]]]), $MachinePrecision]
\begin{array}{l}
t_m = \left|t\right|
\\
t_s = \mathsf{copysign}\left(1, t\right)
\\
t_s \cdot \begin{array}{l}
\mathbf{if}\;t_m \leq 7.5 \cdot 10^{+19}:\\
\;\;\;\;2 \cdot \left({\left(\frac{k}{\ell} \cdot \sin k\right)}^{-2} \cdot \frac{1}{\frac{t_m}{\cos k}}\right)\\
\mathbf{elif}\;t_m \leq 1.25 \cdot 10^{+103}:\\
\;\;\;\;\left(\ell \cdot \frac{2}{\tan k \cdot \left(\sin k \cdot {t_m}^{3}\right)}\right) \cdot \frac{\ell}{2 + {\left(\frac{k}{t_m}\right)}^{2}}\\
\mathbf{else}:\\
\;\;\;\;{\left(\frac{\frac{{\left(\sqrt[3]{\ell}\right)}^{2}}{t_m}}{{\left(\sqrt[3]{k}\right)}^{2}}\right)}^{3}\\
\end{array}
\end{array}
t_m = (fabs.f64 t)
t_s = (copysign.f64 1 t)
(FPCore (t_s t_m l k)
:precision binary64
(*
t_s
(if (<= k 1.9e+14)
(*
2.0
(pow
(* (* k (/ (pow t_m 1.5) l)) (hypot 1.0 (hypot 1.0 (/ k t_m))))
-2.0))
(* 2.0 (* (/ 1.0 (/ t_m (cos k))) (pow (/ k (/ l (sin k))) -2.0))))))t_m = fabs(t);
t_s = copysign(1.0, t);
double code(double t_s, double t_m, double l, double k) {
double tmp;
if (k <= 1.9e+14) {
tmp = 2.0 * pow(((k * (pow(t_m, 1.5) / l)) * hypot(1.0, hypot(1.0, (k / t_m)))), -2.0);
} else {
tmp = 2.0 * ((1.0 / (t_m / cos(k))) * pow((k / (l / sin(k))), -2.0));
}
return t_s * tmp;
}
t_m = Math.abs(t);
t_s = Math.copySign(1.0, t);
public static double code(double t_s, double t_m, double l, double k) {
double tmp;
if (k <= 1.9e+14) {
tmp = 2.0 * Math.pow(((k * (Math.pow(t_m, 1.5) / l)) * Math.hypot(1.0, Math.hypot(1.0, (k / t_m)))), -2.0);
} else {
tmp = 2.0 * ((1.0 / (t_m / Math.cos(k))) * Math.pow((k / (l / Math.sin(k))), -2.0));
}
return t_s * tmp;
}
t_m = math.fabs(t) t_s = math.copysign(1.0, t) def code(t_s, t_m, l, k): tmp = 0 if k <= 1.9e+14: tmp = 2.0 * math.pow(((k * (math.pow(t_m, 1.5) / l)) * math.hypot(1.0, math.hypot(1.0, (k / t_m)))), -2.0) else: tmp = 2.0 * ((1.0 / (t_m / math.cos(k))) * math.pow((k / (l / math.sin(k))), -2.0)) return t_s * tmp
t_m = abs(t) t_s = copysign(1.0, t) function code(t_s, t_m, l, k) tmp = 0.0 if (k <= 1.9e+14) tmp = Float64(2.0 * (Float64(Float64(k * Float64((t_m ^ 1.5) / l)) * hypot(1.0, hypot(1.0, Float64(k / t_m)))) ^ -2.0)); else tmp = Float64(2.0 * Float64(Float64(1.0 / Float64(t_m / cos(k))) * (Float64(k / Float64(l / sin(k))) ^ -2.0))); end return Float64(t_s * tmp) end
t_m = abs(t); t_s = sign(t) * abs(1.0); function tmp_2 = code(t_s, t_m, l, k) tmp = 0.0; if (k <= 1.9e+14) tmp = 2.0 * (((k * ((t_m ^ 1.5) / l)) * hypot(1.0, hypot(1.0, (k / t_m)))) ^ -2.0); else tmp = 2.0 * ((1.0 / (t_m / cos(k))) * ((k / (l / sin(k))) ^ -2.0)); end tmp_2 = t_s * tmp; end
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_, k_] := N[(t$95$s * If[LessEqual[k, 1.9e+14], N[(2.0 * N[Power[N[(N[(k * N[(N[Power[t$95$m, 1.5], $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision] * N[Sqrt[1.0 ^ 2 + N[Sqrt[1.0 ^ 2 + N[(k / t$95$m), $MachinePrecision] ^ 2], $MachinePrecision] ^ 2], $MachinePrecision]), $MachinePrecision], -2.0], $MachinePrecision]), $MachinePrecision], N[(2.0 * N[(N[(1.0 / N[(t$95$m / N[Cos[k], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[Power[N[(k / N[(l / N[Sin[k], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], -2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]), $MachinePrecision]
\begin{array}{l}
t_m = \left|t\right|
\\
t_s = \mathsf{copysign}\left(1, t\right)
\\
t_s \cdot \begin{array}{l}
\mathbf{if}\;k \leq 1.9 \cdot 10^{+14}:\\
\;\;\;\;2 \cdot {\left(\left(k \cdot \frac{{t_m}^{1.5}}{\ell}\right) \cdot \mathsf{hypot}\left(1, \mathsf{hypot}\left(1, \frac{k}{t_m}\right)\right)\right)}^{-2}\\
\mathbf{else}:\\
\;\;\;\;2 \cdot \left(\frac{1}{\frac{t_m}{\cos k}} \cdot {\left(\frac{k}{\frac{\ell}{\sin k}}\right)}^{-2}\right)\\
\end{array}
\end{array}
t_m = (fabs.f64 t)
t_s = (copysign.f64 1 t)
(FPCore (t_s t_m l k)
:precision binary64
(*
t_s
(if (<= t_m 9e+54)
(* 2.0 (* (pow (* (/ k l) (sin k)) -2.0) (/ 1.0 (/ t_m (cos k)))))
(/ (pow l 2.0) (pow (* t_m (pow (cbrt k) 2.0)) 3.0)))))t_m = fabs(t);
t_s = copysign(1.0, t);
double code(double t_s, double t_m, double l, double k) {
double tmp;
if (t_m <= 9e+54) {
tmp = 2.0 * (pow(((k / l) * sin(k)), -2.0) * (1.0 / (t_m / cos(k))));
} else {
tmp = pow(l, 2.0) / pow((t_m * pow(cbrt(k), 2.0)), 3.0);
}
return t_s * tmp;
}
t_m = Math.abs(t);
t_s = Math.copySign(1.0, t);
public static double code(double t_s, double t_m, double l, double k) {
double tmp;
if (t_m <= 9e+54) {
tmp = 2.0 * (Math.pow(((k / l) * Math.sin(k)), -2.0) * (1.0 / (t_m / Math.cos(k))));
} else {
tmp = Math.pow(l, 2.0) / Math.pow((t_m * Math.pow(Math.cbrt(k), 2.0)), 3.0);
}
return t_s * tmp;
}
t_m = abs(t) t_s = copysign(1.0, t) function code(t_s, t_m, l, k) tmp = 0.0 if (t_m <= 9e+54) tmp = Float64(2.0 * Float64((Float64(Float64(k / l) * sin(k)) ^ -2.0) * Float64(1.0 / Float64(t_m / cos(k))))); else tmp = Float64((l ^ 2.0) / (Float64(t_m * (cbrt(k) ^ 2.0)) ^ 3.0)); end return Float64(t_s * tmp) end
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_, k_] := N[(t$95$s * If[LessEqual[t$95$m, 9e+54], N[(2.0 * N[(N[Power[N[(N[(k / l), $MachinePrecision] * N[Sin[k], $MachinePrecision]), $MachinePrecision], -2.0], $MachinePrecision] * N[(1.0 / N[(t$95$m / N[Cos[k], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[Power[l, 2.0], $MachinePrecision] / N[Power[N[(t$95$m * N[Power[N[Power[k, 1/3], $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision], 3.0], $MachinePrecision]), $MachinePrecision]]), $MachinePrecision]
\begin{array}{l}
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 \cdot 10^{+54}:\\
\;\;\;\;2 \cdot \left({\left(\frac{k}{\ell} \cdot \sin k\right)}^{-2} \cdot \frac{1}{\frac{t_m}{\cos k}}\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{{\ell}^{2}}{{\left(t_m \cdot {\left(\sqrt[3]{k}\right)}^{2}\right)}^{3}}\\
\end{array}
\end{array}
t_m = (fabs.f64 t)
t_s = (copysign.f64 1 t)
(FPCore (t_s t_m l k)
:precision binary64
(*
t_s
(if (<= t_m 9.6e+54)
(* 2.0 (* (pow (* (/ k l) (sin k)) -2.0) (/ 1.0 (/ t_m (cos k)))))
(/
(* (/ 2.0 (* (tan k) (* k (pow t_m 3.0)))) (* l l))
(+ 2.0 (pow (/ k t_m) 2.0))))))t_m = fabs(t);
t_s = copysign(1.0, t);
double code(double t_s, double t_m, double l, double k) {
double tmp;
if (t_m <= 9.6e+54) {
tmp = 2.0 * (pow(((k / l) * sin(k)), -2.0) * (1.0 / (t_m / cos(k))));
} else {
tmp = ((2.0 / (tan(k) * (k * pow(t_m, 3.0)))) * (l * l)) / (2.0 + pow((k / t_m), 2.0));
}
return t_s * tmp;
}
t_m = abs(t)
t_s = copysign(1.0d0, t)
real(8) function code(t_s, t_m, l, k)
real(8), intent (in) :: t_s
real(8), intent (in) :: t_m
real(8), intent (in) :: l
real(8), intent (in) :: k
real(8) :: tmp
if (t_m <= 9.6d+54) then
tmp = 2.0d0 * ((((k / l) * sin(k)) ** (-2.0d0)) * (1.0d0 / (t_m / cos(k))))
else
tmp = ((2.0d0 / (tan(k) * (k * (t_m ** 3.0d0)))) * (l * l)) / (2.0d0 + ((k / t_m) ** 2.0d0))
end if
code = t_s * tmp
end function
t_m = Math.abs(t);
t_s = Math.copySign(1.0, t);
public static double code(double t_s, double t_m, double l, double k) {
double tmp;
if (t_m <= 9.6e+54) {
tmp = 2.0 * (Math.pow(((k / l) * Math.sin(k)), -2.0) * (1.0 / (t_m / Math.cos(k))));
} else {
tmp = ((2.0 / (Math.tan(k) * (k * Math.pow(t_m, 3.0)))) * (l * l)) / (2.0 + Math.pow((k / t_m), 2.0));
}
return t_s * tmp;
}
t_m = math.fabs(t) t_s = math.copysign(1.0, t) def code(t_s, t_m, l, k): tmp = 0 if t_m <= 9.6e+54: tmp = 2.0 * (math.pow(((k / l) * math.sin(k)), -2.0) * (1.0 / (t_m / math.cos(k)))) else: tmp = ((2.0 / (math.tan(k) * (k * math.pow(t_m, 3.0)))) * (l * l)) / (2.0 + math.pow((k / t_m), 2.0)) return t_s * tmp
t_m = abs(t) t_s = copysign(1.0, t) function code(t_s, t_m, l, k) tmp = 0.0 if (t_m <= 9.6e+54) tmp = Float64(2.0 * Float64((Float64(Float64(k / l) * sin(k)) ^ -2.0) * Float64(1.0 / Float64(t_m / cos(k))))); else tmp = Float64(Float64(Float64(2.0 / Float64(tan(k) * Float64(k * (t_m ^ 3.0)))) * Float64(l * l)) / Float64(2.0 + (Float64(k / t_m) ^ 2.0))); end return Float64(t_s * tmp) end
t_m = abs(t); t_s = sign(t) * abs(1.0); function tmp_2 = code(t_s, t_m, l, k) tmp = 0.0; if (t_m <= 9.6e+54) tmp = 2.0 * ((((k / l) * sin(k)) ^ -2.0) * (1.0 / (t_m / cos(k)))); else tmp = ((2.0 / (tan(k) * (k * (t_m ^ 3.0)))) * (l * l)) / (2.0 + ((k / t_m) ^ 2.0)); end tmp_2 = t_s * tmp; end
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_, k_] := N[(t$95$s * If[LessEqual[t$95$m, 9.6e+54], N[(2.0 * N[(N[Power[N[(N[(k / l), $MachinePrecision] * N[Sin[k], $MachinePrecision]), $MachinePrecision], -2.0], $MachinePrecision] * N[(1.0 / N[(t$95$m / N[Cos[k], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(2.0 / N[(N[Tan[k], $MachinePrecision] * N[(k * N[Power[t$95$m, 3.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(l * l), $MachinePrecision]), $MachinePrecision] / N[(2.0 + N[Power[N[(k / t$95$m), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]), $MachinePrecision]
\begin{array}{l}
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.6 \cdot 10^{+54}:\\
\;\;\;\;2 \cdot \left({\left(\frac{k}{\ell} \cdot \sin k\right)}^{-2} \cdot \frac{1}{\frac{t_m}{\cos k}}\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{2}{\tan k \cdot \left(k \cdot {t_m}^{3}\right)} \cdot \left(\ell \cdot \ell\right)}{2 + {\left(\frac{k}{t_m}\right)}^{2}}\\
\end{array}
\end{array}
t_m = (fabs.f64 t)
t_s = (copysign.f64 1 t)
(FPCore (t_s t_m l k)
:precision binary64
(*
t_s
(if (<= t_m 4.5e+69)
(* 2.0 (* (pow (* (/ k l) (sin k)) -2.0) (/ 1.0 (/ t_m (cos k)))))
(* (pow l 2.0) (/ (pow t_m -3.0) (pow k 2.0))))))t_m = fabs(t);
t_s = copysign(1.0, t);
double code(double t_s, double t_m, double l, double k) {
double tmp;
if (t_m <= 4.5e+69) {
tmp = 2.0 * (pow(((k / l) * sin(k)), -2.0) * (1.0 / (t_m / cos(k))));
} else {
tmp = pow(l, 2.0) * (pow(t_m, -3.0) / pow(k, 2.0));
}
return t_s * tmp;
}
t_m = abs(t)
t_s = copysign(1.0d0, t)
real(8) function code(t_s, t_m, l, k)
real(8), intent (in) :: t_s
real(8), intent (in) :: t_m
real(8), intent (in) :: l
real(8), intent (in) :: k
real(8) :: tmp
if (t_m <= 4.5d+69) then
tmp = 2.0d0 * ((((k / l) * sin(k)) ** (-2.0d0)) * (1.0d0 / (t_m / cos(k))))
else
tmp = (l ** 2.0d0) * ((t_m ** (-3.0d0)) / (k ** 2.0d0))
end if
code = t_s * tmp
end function
t_m = Math.abs(t);
t_s = Math.copySign(1.0, t);
public static double code(double t_s, double t_m, double l, double k) {
double tmp;
if (t_m <= 4.5e+69) {
tmp = 2.0 * (Math.pow(((k / l) * Math.sin(k)), -2.0) * (1.0 / (t_m / Math.cos(k))));
} else {
tmp = Math.pow(l, 2.0) * (Math.pow(t_m, -3.0) / Math.pow(k, 2.0));
}
return t_s * tmp;
}
t_m = math.fabs(t) t_s = math.copysign(1.0, t) def code(t_s, t_m, l, k): tmp = 0 if t_m <= 4.5e+69: tmp = 2.0 * (math.pow(((k / l) * math.sin(k)), -2.0) * (1.0 / (t_m / math.cos(k)))) else: tmp = math.pow(l, 2.0) * (math.pow(t_m, -3.0) / math.pow(k, 2.0)) return t_s * tmp
t_m = abs(t) t_s = copysign(1.0, t) function code(t_s, t_m, l, k) tmp = 0.0 if (t_m <= 4.5e+69) tmp = Float64(2.0 * Float64((Float64(Float64(k / l) * sin(k)) ^ -2.0) * Float64(1.0 / Float64(t_m / cos(k))))); else tmp = Float64((l ^ 2.0) * Float64((t_m ^ -3.0) / (k ^ 2.0))); end return Float64(t_s * tmp) end
t_m = abs(t); t_s = sign(t) * abs(1.0); function tmp_2 = code(t_s, t_m, l, k) tmp = 0.0; if (t_m <= 4.5e+69) tmp = 2.0 * ((((k / l) * sin(k)) ^ -2.0) * (1.0 / (t_m / cos(k)))); else tmp = (l ^ 2.0) * ((t_m ^ -3.0) / (k ^ 2.0)); end tmp_2 = t_s * tmp; end
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_, k_] := N[(t$95$s * If[LessEqual[t$95$m, 4.5e+69], N[(2.0 * N[(N[Power[N[(N[(k / l), $MachinePrecision] * N[Sin[k], $MachinePrecision]), $MachinePrecision], -2.0], $MachinePrecision] * N[(1.0 / N[(t$95$m / N[Cos[k], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[Power[l, 2.0], $MachinePrecision] * N[(N[Power[t$95$m, -3.0], $MachinePrecision] / N[Power[k, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]), $MachinePrecision]
\begin{array}{l}
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.5 \cdot 10^{+69}:\\
\;\;\;\;2 \cdot \left({\left(\frac{k}{\ell} \cdot \sin k\right)}^{-2} \cdot \frac{1}{\frac{t_m}{\cos k}}\right)\\
\mathbf{else}:\\
\;\;\;\;{\ell}^{2} \cdot \frac{{t_m}^{-3}}{{k}^{2}}\\
\end{array}
\end{array}
t_m = (fabs.f64 t)
t_s = (copysign.f64 1 t)
(FPCore (t_s t_m l k)
:precision binary64
(*
t_s
(if (<= t_m 5.2e+21)
(* 2.0 (pow (* (/ k (/ l (sin k))) (sqrt t_m)) -2.0))
(* (pow l 2.0) (/ (pow t_m -3.0) (pow k 2.0))))))t_m = fabs(t);
t_s = copysign(1.0, t);
double code(double t_s, double t_m, double l, double k) {
double tmp;
if (t_m <= 5.2e+21) {
tmp = 2.0 * pow(((k / (l / sin(k))) * sqrt(t_m)), -2.0);
} else {
tmp = pow(l, 2.0) * (pow(t_m, -3.0) / pow(k, 2.0));
}
return t_s * tmp;
}
t_m = abs(t)
t_s = copysign(1.0d0, t)
real(8) function code(t_s, t_m, l, k)
real(8), intent (in) :: t_s
real(8), intent (in) :: t_m
real(8), intent (in) :: l
real(8), intent (in) :: k
real(8) :: tmp
if (t_m <= 5.2d+21) then
tmp = 2.0d0 * (((k / (l / sin(k))) * sqrt(t_m)) ** (-2.0d0))
else
tmp = (l ** 2.0d0) * ((t_m ** (-3.0d0)) / (k ** 2.0d0))
end if
code = t_s * tmp
end function
t_m = Math.abs(t);
t_s = Math.copySign(1.0, t);
public static double code(double t_s, double t_m, double l, double k) {
double tmp;
if (t_m <= 5.2e+21) {
tmp = 2.0 * Math.pow(((k / (l / Math.sin(k))) * Math.sqrt(t_m)), -2.0);
} else {
tmp = Math.pow(l, 2.0) * (Math.pow(t_m, -3.0) / Math.pow(k, 2.0));
}
return t_s * tmp;
}
t_m = math.fabs(t) t_s = math.copysign(1.0, t) def code(t_s, t_m, l, k): tmp = 0 if t_m <= 5.2e+21: tmp = 2.0 * math.pow(((k / (l / math.sin(k))) * math.sqrt(t_m)), -2.0) else: tmp = math.pow(l, 2.0) * (math.pow(t_m, -3.0) / math.pow(k, 2.0)) return t_s * tmp
t_m = abs(t) t_s = copysign(1.0, t) function code(t_s, t_m, l, k) tmp = 0.0 if (t_m <= 5.2e+21) tmp = Float64(2.0 * (Float64(Float64(k / Float64(l / sin(k))) * sqrt(t_m)) ^ -2.0)); else tmp = Float64((l ^ 2.0) * Float64((t_m ^ -3.0) / (k ^ 2.0))); end return Float64(t_s * tmp) end
t_m = abs(t); t_s = sign(t) * abs(1.0); function tmp_2 = code(t_s, t_m, l, k) tmp = 0.0; if (t_m <= 5.2e+21) tmp = 2.0 * (((k / (l / sin(k))) * sqrt(t_m)) ^ -2.0); else tmp = (l ^ 2.0) * ((t_m ^ -3.0) / (k ^ 2.0)); end tmp_2 = t_s * tmp; end
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_, k_] := N[(t$95$s * If[LessEqual[t$95$m, 5.2e+21], N[(2.0 * N[Power[N[(N[(k / N[(l / N[Sin[k], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[Sqrt[t$95$m], $MachinePrecision]), $MachinePrecision], -2.0], $MachinePrecision]), $MachinePrecision], N[(N[Power[l, 2.0], $MachinePrecision] * N[(N[Power[t$95$m, -3.0], $MachinePrecision] / N[Power[k, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]), $MachinePrecision]
\begin{array}{l}
t_m = \left|t\right|
\\
t_s = \mathsf{copysign}\left(1, t\right)
\\
t_s \cdot \begin{array}{l}
\mathbf{if}\;t_m \leq 5.2 \cdot 10^{+21}:\\
\;\;\;\;2 \cdot {\left(\frac{k}{\frac{\ell}{\sin k}} \cdot \sqrt{t_m}\right)}^{-2}\\
\mathbf{else}:\\
\;\;\;\;{\ell}^{2} \cdot \frac{{t_m}^{-3}}{{k}^{2}}\\
\end{array}
\end{array}
t_m = (fabs.f64 t)
t_s = (copysign.f64 1 t)
(FPCore (t_s t_m l k)
:precision binary64
(*
t_s
(if (<= t_m 1.9e-45)
(/ 2.0 (pow (* (sqrt t_m) (/ (pow k 2.0) l)) 2.0))
(* (pow l 2.0) (/ (pow t_m -3.0) (pow k 2.0))))))t_m = fabs(t);
t_s = copysign(1.0, t);
double code(double t_s, double t_m, double l, double k) {
double tmp;
if (t_m <= 1.9e-45) {
tmp = 2.0 / pow((sqrt(t_m) * (pow(k, 2.0) / l)), 2.0);
} else {
tmp = pow(l, 2.0) * (pow(t_m, -3.0) / pow(k, 2.0));
}
return t_s * tmp;
}
t_m = abs(t)
t_s = copysign(1.0d0, t)
real(8) function code(t_s, t_m, l, k)
real(8), intent (in) :: t_s
real(8), intent (in) :: t_m
real(8), intent (in) :: l
real(8), intent (in) :: k
real(8) :: tmp
if (t_m <= 1.9d-45) then
tmp = 2.0d0 / ((sqrt(t_m) * ((k ** 2.0d0) / l)) ** 2.0d0)
else
tmp = (l ** 2.0d0) * ((t_m ** (-3.0d0)) / (k ** 2.0d0))
end if
code = t_s * tmp
end function
t_m = Math.abs(t);
t_s = Math.copySign(1.0, t);
public static double code(double t_s, double t_m, double l, double k) {
double tmp;
if (t_m <= 1.9e-45) {
tmp = 2.0 / Math.pow((Math.sqrt(t_m) * (Math.pow(k, 2.0) / l)), 2.0);
} else {
tmp = Math.pow(l, 2.0) * (Math.pow(t_m, -3.0) / Math.pow(k, 2.0));
}
return t_s * tmp;
}
t_m = math.fabs(t) t_s = math.copysign(1.0, t) def code(t_s, t_m, l, k): tmp = 0 if t_m <= 1.9e-45: tmp = 2.0 / math.pow((math.sqrt(t_m) * (math.pow(k, 2.0) / l)), 2.0) else: tmp = math.pow(l, 2.0) * (math.pow(t_m, -3.0) / math.pow(k, 2.0)) return t_s * tmp
t_m = abs(t) t_s = copysign(1.0, t) function code(t_s, t_m, l, k) tmp = 0.0 if (t_m <= 1.9e-45) tmp = Float64(2.0 / (Float64(sqrt(t_m) * Float64((k ^ 2.0) / l)) ^ 2.0)); else tmp = Float64((l ^ 2.0) * Float64((t_m ^ -3.0) / (k ^ 2.0))); end return Float64(t_s * tmp) end
t_m = abs(t); t_s = sign(t) * abs(1.0); function tmp_2 = code(t_s, t_m, l, k) tmp = 0.0; if (t_m <= 1.9e-45) tmp = 2.0 / ((sqrt(t_m) * ((k ^ 2.0) / l)) ^ 2.0); else tmp = (l ^ 2.0) * ((t_m ^ -3.0) / (k ^ 2.0)); end tmp_2 = t_s * tmp; end
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_, k_] := N[(t$95$s * If[LessEqual[t$95$m, 1.9e-45], N[(2.0 / N[Power[N[(N[Sqrt[t$95$m], $MachinePrecision] * N[(N[Power[k, 2.0], $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision], N[(N[Power[l, 2.0], $MachinePrecision] * N[(N[Power[t$95$m, -3.0], $MachinePrecision] / N[Power[k, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]), $MachinePrecision]
\begin{array}{l}
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.9 \cdot 10^{-45}:\\
\;\;\;\;\frac{2}{{\left(\sqrt{t_m} \cdot \frac{{k}^{2}}{\ell}\right)}^{2}}\\
\mathbf{else}:\\
\;\;\;\;{\ell}^{2} \cdot \frac{{t_m}^{-3}}{{k}^{2}}\\
\end{array}
\end{array}
t_m = (fabs.f64 t)
t_s = (copysign.f64 1 t)
(FPCore (t_s t_m l k)
:precision binary64
(*
t_s
(if (<= t_m 1e-44)
(* 2.0 (/ 1.0 (/ t_m (/ (pow l 2.0) (pow k 4.0)))))
(* (pow l 2.0) (/ (pow t_m -3.0) (pow k 2.0))))))t_m = fabs(t);
t_s = copysign(1.0, t);
double code(double t_s, double t_m, double l, double k) {
double tmp;
if (t_m <= 1e-44) {
tmp = 2.0 * (1.0 / (t_m / (pow(l, 2.0) / pow(k, 4.0))));
} else {
tmp = pow(l, 2.0) * (pow(t_m, -3.0) / pow(k, 2.0));
}
return t_s * tmp;
}
t_m = abs(t)
t_s = copysign(1.0d0, t)
real(8) function code(t_s, t_m, l, k)
real(8), intent (in) :: t_s
real(8), intent (in) :: t_m
real(8), intent (in) :: l
real(8), intent (in) :: k
real(8) :: tmp
if (t_m <= 1d-44) then
tmp = 2.0d0 * (1.0d0 / (t_m / ((l ** 2.0d0) / (k ** 4.0d0))))
else
tmp = (l ** 2.0d0) * ((t_m ** (-3.0d0)) / (k ** 2.0d0))
end if
code = t_s * tmp
end function
t_m = Math.abs(t);
t_s = Math.copySign(1.0, t);
public static double code(double t_s, double t_m, double l, double k) {
double tmp;
if (t_m <= 1e-44) {
tmp = 2.0 * (1.0 / (t_m / (Math.pow(l, 2.0) / Math.pow(k, 4.0))));
} else {
tmp = Math.pow(l, 2.0) * (Math.pow(t_m, -3.0) / Math.pow(k, 2.0));
}
return t_s * tmp;
}
t_m = math.fabs(t) t_s = math.copysign(1.0, t) def code(t_s, t_m, l, k): tmp = 0 if t_m <= 1e-44: tmp = 2.0 * (1.0 / (t_m / (math.pow(l, 2.0) / math.pow(k, 4.0)))) else: tmp = math.pow(l, 2.0) * (math.pow(t_m, -3.0) / math.pow(k, 2.0)) return t_s * tmp
t_m = abs(t) t_s = copysign(1.0, t) function code(t_s, t_m, l, k) tmp = 0.0 if (t_m <= 1e-44) tmp = Float64(2.0 * Float64(1.0 / Float64(t_m / Float64((l ^ 2.0) / (k ^ 4.0))))); else tmp = Float64((l ^ 2.0) * Float64((t_m ^ -3.0) / (k ^ 2.0))); end return Float64(t_s * tmp) end
t_m = abs(t); t_s = sign(t) * abs(1.0); function tmp_2 = code(t_s, t_m, l, k) tmp = 0.0; if (t_m <= 1e-44) tmp = 2.0 * (1.0 / (t_m / ((l ^ 2.0) / (k ^ 4.0)))); else tmp = (l ^ 2.0) * ((t_m ^ -3.0) / (k ^ 2.0)); end tmp_2 = t_s * tmp; end
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_, k_] := N[(t$95$s * If[LessEqual[t$95$m, 1e-44], N[(2.0 * N[(1.0 / N[(t$95$m / N[(N[Power[l, 2.0], $MachinePrecision] / N[Power[k, 4.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[Power[l, 2.0], $MachinePrecision] * N[(N[Power[t$95$m, -3.0], $MachinePrecision] / N[Power[k, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]), $MachinePrecision]
\begin{array}{l}
t_m = \left|t\right|
\\
t_s = \mathsf{copysign}\left(1, t\right)
\\
t_s \cdot \begin{array}{l}
\mathbf{if}\;t_m \leq 10^{-44}:\\
\;\;\;\;2 \cdot \frac{1}{\frac{t_m}{\frac{{\ell}^{2}}{{k}^{4}}}}\\
\mathbf{else}:\\
\;\;\;\;{\ell}^{2} \cdot \frac{{t_m}^{-3}}{{k}^{2}}\\
\end{array}
\end{array}
t_m = (fabs.f64 t) t_s = (copysign.f64 1 t) (FPCore (t_s t_m l k) :precision binary64 (* t_s (* 2.0 (/ 1.0 (/ t_m (/ (pow l 2.0) (pow k 4.0)))))))
t_m = fabs(t);
t_s = copysign(1.0, t);
double code(double t_s, double t_m, double l, double k) {
return t_s * (2.0 * (1.0 / (t_m / (pow(l, 2.0) / pow(k, 4.0)))));
}
t_m = abs(t)
t_s = copysign(1.0d0, t)
real(8) function code(t_s, t_m, l, k)
real(8), intent (in) :: t_s
real(8), intent (in) :: t_m
real(8), intent (in) :: l
real(8), intent (in) :: k
code = t_s * (2.0d0 * (1.0d0 / (t_m / ((l ** 2.0d0) / (k ** 4.0d0)))))
end function
t_m = Math.abs(t);
t_s = Math.copySign(1.0, t);
public static double code(double t_s, double t_m, double l, double k) {
return t_s * (2.0 * (1.0 / (t_m / (Math.pow(l, 2.0) / Math.pow(k, 4.0)))));
}
t_m = math.fabs(t) t_s = math.copysign(1.0, t) def code(t_s, t_m, l, k): return t_s * (2.0 * (1.0 / (t_m / (math.pow(l, 2.0) / math.pow(k, 4.0)))))
t_m = abs(t) t_s = copysign(1.0, t) function code(t_s, t_m, l, k) return Float64(t_s * Float64(2.0 * Float64(1.0 / Float64(t_m / Float64((l ^ 2.0) / (k ^ 4.0)))))) end
t_m = abs(t); t_s = sign(t) * abs(1.0); function tmp = code(t_s, t_m, l, k) tmp = t_s * (2.0 * (1.0 / (t_m / ((l ^ 2.0) / (k ^ 4.0))))); end
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_, k_] := N[(t$95$s * N[(2.0 * N[(1.0 / N[(t$95$m / N[(N[Power[l, 2.0], $MachinePrecision] / N[Power[k, 4.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
t_m = \left|t\right|
\\
t_s = \mathsf{copysign}\left(1, t\right)
\\
t_s \cdot \left(2 \cdot \frac{1}{\frac{t_m}{\frac{{\ell}^{2}}{{k}^{4}}}}\right)
\end{array}
t_m = (fabs.f64 t) t_s = (copysign.f64 1 t) (FPCore (t_s t_m l k) :precision binary64 (* t_s (* 2.0 (/ (/ (pow l 2.0) (pow k 4.0)) t_m))))
t_m = fabs(t);
t_s = copysign(1.0, t);
double code(double t_s, double t_m, double l, double k) {
return t_s * (2.0 * ((pow(l, 2.0) / pow(k, 4.0)) / t_m));
}
t_m = abs(t)
t_s = copysign(1.0d0, t)
real(8) function code(t_s, t_m, l, k)
real(8), intent (in) :: t_s
real(8), intent (in) :: t_m
real(8), intent (in) :: l
real(8), intent (in) :: k
code = t_s * (2.0d0 * (((l ** 2.0d0) / (k ** 4.0d0)) / t_m))
end function
t_m = Math.abs(t);
t_s = Math.copySign(1.0, t);
public static double code(double t_s, double t_m, double l, double k) {
return t_s * (2.0 * ((Math.pow(l, 2.0) / Math.pow(k, 4.0)) / t_m));
}
t_m = math.fabs(t) t_s = math.copysign(1.0, t) def code(t_s, t_m, l, k): return t_s * (2.0 * ((math.pow(l, 2.0) / math.pow(k, 4.0)) / t_m))
t_m = abs(t) t_s = copysign(1.0, t) function code(t_s, t_m, l, k) return Float64(t_s * Float64(2.0 * Float64(Float64((l ^ 2.0) / (k ^ 4.0)) / t_m))) end
t_m = abs(t); t_s = sign(t) * abs(1.0); function tmp = code(t_s, t_m, l, k) tmp = t_s * (2.0 * (((l ^ 2.0) / (k ^ 4.0)) / t_m)); end
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_, k_] := N[(t$95$s * N[(2.0 * N[(N[(N[Power[l, 2.0], $MachinePrecision] / N[Power[k, 4.0], $MachinePrecision]), $MachinePrecision] / t$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
t_m = \left|t\right|
\\
t_s = \mathsf{copysign}\left(1, t\right)
\\
t_s \cdot \left(2 \cdot \frac{\frac{{\ell}^{2}}{{k}^{4}}}{t_m}\right)
\end{array}
herbie shell --seed 2024010
(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))))