Math FPCore C Fortran Java Python Julia MATLAB Wolfram TeX \[\frac{x \cdot x - \left(y \cdot 4\right) \cdot y}{x \cdot x + \left(y \cdot 4\right) \cdot y}
\]
↓
\[\begin{array}{l}
t_0 := y \cdot \left(y \cdot 4\right)\\
\mathbf{if}\;t_0 \leq 5 \cdot 10^{-148}:\\
\;\;\;\;1 + -4 \cdot \left(\frac{y}{x} \cdot \frac{y}{x}\right)\\
\mathbf{elif}\;t_0 \leq 5 \cdot 10^{+184}:\\
\;\;\;\;\frac{x \cdot x - t_0}{t_0 + x \cdot x}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{y \cdot \frac{y}{x}} \cdot 0.5 + -1\\
\end{array}
\]
(FPCore (x y)
:precision binary64
(/ (- (* x x) (* (* y 4.0) y)) (+ (* x x) (* (* y 4.0) y)))) ↓
(FPCore (x y)
:precision binary64
(let* ((t_0 (* y (* y 4.0))))
(if (<= t_0 5e-148)
(+ 1.0 (* -4.0 (* (/ y x) (/ y x))))
(if (<= t_0 5e+184)
(/ (- (* x x) t_0) (+ t_0 (* x x)))
(+ (* (/ x (* y (/ y x))) 0.5) -1.0))))) double code(double x, double y) {
return ((x * x) - ((y * 4.0) * y)) / ((x * x) + ((y * 4.0) * y));
}
↓
double code(double x, double y) {
double t_0 = y * (y * 4.0);
double tmp;
if (t_0 <= 5e-148) {
tmp = 1.0 + (-4.0 * ((y / x) * (y / x)));
} else if (t_0 <= 5e+184) {
tmp = ((x * x) - t_0) / (t_0 + (x * x));
} else {
tmp = ((x / (y * (y / x))) * 0.5) + -1.0;
}
return tmp;
}
real(8) function code(x, y)
real(8), intent (in) :: x
real(8), intent (in) :: y
code = ((x * x) - ((y * 4.0d0) * y)) / ((x * x) + ((y * 4.0d0) * y))
end function
↓
real(8) function code(x, y)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8) :: t_0
real(8) :: tmp
t_0 = y * (y * 4.0d0)
if (t_0 <= 5d-148) then
tmp = 1.0d0 + ((-4.0d0) * ((y / x) * (y / x)))
else if (t_0 <= 5d+184) then
tmp = ((x * x) - t_0) / (t_0 + (x * x))
else
tmp = ((x / (y * (y / x))) * 0.5d0) + (-1.0d0)
end if
code = tmp
end function
public static double code(double x, double y) {
return ((x * x) - ((y * 4.0) * y)) / ((x * x) + ((y * 4.0) * y));
}
↓
public static double code(double x, double y) {
double t_0 = y * (y * 4.0);
double tmp;
if (t_0 <= 5e-148) {
tmp = 1.0 + (-4.0 * ((y / x) * (y / x)));
} else if (t_0 <= 5e+184) {
tmp = ((x * x) - t_0) / (t_0 + (x * x));
} else {
tmp = ((x / (y * (y / x))) * 0.5) + -1.0;
}
return tmp;
}
def code(x, y):
return ((x * x) - ((y * 4.0) * y)) / ((x * x) + ((y * 4.0) * y))
↓
def code(x, y):
t_0 = y * (y * 4.0)
tmp = 0
if t_0 <= 5e-148:
tmp = 1.0 + (-4.0 * ((y / x) * (y / x)))
elif t_0 <= 5e+184:
tmp = ((x * x) - t_0) / (t_0 + (x * x))
else:
tmp = ((x / (y * (y / x))) * 0.5) + -1.0
return tmp
function code(x, y)
return Float64(Float64(Float64(x * x) - Float64(Float64(y * 4.0) * y)) / Float64(Float64(x * x) + Float64(Float64(y * 4.0) * y)))
end
↓
function code(x, y)
t_0 = Float64(y * Float64(y * 4.0))
tmp = 0.0
if (t_0 <= 5e-148)
tmp = Float64(1.0 + Float64(-4.0 * Float64(Float64(y / x) * Float64(y / x))));
elseif (t_0 <= 5e+184)
tmp = Float64(Float64(Float64(x * x) - t_0) / Float64(t_0 + Float64(x * x)));
else
tmp = Float64(Float64(Float64(x / Float64(y * Float64(y / x))) * 0.5) + -1.0);
end
return tmp
end
function tmp = code(x, y)
tmp = ((x * x) - ((y * 4.0) * y)) / ((x * x) + ((y * 4.0) * y));
end
↓
function tmp_2 = code(x, y)
t_0 = y * (y * 4.0);
tmp = 0.0;
if (t_0 <= 5e-148)
tmp = 1.0 + (-4.0 * ((y / x) * (y / x)));
elseif (t_0 <= 5e+184)
tmp = ((x * x) - t_0) / (t_0 + (x * x));
else
tmp = ((x / (y * (y / x))) * 0.5) + -1.0;
end
tmp_2 = tmp;
end
code[x_, y_] := N[(N[(N[(x * x), $MachinePrecision] - N[(N[(y * 4.0), $MachinePrecision] * y), $MachinePrecision]), $MachinePrecision] / N[(N[(x * x), $MachinePrecision] + N[(N[(y * 4.0), $MachinePrecision] * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
↓
code[x_, y_] := Block[{t$95$0 = N[(y * N[(y * 4.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$0, 5e-148], N[(1.0 + N[(-4.0 * N[(N[(y / x), $MachinePrecision] * N[(y / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$0, 5e+184], N[(N[(N[(x * x), $MachinePrecision] - t$95$0), $MachinePrecision] / N[(t$95$0 + N[(x * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(x / N[(y * N[(y / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * 0.5), $MachinePrecision] + -1.0), $MachinePrecision]]]]
\frac{x \cdot x - \left(y \cdot 4\right) \cdot y}{x \cdot x + \left(y \cdot 4\right) \cdot y}
↓
\begin{array}{l}
t_0 := y \cdot \left(y \cdot 4\right)\\
\mathbf{if}\;t_0 \leq 5 \cdot 10^{-148}:\\
\;\;\;\;1 + -4 \cdot \left(\frac{y}{x} \cdot \frac{y}{x}\right)\\
\mathbf{elif}\;t_0 \leq 5 \cdot 10^{+184}:\\
\;\;\;\;\frac{x \cdot x - t_0}{t_0 + x \cdot x}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{y \cdot \frac{y}{x}} \cdot 0.5 + -1\\
\end{array}