models(3I)

MODELS - Describes mathematical representation models for CF90 and MIPSpro 7 Fortran 90 compiler intrinsic procedures

As shipped in IRIX 6.5.7. Last changed in IRIX 6.5.5.

NAME
     MODELS - Describes mathematical representation models for CF90 and
     MIPSpro 7 Fortran 90 compiler intrinsic procedures

IMPLEMENTATION
     UNICOS, UNICOS/mk, IRIX systems

     CF90, MIPSpro 7 Fortran 90

STANDARDS
     Fortran

DESCRIPTION
     The compilers implement the intrinsic procedures according to the
     representation models described in the Fortran standard.  The Fortran
     standard describes a bit model, an integer model, and a real number
     model.  For more information on these models, see the Fortran Language
     Reference Manual, Volume 2.

     Bit model

     The bit model interprets a nonnegative scalar data object of type
     integer as a sequence of binary digits (bits).  In the model, w
                                                                    k
     has a value of 0 or 1.  A bit is defined to be a binary digit w
     located at position k of a nonnegative integer scalar object, which is
     based on the following nonnegative integer model:
                                  k
          j = the summation of w 2  as k goes from 0 to s-1
                                k
          (Refer to the printed MODELS(3I) man page in the Intrinsic
          Procedures Reference Manual, for a graphical representation of
          this summation.)

     Object    Definition

     j         The integer value.

     s         The number of bits in the model.  The bits are numbered from
               right to left beginning with 0.

     w         A bit is a binary digit, w, located at position k.  Either 0
      k        or 1.

     For 64-bit integers, the values in the model are as follows:

     Object    Value

     s         64

     k         0 through 63

     On UNICOS systems, a 46-bit integer is stored in a 64-bit storage
     container.

     For 32-bit integers, the values are as follows:

     Object    Value

     s         32

     k         0 through 31

     You can use the BIT_SIZE intrinsic function to determine the value of
     s in the model.

     The bit manipulation functions are based upon this bit model.  The
     model deals only with nonnegative integers interpreted through these
     functions and the MVBITS subroutine.  It is not necessarily related to
     the implementation of the integer data type.  It also is independent
     of the binary, octal, and hexadecimal (BOZ) constants described in the
     Fortran Language Reference Manual, Volume 1.

     Integer model

     The integer number system model is as follows:
                                      k-1
          i = s * the summation of w r    as k goes from 1 to q
                                    k
          (Refer to the printed MODELS(3I) man page in the Fortran Language
          Reference Manual, Volume 2, for a graphical representation of
          this summation.)

     This equation assumes the following definitions:

     Object    Definition

     i         The integer value.

     s         The sign.  Either +1 or -1.

     r         The radix.  An integer greater than 1.

     q         The number of digits.  An integer greater than 0.

     w         The kth digit.  An integer 0 <= w  < r.
      k                                         k

     For 64-bit integers, the values in the model are as follows:

     Object    Value

     r         2

     q         63

     k         An integer 1 <= k <= 63, and the sign bit

     For 32-bit integers on UNICOS/mk and IRIX systems, the values in the
     model are as follows:

     Object    Value

     r         2

     q         31

     k         An integer 1 <= k <= 31, and the sign bit

     For 8-bit integers on IRIX systems, the values in the model are as
     follows:

     Object    Value

     r         2

     q         7

     k         An integer 1 <= k <= 7, and the sign bit

     For 16-bit integers on IRIX systems, the values in the model are as
     follows:

     Object    Value

     r         2

     q         15

     k         An integer 1 <= k <= 15, and the sign bit

     The values shown for the integer number system model can be retrieved
     through the DIGITS, RANGE, and RADIX numeric inquiry intrinsic
     functions.  The DIGITS function returns the number of significant
     digits (q) for an integer in the model, and the RANGE function returns
     the decimal number of significant digits.  The RADIX function returns
     the base of the model (r).

     The HUGE numeric inquiry intrinsic function returns the largest
     positive number in the integer number system model.

     Real model

     The real number system model is as follows:

          x = 0

     or

              e                       -k
     x = s * b  * the summation of f b  as k goes from 1 to p}
                                    k

     (Refer to the printed MODELS(3I) man page in the Fortran Language
     Reference Manual, Volume 2, for a graphical representation of this
     summation.)

     This equation assumes the following definitions:

     Object    Definition

     x         The real value.

     s         The sign.  Either +1 or -1.

     b         The base (real radix).  An integer greater than 1.

     e         An integer between some minimum and maximum value.

     p         The number of mantissa digits.  An integer greater than 1.

     f         The kth digit.  An integer 1 <= f  < b.
      k                                         k
               f  can be 0 only if all f  are 0.
                1                       k

     For 128-bit real numbers on UNICOS systems, the values in the model
     are as follows:

     Object    Value

     b         2

     e         8189
      max
     e         -8188
      min
     p         95

     k         An integer 1 <= k <= 95

     For 128-bit real numbers on IRIX systems systems, the values in the
     model are as follows:

     Object    Value

     b         2

     e         1023
      max
     e         -967
      min
     p         107

     k         An integer 1 <= k <= 107

     For 128-bit real numbers on CRAY T90 systems that support IEEE
     floating-point arithmetic, the values in the model are as follows:

     Object    Value

     b         2

     e         16384
      max
     e         -16381
      min
     p         113

     k         An integer 1 <= k <= 113

     For 64-bit real numbers on UNICOS systems, the values in the model are
     as follows:

     Object    Value

     b         2

     e         8189
      max
     e         -8188
      min
     p         47

     k         An integer 1 <= k <= 47

     For 64-bit real numbers on IRIX systems, on CRAY T90 systems that
     support IEEE floating-point arithmetic, and on UNICOS/mk systems, the
     values in the model are as follows:

     Object    Value

     b         2

     e         1024
      max
     e         -1021
      min
     p         53

     k         An integer 1 <= k <= 53

     For 32-bit real numbers on UNICOS/mk and IRIX systems, the values in
     the model are as follows:

     Object    Value

     b         2

     e         128
      max
     e         -125
      min
     p         24

     k         An integer 1 <= k <= 24

     The values shown for the real number system model can be retrieved
     through the RADIX, MAXEXPONENT, MINEXPONENT, DIGITS, PRECISION, and
     RANGE numeric inquiry intrinsic functions.

     The HUGE and TINY numeric inquiry intrinsic functions return the
     largest and the smallest positive number in the real number system
     model.  The EPSILON function returns a positive real number that is
                1-p
     epsilon = b   .

NOTES
     On UNICOS systems, both execution speed and the number of bits used in
     mathematical operations are affected when compiling with
     f90 -O fastint, which is the default setting.  For more information,
     see CF90 Commands and Directives Reference Manual.

SEE ALSO
     Intrinsic Procedures Reference Manual for the printed version of this
     man page.