\[ \begin{array}{c}[x, y, z] = \mathsf{sort}([x, y, z])\\ \end{array} \]
Math FPCore C Fortran Java Python Julia MATLAB Wolfram TeX \[\sqrt{x \cdot x + \left(y \cdot y + z \cdot z\right)}
\]
↓
\[\begin{array}{l}
t_0 := \sqrt{x \cdot x + \left(y \cdot y + z \cdot z\right)}\\
\mathbf{if}\;x \leq -1.3 \cdot 10^{+134}:\\
\;\;\;\;-x\\
\mathbf{elif}\;x \leq -1.7 \cdot 10^{+16}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;x \leq -2.8 \cdot 10^{-35}:\\
\;\;\;\;z\\
\mathbf{elif}\;x \leq -1.9 \cdot 10^{-64}:\\
\;\;\;\;t_0\\
\mathbf{else}:\\
\;\;\;\;z\\
\end{array}
\]
(FPCore (x y z) :precision binary64 (sqrt (+ (* x x) (+ (* y y) (* z z))))) ↓
(FPCore (x y z)
:precision binary64
(let* ((t_0 (sqrt (+ (* x x) (+ (* y y) (* z z))))))
(if (<= x -1.3e+134)
(- x)
(if (<= x -1.7e+16)
t_0
(if (<= x -2.8e-35) z (if (<= x -1.9e-64) t_0 z)))))) double code(double x, double y, double z) {
return sqrt(((x * x) + ((y * y) + (z * z))));
}
↓
double code(double x, double y, double z) {
double t_0 = sqrt(((x * x) + ((y * y) + (z * z))));
double tmp;
if (x <= -1.3e+134) {
tmp = -x;
} else if (x <= -1.7e+16) {
tmp = t_0;
} else if (x <= -2.8e-35) {
tmp = z;
} else if (x <= -1.9e-64) {
tmp = t_0;
} else {
tmp = z;
}
return tmp;
}
real(8) function code(x, y, z)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
code = sqrt(((x * x) + ((y * y) + (z * z))))
end function
↓
real(8) function code(x, y, z)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8) :: t_0
real(8) :: tmp
t_0 = sqrt(((x * x) + ((y * y) + (z * z))))
if (x <= (-1.3d+134)) then
tmp = -x
else if (x <= (-1.7d+16)) then
tmp = t_0
else if (x <= (-2.8d-35)) then
tmp = z
else if (x <= (-1.9d-64)) then
tmp = t_0
else
tmp = z
end if
code = tmp
end function
public static double code(double x, double y, double z) {
return Math.sqrt(((x * x) + ((y * y) + (z * z))));
}
↓
public static double code(double x, double y, double z) {
double t_0 = Math.sqrt(((x * x) + ((y * y) + (z * z))));
double tmp;
if (x <= -1.3e+134) {
tmp = -x;
} else if (x <= -1.7e+16) {
tmp = t_0;
} else if (x <= -2.8e-35) {
tmp = z;
} else if (x <= -1.9e-64) {
tmp = t_0;
} else {
tmp = z;
}
return tmp;
}
def code(x, y, z):
return math.sqrt(((x * x) + ((y * y) + (z * z))))
↓
def code(x, y, z):
t_0 = math.sqrt(((x * x) + ((y * y) + (z * z))))
tmp = 0
if x <= -1.3e+134:
tmp = -x
elif x <= -1.7e+16:
tmp = t_0
elif x <= -2.8e-35:
tmp = z
elif x <= -1.9e-64:
tmp = t_0
else:
tmp = z
return tmp
function code(x, y, z)
return sqrt(Float64(Float64(x * x) + Float64(Float64(y * y) + Float64(z * z))))
end
↓
function code(x, y, z)
t_0 = sqrt(Float64(Float64(x * x) + Float64(Float64(y * y) + Float64(z * z))))
tmp = 0.0
if (x <= -1.3e+134)
tmp = Float64(-x);
elseif (x <= -1.7e+16)
tmp = t_0;
elseif (x <= -2.8e-35)
tmp = z;
elseif (x <= -1.9e-64)
tmp = t_0;
else
tmp = z;
end
return tmp
end
function tmp = code(x, y, z)
tmp = sqrt(((x * x) + ((y * y) + (z * z))));
end
↓
function tmp_2 = code(x, y, z)
t_0 = sqrt(((x * x) + ((y * y) + (z * z))));
tmp = 0.0;
if (x <= -1.3e+134)
tmp = -x;
elseif (x <= -1.7e+16)
tmp = t_0;
elseif (x <= -2.8e-35)
tmp = z;
elseif (x <= -1.9e-64)
tmp = t_0;
else
tmp = z;
end
tmp_2 = tmp;
end
code[x_, y_, z_] := N[Sqrt[N[(N[(x * x), $MachinePrecision] + N[(N[(y * y), $MachinePrecision] + N[(z * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]
↓
code[x_, y_, z_] := Block[{t$95$0 = N[Sqrt[N[(N[(x * x), $MachinePrecision] + N[(N[(y * y), $MachinePrecision] + N[(z * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[x, -1.3e+134], (-x), If[LessEqual[x, -1.7e+16], t$95$0, If[LessEqual[x, -2.8e-35], z, If[LessEqual[x, -1.9e-64], t$95$0, z]]]]]
\sqrt{x \cdot x + \left(y \cdot y + z \cdot z\right)}
↓
\begin{array}{l}
t_0 := \sqrt{x \cdot x + \left(y \cdot y + z \cdot z\right)}\\
\mathbf{if}\;x \leq -1.3 \cdot 10^{+134}:\\
\;\;\;\;-x\\
\mathbf{elif}\;x \leq -1.7 \cdot 10^{+16}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;x \leq -2.8 \cdot 10^{-35}:\\
\;\;\;\;z\\
\mathbf{elif}\;x \leq -1.9 \cdot 10^{-64}:\\
\;\;\;\;t_0\\
\mathbf{else}:\\
\;\;\;\;z\\
\end{array}