\Header{double}{Double Precision Vectors}
\alias{as.double}{double}
\methalias{as.double.default}{double}
\alias{as.single}{double}
\methalias{as.single.default}{double}
\alias{is.double}{double}
\alias{single}{double}
\keyword{classes}{double}
\begin{Description}\relax
Create, coerce to or test for a double-precision vector.\end{Description}
\begin{Usage}
\begin{verbatim}
double(length = 0)
as.double(x, ...)
is.double(x)
single(length = 0)
as.single(x, ...)
\end{verbatim}
\end{Usage}
\begin{Arguments}
\begin{ldescription}
\item[\code{length}] desired length.
\item[\code{x}] object to be coerced or tested.
\item[\code{...}] further arguments passed to or from other methods.
\end{ldescription}
\end{Arguments}
\begin{Value}
\code{double} creates a double precision vector of the specified
length.  The elements of the vector are all equal to \code{0}.

\code{as.double} attempts to coerce its argument to be of double
type: like \code{\Link{as.vector}} it strips attributes including names.

\code{is.double} returns \code{TRUE} or \code{FALSE} depending on
whether its argument is of double type or not.  It is generic:
you can write methods to handle of specific classes of objects,
see \link{InternalMethods}.\end{Value}
\begin{Note}\relax
\emph{\R{} has no single precision data type.  All real numbers are
stored in double precision format}.  The functions \code{as.single}
and \code{single} are identical to \code{as.double} and \code{double}
except they set the attribute \code{Csingle} that is used in the
\code{\Link{.C}} and \code{\Link{.Fortran}} interface, and they are
intended only to be used in that context.\end{Note}
\begin{References}\relax
Becker, R. A., Chambers, J. M. and Wilks, A. R. (1988)
\emph{The New S Language}.
Wadsworth \& Brooks/Cole.\end{References}
\begin{SeeAlso}\relax
\code{\Link{integer}}.\end{SeeAlso}
\begin{Examples}
\begin{ExampleCode}
is.double(1)
all(double(3) == 0)
\end{ExampleCode}
\end{Examples}

