
(FPCore (x l t) :precision binary64 (/ (* (sqrt 2.0) t) (sqrt (- (* (/ (+ x 1.0) (- x 1.0)) (+ (* l l) (* 2.0 (* t t)))) (* l l)))))
double code(double x, double l, double t) {
return (sqrt(2.0) * t) / sqrt(((((x + 1.0) / (x - 1.0)) * ((l * l) + (2.0 * (t * t)))) - (l * l)));
}
real(8) function code(x, l, t)
real(8), intent (in) :: x
real(8), intent (in) :: l
real(8), intent (in) :: t
code = (sqrt(2.0d0) * t) / sqrt(((((x + 1.0d0) / (x - 1.0d0)) * ((l * l) + (2.0d0 * (t * t)))) - (l * l)))
end function
public static double code(double x, double l, double t) {
return (Math.sqrt(2.0) * t) / Math.sqrt(((((x + 1.0) / (x - 1.0)) * ((l * l) + (2.0 * (t * t)))) - (l * l)));
}
def code(x, l, t): return (math.sqrt(2.0) * t) / math.sqrt(((((x + 1.0) / (x - 1.0)) * ((l * l) + (2.0 * (t * t)))) - (l * l)))
function code(x, l, t) return Float64(Float64(sqrt(2.0) * t) / sqrt(Float64(Float64(Float64(Float64(x + 1.0) / Float64(x - 1.0)) * Float64(Float64(l * l) + Float64(2.0 * Float64(t * t)))) - Float64(l * l)))) end
function tmp = code(x, l, t) tmp = (sqrt(2.0) * t) / sqrt(((((x + 1.0) / (x - 1.0)) * ((l * l) + (2.0 * (t * t)))) - (l * l))); end
code[x_, l_, t_] := N[(N[(N[Sqrt[2.0], $MachinePrecision] * t), $MachinePrecision] / N[Sqrt[N[(N[(N[(N[(x + 1.0), $MachinePrecision] / N[(x - 1.0), $MachinePrecision]), $MachinePrecision] * N[(N[(l * l), $MachinePrecision] + N[(2.0 * N[(t * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(l * l), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{\sqrt{2} \cdot t}{\sqrt{\frac{x + 1}{x - 1} \cdot \left(\ell \cdot \ell + 2 \cdot \left(t \cdot t\right)\right) - \ell \cdot \ell}}
\end{array}
Sampling outcomes in binary64 precision:
Herbie found 11 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (x l t) :precision binary64 (/ (* (sqrt 2.0) t) (sqrt (- (* (/ (+ x 1.0) (- x 1.0)) (+ (* l l) (* 2.0 (* t t)))) (* l l)))))
double code(double x, double l, double t) {
return (sqrt(2.0) * t) / sqrt(((((x + 1.0) / (x - 1.0)) * ((l * l) + (2.0 * (t * t)))) - (l * l)));
}
real(8) function code(x, l, t)
real(8), intent (in) :: x
real(8), intent (in) :: l
real(8), intent (in) :: t
code = (sqrt(2.0d0) * t) / sqrt(((((x + 1.0d0) / (x - 1.0d0)) * ((l * l) + (2.0d0 * (t * t)))) - (l * l)))
end function
public static double code(double x, double l, double t) {
return (Math.sqrt(2.0) * t) / Math.sqrt(((((x + 1.0) / (x - 1.0)) * ((l * l) + (2.0 * (t * t)))) - (l * l)));
}
def code(x, l, t): return (math.sqrt(2.0) * t) / math.sqrt(((((x + 1.0) / (x - 1.0)) * ((l * l) + (2.0 * (t * t)))) - (l * l)))
function code(x, l, t) return Float64(Float64(sqrt(2.0) * t) / sqrt(Float64(Float64(Float64(Float64(x + 1.0) / Float64(x - 1.0)) * Float64(Float64(l * l) + Float64(2.0 * Float64(t * t)))) - Float64(l * l)))) end
function tmp = code(x, l, t) tmp = (sqrt(2.0) * t) / sqrt(((((x + 1.0) / (x - 1.0)) * ((l * l) + (2.0 * (t * t)))) - (l * l))); end
code[x_, l_, t_] := N[(N[(N[Sqrt[2.0], $MachinePrecision] * t), $MachinePrecision] / N[Sqrt[N[(N[(N[(N[(x + 1.0), $MachinePrecision] / N[(x - 1.0), $MachinePrecision]), $MachinePrecision] * N[(N[(l * l), $MachinePrecision] + N[(2.0 * N[(t * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(l * l), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{\sqrt{2} \cdot t}{\sqrt{\frac{x + 1}{x - 1} \cdot \left(\ell \cdot \ell + 2 \cdot \left(t \cdot t\right)\right) - \ell \cdot \ell}}
\end{array}
t_m = (fabs.f64 t)
t_s = (copysign.f64 1 t)
(FPCore (t_s x l t_m)
:precision binary64
(let* ((t_2 (+ (* 2.0 (pow t_m 2.0)) (pow l 2.0)))
(t_3 (/ (+ -1.0 x) (+ x 1.0))))
(*
t_s
(if (<= t_m 5.3e-176)
(*
t_m
(/
(sqrt 2.0)
(+
(* 0.5 (/ (+ t_2 t_2) (* t_m (* (sqrt 2.0) x))))
(* t_m (sqrt 2.0)))))
(if (<= t_m 6500000000.0)
(*
(sqrt 2.0)
(/
t_m
(sqrt (fma 2.0 (/ (pow t_m 2.0) t_3) (* 2.0 (/ (pow l 2.0) x))))))
(sqrt t_3))))))t_m = fabs(t);
t_s = copysign(1.0, t);
double code(double t_s, double x, double l, double t_m) {
double t_2 = (2.0 * pow(t_m, 2.0)) + pow(l, 2.0);
double t_3 = (-1.0 + x) / (x + 1.0);
double tmp;
if (t_m <= 5.3e-176) {
tmp = t_m * (sqrt(2.0) / ((0.5 * ((t_2 + t_2) / (t_m * (sqrt(2.0) * x)))) + (t_m * sqrt(2.0))));
} else if (t_m <= 6500000000.0) {
tmp = sqrt(2.0) * (t_m / sqrt(fma(2.0, (pow(t_m, 2.0) / t_3), (2.0 * (pow(l, 2.0) / x)))));
} else {
tmp = sqrt(t_3);
}
return t_s * tmp;
}
t_m = abs(t) t_s = copysign(1.0, t) function code(t_s, x, l, t_m) t_2 = Float64(Float64(2.0 * (t_m ^ 2.0)) + (l ^ 2.0)) t_3 = Float64(Float64(-1.0 + x) / Float64(x + 1.0)) tmp = 0.0 if (t_m <= 5.3e-176) tmp = Float64(t_m * Float64(sqrt(2.0) / Float64(Float64(0.5 * Float64(Float64(t_2 + t_2) / Float64(t_m * Float64(sqrt(2.0) * x)))) + Float64(t_m * sqrt(2.0))))); elseif (t_m <= 6500000000.0) tmp = Float64(sqrt(2.0) * Float64(t_m / sqrt(fma(2.0, Float64((t_m ^ 2.0) / t_3), Float64(2.0 * Float64((l ^ 2.0) / x)))))); else tmp = sqrt(t_3); 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_, x_, l_, t$95$m_] := Block[{t$95$2 = N[(N[(2.0 * N[Power[t$95$m, 2.0], $MachinePrecision]), $MachinePrecision] + N[Power[l, 2.0], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(N[(-1.0 + x), $MachinePrecision] / N[(x + 1.0), $MachinePrecision]), $MachinePrecision]}, N[(t$95$s * If[LessEqual[t$95$m, 5.3e-176], N[(t$95$m * N[(N[Sqrt[2.0], $MachinePrecision] / N[(N[(0.5 * N[(N[(t$95$2 + t$95$2), $MachinePrecision] / N[(t$95$m * N[(N[Sqrt[2.0], $MachinePrecision] * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(t$95$m * N[Sqrt[2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$m, 6500000000.0], N[(N[Sqrt[2.0], $MachinePrecision] * N[(t$95$m / N[Sqrt[N[(2.0 * N[(N[Power[t$95$m, 2.0], $MachinePrecision] / t$95$3), $MachinePrecision] + N[(2.0 * N[(N[Power[l, 2.0], $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[Sqrt[t$95$3], $MachinePrecision]]]), $MachinePrecision]]]
\begin{array}{l}
t_m = \left|t\right|
\\
t_s = \mathsf{copysign}\left(1, t\right)
\\
\begin{array}{l}
t_2 := 2 \cdot {t_m}^{2} + {\ell}^{2}\\
t_3 := \frac{-1 + x}{x + 1}\\
t_s \cdot \begin{array}{l}
\mathbf{if}\;t_m \leq 5.3 \cdot 10^{-176}:\\
\;\;\;\;t_m \cdot \frac{\sqrt{2}}{0.5 \cdot \frac{t_2 + t_2}{t_m \cdot \left(\sqrt{2} \cdot x\right)} + t_m \cdot \sqrt{2}}\\
\mathbf{elif}\;t_m \leq 6500000000:\\
\;\;\;\;\sqrt{2} \cdot \frac{t_m}{\sqrt{\mathsf{fma}\left(2, \frac{{t_m}^{2}}{t_3}, 2 \cdot \frac{{\ell}^{2}}{x}\right)}}\\
\mathbf{else}:\\
\;\;\;\;\sqrt{t_3}\\
\end{array}
\end{array}
\end{array}
t_m = (fabs.f64 t)
t_s = (copysign.f64 1 t)
(FPCore (t_s x l t_m)
:precision binary64
(let* ((t_2 (/ (+ -1.0 x) (+ x 1.0))))
(*
t_s
(if (<= t_m 5.3e-176)
(*
(sqrt 2.0)
(/
t_m
(+
(* t_m (sqrt 2.0))
(*
0.5
(/
(+ (* 2.0 (+ (pow t_m 2.0) (pow t_m 2.0))) (* 2.0 (pow l 2.0)))
(* t_m (* (sqrt 2.0) x)))))))
(if (<= t_m 11000000000.0)
(*
(sqrt 2.0)
(/
t_m
(sqrt (fma 2.0 (/ (pow t_m 2.0) t_2) (* 2.0 (/ (pow l 2.0) x))))))
(sqrt t_2))))))t_m = fabs(t);
t_s = copysign(1.0, t);
double code(double t_s, double x, double l, double t_m) {
double t_2 = (-1.0 + x) / (x + 1.0);
double tmp;
if (t_m <= 5.3e-176) {
tmp = sqrt(2.0) * (t_m / ((t_m * sqrt(2.0)) + (0.5 * (((2.0 * (pow(t_m, 2.0) + pow(t_m, 2.0))) + (2.0 * pow(l, 2.0))) / (t_m * (sqrt(2.0) * x))))));
} else if (t_m <= 11000000000.0) {
tmp = sqrt(2.0) * (t_m / sqrt(fma(2.0, (pow(t_m, 2.0) / t_2), (2.0 * (pow(l, 2.0) / x)))));
} else {
tmp = sqrt(t_2);
}
return t_s * tmp;
}
t_m = abs(t) t_s = copysign(1.0, t) function code(t_s, x, l, t_m) t_2 = Float64(Float64(-1.0 + x) / Float64(x + 1.0)) tmp = 0.0 if (t_m <= 5.3e-176) tmp = Float64(sqrt(2.0) * Float64(t_m / Float64(Float64(t_m * sqrt(2.0)) + Float64(0.5 * Float64(Float64(Float64(2.0 * Float64((t_m ^ 2.0) + (t_m ^ 2.0))) + Float64(2.0 * (l ^ 2.0))) / Float64(t_m * Float64(sqrt(2.0) * x))))))); elseif (t_m <= 11000000000.0) tmp = Float64(sqrt(2.0) * Float64(t_m / sqrt(fma(2.0, Float64((t_m ^ 2.0) / t_2), Float64(2.0 * Float64((l ^ 2.0) / x)))))); else tmp = sqrt(t_2); 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_, x_, l_, t$95$m_] := Block[{t$95$2 = N[(N[(-1.0 + x), $MachinePrecision] / N[(x + 1.0), $MachinePrecision]), $MachinePrecision]}, N[(t$95$s * If[LessEqual[t$95$m, 5.3e-176], N[(N[Sqrt[2.0], $MachinePrecision] * N[(t$95$m / N[(N[(t$95$m * N[Sqrt[2.0], $MachinePrecision]), $MachinePrecision] + N[(0.5 * N[(N[(N[(2.0 * N[(N[Power[t$95$m, 2.0], $MachinePrecision] + N[Power[t$95$m, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(2.0 * N[Power[l, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(t$95$m * N[(N[Sqrt[2.0], $MachinePrecision] * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$m, 11000000000.0], N[(N[Sqrt[2.0], $MachinePrecision] * N[(t$95$m / N[Sqrt[N[(2.0 * N[(N[Power[t$95$m, 2.0], $MachinePrecision] / t$95$2), $MachinePrecision] + N[(2.0 * N[(N[Power[l, 2.0], $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[Sqrt[t$95$2], $MachinePrecision]]]), $MachinePrecision]]
\begin{array}{l}
t_m = \left|t\right|
\\
t_s = \mathsf{copysign}\left(1, t\right)
\\
\begin{array}{l}
t_2 := \frac{-1 + x}{x + 1}\\
t_s \cdot \begin{array}{l}
\mathbf{if}\;t_m \leq 5.3 \cdot 10^{-176}:\\
\;\;\;\;\sqrt{2} \cdot \frac{t_m}{t_m \cdot \sqrt{2} + 0.5 \cdot \frac{2 \cdot \left({t_m}^{2} + {t_m}^{2}\right) + 2 \cdot {\ell}^{2}}{t_m \cdot \left(\sqrt{2} \cdot x\right)}}\\
\mathbf{elif}\;t_m \leq 11000000000:\\
\;\;\;\;\sqrt{2} \cdot \frac{t_m}{\sqrt{\mathsf{fma}\left(2, \frac{{t_m}^{2}}{t_2}, 2 \cdot \frac{{\ell}^{2}}{x}\right)}}\\
\mathbf{else}:\\
\;\;\;\;\sqrt{t_2}\\
\end{array}
\end{array}
\end{array}
t_m = (fabs.f64 t)
t_s = (copysign.f64 1 t)
(FPCore (t_s x l t_m)
:precision binary64
(let* ((t_2 (/ (+ -1.0 x) (+ x 1.0))))
(*
t_s
(if (<= t_m 2.55e-229)
(/ (* t_m (sqrt 2.0)) (* (sqrt 2.0) (/ l (sqrt x))))
(if (<= t_m 2.65e-176)
(sqrt (- 1.0 (/ 2.0 x)))
(if (<= t_m 11000000000.0)
(*
(sqrt 2.0)
(/
t_m
(sqrt (fma 2.0 (/ (pow t_m 2.0) t_2) (* 2.0 (/ (pow l 2.0) x))))))
(sqrt t_2)))))))t_m = fabs(t);
t_s = copysign(1.0, t);
double code(double t_s, double x, double l, double t_m) {
double t_2 = (-1.0 + x) / (x + 1.0);
double tmp;
if (t_m <= 2.55e-229) {
tmp = (t_m * sqrt(2.0)) / (sqrt(2.0) * (l / sqrt(x)));
} else if (t_m <= 2.65e-176) {
tmp = sqrt((1.0 - (2.0 / x)));
} else if (t_m <= 11000000000.0) {
tmp = sqrt(2.0) * (t_m / sqrt(fma(2.0, (pow(t_m, 2.0) / t_2), (2.0 * (pow(l, 2.0) / x)))));
} else {
tmp = sqrt(t_2);
}
return t_s * tmp;
}
t_m = abs(t) t_s = copysign(1.0, t) function code(t_s, x, l, t_m) t_2 = Float64(Float64(-1.0 + x) / Float64(x + 1.0)) tmp = 0.0 if (t_m <= 2.55e-229) tmp = Float64(Float64(t_m * sqrt(2.0)) / Float64(sqrt(2.0) * Float64(l / sqrt(x)))); elseif (t_m <= 2.65e-176) tmp = sqrt(Float64(1.0 - Float64(2.0 / x))); elseif (t_m <= 11000000000.0) tmp = Float64(sqrt(2.0) * Float64(t_m / sqrt(fma(2.0, Float64((t_m ^ 2.0) / t_2), Float64(2.0 * Float64((l ^ 2.0) / x)))))); else tmp = sqrt(t_2); 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_, x_, l_, t$95$m_] := Block[{t$95$2 = N[(N[(-1.0 + x), $MachinePrecision] / N[(x + 1.0), $MachinePrecision]), $MachinePrecision]}, N[(t$95$s * If[LessEqual[t$95$m, 2.55e-229], N[(N[(t$95$m * N[Sqrt[2.0], $MachinePrecision]), $MachinePrecision] / N[(N[Sqrt[2.0], $MachinePrecision] * N[(l / N[Sqrt[x], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$m, 2.65e-176], N[Sqrt[N[(1.0 - N[(2.0 / x), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], If[LessEqual[t$95$m, 11000000000.0], N[(N[Sqrt[2.0], $MachinePrecision] * N[(t$95$m / N[Sqrt[N[(2.0 * N[(N[Power[t$95$m, 2.0], $MachinePrecision] / t$95$2), $MachinePrecision] + N[(2.0 * N[(N[Power[l, 2.0], $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[Sqrt[t$95$2], $MachinePrecision]]]]), $MachinePrecision]]
\begin{array}{l}
t_m = \left|t\right|
\\
t_s = \mathsf{copysign}\left(1, t\right)
\\
\begin{array}{l}
t_2 := \frac{-1 + x}{x + 1}\\
t_s \cdot \begin{array}{l}
\mathbf{if}\;t_m \leq 2.55 \cdot 10^{-229}:\\
\;\;\;\;\frac{t_m \cdot \sqrt{2}}{\sqrt{2} \cdot \frac{\ell}{\sqrt{x}}}\\
\mathbf{elif}\;t_m \leq 2.65 \cdot 10^{-176}:\\
\;\;\;\;\sqrt{1 - \frac{2}{x}}\\
\mathbf{elif}\;t_m \leq 11000000000:\\
\;\;\;\;\sqrt{2} \cdot \frac{t_m}{\sqrt{\mathsf{fma}\left(2, \frac{{t_m}^{2}}{t_2}, 2 \cdot \frac{{\ell}^{2}}{x}\right)}}\\
\mathbf{else}:\\
\;\;\;\;\sqrt{t_2}\\
\end{array}
\end{array}
\end{array}
t_m = (fabs.f64 t)
t_s = (copysign.f64 1 t)
(FPCore (t_s x l t_m)
:precision binary64
(*
t_s
(if (<= t_m 2.6e-229)
(/ (* t_m (sqrt 2.0)) (* (sqrt 2.0) (/ l (sqrt x))))
(if (<= t_m 1.85e-176)
(sqrt (- 1.0 (/ 2.0 x)))
(if (<= t_m 5.3e-163)
(*
(sqrt 2.0)
(*
t_m
(/
1.0
(*
l
(sqrt (+ (+ (/ 1.0 x) (/ 1.0 (pow x 2.0))) (/ 1.0 (+ -1.0 x))))))))
(sqrt (/ (+ -1.0 x) (+ x 1.0))))))))t_m = fabs(t);
t_s = copysign(1.0, t);
double code(double t_s, double x, double l, double t_m) {
double tmp;
if (t_m <= 2.6e-229) {
tmp = (t_m * sqrt(2.0)) / (sqrt(2.0) * (l / sqrt(x)));
} else if (t_m <= 1.85e-176) {
tmp = sqrt((1.0 - (2.0 / x)));
} else if (t_m <= 5.3e-163) {
tmp = sqrt(2.0) * (t_m * (1.0 / (l * sqrt((((1.0 / x) + (1.0 / pow(x, 2.0))) + (1.0 / (-1.0 + x)))))));
} else {
tmp = sqrt(((-1.0 + x) / (x + 1.0)));
}
return t_s * tmp;
}
t_m = abs(t)
t_s = copysign(1.0d0, t)
real(8) function code(t_s, x, l, t_m)
real(8), intent (in) :: t_s
real(8), intent (in) :: x
real(8), intent (in) :: l
real(8), intent (in) :: t_m
real(8) :: tmp
if (t_m <= 2.6d-229) then
tmp = (t_m * sqrt(2.0d0)) / (sqrt(2.0d0) * (l / sqrt(x)))
else if (t_m <= 1.85d-176) then
tmp = sqrt((1.0d0 - (2.0d0 / x)))
else if (t_m <= 5.3d-163) then
tmp = sqrt(2.0d0) * (t_m * (1.0d0 / (l * sqrt((((1.0d0 / x) + (1.0d0 / (x ** 2.0d0))) + (1.0d0 / ((-1.0d0) + x)))))))
else
tmp = sqrt((((-1.0d0) + x) / (x + 1.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 x, double l, double t_m) {
double tmp;
if (t_m <= 2.6e-229) {
tmp = (t_m * Math.sqrt(2.0)) / (Math.sqrt(2.0) * (l / Math.sqrt(x)));
} else if (t_m <= 1.85e-176) {
tmp = Math.sqrt((1.0 - (2.0 / x)));
} else if (t_m <= 5.3e-163) {
tmp = Math.sqrt(2.0) * (t_m * (1.0 / (l * Math.sqrt((((1.0 / x) + (1.0 / Math.pow(x, 2.0))) + (1.0 / (-1.0 + x)))))));
} else {
tmp = Math.sqrt(((-1.0 + x) / (x + 1.0)));
}
return t_s * tmp;
}
t_m = math.fabs(t) t_s = math.copysign(1.0, t) def code(t_s, x, l, t_m): tmp = 0 if t_m <= 2.6e-229: tmp = (t_m * math.sqrt(2.0)) / (math.sqrt(2.0) * (l / math.sqrt(x))) elif t_m <= 1.85e-176: tmp = math.sqrt((1.0 - (2.0 / x))) elif t_m <= 5.3e-163: tmp = math.sqrt(2.0) * (t_m * (1.0 / (l * math.sqrt((((1.0 / x) + (1.0 / math.pow(x, 2.0))) + (1.0 / (-1.0 + x))))))) else: tmp = math.sqrt(((-1.0 + x) / (x + 1.0))) return t_s * tmp
t_m = abs(t) t_s = copysign(1.0, t) function code(t_s, x, l, t_m) tmp = 0.0 if (t_m <= 2.6e-229) tmp = Float64(Float64(t_m * sqrt(2.0)) / Float64(sqrt(2.0) * Float64(l / sqrt(x)))); elseif (t_m <= 1.85e-176) tmp = sqrt(Float64(1.0 - Float64(2.0 / x))); elseif (t_m <= 5.3e-163) tmp = Float64(sqrt(2.0) * Float64(t_m * Float64(1.0 / Float64(l * sqrt(Float64(Float64(Float64(1.0 / x) + Float64(1.0 / (x ^ 2.0))) + Float64(1.0 / Float64(-1.0 + x)))))))); else tmp = sqrt(Float64(Float64(-1.0 + x) / Float64(x + 1.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, x, l, t_m) tmp = 0.0; if (t_m <= 2.6e-229) tmp = (t_m * sqrt(2.0)) / (sqrt(2.0) * (l / sqrt(x))); elseif (t_m <= 1.85e-176) tmp = sqrt((1.0 - (2.0 / x))); elseif (t_m <= 5.3e-163) tmp = sqrt(2.0) * (t_m * (1.0 / (l * sqrt((((1.0 / x) + (1.0 / (x ^ 2.0))) + (1.0 / (-1.0 + x))))))); else tmp = sqrt(((-1.0 + x) / (x + 1.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_, x_, l_, t$95$m_] := N[(t$95$s * If[LessEqual[t$95$m, 2.6e-229], N[(N[(t$95$m * N[Sqrt[2.0], $MachinePrecision]), $MachinePrecision] / N[(N[Sqrt[2.0], $MachinePrecision] * N[(l / N[Sqrt[x], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$m, 1.85e-176], N[Sqrt[N[(1.0 - N[(2.0 / x), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], If[LessEqual[t$95$m, 5.3e-163], N[(N[Sqrt[2.0], $MachinePrecision] * N[(t$95$m * N[(1.0 / N[(l * N[Sqrt[N[(N[(N[(1.0 / x), $MachinePrecision] + N[(1.0 / N[Power[x, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(1.0 / N[(-1.0 + x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[Sqrt[N[(N[(-1.0 + x), $MachinePrecision] / N[(x + 1.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 2.6 \cdot 10^{-229}:\\
\;\;\;\;\frac{t_m \cdot \sqrt{2}}{\sqrt{2} \cdot \frac{\ell}{\sqrt{x}}}\\
\mathbf{elif}\;t_m \leq 1.85 \cdot 10^{-176}:\\
\;\;\;\;\sqrt{1 - \frac{2}{x}}\\
\mathbf{elif}\;t_m \leq 5.3 \cdot 10^{-163}:\\
\;\;\;\;\sqrt{2} \cdot \left(t_m \cdot \frac{1}{\ell \cdot \sqrt{\left(\frac{1}{x} + \frac{1}{{x}^{2}}\right) + \frac{1}{-1 + x}}}\right)\\
\mathbf{else}:\\
\;\;\;\;\sqrt{\frac{-1 + x}{x + 1}}\\
\end{array}
\end{array}
t_m = (fabs.f64 t)
t_s = (copysign.f64 1 t)
(FPCore (t_s x l t_m)
:precision binary64
(*
t_s
(if (<= t_m 2.6e-229)
(/ (* t_m (sqrt 2.0)) (* (sqrt 2.0) (/ l (sqrt x))))
(if (<= t_m 2.75e-176)
(sqrt (- 1.0 (/ 2.0 x)))
(if (<= t_m 4.4e-163)
(* (sqrt 2.0) (* (sqrt (- (* 0.5 x) 0.5)) (/ t_m l)))
(sqrt (/ (+ -1.0 x) (+ x 1.0))))))))t_m = fabs(t);
t_s = copysign(1.0, t);
double code(double t_s, double x, double l, double t_m) {
double tmp;
if (t_m <= 2.6e-229) {
tmp = (t_m * sqrt(2.0)) / (sqrt(2.0) * (l / sqrt(x)));
} else if (t_m <= 2.75e-176) {
tmp = sqrt((1.0 - (2.0 / x)));
} else if (t_m <= 4.4e-163) {
tmp = sqrt(2.0) * (sqrt(((0.5 * x) - 0.5)) * (t_m / l));
} else {
tmp = sqrt(((-1.0 + x) / (x + 1.0)));
}
return t_s * tmp;
}
t_m = abs(t)
t_s = copysign(1.0d0, t)
real(8) function code(t_s, x, l, t_m)
real(8), intent (in) :: t_s
real(8), intent (in) :: x
real(8), intent (in) :: l
real(8), intent (in) :: t_m
real(8) :: tmp
if (t_m <= 2.6d-229) then
tmp = (t_m * sqrt(2.0d0)) / (sqrt(2.0d0) * (l / sqrt(x)))
else if (t_m <= 2.75d-176) then
tmp = sqrt((1.0d0 - (2.0d0 / x)))
else if (t_m <= 4.4d-163) then
tmp = sqrt(2.0d0) * (sqrt(((0.5d0 * x) - 0.5d0)) * (t_m / l))
else
tmp = sqrt((((-1.0d0) + x) / (x + 1.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 x, double l, double t_m) {
double tmp;
if (t_m <= 2.6e-229) {
tmp = (t_m * Math.sqrt(2.0)) / (Math.sqrt(2.0) * (l / Math.sqrt(x)));
} else if (t_m <= 2.75e-176) {
tmp = Math.sqrt((1.0 - (2.0 / x)));
} else if (t_m <= 4.4e-163) {
tmp = Math.sqrt(2.0) * (Math.sqrt(((0.5 * x) - 0.5)) * (t_m / l));
} else {
tmp = Math.sqrt(((-1.0 + x) / (x + 1.0)));
}
return t_s * tmp;
}
t_m = math.fabs(t) t_s = math.copysign(1.0, t) def code(t_s, x, l, t_m): tmp = 0 if t_m <= 2.6e-229: tmp = (t_m * math.sqrt(2.0)) / (math.sqrt(2.0) * (l / math.sqrt(x))) elif t_m <= 2.75e-176: tmp = math.sqrt((1.0 - (2.0 / x))) elif t_m <= 4.4e-163: tmp = math.sqrt(2.0) * (math.sqrt(((0.5 * x) - 0.5)) * (t_m / l)) else: tmp = math.sqrt(((-1.0 + x) / (x + 1.0))) return t_s * tmp
t_m = abs(t) t_s = copysign(1.0, t) function code(t_s, x, l, t_m) tmp = 0.0 if (t_m <= 2.6e-229) tmp = Float64(Float64(t_m * sqrt(2.0)) / Float64(sqrt(2.0) * Float64(l / sqrt(x)))); elseif (t_m <= 2.75e-176) tmp = sqrt(Float64(1.0 - Float64(2.0 / x))); elseif (t_m <= 4.4e-163) tmp = Float64(sqrt(2.0) * Float64(sqrt(Float64(Float64(0.5 * x) - 0.5)) * Float64(t_m / l))); else tmp = sqrt(Float64(Float64(-1.0 + x) / Float64(x + 1.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, x, l, t_m) tmp = 0.0; if (t_m <= 2.6e-229) tmp = (t_m * sqrt(2.0)) / (sqrt(2.0) * (l / sqrt(x))); elseif (t_m <= 2.75e-176) tmp = sqrt((1.0 - (2.0 / x))); elseif (t_m <= 4.4e-163) tmp = sqrt(2.0) * (sqrt(((0.5 * x) - 0.5)) * (t_m / l)); else tmp = sqrt(((-1.0 + x) / (x + 1.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_, x_, l_, t$95$m_] := N[(t$95$s * If[LessEqual[t$95$m, 2.6e-229], N[(N[(t$95$m * N[Sqrt[2.0], $MachinePrecision]), $MachinePrecision] / N[(N[Sqrt[2.0], $MachinePrecision] * N[(l / N[Sqrt[x], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$m, 2.75e-176], N[Sqrt[N[(1.0 - N[(2.0 / x), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], If[LessEqual[t$95$m, 4.4e-163], N[(N[Sqrt[2.0], $MachinePrecision] * N[(N[Sqrt[N[(N[(0.5 * x), $MachinePrecision] - 0.5), $MachinePrecision]], $MachinePrecision] * N[(t$95$m / l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[Sqrt[N[(N[(-1.0 + x), $MachinePrecision] / N[(x + 1.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 2.6 \cdot 10^{-229}:\\
\;\;\;\;\frac{t_m \cdot \sqrt{2}}{\sqrt{2} \cdot \frac{\ell}{\sqrt{x}}}\\
\mathbf{elif}\;t_m \leq 2.75 \cdot 10^{-176}:\\
\;\;\;\;\sqrt{1 - \frac{2}{x}}\\
\mathbf{elif}\;t_m \leq 4.4 \cdot 10^{-163}:\\
\;\;\;\;\sqrt{2} \cdot \left(\sqrt{0.5 \cdot x - 0.5} \cdot \frac{t_m}{\ell}\right)\\
\mathbf{else}:\\
\;\;\;\;\sqrt{\frac{-1 + x}{x + 1}}\\
\end{array}
\end{array}
t_m = (fabs.f64 t)
t_s = (copysign.f64 1 t)
(FPCore (t_s x l t_m)
:precision binary64
(let* ((t_2 (* (sqrt 2.0) (* (sqrt (- (* 0.5 x) 0.5)) (/ t_m l)))))
(*
t_s
(if (<= t_m 2.55e-229)
t_2
(if (<= t_m 3.5e-176)
(sqrt (- 1.0 (/ 2.0 x)))
(if (<= t_m 3.5e-163) t_2 (sqrt (/ (+ -1.0 x) (+ x 1.0)))))))))t_m = fabs(t);
t_s = copysign(1.0, t);
double code(double t_s, double x, double l, double t_m) {
double t_2 = sqrt(2.0) * (sqrt(((0.5 * x) - 0.5)) * (t_m / l));
double tmp;
if (t_m <= 2.55e-229) {
tmp = t_2;
} else if (t_m <= 3.5e-176) {
tmp = sqrt((1.0 - (2.0 / x)));
} else if (t_m <= 3.5e-163) {
tmp = t_2;
} else {
tmp = sqrt(((-1.0 + x) / (x + 1.0)));
}
return t_s * tmp;
}
t_m = abs(t)
t_s = copysign(1.0d0, t)
real(8) function code(t_s, x, l, t_m)
real(8), intent (in) :: t_s
real(8), intent (in) :: x
real(8), intent (in) :: l
real(8), intent (in) :: t_m
real(8) :: t_2
real(8) :: tmp
t_2 = sqrt(2.0d0) * (sqrt(((0.5d0 * x) - 0.5d0)) * (t_m / l))
if (t_m <= 2.55d-229) then
tmp = t_2
else if (t_m <= 3.5d-176) then
tmp = sqrt((1.0d0 - (2.0d0 / x)))
else if (t_m <= 3.5d-163) then
tmp = t_2
else
tmp = sqrt((((-1.0d0) + x) / (x + 1.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 x, double l, double t_m) {
double t_2 = Math.sqrt(2.0) * (Math.sqrt(((0.5 * x) - 0.5)) * (t_m / l));
double tmp;
if (t_m <= 2.55e-229) {
tmp = t_2;
} else if (t_m <= 3.5e-176) {
tmp = Math.sqrt((1.0 - (2.0 / x)));
} else if (t_m <= 3.5e-163) {
tmp = t_2;
} else {
tmp = Math.sqrt(((-1.0 + x) / (x + 1.0)));
}
return t_s * tmp;
}
t_m = math.fabs(t) t_s = math.copysign(1.0, t) def code(t_s, x, l, t_m): t_2 = math.sqrt(2.0) * (math.sqrt(((0.5 * x) - 0.5)) * (t_m / l)) tmp = 0 if t_m <= 2.55e-229: tmp = t_2 elif t_m <= 3.5e-176: tmp = math.sqrt((1.0 - (2.0 / x))) elif t_m <= 3.5e-163: tmp = t_2 else: tmp = math.sqrt(((-1.0 + x) / (x + 1.0))) return t_s * tmp
t_m = abs(t) t_s = copysign(1.0, t) function code(t_s, x, l, t_m) t_2 = Float64(sqrt(2.0) * Float64(sqrt(Float64(Float64(0.5 * x) - 0.5)) * Float64(t_m / l))) tmp = 0.0 if (t_m <= 2.55e-229) tmp = t_2; elseif (t_m <= 3.5e-176) tmp = sqrt(Float64(1.0 - Float64(2.0 / x))); elseif (t_m <= 3.5e-163) tmp = t_2; else tmp = sqrt(Float64(Float64(-1.0 + x) / Float64(x + 1.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, x, l, t_m) t_2 = sqrt(2.0) * (sqrt(((0.5 * x) - 0.5)) * (t_m / l)); tmp = 0.0; if (t_m <= 2.55e-229) tmp = t_2; elseif (t_m <= 3.5e-176) tmp = sqrt((1.0 - (2.0 / x))); elseif (t_m <= 3.5e-163) tmp = t_2; else tmp = sqrt(((-1.0 + x) / (x + 1.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_, x_, l_, t$95$m_] := Block[{t$95$2 = N[(N[Sqrt[2.0], $MachinePrecision] * N[(N[Sqrt[N[(N[(0.5 * x), $MachinePrecision] - 0.5), $MachinePrecision]], $MachinePrecision] * N[(t$95$m / l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, N[(t$95$s * If[LessEqual[t$95$m, 2.55e-229], t$95$2, If[LessEqual[t$95$m, 3.5e-176], N[Sqrt[N[(1.0 - N[(2.0 / x), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], If[LessEqual[t$95$m, 3.5e-163], t$95$2, N[Sqrt[N[(N[(-1.0 + x), $MachinePrecision] / N[(x + 1.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]]]]), $MachinePrecision]]
\begin{array}{l}
t_m = \left|t\right|
\\
t_s = \mathsf{copysign}\left(1, t\right)
\\
\begin{array}{l}
t_2 := \sqrt{2} \cdot \left(\sqrt{0.5 \cdot x - 0.5} \cdot \frac{t_m}{\ell}\right)\\
t_s \cdot \begin{array}{l}
\mathbf{if}\;t_m \leq 2.55 \cdot 10^{-229}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;t_m \leq 3.5 \cdot 10^{-176}:\\
\;\;\;\;\sqrt{1 - \frac{2}{x}}\\
\mathbf{elif}\;t_m \leq 3.5 \cdot 10^{-163}:\\
\;\;\;\;t_2\\
\mathbf{else}:\\
\;\;\;\;\sqrt{\frac{-1 + x}{x + 1}}\\
\end{array}
\end{array}
\end{array}
t_m = (fabs.f64 t)
t_s = (copysign.f64 1 t)
(FPCore (t_s x l t_m)
:precision binary64
(let* ((t_2 (* (sqrt x) (/ t_m l))))
(*
t_s
(if (<= t_m 1.9e-229)
t_2
(if (<= t_m 5.1e-176)
(sqrt (- 1.0 (/ 2.0 x)))
(if (<= t_m 3.5e-163) t_2 (sqrt (/ (+ -1.0 x) (+ x 1.0)))))))))t_m = fabs(t);
t_s = copysign(1.0, t);
double code(double t_s, double x, double l, double t_m) {
double t_2 = sqrt(x) * (t_m / l);
double tmp;
if (t_m <= 1.9e-229) {
tmp = t_2;
} else if (t_m <= 5.1e-176) {
tmp = sqrt((1.0 - (2.0 / x)));
} else if (t_m <= 3.5e-163) {
tmp = t_2;
} else {
tmp = sqrt(((-1.0 + x) / (x + 1.0)));
}
return t_s * tmp;
}
t_m = abs(t)
t_s = copysign(1.0d0, t)
real(8) function code(t_s, x, l, t_m)
real(8), intent (in) :: t_s
real(8), intent (in) :: x
real(8), intent (in) :: l
real(8), intent (in) :: t_m
real(8) :: t_2
real(8) :: tmp
t_2 = sqrt(x) * (t_m / l)
if (t_m <= 1.9d-229) then
tmp = t_2
else if (t_m <= 5.1d-176) then
tmp = sqrt((1.0d0 - (2.0d0 / x)))
else if (t_m <= 3.5d-163) then
tmp = t_2
else
tmp = sqrt((((-1.0d0) + x) / (x + 1.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 x, double l, double t_m) {
double t_2 = Math.sqrt(x) * (t_m / l);
double tmp;
if (t_m <= 1.9e-229) {
tmp = t_2;
} else if (t_m <= 5.1e-176) {
tmp = Math.sqrt((1.0 - (2.0 / x)));
} else if (t_m <= 3.5e-163) {
tmp = t_2;
} else {
tmp = Math.sqrt(((-1.0 + x) / (x + 1.0)));
}
return t_s * tmp;
}
t_m = math.fabs(t) t_s = math.copysign(1.0, t) def code(t_s, x, l, t_m): t_2 = math.sqrt(x) * (t_m / l) tmp = 0 if t_m <= 1.9e-229: tmp = t_2 elif t_m <= 5.1e-176: tmp = math.sqrt((1.0 - (2.0 / x))) elif t_m <= 3.5e-163: tmp = t_2 else: tmp = math.sqrt(((-1.0 + x) / (x + 1.0))) return t_s * tmp
t_m = abs(t) t_s = copysign(1.0, t) function code(t_s, x, l, t_m) t_2 = Float64(sqrt(x) * Float64(t_m / l)) tmp = 0.0 if (t_m <= 1.9e-229) tmp = t_2; elseif (t_m <= 5.1e-176) tmp = sqrt(Float64(1.0 - Float64(2.0 / x))); elseif (t_m <= 3.5e-163) tmp = t_2; else tmp = sqrt(Float64(Float64(-1.0 + x) / Float64(x + 1.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, x, l, t_m) t_2 = sqrt(x) * (t_m / l); tmp = 0.0; if (t_m <= 1.9e-229) tmp = t_2; elseif (t_m <= 5.1e-176) tmp = sqrt((1.0 - (2.0 / x))); elseif (t_m <= 3.5e-163) tmp = t_2; else tmp = sqrt(((-1.0 + x) / (x + 1.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_, x_, l_, t$95$m_] := Block[{t$95$2 = N[(N[Sqrt[x], $MachinePrecision] * N[(t$95$m / l), $MachinePrecision]), $MachinePrecision]}, N[(t$95$s * If[LessEqual[t$95$m, 1.9e-229], t$95$2, If[LessEqual[t$95$m, 5.1e-176], N[Sqrt[N[(1.0 - N[(2.0 / x), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], If[LessEqual[t$95$m, 3.5e-163], t$95$2, N[Sqrt[N[(N[(-1.0 + x), $MachinePrecision] / N[(x + 1.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]]]]), $MachinePrecision]]
\begin{array}{l}
t_m = \left|t\right|
\\
t_s = \mathsf{copysign}\left(1, t\right)
\\
\begin{array}{l}
t_2 := \sqrt{x} \cdot \frac{t_m}{\ell}\\
t_s \cdot \begin{array}{l}
\mathbf{if}\;t_m \leq 1.9 \cdot 10^{-229}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;t_m \leq 5.1 \cdot 10^{-176}:\\
\;\;\;\;\sqrt{1 - \frac{2}{x}}\\
\mathbf{elif}\;t_m \leq 3.5 \cdot 10^{-163}:\\
\;\;\;\;t_2\\
\mathbf{else}:\\
\;\;\;\;\sqrt{\frac{-1 + x}{x + 1}}\\
\end{array}
\end{array}
\end{array}
t_m = (fabs.f64 t)
t_s = (copysign.f64 1 t)
(FPCore (t_s x l t_m)
:precision binary64
(let* ((t_2 (* (sqrt x) (/ t_m l))))
(*
t_s
(if (<= t_m 1.9e-229)
t_2
(if (<= t_m 2.2e-176)
(sqrt (- 1.0 (/ 2.0 x)))
(if (<= t_m 7.2e-163)
t_2
(pow (- 1.0 (/ 0.3333333333333333 x)) 3.0)))))))t_m = fabs(t);
t_s = copysign(1.0, t);
double code(double t_s, double x, double l, double t_m) {
double t_2 = sqrt(x) * (t_m / l);
double tmp;
if (t_m <= 1.9e-229) {
tmp = t_2;
} else if (t_m <= 2.2e-176) {
tmp = sqrt((1.0 - (2.0 / x)));
} else if (t_m <= 7.2e-163) {
tmp = t_2;
} else {
tmp = pow((1.0 - (0.3333333333333333 / x)), 3.0);
}
return t_s * tmp;
}
t_m = abs(t)
t_s = copysign(1.0d0, t)
real(8) function code(t_s, x, l, t_m)
real(8), intent (in) :: t_s
real(8), intent (in) :: x
real(8), intent (in) :: l
real(8), intent (in) :: t_m
real(8) :: t_2
real(8) :: tmp
t_2 = sqrt(x) * (t_m / l)
if (t_m <= 1.9d-229) then
tmp = t_2
else if (t_m <= 2.2d-176) then
tmp = sqrt((1.0d0 - (2.0d0 / x)))
else if (t_m <= 7.2d-163) then
tmp = t_2
else
tmp = (1.0d0 - (0.3333333333333333d0 / x)) ** 3.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 x, double l, double t_m) {
double t_2 = Math.sqrt(x) * (t_m / l);
double tmp;
if (t_m <= 1.9e-229) {
tmp = t_2;
} else if (t_m <= 2.2e-176) {
tmp = Math.sqrt((1.0 - (2.0 / x)));
} else if (t_m <= 7.2e-163) {
tmp = t_2;
} else {
tmp = Math.pow((1.0 - (0.3333333333333333 / x)), 3.0);
}
return t_s * tmp;
}
t_m = math.fabs(t) t_s = math.copysign(1.0, t) def code(t_s, x, l, t_m): t_2 = math.sqrt(x) * (t_m / l) tmp = 0 if t_m <= 1.9e-229: tmp = t_2 elif t_m <= 2.2e-176: tmp = math.sqrt((1.0 - (2.0 / x))) elif t_m <= 7.2e-163: tmp = t_2 else: tmp = math.pow((1.0 - (0.3333333333333333 / x)), 3.0) return t_s * tmp
t_m = abs(t) t_s = copysign(1.0, t) function code(t_s, x, l, t_m) t_2 = Float64(sqrt(x) * Float64(t_m / l)) tmp = 0.0 if (t_m <= 1.9e-229) tmp = t_2; elseif (t_m <= 2.2e-176) tmp = sqrt(Float64(1.0 - Float64(2.0 / x))); elseif (t_m <= 7.2e-163) tmp = t_2; else tmp = Float64(1.0 - Float64(0.3333333333333333 / x)) ^ 3.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, x, l, t_m) t_2 = sqrt(x) * (t_m / l); tmp = 0.0; if (t_m <= 1.9e-229) tmp = t_2; elseif (t_m <= 2.2e-176) tmp = sqrt((1.0 - (2.0 / x))); elseif (t_m <= 7.2e-163) tmp = t_2; else tmp = (1.0 - (0.3333333333333333 / x)) ^ 3.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_, x_, l_, t$95$m_] := Block[{t$95$2 = N[(N[Sqrt[x], $MachinePrecision] * N[(t$95$m / l), $MachinePrecision]), $MachinePrecision]}, N[(t$95$s * If[LessEqual[t$95$m, 1.9e-229], t$95$2, If[LessEqual[t$95$m, 2.2e-176], N[Sqrt[N[(1.0 - N[(2.0 / x), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], If[LessEqual[t$95$m, 7.2e-163], t$95$2, N[Power[N[(1.0 - N[(0.3333333333333333 / x), $MachinePrecision]), $MachinePrecision], 3.0], $MachinePrecision]]]]), $MachinePrecision]]
\begin{array}{l}
t_m = \left|t\right|
\\
t_s = \mathsf{copysign}\left(1, t\right)
\\
\begin{array}{l}
t_2 := \sqrt{x} \cdot \frac{t_m}{\ell}\\
t_s \cdot \begin{array}{l}
\mathbf{if}\;t_m \leq 1.9 \cdot 10^{-229}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;t_m \leq 2.2 \cdot 10^{-176}:\\
\;\;\;\;\sqrt{1 - \frac{2}{x}}\\
\mathbf{elif}\;t_m \leq 7.2 \cdot 10^{-163}:\\
\;\;\;\;t_2\\
\mathbf{else}:\\
\;\;\;\;{\left(1 - \frac{0.3333333333333333}{x}\right)}^{3}\\
\end{array}
\end{array}
\end{array}
t_m = (fabs.f64 t)
t_s = (copysign.f64 1 t)
(FPCore (t_s x l t_m)
:precision binary64
(let* ((t_2 (* (sqrt x) (/ t_m l))))
(*
t_s
(if (<= t_m 2.5e-229)
t_2
(if (<= t_m 2.2e-176)
(sqrt (- 1.0 (/ 2.0 x)))
(if (<= t_m 5.3e-163) t_2 (- 1.0 (/ 1.0 x))))))))t_m = fabs(t);
t_s = copysign(1.0, t);
double code(double t_s, double x, double l, double t_m) {
double t_2 = sqrt(x) * (t_m / l);
double tmp;
if (t_m <= 2.5e-229) {
tmp = t_2;
} else if (t_m <= 2.2e-176) {
tmp = sqrt((1.0 - (2.0 / x)));
} else if (t_m <= 5.3e-163) {
tmp = t_2;
} else {
tmp = 1.0 - (1.0 / x);
}
return t_s * tmp;
}
t_m = abs(t)
t_s = copysign(1.0d0, t)
real(8) function code(t_s, x, l, t_m)
real(8), intent (in) :: t_s
real(8), intent (in) :: x
real(8), intent (in) :: l
real(8), intent (in) :: t_m
real(8) :: t_2
real(8) :: tmp
t_2 = sqrt(x) * (t_m / l)
if (t_m <= 2.5d-229) then
tmp = t_2
else if (t_m <= 2.2d-176) then
tmp = sqrt((1.0d0 - (2.0d0 / x)))
else if (t_m <= 5.3d-163) then
tmp = t_2
else
tmp = 1.0d0 - (1.0d0 / x)
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 x, double l, double t_m) {
double t_2 = Math.sqrt(x) * (t_m / l);
double tmp;
if (t_m <= 2.5e-229) {
tmp = t_2;
} else if (t_m <= 2.2e-176) {
tmp = Math.sqrt((1.0 - (2.0 / x)));
} else if (t_m <= 5.3e-163) {
tmp = t_2;
} else {
tmp = 1.0 - (1.0 / x);
}
return t_s * tmp;
}
t_m = math.fabs(t) t_s = math.copysign(1.0, t) def code(t_s, x, l, t_m): t_2 = math.sqrt(x) * (t_m / l) tmp = 0 if t_m <= 2.5e-229: tmp = t_2 elif t_m <= 2.2e-176: tmp = math.sqrt((1.0 - (2.0 / x))) elif t_m <= 5.3e-163: tmp = t_2 else: tmp = 1.0 - (1.0 / x) return t_s * tmp
t_m = abs(t) t_s = copysign(1.0, t) function code(t_s, x, l, t_m) t_2 = Float64(sqrt(x) * Float64(t_m / l)) tmp = 0.0 if (t_m <= 2.5e-229) tmp = t_2; elseif (t_m <= 2.2e-176) tmp = sqrt(Float64(1.0 - Float64(2.0 / x))); elseif (t_m <= 5.3e-163) tmp = t_2; else tmp = Float64(1.0 - Float64(1.0 / x)); end return Float64(t_s * tmp) end
t_m = abs(t); t_s = sign(t) * abs(1.0); function tmp_2 = code(t_s, x, l, t_m) t_2 = sqrt(x) * (t_m / l); tmp = 0.0; if (t_m <= 2.5e-229) tmp = t_2; elseif (t_m <= 2.2e-176) tmp = sqrt((1.0 - (2.0 / x))); elseif (t_m <= 5.3e-163) tmp = t_2; else tmp = 1.0 - (1.0 / x); 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_, x_, l_, t$95$m_] := Block[{t$95$2 = N[(N[Sqrt[x], $MachinePrecision] * N[(t$95$m / l), $MachinePrecision]), $MachinePrecision]}, N[(t$95$s * If[LessEqual[t$95$m, 2.5e-229], t$95$2, If[LessEqual[t$95$m, 2.2e-176], N[Sqrt[N[(1.0 - N[(2.0 / x), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], If[LessEqual[t$95$m, 5.3e-163], t$95$2, N[(1.0 - N[(1.0 / x), $MachinePrecision]), $MachinePrecision]]]]), $MachinePrecision]]
\begin{array}{l}
t_m = \left|t\right|
\\
t_s = \mathsf{copysign}\left(1, t\right)
\\
\begin{array}{l}
t_2 := \sqrt{x} \cdot \frac{t_m}{\ell}\\
t_s \cdot \begin{array}{l}
\mathbf{if}\;t_m \leq 2.5 \cdot 10^{-229}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;t_m \leq 2.2 \cdot 10^{-176}:\\
\;\;\;\;\sqrt{1 - \frac{2}{x}}\\
\mathbf{elif}\;t_m \leq 5.3 \cdot 10^{-163}:\\
\;\;\;\;t_2\\
\mathbf{else}:\\
\;\;\;\;1 - \frac{1}{x}\\
\end{array}
\end{array}
\end{array}
t_m = (fabs.f64 t) t_s = (copysign.f64 1 t) (FPCore (t_s x l t_m) :precision binary64 (* t_s (- 1.0 (/ 1.0 x))))
t_m = fabs(t);
t_s = copysign(1.0, t);
double code(double t_s, double x, double l, double t_m) {
return t_s * (1.0 - (1.0 / x));
}
t_m = abs(t)
t_s = copysign(1.0d0, t)
real(8) function code(t_s, x, l, t_m)
real(8), intent (in) :: t_s
real(8), intent (in) :: x
real(8), intent (in) :: l
real(8), intent (in) :: t_m
code = t_s * (1.0d0 - (1.0d0 / x))
end function
t_m = Math.abs(t);
t_s = Math.copySign(1.0, t);
public static double code(double t_s, double x, double l, double t_m) {
return t_s * (1.0 - (1.0 / x));
}
t_m = math.fabs(t) t_s = math.copysign(1.0, t) def code(t_s, x, l, t_m): return t_s * (1.0 - (1.0 / x))
t_m = abs(t) t_s = copysign(1.0, t) function code(t_s, x, l, t_m) return Float64(t_s * Float64(1.0 - Float64(1.0 / x))) end
t_m = abs(t); t_s = sign(t) * abs(1.0); function tmp = code(t_s, x, l, t_m) tmp = t_s * (1.0 - (1.0 / x)); 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_, x_, l_, t$95$m_] := N[(t$95$s * N[(1.0 - N[(1.0 / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
t_m = \left|t\right|
\\
t_s = \mathsf{copysign}\left(1, t\right)
\\
t_s \cdot \left(1 - \frac{1}{x}\right)
\end{array}
t_m = (fabs.f64 t) t_s = (copysign.f64 1 t) (FPCore (t_s x l t_m) :precision binary64 (* t_s 1.0))
t_m = fabs(t);
t_s = copysign(1.0, t);
double code(double t_s, double x, double l, double t_m) {
return t_s * 1.0;
}
t_m = abs(t)
t_s = copysign(1.0d0, t)
real(8) function code(t_s, x, l, t_m)
real(8), intent (in) :: t_s
real(8), intent (in) :: x
real(8), intent (in) :: l
real(8), intent (in) :: t_m
code = t_s * 1.0d0
end function
t_m = Math.abs(t);
t_s = Math.copySign(1.0, t);
public static double code(double t_s, double x, double l, double t_m) {
return t_s * 1.0;
}
t_m = math.fabs(t) t_s = math.copysign(1.0, t) def code(t_s, x, l, t_m): return t_s * 1.0
t_m = abs(t) t_s = copysign(1.0, t) function code(t_s, x, l, t_m) return Float64(t_s * 1.0) end
t_m = abs(t); t_s = sign(t) * abs(1.0); function tmp = code(t_s, x, l, t_m) tmp = t_s * 1.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_, x_, l_, t$95$m_] := N[(t$95$s * 1.0), $MachinePrecision]
\begin{array}{l}
t_m = \left|t\right|
\\
t_s = \mathsf{copysign}\left(1, t\right)
\\
t_s \cdot 1
\end{array}
herbie shell --seed 2023343
(FPCore (x l t)
:name "Toniolo and Linder, Equation (7)"
:precision binary64
(/ (* (sqrt 2.0) t) (sqrt (- (* (/ (+ x 1.0) (- x 1.0)) (+ (* l l) (* 2.0 (* t t)))) (* l l)))))