[Contents] [Previous Section] [Next Section] [Index]


1.2 Data Types

DPML is designed to support mathematics function evaluation for multiple data types. These data types include integer, floating-point, and complex floating-point.

The integer data type, identified as int throughout this manual, is the natural size signed integer for a particular platform. On a 32-bit system, int is a 32-bit signed integer, and on a 64-bit system, int is a 64-bit signed integer.

The floating-point types referred to in this document are F_ FLOAT, G_FLOAT, X_FLOAT, S_FLOAT, and T_FLOAT respectively. When it is not necessary to distinguish between the different floating types, they are referred to collectively as F_TYPE. Your platform may support all or a subset of these floating-point data types. For example, DPML on OpenVMS Alpha systems supports the following floating-point data types: VAX single- and double-precision, IEEE single- and double-precision, and IEEE extended-precision. DPML on Digital UNIX Alpha systems supports only IEEE single- and double- precision data types. Table 1-1 describes the floating-point data types.

Table 1-1 Floating-Point Data Types


F_TYPE      Description

S_FLOAT     32-bit IEEE single-precision number

T_FLOAT     64-bit IEEE double-precision number

X_FLOAT     128-bit IEEE extended-precision number

F_FLOAT     32-bit VAX single-precision number

G_FLOAT     64-bit VAX double-precision number



In addition to the data types mentioned in Table 1-1, DPML also provides routines that return two values of the same floating-point type; for example, two S_TYPE values or two G_TYPE values. In the discussion that follows, these pairs of floating-point data type values are referred to as F_COMPLEX. Refer to Table 1-2. This document uses F_COMPLEX to indicate that a given routine returns two different values of the same floating-point data type.

The mechanism for returning two floating-point values from DPML routines varies from platform to platform. However, on OpenVMS Alpha systems, F_COMPLEX data is returned in consecutive floating-point registers and is accessible only through a high-level language, like Fortran, that specifically allows access to them.

A complex number, z, is defined as an ordered pair of real numbers. The convention used in this manual to define an ordered pair of real numbers as complex is as follows:

For example:

  • z = x + iy

  • z = sin x + icos y
  • DPML includes complex functions, for example, the complex sine, csin(x,y), defined to be sin(x + iy). Complex function routines like csin(), which have complex input, accept floating- point numbers in pairs and treat them as if they are real and imaginary parts of a complex number.

    In the previous two examples, the first floating-point values are defined by x and sin x, respectively, and are the real part of the complex number. The second floating-point values used in the examples are defined by iy and icos y, respectively, and are the imaginary part of the complex number. Similarly, DPML routines that return complex function values return two floating-point values. Taken together, these two floating-point values represent a complex number.

    DPML supports the floating-point complex types described in Table 1-2. DPML complex functions can be accessed only through high-level languages that support the complex data type. Use only the data types supported by your system.

    Table 1-2 Floating-Point Complex Data Types


    F_COMPLEX        Description[1]
    
    S_FLOAT_COMPLEX  An ordered pair of S_FLOAT quantities, representing
                     a single-precision complex number
    
    T_FLOAT_COMPLEX  An ordered pair of T_FLOAT quantities, representing
                     a double-precision complex number
    
    X_FLOAT_COMPLEX  An ordered pair of X_FLOAT quantities, representing
                     an extended-precision complex number
    
    F_FLOAT_COMPLEX  An ordered pair of F_FLOAT quantities, representing
                     a single-precision complex number
    
    G_FLOAT_COMPLEX  An ordered pair of G_FLOAT quantities, representing
                     a double-precision complex number
    
    
    
    [1]The lower addressed quantity is the real part; the higher addressed quantity is the imaginary part.


    [Contents] [Previous Section] [Next Section] [Index]