![]() |
![]() HP OpenVMS Systems Documentation |
![]() |
OpenVMS RTL General Purpose (OTS$) Manual
OTS$MOVE5
The Move Data with Fill routine moves up to 232 - 1 bytes (2,147,483,647 bytes) from a specified source address to a specified destination address, with separate source and destination lengths, and with fill. Overlap of the source and destination arrays does not affect the result. FormatOTS$MOVE5 longword-int-source-length ,source-array ,fill-value ,longword-int-dest-length ,destination-array RETURNS
Arguments
DescriptionOTS$MOVE5 performs the same function as the VAX MOVC5 instruction except that the longword-int-source-length and longword-int-dest-length arguments are longword integers rather than word integers. When called from the JSB entry point, the register outputs of OTS$MOVE5_R5 follow the same pattern as those of the MOVC5 instruction: Condition Values Returned
OTS$MULCx
The Complex Multiplication routines calculate the complex product of two complex values. FormatOTS$MULCD_R3 complex-multiplier ,complex-multiplicand (VAX only) These formats correspond to the D-floating and G-floating complex types. RETURNS
Arguments
DescriptionOTS$MULCD_R3 and OTS$MULCG_R3 calculate the complex product of two complex values. Condition Values Signaled
Example
OTS$POWCxCx
The Raise a Complex Base to a Complex Floating-Point Exponent routines raise a complex base to a complex exponent. FormatOTS$POWCC complex-base ,complex-exponent-value Each of these three formats corresponds to one of the three floating-point complex types. RETURNS
Arguments
DescriptionOTS$POWCC, OTS$POWCDCD_R3 and OTS$POWCGCG_R3 raise a complex base to a complex exponent. The American National Standard FORTRAN-77 (ANSI X3.9--1978) defines complex exponentiation as follows: Condition Values Signaled
|
#1 |
---|
C+ C This Fortran example raises a complex base to a complex C power using OTS$POWCC. C C Declare Z1, Z2, Z3, and OTS$POWCC as complex values. Then OTS$POWCC C returns the complex result of Z1**Z2: Z3 = OTS$POWCC(Z1,Z2), C where Z1 and Z2 are passed by value. C- COMPLEX Z1,Z2,Z3,OTS$POWCC C+ C Generate a complex base. C- Z1 = (2.0,3.0) C+ C Generate a complex power. C- Z2 = (1.0,2.0) C+ C Compute the complex value of Z1**Z2. C- Z3 = OTS$POWCC( %VAL(REAL(Z1)), %VAL(AIMAG(Z1)), + %VAL(REAL(Z2)), %VAL(AIMAG(Z2))) TYPE *, ' The value of',Z1,'**',Z2,' is',Z3 END |
This Fortran example uses OTS$POWCC to raise an F-floating complex base to an F-floating complex exponent.
The output generated by this program is as follows:
The value of (2.000000,3.000000)** (1.000000,2.000000) is (-0.4639565,-0.1995301)
#2 |
---|
C+ C This Fortran example raises a complex base to a complex C power using OTS$POWCGCG_R3. C C Declare Z1, Z2, and Z3 as complex values. OTS$POWCGCG_R3 C returns the complex result of Z1**Z2: Z3 = Z1**Z2. C- COMPLEX*16 Z1,Z2,Z3 C+ C Generate a complex base. C- Z1 = (2.0,3.0) C+ C Generate a complex power. C- Z2 = (1.0,2.0) C+ C Compute the complex value of Z1**Z2. C- Z3 = Z1**Z2 TYPE 1,Z1,Z2,Z3 1 FORMAT(' The value of (',F11.8,',',F11.8,')**(',F11.8, + ',',F11.8,') is (',F11.8,',',F11.8,').') END |
This Fortran example program shows how to use OTS$POWCGCG_R3. Notice the high precision in the output generated by this program:
The value of ( 2.00000000, 3.00000000)**( 1.00000000, 2.00000000) is (-0.46395650,-0.46395650).
The Raise a Complex Base to a Signed Longword Integer Exponent routines return the complex result of raising a complex base to an integer exponent.
OTS$POWCJ complex-base ,longword-integer-exponentOTS$POWCDJ_R3 complex-base ,longword-integer-exponent (VAX only)
OTS$POWCGJ_R3 complex-base ,longword-integer-exponent (VAX only)
Each of these three formats corresponds to one of the three floating-point complex types.
OpenVMS usage: complex_number type: F_floating complex, D_floating complex, G_floating complex access: write only mechanism: by value
Complex result of raising a complex base to an integer exponent. OTS$POWCJ returns an F-floating complex number. OTS$POWCDJ_R3 returns a D-floating complex number. OTS$POWCGJ_R3 returns a G-floating complex number. In each format, the result and base are of the same data type.
complex-base
OpenVMS usage: complex_number type: F_floating complex, D_floating complex, G_floating complex access: read only mechanism: by value
Complex base. The complex-base argument contains the complex base. For OTS$POWCJ, complex-base is an F-floating complex number. For OTS$POWCDJ_R3, complex-base is a D-floating complex number. For OTS$POWCGJ_R3, complex-base is a G-floating complex number.longword-integer-exponent
OpenVMS usage: longword_signed type: longword (signed) access: read only mechanism: by value
Exponent. The longword-integer-exponent argument is a signed longword containing the exponent.
OTS$POWCJ, OTS$POWCDJ_R3, and OTS$POWCGJ_R3 return the complex result of raising a complex base to an integer exponent. The complex result is as follows:
Base Exponent Result Any > 0 The product of (base**2 i ), where i is each nonzero bit in longword-integer-exponent. (0.,0.) <= 0 Undefined exponentiation. Not (0.,0.) < 0 The product of (base**2 i ), where i is each nonzero bit in longword-integer-exponent. Not (0.,0.) 0 (1.0,0.0) On Alpha systems, some restrictions apply when linking OTS$POWCJ. See Chapter 1 for more information about these restrictions.
SS$_FLTDIV Floating-point division by zero. SS$_FLTOVF Floating-point overflow. MTH$_UNDEXP Undefined exponentiation.
C+ C This Fortran example raises a complex base to C a NONNEGATIVE integer power using OTS$POWCJ. C C Declare Z1, Z2, Z3, and OTS$POWCJ as complex values. C Then OTS$POWCJ returns the complex result of C Z1**Z2: Z3 = OTS$POWCJ(Z1,Z2), C where Z1 and Z2 are passed by value. C- COMPLEX Z1,Z3,OTS$POWCJ INTEGER Z2 C+ C Generate a complex base. C- Z1 = (2.0,3.0) C+ C Generate an integer power. C- Z2 = 2 C+ C Compute the complex value of Z1**Z2. C- Z3 = OTS$POWCJ( %VAL(REAL(Z1)), %VAL(AIMAG(Z1)), %VAL(Z2)) TYPE 1,Z1,Z2,Z3 1 FORMAT(' The value of (',F10.8,',',F11.8,')**',I1,' is + (',F11.8,',',F12.8,').') END |
The output generated by this Fortran program is as follows:
The value of (2.00000000, 3.00000000)**2 is (-5.00000000, 12.00000000).
The Raise a D-Floating Base to a D-Floating Exponent routine raises a D-floating base to a D-floating exponent.
OTS$POWDD D-floating-point-base ,D-floating-point-exponent
OpenVMS usage: floating_point type: D_floating access: write only mechanism: by value
Result of raising a D-floating base to a D-floating exponent.
D-floating-point-base
OpenVMS usage: floating_point type: D_floating access: read only mechanism: by value
Base. The D-floating-point-base argument is a D-floating number containing the base.D-floating-point-exponent
OpenVMS usage: floating_point type: D_floating access: read only mechanism: by value
Exponent. The D-floating-point-exponent argument is a D-floating number that contains the exponent.
OTS$POWDD raises a D-floating base to a D-floating exponent.The internal calculations and the floating-point result have the same precision as the base value.
The D-floating result for OTS$POWDD is given by the following:
Base Exponent Result = 0 > 0 0.0 = 0 = 0 Undefined exponentiation = 0 < 0 Undefined exponentiation < 0 Any Undefined exponentiation > 0 > 0 2 [ exponent*log2( base)] > 0 = 0 1.0 > 0 < 0 2 [ exponent*log2( base)] Floating-point overflow can occur.
Undefined exponentiation occurs if the base is zero and the exponent is zero or negative, or if the base is negative.
MTH$_FLOOVEMAT Floating-point overflow in math library. MTH$_FLOUNDMAT Floating-point underflow in math library. MTH$_UNDEXP Undefined exponentiation. This error is signaled if D-floating-point-base is zero and D-floating-point-exponent is zero or negative, or if the D-floating-point-base is negative.
Previous | Next | Contents | Index |