• Keine Ergebnisse gefunden

Code generation: In-line

Im Dokument SR-0113 D (Seite 52-64)

2-28

CMPLX(3M)

D

COMPL(3M) COMPL(3M)

NAME

COMPL - Computes logical complement SYNOPSIS

Fortran:

I

=

COMPL(logical) b :: COMPL(arg)

DESCRIPTION

arg

=

CFT; type Boolean, integer, or real

CFf77: type Boolean, integer, real, or pointer

When given an argument of type logical, COMPL computes a logical complement and returns a logical result

When given an argument of type integer, real, Boolean, or pointer, COMPL computes a bit-wise logical complement and returns a Boolean result.

COMPL is intrinsic for CIT and CFf77.

The following tables show both the logical complement and bit-wise logical complement:

Logical Variable COMPL (Logical Variable)

T F

F T

Bit of Variable COMPL (Bit of Variable)

1 0

0 I

IMPLEMENTATION

NOTES

This routine is available to users of both the COS and UNICOS operating systems.

Fortran:

ANSI Fortran 77 standard or Cray extension to standard: Crayextension Level of vectorization: Full

Code generation: In-line CAUTIONS

SR-Ol13

Unexpected results can occur when Boolean functions are declared external and then used with logical argument£. The external Boolean functions always treat their arguments as type Boolean and return a Boolean result.

2-29

D

COMPL(3M) COMPL(3M)

EXAMPLES

SR-0113

The following section of Fortran code shows the COMPL function used with an argument of type logical:

LOGICAL Ll. L2 L2

=

COMPL(LI)

The following section of Fortran code shows the COMPL function used with an argument of type integer. The bit patterns of the argument and result are also given. For clarity. an 8-bit word is used instead of the actual 64-bit word.

IN'IEGER 11, I2 12 = COMPL(I1)

11111111101010101

II

10101010111111111

. 12

2-30 D

CONJG(3M}

NAME

CONJG - Computes conjugate of a complex number SYNOPSIS

Fortran:

z = CONJG(complex) DESCRIPTION

This function evaluates

CONJG returns the complex conjugate of a complex number.

CONJG is intrinsic for CFT and CFT77.

ARGUMENT RANGE

IXrl,lxil<oo

