.Machine                package:base                R Documentation

_N_u_m_e_r_i_c_a_l _C_h_a_r_a_c_t_e_r_i_s_t_i_c_s _o_f _t_h_e _M_a_c_h_i_n_e

_D_e_s_c_r_i_p_t_i_o_n:

     '.Machine' is a variable holding information on the numerical
     characteristics of the machine R is running on, such as the
     largest double or integer and the machine's precision.

_U_s_a_g_e:

     .Machine

_D_e_t_a_i_l_s:

     The algorithm is based on Cody's (1988) subroutine MACHAR.  As
     almost all current inplements of R use 32-bit integers and IEC
     60059 floating-point (double precision) arithmetic, most of these
     values are the same for almost all R builds.

     Note that on most platforms smaller positive values than
     '.Machine$double.xmin' can occur.  On a typical R platform the
     smallest positive double is about '5e-324'.

_V_a_l_u_e:

     A list with components (for simplicity, the prefix 'double' is
     omitted in the explanations) 

double.eps: the smallest positive floating-point number 'x' such that
          '1 + x != 1'.  It equals 'base^ulp.digits' if either 'base'
          is 2 or 'rounding' is 0;  otherwise, it is '(base^ulp.digits)
          / 2'.  Normally '2.220446e-16'.

double.neg.eps: a small positive floating-point number 'x' such that '1
          - x != 1'.  It equals 'base^neg.ulp.digits' if 'base' is 2 or
          'round' is 0;  otherwise, it is '(base^neg.ulp.digits) / 2'. 
          Normally '1.110223e-16'. As 'neg.ulp.digits' is bounded below
          by '-(digits + 3)', 'neg.eps' may not be the smallest number
          that can alter 1 by subtraction.

double.xmin: the smallest non-vanishing normalized floating-point power
          of the radix, i.e., 'base^min.exp'. Normally '2.225074e-308'.

double.xmax: the largest finite floating-point number. Typically, it is
          equal to '(1 - neg.eps) * base^max.exp', but on some machines
          it is only the second, or perhaps third, largest number,
          being too small by 1 or 2 units in the last digit of the
          significand.  Normally '1.797693e+308'.

double.base: the radix for the floating-point representation: normally
          '2'.

double.digits: the number of base digits in the floating-point
          significand: normally '53'.

double.rounding: the rounding action. 
           0 if floating-point addition chops; 
           1 if floating-point addition rounds, but not in the IEEE
          style; 
           2 if floating-point addition rounds in the IEEE style; 
           3 if floating-point addition chops, and there is partial
          underflow; 
           4 if floating-point addition rounds, but not in the IEEE
          style, and there is partial underflow; 
           5 if floating-point addition rounds in the IEEE style, and
          there is partial underflow.  Normally '5'.

double.guard: the number of guard digits for multiplication with
          truncating arithmetic.  It is 1 if floating-point arithmetic
          truncates and more than 'digits' base 'base' digits
          participate in the post-normalization shift of the
          floating-point significand in multiplication, and 0
          otherwise.

double.ulp.digits: the largest negative integer 'i' such that '1 +
          base^i != 1', except that it is bounded below by '-(digits +
          3)'.  Normally '-52'.

double.neg.ulp.digits: the largest negative integer 'i' such that '1 -
          base^i != 1', except that it is bounded below by '-(digits +
          3)'. Normally '-53'.

double.exponent: the number of bits (decimal places if 'base' is 10)
          reserved for the representation of the exponent (including
          the bias or sign) of a floating-point number.  Normally '11'.

double.min.exp: the largest in magnitude negative integer 'i' such that
          'base ^ i' is positive and normalized.  Normally '-1022'.

double.max.exp: the smallest positive power of 'base' that overflows. 
          Normally '1024'.

integer.max: the largest integer which can be represented. Always
          '2147483647'.

sizeof.long: the number of bytes in a C 'long' type: '4' or '8' (most
          64-bit systems, but not Windows).

sizeof.longlong: the number of bytes in a C 'long long' type.  Will be
          zero if there is no such type, otherwise usually '8'.

sizeof.longdouble: the number of bytes in a C 'long double' type.  Will
          be zero if there is no such type, otherwise possibly '12'
          (Windows, 32-bit Linux/Solaris) or '16' (64-bit
          Linux/Solaris, Intel Mac OS X).

sizeof.pointer: the number of bytes in a C 'SEXP' type.  Will be '4' on
          32-bit builds and '8' on 64-bit builds of R.

_R_e_f_e_r_e_n_c_e_s:

     Cody, W. J. (1988) MACHAR: A subroutine to dynamically determine
     machine parameters. _Transactions on Mathematical Software_, *14*,
     4, 303-311.

_S_e_e _A_l_s_o:

     '.Platform' for details of the platform.

_E_x_a_m_p_l_e_s:

     .Machine
     ## or for a neat printout
     noquote(unlist(format(.Machine)))

