Math FPCore C Fortran Java Python Julia MATLAB Wolfram TeX \[\frac{x}{x \cdot x + 1}
\]
↓
\[\begin{array}{l}
\mathbf{if}\;x \leq -16656208939.85756:\\
\;\;\;\;\frac{1}{x}\\
\mathbf{elif}\;x \leq 59648160.18353129:\\
\;\;\;\;\frac{x}{1 + x \cdot x}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{x}\\
\end{array}
\]
(FPCore (x) :precision binary64 (/ x (+ (* x x) 1.0))) ↓
(FPCore (x)
:precision binary64
(if (<= x -16656208939.85756)
(/ 1.0 x)
(if (<= x 59648160.18353129) (/ x (+ 1.0 (* x x))) (/ 1.0 x)))) double code(double x) {
return x / ((x * x) + 1.0);
}
↓
double code(double x) {
double tmp;
if (x <= -16656208939.85756) {
tmp = 1.0 / x;
} else if (x <= 59648160.18353129) {
tmp = x / (1.0 + (x * x));
} else {
tmp = 1.0 / x;
}
return tmp;
}
real(8) function code(x)
real(8), intent (in) :: x
code = x / ((x * x) + 1.0d0)
end function
↓
real(8) function code(x)
real(8), intent (in) :: x
real(8) :: tmp
if (x <= (-16656208939.85756d0)) then
tmp = 1.0d0 / x
else if (x <= 59648160.18353129d0) then
tmp = x / (1.0d0 + (x * x))
else
tmp = 1.0d0 / x
end if
code = tmp
end function
public static double code(double x) {
return x / ((x * x) + 1.0);
}
↓
public static double code(double x) {
double tmp;
if (x <= -16656208939.85756) {
tmp = 1.0 / x;
} else if (x <= 59648160.18353129) {
tmp = x / (1.0 + (x * x));
} else {
tmp = 1.0 / x;
}
return tmp;
}
def code(x):
return x / ((x * x) + 1.0)
↓
def code(x):
tmp = 0
if x <= -16656208939.85756:
tmp = 1.0 / x
elif x <= 59648160.18353129:
tmp = x / (1.0 + (x * x))
else:
tmp = 1.0 / x
return tmp
function code(x)
return Float64(x / Float64(Float64(x * x) + 1.0))
end
↓
function code(x)
tmp = 0.0
if (x <= -16656208939.85756)
tmp = Float64(1.0 / x);
elseif (x <= 59648160.18353129)
tmp = Float64(x / Float64(1.0 + Float64(x * x)));
else
tmp = Float64(1.0 / x);
end
return tmp
end
function tmp = code(x)
tmp = x / ((x * x) + 1.0);
end
↓
function tmp_2 = code(x)
tmp = 0.0;
if (x <= -16656208939.85756)
tmp = 1.0 / x;
elseif (x <= 59648160.18353129)
tmp = x / (1.0 + (x * x));
else
tmp = 1.0 / x;
end
tmp_2 = tmp;
end
code[x_] := N[(x / N[(N[(x * x), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision]
↓
code[x_] := If[LessEqual[x, -16656208939.85756], N[(1.0 / x), $MachinePrecision], If[LessEqual[x, 59648160.18353129], N[(x / N[(1.0 + N[(x * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(1.0 / x), $MachinePrecision]]]
\frac{x}{x \cdot x + 1}
↓
\begin{array}{l}
\mathbf{if}\;x \leq -16656208939.85756:\\
\;\;\;\;\frac{1}{x}\\
\mathbf{elif}\;x \leq 59648160.18353129:\\
\;\;\;\;\frac{x}{1 + x \cdot x}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{x}\\
\end{array}