\[ \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}\;y \leq 8.6 \cdot 10^{-133}:\\
\;\;\;\;-x\\
\mathbf{elif}\;y \leq 6.2 \cdot 10^{+90}:\\
\;\;\;\;\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 (<= y 8.6e-133) (- x) (if (<= y 6.2e+90) (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 (y <= 8.6e-133) {
tmp = -x;
} else if (y <= 6.2e+90) {
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 (y <= 8.6d-133) then
tmp = -x
else if (y <= 6.2d+90) 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 (y <= 8.6e-133) {
tmp = -x;
} else if (y <= 6.2e+90) {
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 y <= 8.6e-133:
tmp = -x
elif y <= 6.2e+90:
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 (y <= 8.6e-133)
tmp = Float64(-x);
elseif (y <= 6.2e+90)
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 (y <= 8.6e-133)
tmp = -x;
elseif (y <= 6.2e+90)
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[y, 8.6e-133], (-x), If[LessEqual[y, 6.2e+90], 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}\;y \leq 8.6 \cdot 10^{-133}:\\
\;\;\;\;-x\\
\mathbf{elif}\;y \leq 6.2 \cdot 10^{+90}:\\
\;\;\;\;\sqrt{x \cdot x + y \cdot y}\\
\mathbf{else}:\\
\;\;\;\;y\\
\end{array}