hp.com home products and services support and drivers solutions how to buy
cd-rom home
End of Jump to page title
HP OpenVMS systems
documentation

Jump to content


HP OpenVMS RTL General Purpose (OTS$) Manual

HP OpenVMS RTL General Purpose (OTS$) Manual


Previous Contents Index


OTS$POWSJ

The Raise an IEEE S-Floating Base to a Longword Exponent routine raises an IEEE S-floating base to a longword exponent.

Format

OTS$POWSJ S-floating-point-base ,longword-integer-exponent


RETURNS


OpenVMS usage: floating_point
type: S_floating
access: write only
mechanism: by value

Result of raising an IEEE S-floating base to a longword exponent.


Arguments

S-floating-point-base


OpenVMS usage: floating_point
type: S_floating
access: read only
mechanism: by value

Base. The S-floating-point-base argument is an IEEE S-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.

Description

OTS$POWSJ raises an IEEE S-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 and I64 systems, some restrictions apply when linking OTS$POWSJ. See Chapter 1 for more information about these restrictions.


Condition Values Signaled

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 S-floating-point-base is zero and longword-integer-exponent is zero or negative, or if S-floating-point-base is negative.

OTS$POWSS

The Raise an IEEE S-Floating Base to an IEEE S-Floating Exponent routine raises a IEEE S-floating base to an IEEE S-floating exponent.

Format

OTS$POWSS S-floating-point-base ,S-floating-point-exponent


RETURNS


OpenVMS usage: floating_point
type: IEEE S_floating
access: write only
mechanism: by value

Result of raising an IEEE S-floating base to an IEEE S-floating exponent.


Arguments

S-floating-point-base


OpenVMS usage: floating_point
type: IEEE S_floating
access: read only
mechanism: by value

Base that OTS$POWSS raises to an IEEE S-floating exponent. The S-floating-point-base argument is an IEEE S-floating number containing the base.

S-floating-point-exponent


OpenVMS usage: floating_point
type: IEEE S_floating
access: read only
mechanism: by value

Exponent to which OTS$POWSS raises the base. The S-floating-point-exponent argument is an IEEE S-floating number containing the exponent.

Description

OTS$POWSS raises an IEEE S-floating base to an IEEE S-floating exponent.

The internal calculations and the floating-point result have the same precision as the base value.

The S-floating result for OTS$POWSS 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 and I64 systems, some restrictions apply when linking OTS$POWSS. See Chapter 1 for more information about these restrictions.


Condition Values Signaled

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 S-floating-point-base is zero and S-floating-point-exponent is zero or negative, or if S-floating-point-base is negative.

Example

The following example demonstrates the use of OTS$POWSS.


C+ 
C This Fortran example demonstrates the use of 
C OTS$POWSS, which raises an IEEE S-floating 
C point base to an IEEE S-floating point power. 
C- 
 
 OPTIONS /FLOAT=IEEE_FLOAT 
 
 REAL*4 X,Y,RESULT,OTS$POWSS 
 X = 10.0 
 Y = 3.0 
 
C+ 
C The arguments of OTS$POWSS are passed by value. 
C- 
 
 RESULT = OTS$POWSS(%VAL(X),%VAL(Y)) 
 TYPE *,' 10.0**3.0 IS ',RESULT 
 X = 9.0 
 Y = -0.5 
 
C+ 
C In Fortran, OTS$POWSS is indirectly called by 
C simply using the exponentiation operator. 
C- 
 
 RESULT = X**Y 
 TYPE *,' 9.0**-0.5 IS ',RESULT 
 END 

This Fortran example uses OTS$POWSS to raise an IEEE S-floating point base to an IEEE S-floating point exponent. The output generated by this program is as follows:


   10.0**3.0 IS    1000.000 
   9.0**-0.5 IS   0.3333333 


OTS$POWTJ

The Raise a T-Floating base to a Longword Exponent routine raises an IEEE T-floating base to a longword exponent.

Format

OTS$POWTJ T-floating-point-base ,longword-integer-exponent


RETURNS


OpenVMS usage: floating_point
type: IEEE T_floating
access: write only
mechanism: by value

Result of raising an IEEE T-floating base to a longword exponent.


Arguments

T-floating-point-base


OpenVMS usage: floating_point
type: IEEE T_floating
access: read only
mechanism: by value

Base. The T-floating-point-base argument is an IEEE T-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.

Description

OTS$POWTJ raises an IEEE T-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 and I64 systems, some restrictions apply when linking OTS$POWTJ. See Chapter 1 for more information about these restrictions.


Condition Values Signaled

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 T-floating-point-base is zero and longword-integer-exponent is zero or negative, or if T-floating-point-base is negative.

OTS$POWTT

The Raise an IEEE T-Floating Base to an IEEE T-Floating Exponent routine raises an IEEE T-floating base to an IEEE T-floating exponent.

Format

OTS$POWTT T-floating-point-base ,T-floating-point-exponent


RETURNS


OpenVMS usage: floating_point
type: IEEE T_floating
access: write only
mechanism: by value

