Document revision date: 19 July 1999 | |
Previous | Contents | Index |
The Raise a D-Floating Base to a Longword Exponent routine raises a D-floating base to a longword exponent.
OTS$POWDJ D-floating-point-base ,longword-integer-exponent
OpenVMS usage: floating_point type: D_floating access: write only mechanism: by value
Result of raising a D-floating base to a longword 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.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 integer exponent.
OTS$POWDJ raises a D-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 D-floating-point-base is zero and longword-integer-exponent is zero or negative, or if the D-floating-point-base is negative.
The Raise a D-Floating Base to an F-Floating Exponent routine raises a D-floating base to an F-floating exponent.
OTS$POWDR D-floating-point-base ,F-floating-point-exponent
OpenVMS usage: floating_point type: D_floating access: write only mechanism: by value
Result of raising a D-floating base to an F-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.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$POWDR raises a D-floating base to an F-floating exponent.The internal calculations and the floating-point result have the same precision as the base value.
OTS$POWDR converts the F-floating exponent to a D-floating number. The D-floating result for OTS$POWDR 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.
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 D-floating-point-base is zero and F-floating-point-exponent is zero or negative, or if the D-floating-point-base is negative.
The Raise a G-Floating Base to a G-Floating Exponent routine raises a G-floating base to a G-floating exponent.
OTS$POWGG G-floating-point-base ,G-floating-point-exponent
OpenVMS usage: floating_point type: G_floating access: write only mechanism: by value
Result of raising a G-floating base to a G-floating exponent.
G-floating-point-base
OpenVMS usage: floating_point type: G_floating access: read only mechanism: by value
Base that OTS$POWGG raises to a G-floating exponent. The G-floating-point-base argument is a G-floating number containing the base.G-floating-point-exponent
OpenVMS usage: floating_point type: G_floating access: read only mechanism: by value
Exponent to which OTS$POWGG raises the base. The G-floating-point-exponent argument is a G-floating number containing the exponent.
OTS$POWGG raises a G-floating base to a G-floating exponent.The internal calculations and the floating-point result have the same precision as the base value.
The G-floating result for OTS$POWGG 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$POWGG. 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 exponent. This error is signaled if G-floating-point-base is zero and G-floating-point-exponent is zero or negative, or if G-floating-point-base is negative.
C+ C This example demonstrates the use of OTS$POWGG, C which raises a G-floating point base C to a G-floating point power. C- REAL*8 X,Y,RESULT,OTS$POWGG C+ C The arguments of OTS$POWGG are passed by value. Fortran can C only pass INTEGER and REAL*4 expressions as VALUE. Since C INTEGER and REAL*4 values are one longword long, while REAL*8 C values are two longwords long, equate the base (and power) to C two-dimensional INTEGER vectors. These vectors will be passed C by VALUE. C- INTEGER N(2),M(2) EQUIVALENCE (N(1),X), (M(1),Y) X = 8.0 Y = 2.0 C+ C To pass X by value, pass N(1) and N(2) by value. Similarly for Y. C- RESULT = OTS$POWGG(%VAL(N(1)),%VAL(N(2)),%VAL(M(1)),%VAL(M(2))) TYPE *,' 8.0**2.0 IS ',RESULT X = 9.0 Y = -0.5 C+ C In Fortran, OTS$POWWGG is indirectly called by simply using the C exponentiation operator. C- RESULT = X**Y TYPE *,' 9.0**-0.5 IS ',RESULT END |
This Fortran example uses OTS$POWGG to raise a G-floating base to a G-floating exponent.
The output generated by this example is as follows:
8.0**2.0 IS 64.0000000000000 9.0**-0.5 IS 0.333333333333333
The Raise a G-Floating Base to a Longword Exponent routine raises a G-floating base to a longword exponent.
OTS$POWGJ G-floating-point-base ,longword-integer-exponent
OpenVMS usage: floating_point type: G_floating access: write only mechanism: by value
Result of raising a G-floating base to a longword exponent.
G-floating-point-base
OpenVMS usage: floating_point type: G_floating access: read only mechanism: by value
Base that OTS$POWGJ raises to a longword exponent. The G-floating-point-base argument is a G-floating number containing the base.longword-integer-exponent
OpenVMS usage: longword_signed type: longword (signed) access: read only mechanism: by value
Exponent to which OTS$POWGJ raises the base. The longword-integer-exponent argument is a signed longword containing the exponent.
OTS$POWGJ raises a G-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$POWGJ. 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 exponent. This error is signaled if G-floating-point-base is zero and longword-integer-exponent is zero or negative, or if G-floating-point-base is negative.
On VAX systems, the Raise an H-Floating Base to an H-Floating Exponent routine raises an H-floating base to an H-floating exponent.
OTS$POWHH_R3 H-floating-point-base ,H-floating-point-exponent
OpenVMS usage: floating_point type: H_floating access: write only mechanism: by value
Result of raising an H-floating base to an H-floating 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.H-floating-point-exponent
OpenVMS usage: floating_point type: H_floating access: read only mechanism: by value
Exponent. The H-floating-point-exponent argument is an H-floating number that contains the H-floating exponent.
OTS$POWHH_R3 raises an H-floating base to an H-floating exponent.The internal calculations and the floating-point result have the same precision as the base value.
The H-floating result for OTS$POWHH_R3 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 H-floating-point-base is zero and H-floating-point-exponent is zero or negative, or if the H-floating-point-base is negative.
C+ C Example of OTS$POWHH, which raises an H_floating C point base to an H_floating point power. In Fortran, C it is not directly called. C- REAL*16 X,Y,RESULT X = 9877356535.0 Y = -0.5837653 C+ C In Fortran, OTS$POWWHH is indirectly called by simply using the C exponentiation operator. C- RESULT = X**Y TYPE *,' 9877356535.0**-0.5837653 IS ',RESULT END |
This Fortran example demonstrates how to call OTS$POWHH_R3 to raise an H-floating base to an H-floating power.
The output generated by this program is as follows:
9877356535.0**-0.5837653 IS 1.463779145994628357482343598205427E-0006
Previous | Next | Contents | Index |
privacy and legal statement | ||
5933PRO_006.HTML |