Math FPCore C Java Python Julia MATLAB Wolfram TeX \[\frac{\left(x \cdot x + y \cdot y\right) - z \cdot z}{y \cdot 2}
\]
↓
\[\begin{array}{l}
t_0 := \frac{\left(x \cdot x + y \cdot y\right) - z \cdot z}{y \cdot 2}\\
\mathbf{if}\;t_0 \leq -\infty:\\
\;\;\;\;0.5 \cdot y\\
\mathbf{elif}\;t_0 \leq 5 \cdot 10^{+299}:\\
\;\;\;\;0.5 \cdot \left(y + \frac{{x}^{2} - {z}^{2}}{y}\right)\\
\mathbf{else}:\\
\;\;\;\;0.5 \cdot y\\
\end{array}
\]
(FPCore (x y z)
:precision binary64
(/ (- (+ (* x x) (* y y)) (* z z)) (* y 2.0))) ↓
(FPCore (x y z)
:precision binary64
(let* ((t_0 (/ (- (+ (* x x) (* y y)) (* z z)) (* y 2.0))))
(if (<= t_0 (- INFINITY))
(* 0.5 y)
(if (<= t_0 5e+299)
(* 0.5 (+ y (/ (- (pow x 2.0) (pow z 2.0)) y)))
(* 0.5 y))))) double code(double x, double y, double z) {
return (((x * x) + (y * y)) - (z * z)) / (y * 2.0);
}
↓
double code(double x, double y, double z) {
double t_0 = (((x * x) + (y * y)) - (z * z)) / (y * 2.0);
double tmp;
if (t_0 <= -((double) INFINITY)) {
tmp = 0.5 * y;
} else if (t_0 <= 5e+299) {
tmp = 0.5 * (y + ((pow(x, 2.0) - pow(z, 2.0)) / y));
} else {
tmp = 0.5 * y;
}
return tmp;
}
public static double code(double x, double y, double z) {
return (((x * x) + (y * y)) - (z * z)) / (y * 2.0);
}
↓
public static double code(double x, double y, double z) {
double t_0 = (((x * x) + (y * y)) - (z * z)) / (y * 2.0);
double tmp;
if (t_0 <= -Double.POSITIVE_INFINITY) {
tmp = 0.5 * y;
} else if (t_0 <= 5e+299) {
tmp = 0.5 * (y + ((Math.pow(x, 2.0) - Math.pow(z, 2.0)) / y));
} else {
tmp = 0.5 * y;
}
return tmp;
}
def code(x, y, z):
return (((x * x) + (y * y)) - (z * z)) / (y * 2.0)
↓
def code(x, y, z):
t_0 = (((x * x) + (y * y)) - (z * z)) / (y * 2.0)
tmp = 0
if t_0 <= -math.inf:
tmp = 0.5 * y
elif t_0 <= 5e+299:
tmp = 0.5 * (y + ((math.pow(x, 2.0) - math.pow(z, 2.0)) / y))
else:
tmp = 0.5 * y
return tmp
function code(x, y, z)
return Float64(Float64(Float64(Float64(x * x) + Float64(y * y)) - Float64(z * z)) / Float64(y * 2.0))
end
↓
function code(x, y, z)
t_0 = Float64(Float64(Float64(Float64(x * x) + Float64(y * y)) - Float64(z * z)) / Float64(y * 2.0))
tmp = 0.0
if (t_0 <= Float64(-Inf))
tmp = Float64(0.5 * y);
elseif (t_0 <= 5e+299)
tmp = Float64(0.5 * Float64(y + Float64(Float64((x ^ 2.0) - (z ^ 2.0)) / y)));
else
tmp = Float64(0.5 * y);
end
return tmp
end
function tmp = code(x, y, z)
tmp = (((x * x) + (y * y)) - (z * z)) / (y * 2.0);
end
↓
function tmp_2 = code(x, y, z)
t_0 = (((x * x) + (y * y)) - (z * z)) / (y * 2.0);
tmp = 0.0;
if (t_0 <= -Inf)
tmp = 0.5 * y;
elseif (t_0 <= 5e+299)
tmp = 0.5 * (y + (((x ^ 2.0) - (z ^ 2.0)) / y));
else
tmp = 0.5 * y;
end
tmp_2 = tmp;
end
code[x_, y_, z_] := N[(N[(N[(N[(x * x), $MachinePrecision] + N[(y * y), $MachinePrecision]), $MachinePrecision] - N[(z * z), $MachinePrecision]), $MachinePrecision] / N[(y * 2.0), $MachinePrecision]), $MachinePrecision]
↓
code[x_, y_, z_] := Block[{t$95$0 = N[(N[(N[(N[(x * x), $MachinePrecision] + N[(y * y), $MachinePrecision]), $MachinePrecision] - N[(z * z), $MachinePrecision]), $MachinePrecision] / N[(y * 2.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$0, (-Infinity)], N[(0.5 * y), $MachinePrecision], If[LessEqual[t$95$0, 5e+299], N[(0.5 * N[(y + N[(N[(N[Power[x, 2.0], $MachinePrecision] - N[Power[z, 2.0], $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(0.5 * y), $MachinePrecision]]]]
\frac{\left(x \cdot x + y \cdot y\right) - z \cdot z}{y \cdot 2}
↓
\begin{array}{l}
t_0 := \frac{\left(x \cdot x + y \cdot y\right) - z \cdot z}{y \cdot 2}\\
\mathbf{if}\;t_0 \leq -\infty:\\
\;\;\;\;0.5 \cdot y\\
\mathbf{elif}\;t_0 \leq 5 \cdot 10^{+299}:\\
\;\;\;\;0.5 \cdot \left(y + \frac{{x}^{2} - {z}^{2}}{y}\right)\\
\mathbf{else}:\\
\;\;\;\;0.5 \cdot y\\
\end{array}