\[ \begin{array}{c}[x, y, z] = \mathsf{sort}([x, y, z])\\ \end{array} \]
Math FPCore C Fortran Java Python Julia MATLAB Wolfram TeX \[2 \cdot \sqrt{\left(x \cdot y + x \cdot z\right) + y \cdot z}
\]
↓
\[\begin{array}{l}
\mathbf{if}\;y \leq 9.2 \cdot 10^{-296}:\\
\;\;\;\;2 \cdot \frac{\sqrt{-x}}{\sqrt{\frac{-1}{y + z}}}\\
\mathbf{else}:\\
\;\;\;\;2 \cdot \left(\sqrt{z} \cdot \sqrt{y}\right)\\
\end{array}
\]
(FPCore (x y z)
:precision binary64
(* 2.0 (sqrt (+ (+ (* x y) (* x z)) (* y z))))) ↓
(FPCore (x y z)
:precision binary64
(if (<= y 9.2e-296)
(* 2.0 (/ (sqrt (- x)) (sqrt (/ -1.0 (+ y z)))))
(* 2.0 (* (sqrt z) (sqrt y))))) double code(double x, double y, double z) {
return 2.0 * sqrt((((x * y) + (x * z)) + (y * z)));
}
↓
double code(double x, double y, double z) {
double tmp;
if (y <= 9.2e-296) {
tmp = 2.0 * (sqrt(-x) / sqrt((-1.0 / (y + z))));
} else {
tmp = 2.0 * (sqrt(z) * sqrt(y));
}
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 = 2.0d0 * sqrt((((x * y) + (x * z)) + (y * 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) :: tmp
if (y <= 9.2d-296) then
tmp = 2.0d0 * (sqrt(-x) / sqrt(((-1.0d0) / (y + z))))
else
tmp = 2.0d0 * (sqrt(z) * sqrt(y))
end if
code = tmp
end function
public static double code(double x, double y, double z) {
return 2.0 * Math.sqrt((((x * y) + (x * z)) + (y * z)));
}
↓
public static double code(double x, double y, double z) {
double tmp;
if (y <= 9.2e-296) {
tmp = 2.0 * (Math.sqrt(-x) / Math.sqrt((-1.0 / (y + z))));
} else {
tmp = 2.0 * (Math.sqrt(z) * Math.sqrt(y));
}
return tmp;
}
def code(x, y, z):
return 2.0 * math.sqrt((((x * y) + (x * z)) + (y * z)))
↓
def code(x, y, z):
tmp = 0
if y <= 9.2e-296:
tmp = 2.0 * (math.sqrt(-x) / math.sqrt((-1.0 / (y + z))))
else:
tmp = 2.0 * (math.sqrt(z) * math.sqrt(y))
return tmp
function code(x, y, z)
return Float64(2.0 * sqrt(Float64(Float64(Float64(x * y) + Float64(x * z)) + Float64(y * z))))
end
↓
function code(x, y, z)
tmp = 0.0
if (y <= 9.2e-296)
tmp = Float64(2.0 * Float64(sqrt(Float64(-x)) / sqrt(Float64(-1.0 / Float64(y + z)))));
else
tmp = Float64(2.0 * Float64(sqrt(z) * sqrt(y)));
end
return tmp
end
function tmp = code(x, y, z)
tmp = 2.0 * sqrt((((x * y) + (x * z)) + (y * z)));
end
↓
function tmp_2 = code(x, y, z)
tmp = 0.0;
if (y <= 9.2e-296)
tmp = 2.0 * (sqrt(-x) / sqrt((-1.0 / (y + z))));
else
tmp = 2.0 * (sqrt(z) * sqrt(y));
end
tmp_2 = tmp;
end
code[x_, y_, z_] := N[(2.0 * N[Sqrt[N[(N[(N[(x * y), $MachinePrecision] + N[(x * z), $MachinePrecision]), $MachinePrecision] + N[(y * z), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]
↓
code[x_, y_, z_] := If[LessEqual[y, 9.2e-296], N[(2.0 * N[(N[Sqrt[(-x)], $MachinePrecision] / N[Sqrt[N[(-1.0 / N[(y + z), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(2.0 * N[(N[Sqrt[z], $MachinePrecision] * N[Sqrt[y], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
2 \cdot \sqrt{\left(x \cdot y + x \cdot z\right) + y \cdot z}
↓
\begin{array}{l}
\mathbf{if}\;y \leq 9.2 \cdot 10^{-296}:\\
\;\;\;\;2 \cdot \frac{\sqrt{-x}}{\sqrt{\frac{-1}{y + z}}}\\
\mathbf{else}:\\
\;\;\;\;2 \cdot \left(\sqrt{z} \cdot \sqrt{y}\right)\\
\end{array}