\[10^{-150} < \left|x\right| \land \left|x\right| < 10^{+150}\]
\[\sqrt{0.5 \cdot \left(1 + \frac{x}{\sqrt{\left(4 \cdot p\right) \cdot p + x \cdot x}}\right)}
\]
↓
\[\begin{array}{l}
t_0 := \mathsf{hypot}\left(p + p, x\right)\\
\mathbf{if}\;\frac{x}{\sqrt{\left(4 \cdot p\right) \cdot p + x \cdot x}} \leq -1:\\
\;\;\;\;\frac{-\left|p\right|}{x}\\
\mathbf{else}:\\
\;\;\;\;\sqrt{{\left({\left(0.5 + \begin{array}{l}
\mathbf{if}\;x \ne 0:\\
\;\;\;\;\frac{0.5}{\frac{t_0}{x}}\\
\mathbf{else}:\\
\;\;\;\;\frac{0.5 \cdot x}{t_0}\\
\end{array}\right)}^{3}\right)}^{0.3333333333333333}}\\
\end{array}
\]
(FPCore (p x)
:precision binary64
(sqrt (* 0.5 (+ 1.0 (/ x (sqrt (+ (* (* 4.0 p) p) (* x x))))))))
↓
(FPCore (p x)
:precision binary64
(let* ((t_0 (hypot (+ p p) x)))
(if (<= (/ x (sqrt (+ (* (* 4.0 p) p) (* x x)))) -1.0)
(/ (- (fabs p)) x)
(sqrt
(pow
(pow (+ 0.5 (if (!= x 0.0) (/ 0.5 (/ t_0 x)) (/ (* 0.5 x) t_0))) 3.0)
0.3333333333333333)))))double code(double p, double x) {
return sqrt((0.5 * (1.0 + (x / sqrt((((4.0 * p) * p) + (x * x)))))));
}
↓
double code(double p, double x) {
double t_0 = hypot((p + p), x);
double tmp;
if ((x / sqrt((((4.0 * p) * p) + (x * x)))) <= -1.0) {
tmp = -fabs(p) / x;
} else {
double tmp_1;
if (x != 0.0) {
tmp_1 = 0.5 / (t_0 / x);
} else {
tmp_1 = (0.5 * x) / t_0;
}
tmp = sqrt(pow(pow((0.5 + tmp_1), 3.0), 0.3333333333333333));
}
return tmp;
}
public static double code(double p, double x) {
return Math.sqrt((0.5 * (1.0 + (x / Math.sqrt((((4.0 * p) * p) + (x * x)))))));
}
↓
public static double code(double p, double x) {
double t_0 = Math.hypot((p + p), x);
double tmp;
if ((x / Math.sqrt((((4.0 * p) * p) + (x * x)))) <= -1.0) {
tmp = -Math.abs(p) / x;
} else {
double tmp_1;
if (x != 0.0) {
tmp_1 = 0.5 / (t_0 / x);
} else {
tmp_1 = (0.5 * x) / t_0;
}
tmp = Math.sqrt(Math.pow(Math.pow((0.5 + tmp_1), 3.0), 0.3333333333333333));
}
return tmp;
}
def code(p, x):
return math.sqrt((0.5 * (1.0 + (x / math.sqrt((((4.0 * p) * p) + (x * x)))))))
↓
def code(p, x):
t_0 = math.hypot((p + p), x)
tmp = 0
if (x / math.sqrt((((4.0 * p) * p) + (x * x)))) <= -1.0:
tmp = -math.fabs(p) / x
else:
tmp_1 = 0
if x != 0.0:
tmp_1 = 0.5 / (t_0 / x)
else:
tmp_1 = (0.5 * x) / t_0
tmp = math.sqrt(math.pow(math.pow((0.5 + tmp_1), 3.0), 0.3333333333333333))
return tmp
function code(p, x)
return sqrt(Float64(0.5 * Float64(1.0 + Float64(x / sqrt(Float64(Float64(Float64(4.0 * p) * p) + Float64(x * x)))))))
end
↓
function code(p, x)
t_0 = hypot(Float64(p + p), x)
tmp = 0.0
if (Float64(x / sqrt(Float64(Float64(Float64(4.0 * p) * p) + Float64(x * x)))) <= -1.0)
tmp = Float64(Float64(-abs(p)) / x);
else
tmp_1 = 0.0
if (x != 0.0)
tmp_1 = Float64(0.5 / Float64(t_0 / x));
else
tmp_1 = Float64(Float64(0.5 * x) / t_0);
end
tmp = sqrt(((Float64(0.5 + tmp_1) ^ 3.0) ^ 0.3333333333333333));
end
return tmp
end
function tmp = code(p, x)
tmp = sqrt((0.5 * (1.0 + (x / sqrt((((4.0 * p) * p) + (x * x)))))));
end
↓
function tmp_3 = code(p, x)
t_0 = hypot((p + p), x);
tmp = 0.0;
if ((x / sqrt((((4.0 * p) * p) + (x * x)))) <= -1.0)
tmp = -abs(p) / x;
else
tmp_2 = 0.0;
if (x ~= 0.0)
tmp_2 = 0.5 / (t_0 / x);
else
tmp_2 = (0.5 * x) / t_0;
end
tmp = sqrt((((0.5 + tmp_2) ^ 3.0) ^ 0.3333333333333333));
end
tmp_3 = tmp;
end
code[p_, x_] := N[Sqrt[N[(0.5 * N[(1.0 + N[(x / N[Sqrt[N[(N[(N[(4.0 * p), $MachinePrecision] * p), $MachinePrecision] + N[(x * x), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]
↓
code[p_, x_] := Block[{t$95$0 = N[Sqrt[N[(p + p), $MachinePrecision] ^ 2 + x ^ 2], $MachinePrecision]}, If[LessEqual[N[(x / N[Sqrt[N[(N[(N[(4.0 * p), $MachinePrecision] * p), $MachinePrecision] + N[(x * x), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], -1.0], N[((-N[Abs[p], $MachinePrecision]) / x), $MachinePrecision], N[Sqrt[N[Power[N[Power[N[(0.5 + If[Unequal[x, 0.0], N[(0.5 / N[(t$95$0 / x), $MachinePrecision]), $MachinePrecision], N[(N[(0.5 * x), $MachinePrecision] / t$95$0), $MachinePrecision]]), $MachinePrecision], 3.0], $MachinePrecision], 0.3333333333333333], $MachinePrecision]], $MachinePrecision]]]
\sqrt{0.5 \cdot \left(1 + \frac{x}{\sqrt{\left(4 \cdot p\right) \cdot p + x \cdot x}}\right)}
↓
\begin{array}{l}
t_0 := \mathsf{hypot}\left(p + p, x\right)\\
\mathbf{if}\;\frac{x}{\sqrt{\left(4 \cdot p\right) \cdot p + x \cdot x}} \leq -1:\\
\;\;\;\;\frac{-\left|p\right|}{x}\\
\mathbf{else}:\\
\;\;\;\;\sqrt{{\left({\left(0.5 + \begin{array}{l}
\mathbf{if}\;x \ne 0:\\
\;\;\;\;\frac{0.5}{\frac{t_0}{x}}\\
\mathbf{else}:\\
\;\;\;\;\frac{0.5 \cdot x}{t_0}\\
\end{array}\right)}^{3}\right)}^{0.3333333333333333}}\\
\end{array}