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