models

Date:

10-12-2011

NAME

MODELS - Describes mathematical representation models for Cray Fortran Compiler intrinsic procedures

IMPLEMENTATION

Cray Linux Environment (CLE)

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 Cray Fortran Reference Manual.

Bit Model

The bit model interprets a nonnegative scalar data object of type integer as a sequence of binary digits (bits). In the model

wk

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: j = the summation of

wk2k

as k goes from 0 to s-1.

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.

wk

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

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

Object

Value

s

64

k

0 through 63

Integer Model

The integer number system model is as follows:

i = s times the summation of

wkrk-1

as k goes from 1 to q.

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.

wk

The kth digit. An integer 0 <= wk < r.

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

Real Model

The real number system model is as follows:

x = 0

or

x = s * be * the summation of

fkb-k

as k varies from 1 to p

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.

fk

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

SEE ALSO

Cray Fortran Reference Manual