
(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 10 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}
l_m = (fabs.f64 l)
t_m = (fabs.f64 t)
t_s = (copysign.f64 1 t)
(FPCore (t_s x l_m t_m)
:precision binary64
(let* ((t_2
(*
t_m
(/
(sqrt 2.0)
(+
(*
0.5
(/
(+ (* 2.0 (+ (pow t_m 2.0) (pow t_m 2.0))) (* 2.0 (pow l_m 2.0)))
(* t_m (* (sqrt 2.0) x))))
(* t_m (sqrt 2.0)))))))
(*
t_s
(if (<= t_m 7.5e-234)
t_2
(if (<= t_m 1.55e-186)
(*
t_m
(*
(sqrt 2.0)
(/ 1.0 (* l_m (sqrt (fma 2.0 (pow x -2.0) (/ 2.0 x)))))))
(if (<= t_m 9e-160)
t_2
(if (<= t_m 490.0)
(*
t_m
(/
(sqrt 2.0)
(sqrt
(fma
2.0
(/ (pow t_m 2.0) (/ (+ -1.0 x) (+ x 1.0)))
(* 2.0 (/ (pow l_m 2.0) x))))))
(pow (/ (+ x 1.0) (+ -1.0 x)) -0.5))))))))l_m = fabs(l);
t_m = fabs(t);
t_s = copysign(1.0, t);
double code(double t_s, double x, double l_m, double t_m) {
double t_2 = t_m * (sqrt(2.0) / ((0.5 * (((2.0 * (pow(t_m, 2.0) + pow(t_m, 2.0))) + (2.0 * pow(l_m, 2.0))) / (t_m * (sqrt(2.0) * x)))) + (t_m * sqrt(2.0))));
double tmp;
if (t_m <= 7.5e-234) {
tmp = t_2;
} else if (t_m <= 1.55e-186) {
tmp = t_m * (sqrt(2.0) * (1.0 / (l_m * sqrt(fma(2.0, pow(x, -2.0), (2.0 / x))))));
} else if (t_m <= 9e-160) {
tmp = t_2;
} else if (t_m <= 490.0) {
tmp = t_m * (sqrt(2.0) / sqrt(fma(2.0, (pow(t_m, 2.0) / ((-1.0 + x) / (x + 1.0))), (2.0 * (pow(l_m, 2.0) / x)))));
} else {
tmp = pow(((x + 1.0) / (-1.0 + x)), -0.5);
}
return t_s * tmp;
}
l_m = abs(l) t_m = abs(t) t_s = copysign(1.0, t) function code(t_s, x, l_m, t_m) t_2 = Float64(t_m * Float64(sqrt(2.0) / Float64(Float64(0.5 * Float64(Float64(Float64(2.0 * Float64((t_m ^ 2.0) + (t_m ^ 2.0))) + Float64(2.0 * (l_m ^ 2.0))) / Float64(t_m * Float64(sqrt(2.0) * x)))) + Float64(t_m * sqrt(2.0))))) tmp = 0.0 if (t_m <= 7.5e-234) tmp = t_2; elseif (t_m <= 1.55e-186) tmp = Float64(t_m * Float64(sqrt(2.0) * Float64(1.0 / Float64(l_m * sqrt(fma(2.0, (x ^ -2.0), Float64(2.0 / x))))))); elseif (t_m <= 9e-160) tmp = t_2; elseif (t_m <= 490.0) tmp = Float64(t_m * Float64(sqrt(2.0) / sqrt(fma(2.0, Float64((t_m ^ 2.0) / Float64(Float64(-1.0 + x) / Float64(x + 1.0))), Float64(2.0 * Float64((l_m ^ 2.0) / x)))))); else tmp = Float64(Float64(x + 1.0) / Float64(-1.0 + x)) ^ -0.5; 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_, x_, l$95$m_, t$95$m_] := Block[{t$95$2 = N[(t$95$m * N[(N[Sqrt[2.0], $MachinePrecision] / N[(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$95$m, 2.0], $MachinePrecision]), $MachinePrecision]), $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]}, N[(t$95$s * If[LessEqual[t$95$m, 7.5e-234], t$95$2, If[LessEqual[t$95$m, 1.55e-186], N[(t$95$m * N[(N[Sqrt[2.0], $MachinePrecision] * N[(1.0 / N[(l$95$m * N[Sqrt[N[(2.0 * N[Power[x, -2.0], $MachinePrecision] + N[(2.0 / x), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$m, 9e-160], t$95$2, If[LessEqual[t$95$m, 490.0], N[(t$95$m * N[(N[Sqrt[2.0], $MachinePrecision] / N[Sqrt[N[(2.0 * N[(N[Power[t$95$m, 2.0], $MachinePrecision] / N[(N[(-1.0 + x), $MachinePrecision] / N[(x + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(2.0 * N[(N[Power[l$95$m, 2.0], $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[Power[N[(N[(x + 1.0), $MachinePrecision] / N[(-1.0 + x), $MachinePrecision]), $MachinePrecision], -0.5], $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 := t_m \cdot \frac{\sqrt{2}}{0.5 \cdot \frac{2 \cdot \left({t_m}^{2} + {t_m}^{2}\right) + 2 \cdot {l_m}^{2}}{t_m \cdot \left(\sqrt{2} \cdot x\right)} + t_m \cdot \sqrt{2}}\\
t_s \cdot \begin{array}{l}
\mathbf{if}\;t_m \leq 7.5 \cdot 10^{-234}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;t_m \leq 1.55 \cdot 10^{-186}:\\
\;\;\;\;t_m \cdot \left(\sqrt{2} \cdot \frac{1}{l_m \cdot \sqrt{\mathsf{fma}\left(2, {x}^{-2}, \frac{2}{x}\right)}}\right)\\
\mathbf{elif}\;t_m \leq 9 \cdot 10^{-160}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;t_m \leq 490:\\
\;\;\;\;t_m \cdot \frac{\sqrt{2}}{\sqrt{\mathsf{fma}\left(2, \frac{{t_m}^{2}}{\frac{-1 + x}{x + 1}}, 2 \cdot \frac{{l_m}^{2}}{x}\right)}}\\
\mathbf{else}:\\
\;\;\;\;{\left(\frac{x + 1}{-1 + x}\right)}^{-0.5}\\
\end{array}
\end{array}
\end{array}
l_m = (fabs.f64 l)
t_m = (fabs.f64 t)
t_s = (copysign.f64 1 t)
(FPCore (t_s x l_m t_m)
:precision binary64
(*
t_s
(if (<= t_m 6.2e-158)
(/ (* t_m (sqrt 2.0)) (* l_m (sqrt (fma 2.0 (pow x -2.0) (/ 2.0 x)))))
(if (<= t_m 2800.0)
(*
t_m
(/
(sqrt 2.0)
(sqrt
(fma
2.0
(/ (pow t_m 2.0) (/ (+ -1.0 x) (+ x 1.0)))
(* 2.0 (/ (pow l_m 2.0) x))))))
(pow (/ (+ x 1.0) (+ -1.0 x)) -0.5)))))l_m = fabs(l);
t_m = fabs(t);
t_s = copysign(1.0, t);
double code(double t_s, double x, double l_m, double t_m) {
double tmp;
if (t_m <= 6.2e-158) {
tmp = (t_m * sqrt(2.0)) / (l_m * sqrt(fma(2.0, pow(x, -2.0), (2.0 / x))));
} else if (t_m <= 2800.0) {
tmp = t_m * (sqrt(2.0) / sqrt(fma(2.0, (pow(t_m, 2.0) / ((-1.0 + x) / (x + 1.0))), (2.0 * (pow(l_m, 2.0) / x)))));
} else {
tmp = pow(((x + 1.0) / (-1.0 + x)), -0.5);
}
return t_s * tmp;
}
l_m = abs(l) t_m = abs(t) t_s = copysign(1.0, t) function code(t_s, x, l_m, t_m) tmp = 0.0 if (t_m <= 6.2e-158) tmp = Float64(Float64(t_m * sqrt(2.0)) / Float64(l_m * sqrt(fma(2.0, (x ^ -2.0), Float64(2.0 / x))))); elseif (t_m <= 2800.0) tmp = Float64(t_m * Float64(sqrt(2.0) / sqrt(fma(2.0, Float64((t_m ^ 2.0) / Float64(Float64(-1.0 + x) / Float64(x + 1.0))), Float64(2.0 * Float64((l_m ^ 2.0) / x)))))); else tmp = Float64(Float64(x + 1.0) / Float64(-1.0 + x)) ^ -0.5; 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_, x_, l$95$m_, t$95$m_] := N[(t$95$s * If[LessEqual[t$95$m, 6.2e-158], N[(N[(t$95$m * N[Sqrt[2.0], $MachinePrecision]), $MachinePrecision] / N[(l$95$m * N[Sqrt[N[(2.0 * N[Power[x, -2.0], $MachinePrecision] + N[(2.0 / x), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$m, 2800.0], N[(t$95$m * N[(N[Sqrt[2.0], $MachinePrecision] / N[Sqrt[N[(2.0 * N[(N[Power[t$95$m, 2.0], $MachinePrecision] / N[(N[(-1.0 + x), $MachinePrecision] / N[(x + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(2.0 * N[(N[Power[l$95$m, 2.0], $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[Power[N[(N[(x + 1.0), $MachinePrecision] / N[(-1.0 + x), $MachinePrecision]), $MachinePrecision], -0.5], $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.2 \cdot 10^{-158}:\\
\;\;\;\;\frac{t_m \cdot \sqrt{2}}{l_m \cdot \sqrt{\mathsf{fma}\left(2, {x}^{-2}, \frac{2}{x}\right)}}\\
\mathbf{elif}\;t_m \leq 2800:\\
\;\;\;\;t_m \cdot \frac{\sqrt{2}}{\sqrt{\mathsf{fma}\left(2, \frac{{t_m}^{2}}{\frac{-1 + x}{x + 1}}, 2 \cdot \frac{{l_m}^{2}}{x}\right)}}\\
\mathbf{else}:\\
\;\;\;\;{\left(\frac{x + 1}{-1 + x}\right)}^{-0.5}\\
\end{array}
\end{array}
l_m = (fabs.f64 l)
t_m = (fabs.f64 t)
t_s = (copysign.f64 1 t)
(FPCore (t_s x l_m t_m)
:precision binary64
(*
t_s
(if (<= (* l_m l_m) 1e+289)
(pow (/ (+ x 1.0) (+ -1.0 x)) -0.5)
(*
t_m
(* (sqrt 2.0) (/ 1.0 (* l_m (sqrt (fma 2.0 (pow x -2.0) (/ 2.0 x))))))))))l_m = fabs(l);
t_m = fabs(t);
t_s = copysign(1.0, t);
double code(double t_s, double x, double l_m, double t_m) {
double tmp;
if ((l_m * l_m) <= 1e+289) {
tmp = pow(((x + 1.0) / (-1.0 + x)), -0.5);
} else {
tmp = t_m * (sqrt(2.0) * (1.0 / (l_m * sqrt(fma(2.0, pow(x, -2.0), (2.0 / x))))));
}
return t_s * tmp;
}
l_m = abs(l) t_m = abs(t) t_s = copysign(1.0, t) function code(t_s, x, l_m, t_m) tmp = 0.0 if (Float64(l_m * l_m) <= 1e+289) tmp = Float64(Float64(x + 1.0) / Float64(-1.0 + x)) ^ -0.5; else tmp = Float64(t_m * Float64(sqrt(2.0) * Float64(1.0 / Float64(l_m * sqrt(fma(2.0, (x ^ -2.0), Float64(2.0 / x))))))); 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_, x_, l$95$m_, t$95$m_] := N[(t$95$s * If[LessEqual[N[(l$95$m * l$95$m), $MachinePrecision], 1e+289], N[Power[N[(N[(x + 1.0), $MachinePrecision] / N[(-1.0 + x), $MachinePrecision]), $MachinePrecision], -0.5], $MachinePrecision], N[(t$95$m * N[(N[Sqrt[2.0], $MachinePrecision] * N[(1.0 / N[(l$95$m * N[Sqrt[N[(2.0 * N[Power[x, -2.0], $MachinePrecision] + N[(2.0 / x), $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}\;l_m \cdot l_m \leq 10^{+289}:\\
\;\;\;\;{\left(\frac{x + 1}{-1 + x}\right)}^{-0.5}\\
\mathbf{else}:\\
\;\;\;\;t_m \cdot \left(\sqrt{2} \cdot \frac{1}{l_m \cdot \sqrt{\mathsf{fma}\left(2, {x}^{-2}, \frac{2}{x}\right)}}\right)\\
\end{array}
\end{array}
l_m = (fabs.f64 l)
t_m = (fabs.f64 t)
t_s = (copysign.f64 1 t)
(FPCore (t_s x l_m t_m)
:precision binary64
(*
t_s
(if (<= (* l_m l_m) 1e+289)
(pow (/ (+ x 1.0) (+ -1.0 x)) -0.5)
(* t_m (/ (sqrt 2.0) (* l_m (sqrt (+ (/ 2.0 x) (/ 2.0 (pow x 2.0))))))))))l_m = fabs(l);
t_m = fabs(t);
t_s = copysign(1.0, t);
double code(double t_s, double x, double l_m, double t_m) {
double tmp;
if ((l_m * l_m) <= 1e+289) {
tmp = pow(((x + 1.0) / (-1.0 + x)), -0.5);
} else {
tmp = t_m * (sqrt(2.0) / (l_m * sqrt(((2.0 / x) + (2.0 / pow(x, 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, x, l_m, t_m)
real(8), intent (in) :: t_s
real(8), intent (in) :: x
real(8), intent (in) :: l_m
real(8), intent (in) :: t_m
real(8) :: tmp
if ((l_m * l_m) <= 1d+289) then
tmp = ((x + 1.0d0) / ((-1.0d0) + x)) ** (-0.5d0)
else
tmp = t_m * (sqrt(2.0d0) / (l_m * sqrt(((2.0d0 / x) + (2.0d0 / (x ** 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 x, double l_m, double t_m) {
double tmp;
if ((l_m * l_m) <= 1e+289) {
tmp = Math.pow(((x + 1.0) / (-1.0 + x)), -0.5);
} else {
tmp = t_m * (Math.sqrt(2.0) / (l_m * Math.sqrt(((2.0 / x) + (2.0 / Math.pow(x, 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, x, l_m, t_m): tmp = 0 if (l_m * l_m) <= 1e+289: tmp = math.pow(((x + 1.0) / (-1.0 + x)), -0.5) else: tmp = t_m * (math.sqrt(2.0) / (l_m * math.sqrt(((2.0 / x) + (2.0 / math.pow(x, 2.0)))))) return t_s * tmp
l_m = abs(l) t_m = abs(t) t_s = copysign(1.0, t) function code(t_s, x, l_m, t_m) tmp = 0.0 if (Float64(l_m * l_m) <= 1e+289) tmp = Float64(Float64(x + 1.0) / Float64(-1.0 + x)) ^ -0.5; else tmp = Float64(t_m * Float64(sqrt(2.0) / Float64(l_m * sqrt(Float64(Float64(2.0 / x) + Float64(2.0 / (x ^ 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, x, l_m, t_m) tmp = 0.0; if ((l_m * l_m) <= 1e+289) tmp = ((x + 1.0) / (-1.0 + x)) ^ -0.5; else tmp = t_m * (sqrt(2.0) / (l_m * sqrt(((2.0 / x) + (2.0 / (x ^ 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_, x_, l$95$m_, t$95$m_] := N[(t$95$s * If[LessEqual[N[(l$95$m * l$95$m), $MachinePrecision], 1e+289], N[Power[N[(N[(x + 1.0), $MachinePrecision] / N[(-1.0 + x), $MachinePrecision]), $MachinePrecision], -0.5], $MachinePrecision], N[(t$95$m * N[(N[Sqrt[2.0], $MachinePrecision] / N[(l$95$m * N[Sqrt[N[(N[(2.0 / x), $MachinePrecision] + N[(2.0 / N[Power[x, 2.0], $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}\;l_m \cdot l_m \leq 10^{+289}:\\
\;\;\;\;{\left(\frac{x + 1}{-1 + x}\right)}^{-0.5}\\
\mathbf{else}:\\
\;\;\;\;t_m \cdot \frac{\sqrt{2}}{l_m \cdot \sqrt{\frac{2}{x} + \frac{2}{{x}^{2}}}}\\
\end{array}
\end{array}
l_m = (fabs.f64 l)
t_m = (fabs.f64 t)
t_s = (copysign.f64 1 t)
(FPCore (t_s x l_m t_m)
:precision binary64
(*
t_s
(if (<= (* l_m l_m) 1e+289)
(pow (/ (+ x 1.0) (+ -1.0 x)) -0.5)
(* t_m (/ (sqrt 2.0) (* l_m (sqrt (/ 2.0 x))))))))l_m = fabs(l);
t_m = fabs(t);
t_s = copysign(1.0, t);
double code(double t_s, double x, double l_m, double t_m) {
double tmp;
if ((l_m * l_m) <= 1e+289) {
tmp = pow(((x + 1.0) / (-1.0 + x)), -0.5);
} else {
tmp = t_m * (sqrt(2.0) / (l_m * sqrt((2.0 / x))));
}
return t_s * tmp;
}
l_m = abs(l)
t_m = abs(t)
t_s = copysign(1.0d0, t)
real(8) function code(t_s, x, l_m, t_m)
real(8), intent (in) :: t_s
real(8), intent (in) :: x
real(8), intent (in) :: l_m
real(8), intent (in) :: t_m
real(8) :: tmp
if ((l_m * l_m) <= 1d+289) then
tmp = ((x + 1.0d0) / ((-1.0d0) + x)) ** (-0.5d0)
else
tmp = t_m * (sqrt(2.0d0) / (l_m * sqrt((2.0d0 / x))))
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 x, double l_m, double t_m) {
double tmp;
if ((l_m * l_m) <= 1e+289) {
tmp = Math.pow(((x + 1.0) / (-1.0 + x)), -0.5);
} else {
tmp = t_m * (Math.sqrt(2.0) / (l_m * Math.sqrt((2.0 / x))));
}
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, x, l_m, t_m): tmp = 0 if (l_m * l_m) <= 1e+289: tmp = math.pow(((x + 1.0) / (-1.0 + x)), -0.5) else: tmp = t_m * (math.sqrt(2.0) / (l_m * math.sqrt((2.0 / x)))) return t_s * tmp
l_m = abs(l) t_m = abs(t) t_s = copysign(1.0, t) function code(t_s, x, l_m, t_m) tmp = 0.0 if (Float64(l_m * l_m) <= 1e+289) tmp = Float64(Float64(x + 1.0) / Float64(-1.0 + x)) ^ -0.5; else tmp = Float64(t_m * Float64(sqrt(2.0) / Float64(l_m * sqrt(Float64(2.0 / x))))); 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, x, l_m, t_m) tmp = 0.0; if ((l_m * l_m) <= 1e+289) tmp = ((x + 1.0) / (-1.0 + x)) ^ -0.5; else tmp = t_m * (sqrt(2.0) / (l_m * sqrt((2.0 / x)))); 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_, x_, l$95$m_, t$95$m_] := N[(t$95$s * If[LessEqual[N[(l$95$m * l$95$m), $MachinePrecision], 1e+289], N[Power[N[(N[(x + 1.0), $MachinePrecision] / N[(-1.0 + x), $MachinePrecision]), $MachinePrecision], -0.5], $MachinePrecision], N[(t$95$m * N[(N[Sqrt[2.0], $MachinePrecision] / N[(l$95$m * N[Sqrt[N[(2.0 / x), $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}\;l_m \cdot l_m \leq 10^{+289}:\\
\;\;\;\;{\left(\frac{x + 1}{-1 + x}\right)}^{-0.5}\\
\mathbf{else}:\\
\;\;\;\;t_m \cdot \frac{\sqrt{2}}{l_m \cdot \sqrt{\frac{2}{x}}}\\
\end{array}
\end{array}
l_m = (fabs.f64 l)
t_m = (fabs.f64 t)
t_s = (copysign.f64 1 t)
(FPCore (t_s x l_m t_m)
:precision binary64
(let* ((t_2 (+ 1.0 (/ 1.0 t_m))))
(*
t_s
(if (<= l_m 3.1e+98)
(pow (/ (+ x 1.0) (+ -1.0 x)) -0.5)
(* t_m (/ (/ 3.0 t_m) (+ (* t_2 t_2) (+ 1.0 t_2))))))))l_m = fabs(l);
t_m = fabs(t);
t_s = copysign(1.0, t);
double code(double t_s, double x, double l_m, double t_m) {
double t_2 = 1.0 + (1.0 / t_m);
double tmp;
if (l_m <= 3.1e+98) {
tmp = pow(((x + 1.0) / (-1.0 + x)), -0.5);
} else {
tmp = t_m * ((3.0 / t_m) / ((t_2 * t_2) + (1.0 + t_2)));
}
return t_s * tmp;
}
l_m = abs(l)
t_m = abs(t)
t_s = copysign(1.0d0, t)
real(8) function code(t_s, x, l_m, t_m)
real(8), intent (in) :: t_s
real(8), intent (in) :: x
real(8), intent (in) :: l_m
real(8), intent (in) :: t_m
real(8) :: t_2
real(8) :: tmp
t_2 = 1.0d0 + (1.0d0 / t_m)
if (l_m <= 3.1d+98) then
tmp = ((x + 1.0d0) / ((-1.0d0) + x)) ** (-0.5d0)
else
tmp = t_m * ((3.0d0 / t_m) / ((t_2 * t_2) + (1.0d0 + t_2)))
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 x, double l_m, double t_m) {
double t_2 = 1.0 + (1.0 / t_m);
double tmp;
if (l_m <= 3.1e+98) {
tmp = Math.pow(((x + 1.0) / (-1.0 + x)), -0.5);
} else {
tmp = t_m * ((3.0 / t_m) / ((t_2 * t_2) + (1.0 + t_2)));
}
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, x, l_m, t_m): t_2 = 1.0 + (1.0 / t_m) tmp = 0 if l_m <= 3.1e+98: tmp = math.pow(((x + 1.0) / (-1.0 + x)), -0.5) else: tmp = t_m * ((3.0 / t_m) / ((t_2 * t_2) + (1.0 + t_2))) return t_s * tmp
l_m = abs(l) t_m = abs(t) t_s = copysign(1.0, t) function code(t_s, x, l_m, t_m) t_2 = Float64(1.0 + Float64(1.0 / t_m)) tmp = 0.0 if (l_m <= 3.1e+98) tmp = Float64(Float64(x + 1.0) / Float64(-1.0 + x)) ^ -0.5; else tmp = Float64(t_m * Float64(Float64(3.0 / t_m) / Float64(Float64(t_2 * t_2) + Float64(1.0 + t_2)))); 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, x, l_m, t_m) t_2 = 1.0 + (1.0 / t_m); tmp = 0.0; if (l_m <= 3.1e+98) tmp = ((x + 1.0) / (-1.0 + x)) ^ -0.5; else tmp = t_m * ((3.0 / t_m) / ((t_2 * t_2) + (1.0 + t_2))); 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_, x_, l$95$m_, t$95$m_] := Block[{t$95$2 = N[(1.0 + N[(1.0 / t$95$m), $MachinePrecision]), $MachinePrecision]}, N[(t$95$s * If[LessEqual[l$95$m, 3.1e+98], N[Power[N[(N[(x + 1.0), $MachinePrecision] / N[(-1.0 + x), $MachinePrecision]), $MachinePrecision], -0.5], $MachinePrecision], N[(t$95$m * N[(N[(3.0 / t$95$m), $MachinePrecision] / N[(N[(t$95$2 * t$95$2), $MachinePrecision] + N[(1.0 + t$95$2), $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)
\\
\begin{array}{l}
t_2 := 1 + \frac{1}{t_m}\\
t_s \cdot \begin{array}{l}
\mathbf{if}\;l_m \leq 3.1 \cdot 10^{+98}:\\
\;\;\;\;{\left(\frac{x + 1}{-1 + x}\right)}^{-0.5}\\
\mathbf{else}:\\
\;\;\;\;t_m \cdot \frac{\frac{3}{t_m}}{t_2 \cdot t_2 + \left(1 + t_2\right)}\\
\end{array}
\end{array}
\end{array}
l_m = (fabs.f64 l)
t_m = (fabs.f64 t)
t_s = (copysign.f64 1 t)
(FPCore (t_s x l_m t_m)
:precision binary64
(let* ((t_2 (+ 1.0 (/ 1.0 t_m))))
(*
t_s
(if (<= l_m 2.65e+97)
(sqrt (/ (+ -1.0 x) (+ x 1.0)))
(* t_m (/ (/ 3.0 t_m) (+ (* t_2 t_2) (+ 1.0 t_2))))))))l_m = fabs(l);
t_m = fabs(t);
t_s = copysign(1.0, t);
double code(double t_s, double x, double l_m, double t_m) {
double t_2 = 1.0 + (1.0 / t_m);
double tmp;
if (l_m <= 2.65e+97) {
tmp = sqrt(((-1.0 + x) / (x + 1.0)));
} else {
tmp = t_m * ((3.0 / t_m) / ((t_2 * t_2) + (1.0 + t_2)));
}
return t_s * tmp;
}
l_m = abs(l)
t_m = abs(t)
t_s = copysign(1.0d0, t)
real(8) function code(t_s, x, l_m, t_m)
real(8), intent (in) :: t_s
real(8), intent (in) :: x
real(8), intent (in) :: l_m
real(8), intent (in) :: t_m
real(8) :: t_2
real(8) :: tmp
t_2 = 1.0d0 + (1.0d0 / t_m)
if (l_m <= 2.65d+97) then
tmp = sqrt((((-1.0d0) + x) / (x + 1.0d0)))
else
tmp = t_m * ((3.0d0 / t_m) / ((t_2 * t_2) + (1.0d0 + t_2)))
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 x, double l_m, double t_m) {
double t_2 = 1.0 + (1.0 / t_m);
double tmp;
if (l_m <= 2.65e+97) {
tmp = Math.sqrt(((-1.0 + x) / (x + 1.0)));
} else {
tmp = t_m * ((3.0 / t_m) / ((t_2 * t_2) + (1.0 + t_2)));
}
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, x, l_m, t_m): t_2 = 1.0 + (1.0 / t_m) tmp = 0 if l_m <= 2.65e+97: tmp = math.sqrt(((-1.0 + x) / (x + 1.0))) else: tmp = t_m * ((3.0 / t_m) / ((t_2 * t_2) + (1.0 + t_2))) return t_s * tmp
l_m = abs(l) t_m = abs(t) t_s = copysign(1.0, t) function code(t_s, x, l_m, t_m) t_2 = Float64(1.0 + Float64(1.0 / t_m)) tmp = 0.0 if (l_m <= 2.65e+97) tmp = sqrt(Float64(Float64(-1.0 + x) / Float64(x + 1.0))); else tmp = Float64(t_m * Float64(Float64(3.0 / t_m) / Float64(Float64(t_2 * t_2) + Float64(1.0 + t_2)))); 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, x, l_m, t_m) t_2 = 1.0 + (1.0 / t_m); tmp = 0.0; if (l_m <= 2.65e+97) tmp = sqrt(((-1.0 + x) / (x + 1.0))); else tmp = t_m * ((3.0 / t_m) / ((t_2 * t_2) + (1.0 + t_2))); 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_, x_, l$95$m_, t$95$m_] := Block[{t$95$2 = N[(1.0 + N[(1.0 / t$95$m), $MachinePrecision]), $MachinePrecision]}, N[(t$95$s * If[LessEqual[l$95$m, 2.65e+97], N[Sqrt[N[(N[(-1.0 + x), $MachinePrecision] / N[(x + 1.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], N[(t$95$m * N[(N[(3.0 / t$95$m), $MachinePrecision] / N[(N[(t$95$2 * t$95$2), $MachinePrecision] + N[(1.0 + t$95$2), $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)
\\
\begin{array}{l}
t_2 := 1 + \frac{1}{t_m}\\
t_s \cdot \begin{array}{l}
\mathbf{if}\;l_m \leq 2.65 \cdot 10^{+97}:\\
\;\;\;\;\sqrt{\frac{-1 + x}{x + 1}}\\
\mathbf{else}:\\
\;\;\;\;t_m \cdot \frac{\frac{3}{t_m}}{t_2 \cdot t_2 + \left(1 + t_2\right)}\\
\end{array}
\end{array}
\end{array}
l_m = (fabs.f64 l)
t_m = (fabs.f64 t)
t_s = (copysign.f64 1 t)
(FPCore (t_s x l_m t_m)
:precision binary64
(let* ((t_2 (+ 1.0 (/ 1.0 t_m))))
(*
t_s
(if (<= l_m 2.95e+95)
(+ 1.0 (/ -1.0 x))
(* t_m (/ (/ 3.0 t_m) (+ (* t_2 t_2) (+ 1.0 t_2))))))))l_m = fabs(l);
t_m = fabs(t);
t_s = copysign(1.0, t);
double code(double t_s, double x, double l_m, double t_m) {
double t_2 = 1.0 + (1.0 / t_m);
double tmp;
if (l_m <= 2.95e+95) {
tmp = 1.0 + (-1.0 / x);
} else {
tmp = t_m * ((3.0 / t_m) / ((t_2 * t_2) + (1.0 + t_2)));
}
return t_s * tmp;
}
l_m = abs(l)
t_m = abs(t)
t_s = copysign(1.0d0, t)
real(8) function code(t_s, x, l_m, t_m)
real(8), intent (in) :: t_s
real(8), intent (in) :: x
real(8), intent (in) :: l_m
real(8), intent (in) :: t_m
real(8) :: t_2
real(8) :: tmp
t_2 = 1.0d0 + (1.0d0 / t_m)
if (l_m <= 2.95d+95) then
tmp = 1.0d0 + ((-1.0d0) / x)
else
tmp = t_m * ((3.0d0 / t_m) / ((t_2 * t_2) + (1.0d0 + t_2)))
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 x, double l_m, double t_m) {
double t_2 = 1.0 + (1.0 / t_m);
double tmp;
if (l_m <= 2.95e+95) {
tmp = 1.0 + (-1.0 / x);
} else {
tmp = t_m * ((3.0 / t_m) / ((t_2 * t_2) + (1.0 + t_2)));
}
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, x, l_m, t_m): t_2 = 1.0 + (1.0 / t_m) tmp = 0 if l_m <= 2.95e+95: tmp = 1.0 + (-1.0 / x) else: tmp = t_m * ((3.0 / t_m) / ((t_2 * t_2) + (1.0 + t_2))) return t_s * tmp
l_m = abs(l) t_m = abs(t) t_s = copysign(1.0, t) function code(t_s, x, l_m, t_m) t_2 = Float64(1.0 + Float64(1.0 / t_m)) tmp = 0.0 if (l_m <= 2.95e+95) tmp = Float64(1.0 + Float64(-1.0 / x)); else tmp = Float64(t_m * Float64(Float64(3.0 / t_m) / Float64(Float64(t_2 * t_2) + Float64(1.0 + t_2)))); 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, x, l_m, t_m) t_2 = 1.0 + (1.0 / t_m); tmp = 0.0; if (l_m <= 2.95e+95) tmp = 1.0 + (-1.0 / x); else tmp = t_m * ((3.0 / t_m) / ((t_2 * t_2) + (1.0 + t_2))); 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_, x_, l$95$m_, t$95$m_] := Block[{t$95$2 = N[(1.0 + N[(1.0 / t$95$m), $MachinePrecision]), $MachinePrecision]}, N[(t$95$s * If[LessEqual[l$95$m, 2.95e+95], N[(1.0 + N[(-1.0 / x), $MachinePrecision]), $MachinePrecision], N[(t$95$m * N[(N[(3.0 / t$95$m), $MachinePrecision] / N[(N[(t$95$2 * t$95$2), $MachinePrecision] + N[(1.0 + t$95$2), $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)
\\
\begin{array}{l}
t_2 := 1 + \frac{1}{t_m}\\
t_s \cdot \begin{array}{l}
\mathbf{if}\;l_m \leq 2.95 \cdot 10^{+95}:\\
\;\;\;\;1 + \frac{-1}{x}\\
\mathbf{else}:\\
\;\;\;\;t_m \cdot \frac{\frac{3}{t_m}}{t_2 \cdot t_2 + \left(1 + t_2\right)}\\
\end{array}
\end{array}
\end{array}
l_m = (fabs.f64 l) t_m = (fabs.f64 t) t_s = (copysign.f64 1 t) (FPCore (t_s x l_m t_m) :precision binary64 (* t_s (+ 1.0 (/ -1.0 x))))
l_m = fabs(l);
t_m = fabs(t);
t_s = copysign(1.0, t);
double code(double t_s, double x, double l_m, double t_m) {
return t_s * (1.0 + (-1.0 / x));
}
l_m = abs(l)
t_m = abs(t)
t_s = copysign(1.0d0, t)
real(8) function code(t_s, x, l_m, t_m)
real(8), intent (in) :: t_s
real(8), intent (in) :: x
real(8), intent (in) :: l_m
real(8), intent (in) :: t_m
code = t_s * (1.0d0 + ((-1.0d0) / x))
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 x, double l_m, double t_m) {
return t_s * (1.0 + (-1.0 / x));
}
l_m = math.fabs(l) t_m = math.fabs(t) t_s = math.copysign(1.0, t) def code(t_s, x, l_m, t_m): return t_s * (1.0 + (-1.0 / x))
l_m = abs(l) t_m = abs(t) t_s = copysign(1.0, t) function code(t_s, x, l_m, t_m) return Float64(t_s * Float64(1.0 + Float64(-1.0 / x))) end
l_m = abs(l); t_m = abs(t); t_s = sign(t) * abs(1.0); function tmp = code(t_s, x, l_m, t_m) tmp = t_s * (1.0 + (-1.0 / x)); 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_, x_, l$95$m_, t$95$m_] := N[(t$95$s * N[(1.0 + N[(-1.0 / x), $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 \left(1 + \frac{-1}{x}\right)
\end{array}
l_m = (fabs.f64 l) t_m = (fabs.f64 t) t_s = (copysign.f64 1 t) (FPCore (t_s x l_m t_m) :precision binary64 (* t_s 1.0))
l_m = fabs(l);
t_m = fabs(t);
t_s = copysign(1.0, t);
double code(double t_s, double x, double l_m, double t_m) {
return t_s * 1.0;
}
l_m = abs(l)
t_m = abs(t)
t_s = copysign(1.0d0, t)
real(8) function code(t_s, x, l_m, t_m)
real(8), intent (in) :: t_s
real(8), intent (in) :: x
real(8), intent (in) :: l_m
real(8), intent (in) :: t_m
code = t_s * 1.0d0
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 x, double l_m, double t_m) {
return t_s * 1.0;
}
l_m = math.fabs(l) t_m = math.fabs(t) t_s = math.copysign(1.0, t) def code(t_s, x, l_m, t_m): return t_s * 1.0
l_m = abs(l) t_m = abs(t) t_s = copysign(1.0, t) function code(t_s, x, l_m, t_m) return Float64(t_s * 1.0) end
l_m = abs(l); t_m = abs(t); t_s = sign(t) * abs(1.0); function tmp = code(t_s, x, l_m, t_m) tmp = t_s * 1.0; 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_, x_, l$95$m_, t$95$m_] := N[(t$95$s * 1.0), $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 1
\end{array}
herbie shell --seed 2024003
(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)))))