Updated: 11 December 1998 |
OpenVMS RTL General Purpose (OTS$) Manual
Previous | Contents | Index |
On VAX systems, the Raise an H-Floating Base to a Longword Exponent routine raises an H-floating base to a longword exponent.
OTS$POWHJ_R3 H-floating-point-base ,longword-integer-exponent
OpenVMS usage: floating_point type: H_floating access: write only mechanism: by value
Result of raising an H-floating base to a longword exponent.
H-floating-point-base
OpenVMS usage: floating_point type: H_floating access: read only mechanism: by value
Base. The H-floating-point-base argument is an H-floating number containing the base.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 that contains the signed longword exponent.
OTS$POWHJ_R3 raises an H-floating base to a longword exponent.The internal calculations and the floating-point result have the same precision as the base value.
The floating-point result is as follows:
Base Exponent Result Any > 0 Product of ( base**2 i ), where i is each nonzero bit position in longword-integer-exponent. > 0 = 0 1.0 = 0 = 0 Undefined exponentiation. < 0 = 0 1.0 > 0 < 0 1.0/( base**2 i ), where i is each nonzero bit position in longword-integer-exponent. = 0 < 0 Undefined exponentiation. < 0 < 0 1.0/( base**2 i ), where i is each nonzero bit position in longword-integer-exponent. Floating-point overflow can occur.
Undefined exponentiation occurs if the base is zero and the exponent is zero or negative.
SS$_FLTOVF Arithmetic trap. This error is signaled by the hardware if a floating-point overflow occurs. 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 H-floating-point-base is zero and longword-integer-exponent is zero or negative, or if the H-floating-point-base is negative.
The Raise a Word Base to a Word Exponent routine raises a word base to a word exponent.
OTS$POWII word-integer-base ,word-integer-exponent
OpenVMS usage: word_signed type: word (signed) access: write only mechanism: by value
Result of raising a word base to a word exponent.
word-integer-base
OpenVMS usage: word_signed type: word (signed) access: read only mechanism: by value
Base. The word-integer-base argument is a signed word containing the base.word-integer-exponent
OpenVMS usage: word_signed type: word (signed) access: read only mechanism: by value
Exponent. The word-integer-exponent argument is a signed word containing the exponent.
The OTS$POWII routine raises a word base to a word exponent.On Alpha systems, some restrictions apply when linking OTS$POWII. See Chapter 1 for more information about these restrictions.
SS$_FLTDIV Arithmetic trap. This error is signaled by the hardware if a floating-point division by zero occurs. SS$_FLTOVF Arithmetic trap. This error is signaled by the hardware if a floating-point overflow occurs. MTH$_UNDEXP Undefined exponentiation. This error is signaled if word-integer-base is zero and word-integer-exponent is zero or negative, or if word-integer-base is negative.
The Raise a Longword Base to a Longword Exponent routine raises a signed longword base to a signed longword exponent.
OTS$POWJJ longword-integer-base ,longword-integer-exponent
OpenVMS usage: longword_signed type: longword (signed) access: write only mechanism: by value
Result of raising a signed longword base to a signed longword exponent.
longword-integer-base
OpenVMS usage: longword_signed type: longword (signed) access: read only mechanism: by value
Base. The longword-integer-base argument is a signed longword containing the base.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.
The OTS$POWJJ routine raises a signed longword base to a signed longword exponent.On Alpha systems, some restrictions apply when linking OTS$POWJJ. See Chapter 1 for more information about these restrictions.
SS$_FLTDIV Arithmetic trap. This error is signaled by the hardware if a floating-point division by zero occurs. SS$_FLTOVF Arithmetic trap. This error is signaled by the hardware if a floating-point overflow occurs. MTH$_UNDEXP Undefined exponentiation. This error is signaled if longword-integer-base is zero and longword-integer-exponent is zero or negative, or if longword-integer-base is negative.
The Raise an Unsigned Longword Base to an Unsigned Longword Exponent routine raises an unsigned longword integer base to an unsigned longword integer exponent.
OTS$POWLULU unsigned-lword-int-base, unsigned-lword-int-exponent
OpenVMS usage: longword_unsigned type: longword (unsigned) access: write only mechanism: by value
Result of raising an unsigned longword integer base to an unsigned longword integer exponent.
unsigned-lword-int-base
OpenVMS usage: longword_unsigned type: longword (unsigned) access: read only mechanism: by value
Unsigned longword integer base. The unsigned-lword-int-base argument contains the value of the integer base.unsigned-lword-int-exponent
OpenVMS usage: longword_unsigned type: longword (unsigned) access: read only mechanism: by value
Unsigned longword integer exponent. The unsigned-lword-int-exponent argument contains the value of the integer exponent.
OTS$POWLULU returns the unsigned longword integer result of raising an unsigned longword integer base to an unsigned longword integer exponent. Note that overflow cannot occur in this routine. If the result or intermediate result is greater than 32 bits, the low-order 32 bits are used.On Alpha systems, some restrictions apply when linking OTS$POWLULU. See Chapter 1 for more information about these restrictions.
MTH$_UNDEXP Both the base and exponent values are zero.
The Raise an F-Floating Base to a D-Floating Exponent routine raises an F-floating base to a D-floating exponent.
OTS$POWRD F-floating-point-base ,D-floating-point-exponent
OpenVMS usage: floating_point type: D_floating access: write only mechanism: by value
Result of raising an F-floating base to a D-floating exponent.
F-floating-point-base
OpenVMS usage: floating_point type: F_floating access: read only mechanism: by value
Base. The F-floating-point-base argument is an F-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$POWRD raises an F-floating base to a D-floating exponent.The internal calculations and the floating-point result have the same precision as the base value.
OTS$POWRD first converts the F-floating base to D-floating. The D-floating result for OTS$POWRD is as follows:
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.
SS$_FLTOVF Arithmetic trap. This error is signaled by the hardware if a floating-point overflow occurs. 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 F-floating-point-base is zero and D-floating-point-exponent is zero or negative, or if F-floating-point-base is negative.
C+ C This Fortran example uses OTS$POWRD, to raise an F-floating point C base to a D-floating point exponent. The result is a D-floating value. C- REAL*4 X REAL*8 Y,RESULT,OTS$POWRD INTEGER M(2) EQUIVALENCE (M(1),Y) X = 9768.0 Y = 9.0 C+ C The arguments of OTS$POWRD are passed by value. C- RESULT = OTS$POWRD(%VAL(X),%VAL(M(1)),%VAL(M(2))) TYPE *,' 9768.0**9.0 IS ',RESULT X = 7689.0 Y = -0.587436654545 C+ C In Fortran, OTS$POWRD is indirectly called by the exponentiation operator. C- RESULT = X**Y TYPE *,' 7689.0**-0.587436654545 IS ',RESULT END |
This Fortran example uses OTS$POWRD to raise an F-floating base to a D-floating exponent. Notice the difference in the precision of the result produced by this routine in comparison to the result produced by OTS$POWRR. The output generated by this program is as follows:
9768.0**9.0 IS 8.0956338648832908E+35 7689.0**-0.587436654545 IS 5.2155199252836588E-03
The Raise an F-Floating Base to a Longword Exponent routine raises an F-floating base to a longword exponent.
OTS$POWRJ F-floating-point-base ,longword-integer-exponent
OpenVMS usage: floating_point type: F_floating access: write only mechanism: by value
Result of raising an F-floating base to a longword exponent.
F-floating-point-base
OpenVMS usage: floating_point type: F_floating access: read only mechanism: by value
Base. The F-floating-point-base argument is an F-floating number containing the base.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 that contains the longword exponent.
OTS$POWRJ raises an F-floating base to a longword exponent.The internal calculations and the floating-point result have the same precision as the base value.
The floating-point result is as follows:
Base Exponent Result Any > 0 Product of ( base**2 i ), where i is each nonzero bit position in longword-integer-exponent. > 0 = 0 1.0 = 0 = 0 Undefined exponentiation. < 0 = 0 1.0 > 0 < 0 1.0/( base**2 i ), where i is each nonzero bit position in longword-integer-exponent. = 0 < 0 Undefined exponentiation. < 0 < 0 1.0/( base**2 i ), where i is each nonzero bit position in longword-integer-exponent. Floating-point overflow can occur.
Undefined exponentiation occurs if the base is zero and the exponent is zero or negative.
On Alpha systems, some restrictions apply when linking OTS$POWRJ. See Chapter 1 for more information about these restrictions.
SS$_FLTOVF Arithmetic trap. This error is signaled by the hardware if a floating-point overflow occurs. 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 F-floating-point-base is zero and longword-integer-exponent is zero or negative, or if F-floating-point-base is negative.
The Raise an F-Floating Base to an F-Floating Exponent routine raises an F-floating base to an F-floating exponent.
OTS$POWRR F-floating-point-base ,F-floating-point-exponent
OpenVMS usage: floating_point type: F_floating access: write only mechanism: by value
Result of raising an F-floating base to an F-floating exponent.
F-floating-point-base
OpenVMS usage: floating_point type: F_floating access: read only mechanism: by value
Base. The F-floating-point-base argument is an F-floating number containing the base.F-floating-point-exponent
OpenVMS usage: floating_point type: F_floating access: read only mechanism: by value
Exponent. The F-floating-point-exponent argument is an F-floating number that contains the exponent.
OTS$POWRR raises an F-floating base to an F-floating exponent.The internal calculations and the floating-point result have the same precision as the base value.
The F-floating result for OTS$POWRR is as follows:
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.
On Alpha systems, some restrictions apply when linking OTS$POWRR. See Chapter 1 for more information about these restrictions.
SS$_FLTOVF Arithmetic trap. This error is signaled by the hardware if a floating-point overflow occurs. 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 F-floating-point-base is zero and F-floating-point-exponent is zero or negative, or if F-floating-point-base is negative.
C+ C This Fortran example demonstrates the use C of OTS$POWRR, which raises an F-floating C point base to an F-floating point power. C- REAL*4 X,Y,RESULT,OTS$POWRR X = 8.0 Y = 2.0 C+ C The arguments of OTS$POWRR are passed by value. C- RESULT = OTS$POWRR(%VAL(X),%VAL(Y)) TYPE *,' 8.0**2.0 IS ',RESULT X = 9.0 Y = -0.5 C+ C In Fortran, OTS$POWRR is indirectly called by simply C using the exponentiation operator. C- RESULT = X**Y TYPE *,' 9.0**-0.5 IS ',RESULT END |
This Fortran example uses OTS$POWRR to raise an F-floating point base to an F-floating point exponent. The output generated by this program is as follows:
8.0**2.0 IS 64.00000 9.0**-0.5 IS 0.3333333
Previous | Next | Contents | Index |
Copyright © Compaq Computer Corporation 1998. All rights reserved. Legal |
5933PRO_007.HTML
|