Result of raising an IEEE T-floating base to an IEEE T-floating exponent.


Arguments

T-floating-point-base


OpenVMS usage: floating_point
type: IEEE T_floating
access: read only
mechanism: by value

Base that OTS$POWTT raises to an IEEE T-floating exponent. The T-floating-point-base argument is an IEEE T-floating number containing the base.

T-floating-point-exponent


OpenVMS usage: floating_point
type: IEEE T_floating
access: read only
mechanism: by value

Exponent to which OTS$POWTT raises the base. The T-floating-point-exponent argument is an IEEE T-floating number containing the exponent.

Description

OTS$POWTT raises an IEEE T-floating base to an IEEE T-floating exponent.

The internal calculations and the floating-point result have the same precision as the base value.

The T-floating result for OTS$POWTT 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 and I64 systems, some restrictions apply when linking OTS$POWTT. See Chapter 1 for more information about these restrictions.


Condition Values Signaled

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 T-floating-point-base is zero and T-floating-point-exponent is zero or negative, or if T-floating-point-base is negative.

Example

The following example demonstrates the use of OTS$POWTT.


C+ 
C This Fortran example demonstrates the use of 
C OTS$POWTT, which raises an IEEE T-floating 
C point base to an IEEE T-floating point power. 
C- 
 
 OPTIONS /FLOAT=IEEE_FLOAT 
 
 REAL*8 X,Y,RESULT,OTS$POWTT 
 X = 10.0 
 Y = 3.0 
 
C+ 
C The arguments of OTS$POWTT are passed by value. 
C- 
 
 RESULT = OTS$POWTT(%VAL(X),%VAL(Y)) 
 TYPE *,' 10.0**3.0 IS ',RESULT 
 X = 9.0 
 Y = -0.5 
 
C+ 
C In Fortran, OTS$POWTT is indirectly called by 
C simply using the exponentiation operator. 
C- 
 
 RESULT = X**Y 
 TYPE *,' 9.0**-0.5 IS ',RESULT 
 END 

This Fortran example uses OTS$POWTT to raise an IEEE T-floating point base to an IEEE T-floating point exponent. The output generated by this program is as follows:


   10.0**3.0 IS    1000.00000000000 
   9.0**-0.5 IS   0.333333333333333 


OTS$POWxLU

The Raise a Floating-Point Base to an Unsigned Longword Integer Exponent routines raise a floating-point base to an unsigned longword integer exponent.

Format

OTS$POWRLU floating-point-base ,unsigned-lword-int-exponent

OTS$POWDLU floating-point-base ,unsigned-lword-int-exponent

OTS$POWGLU floating-point-base ,unsigned-lword-int-exponent

OTS$POWSLU floating-point-base ,unsigned-lword-int-exponent

OTS$POWTLU floating-point-base ,unsigned-lword-int-exponent

OTS$POWHLU_R3 floating-point-base ,unsigned-lword-int-exponent (VAX only)


RETURNS


OpenVMS usage: floating_point
type: F_floating, D_floating, G_floating, H_floating, IEEE S_floating, IEEE T_floating
access: write only
mechanism: by value

Result of raising a floating-point base to an unsigned longword integer exponent. OTS$POWRLU returns an F-floating number. OTS$POWDLU returns a D-floating number. OTS$POWGLU returns a G-floating number. OTS$POWSLU returns an IEEE S-floating number. OTS$POWTLU returns an IEEE T-floating number.

On VAX systems, OTS$POWHLU_R3 returns an H-floating number.


Arguments

floating-point-base


OpenVMS usage: floating_point
type: F_floating, D_floating, G_floating, H_floating, IEEE S_floating, IEEE T_floating
access: read only
mechanism: by value

Floating-point base. The floating-point-base argument contains the value of the base. For OTS$POWRLU, floating-point-base is an F-floating number. For OTS$POWDLU, floating-point-base is a D-floating number. For OTS$POWGLU, floating-point-base is a G-floating number. For OTS$POWHLU_R3, floating-point-base is an H-floating number. For OTS$POWSLU, floating-point-base is an IEE S-floating number. For OTS$POWTLU, floating-point-base is an IEEE T-floating number.

unsigned-lword-int-exponent


OpenVMS usage: longword_unsigned
type: longword (unsigned)
access: read only
mechanism: by value

Integer exponent. The unsigned-lword-int-exponent argument contains the value of the unsigned longword integer exponent.

Description

The OTS$POWxLU routines return the result of raising a floating-point base to an unsigned longword integer exponent. 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

On Alpha and I64 systems, some restrictions apply when linking OTS$POWRLU, OTS$POWGLU, OTS$POWSLU, and OTS$POWTLU. See Chapter 1 for more information about these restrictions.


Condition Values Signaled

MTH$_FLOOVEMAT Floating-point overflow in math library.
MTH$_FLOUNDMAT Floating-point underflow in math library. This can only occur if the caller has floating-point underflow enabled.
MTH$_UNDEXP Undefined exponentiation. This occurs if both the floating-point-base and unsigned-longword-integer-exponent arguments are zero.


Previous Next Contents Index