\[ \begin{array}{c}[x, y] = \mathsf{sort}([x, y])\\ \end{array} \]
Math FPCore C Fortran Java Python Julia MATLAB Wolfram TeX \[\sqrt{x \cdot x + y \cdot y}
\]
↓
\[\begin{array}{l}
\mathbf{if}\;x \leq -2.25 \cdot 10^{+110}:\\
\;\;\;\;-x\\
\mathbf{elif}\;x \leq -1.5 \cdot 10^{-146}:\\
\;\;\;\;\sqrt{x \cdot x + y \cdot y}\\
\mathbf{else}:\\
\;\;\;\;y\\
\end{array}
\]
(FPCore (x y) :precision binary64 (sqrt (+ (* x x) (* y y)))) ↓
(FPCore (x y)
:precision binary64
(if (<= x -2.25e+110)
(- x)
(if (<= x -1.5e-146) (sqrt (+ (* x x) (* y y))) y))) double code(double x, double y) {
return sqrt(((x * x) + (y * y)));
}
↓
double code(double x, double y) {
double tmp;
if (x <= -2.25e+110) {
tmp = -x;
} else if (x <= -1.5e-146) {
tmp = sqrt(((x * x) + (y * y)));
} else {
tmp = y;
}
return tmp;
}
real(8) function code(x, y)
real(8), intent (in) :: x
real(8), intent (in) :: y
code = sqrt(((x * x) + (y * y)))
end function
↓
real(8) function code(x, y)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8) :: tmp
if (x <= (-2.25d+110)) then
tmp = -x
else if (x <= (-1.5d-146)) then
tmp = sqrt(((x * x) + (y * y)))
else
tmp = y
end if
code = tmp
end function
public static double code(double x, double y) {
return Math.sqrt(((x * x) + (y * y)));
}
↓
public static double code(double x, double y) {
double tmp;
if (x <= -2.25e+110) {
tmp = -x;
} else if (x <= -1.5e-146) {
tmp = Math.sqrt(((x * x) + (y * y)));
} else {
tmp = y;
}
return tmp;
}
def code(x, y):
return math.sqrt(((x * x) + (y * y)))
↓
def code(x, y):
tmp = 0
if x <= -2.25e+110:
tmp = -x
elif x <= -1.5e-146:
tmp = math.sqrt(((x * x) + (y * y)))
else:
tmp = y
return tmp
function code(x, y)
return sqrt(Float64(Float64(x * x) + Float64(y * y)))
end
↓
function code(x, y)
tmp = 0.0
if (x <= -2.25e+110)
tmp = Float64(-x);
elseif (x <= -1.5e-146)
tmp = sqrt(Float64(Float64(x * x) + Float64(y * y)));
else
tmp = y;
end
return tmp
end
function tmp = code(x, y)
tmp = sqrt(((x * x) + (y * y)));
end
↓
function tmp_2 = code(x, y)
tmp = 0.0;
if (x <= -2.25e+110)
tmp = -x;
elseif (x <= -1.5e-146)
tmp = sqrt(((x * x) + (y * y)));
else
tmp = y;
end
tmp_2 = tmp;
end
code[x_, y_] := N[Sqrt[N[(N[(x * x), $MachinePrecision] + N[(y * y), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]
↓
code[x_, y_] := If[LessEqual[x, -2.25e+110], (-x), If[LessEqual[x, -1.5e-146], N[Sqrt[N[(N[(x * x), $MachinePrecision] + N[(y * y), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], y]]
\sqrt{x \cdot x + y \cdot y}
↓
\begin{array}{l}
\mathbf{if}\;x \leq -2.25 \cdot 10^{+110}:\\
\;\;\;\;-x\\
\mathbf{elif}\;x \leq -1.5 \cdot 10^{-146}:\\
\;\;\;\;\sqrt{x \cdot x + y \cdot y}\\
\mathbf{else}:\\
\;\;\;\;y\\
\end{array}