Rev 49852 | Blame | Compare with Previous | Last modification | View Log | Download | RSS feed
% File src/library/base/man/zMachine.Rd% Part of the R package, http://www.R-project.org% Copyright 1995-2009 R Core Development Team% Distributed under GPL 2 or later\name{.Machine}\title{Numerical Characteristics of the Machine}\usage{.Machine}\alias{.Machine}\description{\code{.Machine} is a variable holding information on the numericalcharacteristics of the machine \R is running on, such as the largestdouble or integer and the machine's precision.}\value{A list with components\item{double.eps}{the smallest positive floating-point number\code{x} such that \code{1 + x != 1}. It equals\code{double.base ^ ulp.digits} if either \code{double.base} is 2 or\code{double.rounding} is 0; otherwise, it is\code{(double.base ^ double.ulp.digits) / 2}. Normally\code{2.220446e-16}.}\item{double.neg.eps}{a small positive floating-point number \code{x}such that \code{1 - x != 1}. It equals\code{double.base ^ double.neg.ulp.digits} if \code{double.base} is 2or \code{double.rounding} is 0; otherwise, it is\code{(double.base ^ double.neg.ulp.digits) / 2}. Normally\code{1.110223e-16}. As \code{double.neg.ulp.digits} is boundedbelow by \code{-(double.digits + 3)}, \code{double.neg.eps} may notbe the smallest number that can alter 1 by subtraction.}\item{double.xmin}{the smallest non-vanishing normalizedfloating-point power of the radix, i.e.,\code{double.base ^ double.min.exp}. Normally \code{2.225074e-308}.}\item{double.xmax}{the largest normalized floating-point number.Typically, it is equal to \code{(1 - double.neg.eps) *double.base ^ double.max.exp}, buton some machines it is only the second or third largest suchnumber, being too small by 1 or 2 units in the last digit of thesignificand. Normally \code{1.797693e+308}. Note that largerunnormalized numbers can occur.}\item{double.base}{the radix for the floating-point representation:normally \code{2}.}\item{double.digits}{the number of base digits in the floating-pointsignificand: normally \code{53}.}\item{double.rounding}{the rounding action, one of. \cr0 if floating-point addition chops; \cr1 if floating-point addition rounds, but not in the IEEE style; \cr2 if floating-point addition rounds in the IEEE style; \cr3 if floating-point addition chops, and there is partial underflow; \cr4 if floating-point addition rounds, but not in the IEEE style, andthere is partial underflow; \cr5 if floating-point addition rounds in the IEEE style, and there ispartial underflow.\crNormally \code{5}.}\item{double.guard}{the number of guard digits for multiplicationwith truncating arithmetic. It is 1 if floating-point arithmetictruncates and more than \code{double digits} base-\code{double.base} digitsparticipate in the post-normalization shift of the floating-pointsignificand in multiplication, and 0 otherwise.}\item{double.ulp.digits}{the largest negative integer \code{i} suchthat \code{1 + double.base ^ i != 1}, except that it is bounded below by\code{-(double.digits + 3)}. Normally \code{-52}.}\item{double.neg.ulp.digits}{the largest negative integer \code{i}such that \code{1 - double.base ^ i != 1}, except that it is boundedbelow by \code{-(double.digits + 3)}. Normally \code{-53}.}\item{double.exponent}{the number of bits (decimal places if \code{double.base} is 10) reservedfor the representation of the exponent (including the bias or sign)of a floating-point number. Normally \code{11}.}\item{double.min.exp}{the largest in magnitude negative integer \code{i} such that\code{double.base ^ i} is positive and normalized. Normally \code{-1022}.}\item{double.max.exp}{the smallest positive power of \code{double.base} that overflows. Normally\code{1024}.}\item{integer.max}{the largest integer which can be represented.Always \code{2147483647}.}\item{sizeof.long}{the number of bytes in a C \code{long} type:\code{4} or \code{8} (most 64-bit systems, but not Windows).}\item{sizeof.longlong}{the number of bytes in a C \code{long long}type. Will be zero if there is no such type, otherwise usually\code{8}.}\item{sizeof.longdouble}{the number of bytes in a C \code{long double}type. Will be zero if there is no such type, otherwise possibly\code{12} (Windows, 32-bit Linux/Solaris) or \code{16} (64-bitLinux/Solaris, Intel Mac OS X).}\item{sizeof.pointer}{the number of bytes in a C \code{SEXP}type. Will be \code{4} on 32-bit builds and \code{8} on 64-bitbuilds of \R.}}\details{The algorithm is based on Cody's (1988) subroutine MACHAR. Asall current implementations of \R use 32-bit integers and almost alluse IEC 60059 floating-point (double precision) arithmetic, all butthe last two values are the same for almost all \R builds.Note that on most platforms smaller positive values than\code{.Machine$double.xmin} can occur. On a typical \R platform thesmallest positive double is about \code{5e-324}.}\note{\code{sizeof.longdouble} only tells you the amount of storageallocated for a long double (which are used internally by \R foraccumulators in e.g. \code{\link{sum}}, and can be read by\code{\link{readBin}}). Often what is stored is the 80-bit extendeddouble type of IEC 60059, padded to the double alignment used on theplatform.}\references{Cody, W. J. (1988)MACHAR: A subroutine to dynamically determine machine parameters.\emph{Transactions on Mathematical Software}, \bold{14}, 4, 303--311.}\seealso{\code{\link{.Platform}} for details of the platform.}\examples{.Machine## or for a neat printoutnoquote(unlist(format(.Machine)))}\keyword{sysdata}\keyword{programming}\keyword{math}