\section{NAN Not-a-Number Constant}

\subsection{Usage}

Returns a value that represents ``not-a-number'' for both 32 and 64-bit 
floating point values.  This constant is meant to represent the result of
arithmetic operations whose output cannot be meaningfully defined (like 
zero divided by zero).
\begin{verbatim}
   y = nan
\end{verbatim}
The returned type is a 64-bit float, but demotion to 32 bits preserves the not-a-number.  The not-a-number constant has one simple property.  In particular, any arithmetic operation with a \verb|NaN| results in a \verb|NaN|. These calculations run significantly slower than calculations involving finite quantities!  Make sure that you use \verb|NaN|s in extreme circumstances only.  Note that \verb|NaN| is not preserved under type conversion to integer types (see the examples below).
\subsection{Example}

The following examples demonstrate a few calculations with the not-a-number constant.
\begin{verbatim}
--> nan*0

ans = 

       nan 

--> nan-nan

ans = 

       nan 


\end{verbatim}
Note that \verb|NaN|s are preserved under type conversion to floating point types (i.e., \verb|float|, \verb|double|, \verb|complex| and \verb|dcomplex| types), but not integer  types.
\begin{verbatim}
--> uint32(nan)

ans = 

 0 

--> complex(nan)

ans = 

       nan +  0.0000i 


\end{verbatim}
