\section{INT64 Convert to Signed 64-bit Integer}

\subsection{Usage}

Converts the argument to an signed 64-bit Integer.  The syntax
for its use is
\begin{verbatim}
   y = int64(x)
\end{verbatim}
where \verb|x| is an \verb|n|-dimensional numerical array.  Conversion
follows the general C rules (e.g., if \verb|x| is outside the normal
range for a signed 64-bit integer of \verb|[-2^63,2^63-1]|, the least significant
64 bits of \verb|x| are used after conversion to a signed integer).  Note that
both \verb|NaN| and \verb|Inf| both map to 0.
\subsection{Example}

The following piece of code demonstrates several uses of \verb|int64|.  First, the routine uses
\begin{verbatim}
--> int64(100)
ans = 
  <int64>  - size: [1 1]
 100  
--> int64(-100)
ans = 
  <int64>  - size: [1 1]
 -100  

\end{verbatim}
In the next example, an integer outside the range  of the type is passed in.  The result is the 64 least significant bits of the argument.
\begin{verbatim}
--> int64(40e9)
ans = 
  <int64>  - size: [1 1]
 40000000000  

\end{verbatim}
In the next example, a positive double precision argument is passed in.  The result is the signed integer that is closest to the argument.
\begin{verbatim}
--> int64(pi)
ans = 
  <int64>  - size: [1 1]
 3  

\end{verbatim}
In the next example, a complex argument is passed in.  The result is the signed integer that is closest to the real part of the argument.
\begin{verbatim}
--> int64(5+2*i)
ans = 
  <int64>  - size: [1 1]
 5  

\end{verbatim}
In the next example, a string argument is passed in.  The string argument is converted into an integer array corresponding to the ASCII values of each character.
\begin{verbatim}
--> int64('helo')
ans = 
  <int64>  - size: [1 4]
 
Columns 1 to 4
 104  101  108  111  

\end{verbatim}
In the last example, a cell-array is passed in.  For cell-arrays and structure arrays, the result is an error.
\begin{verbatim}
--> int64({4})
Error: Cannot convert cell-arrays to any other type.

\end{verbatim}