(oo;:::l~

IMPLEMENTATION

NOTES

This routine is available to users of both the COS and UNICOS operating systems.

Fortran:

ANSI Fortran 77 standard or Cray extension to standard:

ANSI

standard Level of vectorization: Full

Code generation: In-line EXAMPLE

SR-0113

PROGRAM CONlEST COMPLEX ARG, RESULT

J\1tCT.=(3.0,4.0)

RESUL T=CONJG(ARG) PRINT *,RESULT STOP

END

The preceding program gives RESULT = (3 •• -4.).

2-31

CONJG{3M)

o

COS(3M) COS (3M) DCOS returns the doubJe-precision cosine of its double-precision argument.

ccos

returns the complex cosine of its complex argument COS is the generic function name.

COS, DCOS, and CCOS

are

intrinsic for CFT and CfT77.

2-32

D

COS(3M)

AR.GUMENT RANGE

cos:

1.%1<224

DCOS:

Ix 1<2"

ccos:

1

xr

1 < 224. 1

Xi

1<2

13

*

102 IMPLEMENTATION

NOTES

SR-Ol13

1bese routines are available to users of hodl the

cos

and UNICOS operating systems.

Fortran:

C:

ANSI Fortran 77 standard or Cmy extension to standard: ANSI standard Level of vectorization: Full

Code generation: External

ANSI C standard or Cray extension to standard: ANSI standard Level of vectorization: None

Code generation: External

2-33

COS (3M)

D

COSH(3M)

NAME

COSH, DeOSH, cosh - Computes hyperbolic cosine SYNOPSIS

DCOSH returns the double-precision hyperbolic cosine of its double-precision argument.

COSH is the generic function name.

These routines are available to users of both the COS and UNICOS operating systems.

Fortran:

ANSI Fortran 77 standard or Cray extension to standard: ANSI standard Level of vectorization: Full

Code generation: External

2-34

D

COSH(3M)

c:

SR-Ol13

ANSI C standard or Cmy extension to standard: ANSI standard Level of vectorization: None

Code generation: External

2-35

COSH(3M)

D

eOT(3M)

NAME

eOT, DeOT - Computes cotangent SYNOPSIS

DeOT returns the double·precision cotangent of its double.precision argumenL COT

is the generic

function name.

ANSI Fortran 77 standard or Cray extension to standard:

Cray

extension Level of vectorization: Full

Code generation: External

2-36

D

NAME

DASS, DASV, DAVS, DAVV, DDSS, DDSV, DDVS, DDVV, DMSS, DMSV, DMVS, DMVV, DSSS, DSSV, DSVS, DSVV - Performs double-precision arithmetic

DESCRIPTION

Double-precision arithmetic routines include addition (D+D), division (DID), multiplication (D*D), and subtraction (D-D) functions. These routines are implicitly called by CPr and CF1'77 programs to per-form double-precision arithmetic.

The function of each routine follows:

DASS - Double-precision addition: Scalar + Scalar DASV - Double-precision addition: Scalar + Vector DA VS - Double-precision addition: Vector + Scalar DAVV - Double-precision addition: Vector

+

Vector DOSS - Double-precision division: Scalar I Scalar DOSV - Double-precision division: Scalar

I

Vector DOVS - Double-precision division: Vector

I

Scalar DDVV - Double-precision division: Vector

I

Vector DMSS - Double-precision multiplication: Scalar

*

Scalar OMSV - Double-precision multiplication: Scalar

*

Vector DMVS - Double-precision multiplication: Vector'" Scalar DMVV - Double-precision multiplication: Vector ... Vector DSSS - Double-precision subtraction: ScaJar - Scalar DSSV - Double-precision subtraction: Scalar - Vector DSVS - Double-precision subtraction: Vector - Scalar DSVV - Double-precision subtraction: Vector - Vector CAL REGISTER USAGE

SR-Ol13

Double-precision addition: Scalar + Scalar DASS% (call by register)

entry (SI) and (S2) = arg 1 words 1 and 2 (S3) and (S4) = atg

2

words

1

and

2

exit (S 1) and (S2) = result words 1 and 2 Double-precision addition: Vector + Scalar

DAVS~ (call by register)

entry (VI) and (V2)

=

arg 1 (augend)

(S3) and (S4)

=

arg 2 (addend) exit (VI) and (V2)

=

result vector (sum)

Double-precision division: Scalar

I

Scalar DDSS" (call by register)

entry (SI) and (S2)

=

numerator words

1

and

2

(S3) and (S4)

=

divisor words 1 and 2 exit (SI) and (52)

=

quotient words I and 2

2-37

Double-precision addition: Scalar

+

Vector DASV% (call by register)

entry (SI) and (52) = arg 1 (augend) (V3) and (V 4)

=

arg 2 (addend) exit (VI) and (V2)

=

result vector (sum) Double-precision addition: Vector + Vector DAVV% (call by register)

entry (VI) and (V2)

=

arg 1 (augend) (V3) and (V4)

=

arg

2

(addend) exit (VI) and (V2) = result vector (sum)

Double-precision division: Scalar

I

Vector DDSV" (call by register)

entty (SI) and (S2) = numerator words 1 and 2 (V3) and (V4) == divisor words 1 and 2 exit (VI) and (V2) ::: quotient words 1 and 2

D

Double-precision division: Vector I Scalar DDVS% (call by register)

entry (VI) and (V2)

=

numerator words 1 and 2 (53) and (S4)

=

divisor words 1 and 2 exit (VI) and (V2) = quotient words I and 2

Double-precision multiplication: Scalar

*

Scalar DMSS% (call by register)

entry (51) and (S2) = arg 1 words 1 and 2 (S3) and (S4)

=

arg 2 words 1 and 2 exit (51) and (52)

=

result words 1 and 2 Double-precision multiplication: Vector

*

Scalar DMVS% (call by register)

entry (V 1) and (V2)

=

arg I words 1 and 2 (53) and (S4) = arg 2 words 1 and 2 exit (VI) and (V2)

=

product words 1 and 2

Double-precision subtraction: Scalar - Scalar DSSS% (call by register)

entry (51) and (52)

=

arg I words 1 and 2 (53) and (S4)

=

arg 2 words 1 and 2 exit (S 1) and (52) = result words 1 and 2 Double-precisionsubtrnction: Vector - Scalar DSVS % (call by register)

entry (VI) and (V2) = arg I (minuend) (53) and (S4)

=

arg 2 (subtrahend) exit (VI) and (V2)

=

result vector (swn)

IMPLEMENTATION

Double-precision division: Vector / Vector DDVV% (call by register)

entry (VI) and (V2)

=

numerator words I and 2 (V3) and (V4)

=

divisor words I and 2 exit (VI) and (V2)

=

quotient words I and 2

Double-precision multiplication: Scalar

*

Vector DMSV% (call by register)

entry (SI) and (52)

=

arg 1 words 1 and 2

(V3) and (V4)

=

arg 2 words 1 and 2 exit (VI) and (V2)

=

product words I and 2 Double-precision multiplication: Vector

*

Vector DMVV% (call by register)

entry (VI) and (V2) = arg I words 1 and 2 (V3) and (V 4)

=

arg 2 words 1 and 2 exit (VI) and (V2)

=

product words 1 and 2

Double-precision subtraction: Scalar - Vector DSSV% (call by register)

entry (SI) and (52) = arg 1 (minuend) (V3) and (V4)

=

arg 2 (subtrahend) exit (VI) and (V2)

=

result vector (sum) Double-precision subtraction: Vector - Vector DSVV% (call by register)

DBLE(3M)

NAME

DBLE, DFLOAT - Converts to type double precision SYNOPSIS

Fortran:

d = DBLE(arg) d = DFLOAT(integer) DESCRIPTION

arg

=

type complex, integer, Boolean, real, or double precision These functions convert specified types to type double precision.

DBLE(3M)

DBLE returns the double-precision equivalent of its complex, integer, Boolean, real, or double-precision argument.

DFLOAT returns the double-precision floating-point equivalent of its integer argument.

Type conversion routines assign the appropriate type to Boolean arguments without shifting or manipu-lating the bit patterns they represent.

ARGUMENT R.ANGE DBLE:

Real. double precision, Boolean:

Complex:

(for complex arguments x = x I + i ... Xi)

Integer:

Integer (24-bit) (CFT only):

I x 1<2

23

DFLOAT:

IMPLEMENTATION

These routines are available to users of both the COS and UNICQS operating systems.

SR-Ol13

2-39

D

DBLE(3M)

NOTES

Fortran:

SR-0113

DBLE:

ANSI Fortran 77

standard or

Cray extension

to standard: ANSI standard

Im Dokument SR-0113 D (Seite 52-64)