
HP OpenVMS RTL General Purpose (OTS$) Manual
OTS$POWSJ
The Raise an IEEE SFloating Base to a Longword Exponent routine raises
an IEEE Sfloating base to a longword exponent.
Format
OTS$POWSJ Sfloatingpointbase ,longwordintegerexponent
RETURNS
OpenVMS usage: 
floating_point 
type: 
S_floating 
access: 
write only 
mechanism: 
by value 
Result of raising an IEEE Sfloating base to a longword exponent.
Arguments
Sfloatingpointbase
OpenVMS usage: 
floating_point 
type: 
S_floating 
access: 
read only 
mechanism: 
by value 
Base. The Sfloatingpointbase argument is an IEEE
Sfloating number containing the base.
longwordintegerexponent
OpenVMS usage: 
longword_signed 
type: 
longword (signed) 
access: 
read only 
mechanism: 
by value 
Exponent. The longwordintegerexponent argument is a
signed longword that contains the longword exponent.
Description
OTS$POWSJ raises an IEEE Sfloating base to a longword exponent.
The internal calculations and the floatingpoint result have the same
precision as the base value.
The floatingpoint result is as follows:
Base 
Exponent 
Result 
Any

> 0

Product of (
base**2
^{
i
}
), where
i is each nonzero bit position in
longwordintegerexponent.

> 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
longwordintegerexponent.

= 0

< 0

Undefined exponentiation.

< 0

< 0

1.0/(
base**2
^{
i
}
), where
i is each nonzero bit position in
longwordintegerexponent.

Floatingpoint 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
floatingpoint overflow occurs.

MTH$_FLOOVEMAT

Floatingpoint overflow in math library.

MTH$_FLOUNDMAT

Floatingpoint underflow in math library.

MTH$_UNDEXP

Undefined exponentiation. This error is signaled if
Sfloatingpointbase is zero and
longwordintegerexponent is zero or negative, or if
Sfloatingpointbase is negative.

OTS$POWSS
The Raise an IEEE SFloating Base to an IEEE SFloating Exponent
routine raises a IEEE Sfloating base to an IEEE Sfloating exponent.
Format
OTS$POWSS Sfloatingpointbase ,Sfloatingpointexponent
RETURNS
OpenVMS usage: 
floating_point 
type: 
IEEE S_floating 
access: 
write only 
mechanism: 
by value 
Result of raising an IEEE Sfloating base to an IEEE Sfloating
exponent.
Arguments
Sfloatingpointbase
OpenVMS usage: 
floating_point 
type: 
IEEE S_floating 
access: 
read only 
mechanism: 
by value 
Base that OTS$POWSS raises to an IEEE Sfloating exponent. The
Sfloatingpointbase argument is an IEEE Sfloating
number containing the base.
Sfloatingpointexponent
OpenVMS usage: 
floating_point 
type: 
IEEE S_floating 
access: 
read only 
mechanism: 
by value 
Exponent to which OTS$POWSS raises the base. The
Sfloatingpointexponent argument is an IEEE
Sfloating number containing the exponent.
Description
OTS$POWSS raises an IEEE Sfloating base to an IEEE Sfloating exponent.
The internal calculations and the floatingpoint result have the same
precision as the base value.
The Sfloating 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)]
}

Floatingpoint 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
floatingpoint overflow occurs.

MTH$_FLOOVEMAT

Floatingpoint overflow in math library.

MTH$_FLOUNDMAT

Floatingpoint underflow in math library.

MTH$_UNDEXP

Undefined exponent. This error is signaled if
Sfloatingpointbase is zero and
Sfloatingpointexponent is zero or negative, or if
Sfloatingpointbase 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 Sfloating
C point base to an IEEE Sfloating 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 Sfloating point
base to an IEEE Sfloating 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 TFloating base to a Longword Exponent routine raises an
IEEE Tfloating base to a longword exponent.
Format
OTS$POWTJ Tfloatingpointbase ,longwordintegerexponent
RETURNS
OpenVMS usage: 
floating_point 
type: 
IEEE T_floating 
access: 
write only 
mechanism: 
by value 
Result of raising an IEEE Tfloating base to a longword exponent.
Arguments
Tfloatingpointbase
OpenVMS usage: 
floating_point 
type: 
IEEE T_floating 
access: 
read only 
mechanism: 
by value 
Base. The Tfloatingpointbase argument is an IEEE
Tfloating number containing the base.
longwordintegerexponent
OpenVMS usage: 
longword_signed 
type: 
longword (signed) 
access: 
read only 
mechanism: 
by value 
Exponent. The longwordintegerexponent argument is a
signed longword that contains the longword exponent.
Description
OTS$POWTJ raises an IEEE Tfloating base to a longword exponent.
The internal calculations and the floatingpoint result have the same
precision as the base value.
The floatingpoint result is as follows:
Base 
Exponent 
Result 
Any

> 0

Product of (
base**2
^{
i
}
), where
i is each nonzero bit position in
longwordintegerexponent.

> 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
longwordintegerexponent.

= 0

< 0

Undefined exponentiation.

< 0

< 0

1.0/(
base**2
^{
i
}
), where
i is each nonzero bit position in
longwordintegerexponent.

Floatingpoint 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
floatingpoint overflow occurs.

MTH$_FLOOVEMAT

Floatingpoint overflow in math library.

MTH$_FLOUNDMAT

Floatingpoint underflow in math library.

MTH$_UNDEXP

Undefined exponentiation. This error is signaled if
Tfloatingpointbase is zero and
longwordintegerexponent is zero or negative, or if
Tfloatingpointbase is negative.

OTS$POWTT
The Raise an IEEE TFloating Base to an IEEE TFloating Exponent
routine raises an IEEE Tfloating base to an IEEE Tfloating exponent.
Format
OTS$POWTT Tfloatingpointbase ,Tfloatingpointexponent
RETURNS
OpenVMS usage: 
floating_point 
type: 
IEEE T_floating 
access: 
write only 
mechanism: 
by value 
Result of raising an IEEE Tfloating base to an IEEE Tfloating
exponent.
Arguments
Tfloatingpointbase
OpenVMS usage: 
floating_point 
type: 
IEEE T_floating 
access: 
read only 
mechanism: 
by value 
Base that OTS$POWTT raises to an IEEE Tfloating exponent. The
Tfloatingpointbase argument is an IEEE Tfloating
number containing the base.
Tfloatingpointexponent
OpenVMS usage: 
floating_point 
type: 
IEEE T_floating 
access: 
read only 
mechanism: 
by value 
Exponent to which OTS$POWTT raises the base. The
Tfloatingpointexponent argument is an IEEE
Tfloating number containing the exponent.
Description
OTS$POWTT raises an IEEE Tfloating base to an IEEE Tfloating exponent.
The internal calculations and the floatingpoint result have the same
precision as the base value.
The Tfloating 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)]
}

Floatingpoint 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
floatingpoint overflow occurs.

MTH$_FLOOVEMAT

Floatingpoint overflow in math library.

MTH$_FLOUNDMAT

Floatingpoint underflow in math library.

MTH$_UNDEXP

Undefined exponent. This error is signaled if
Tfloatingpointbase is zero and
Tfloatingpointexponent is zero or negative, or if
Tfloatingpointbase 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 Tfloating
C point base to an IEEE Tfloating 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 Tfloating point
base to an IEEE Tfloating 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 FloatingPoint Base to an Unsigned Longword Integer
Exponent routines raise a floatingpoint base to an unsigned longword
integer exponent.
Format
OTS$POWRLU floatingpointbase ,unsignedlwordintexponent
OTS$POWDLU floatingpointbase ,unsignedlwordintexponent
OTS$POWGLU floatingpointbase ,unsignedlwordintexponent
OTS$POWSLU floatingpointbase ,unsignedlwordintexponent
OTS$POWTLU floatingpointbase ,unsignedlwordintexponent
OTS$POWHLU_R3 floatingpointbase ,unsignedlwordintexponent (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 floatingpoint base to an unsigned longword integer
exponent. OTS$POWRLU returns an Ffloating number. OTS$POWDLU returns a
Dfloating number. OTS$POWGLU returns a Gfloating number. OTS$POWSLU
returns an IEEE Sfloating number. OTS$POWTLU returns an IEEE
Tfloating number.
On VAX systems, OTS$POWHLU_R3 returns an Hfloating number.
Arguments
floatingpointbase
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 
Floatingpoint base. The floatingpointbase argument
contains the value of the base. For OTS$POWRLU,
floatingpointbase is an Ffloating number. For
OTS$POWDLU, floatingpointbase is a Dfloating
number. For OTS$POWGLU, floatingpointbase is a
Gfloating number. For OTS$POWHLU_R3,
floatingpointbase is an Hfloating number. For
OTS$POWSLU, floatingpointbase is an IEE Sfloating
number. For OTS$POWTLU, floatingpointbase is an IEEE
Tfloating number.
unsignedlwordintexponent
OpenVMS usage: 
longword_unsigned 
type: 
longword (unsigned) 
access: 
read only 
mechanism: 
by value 
Integer exponent. The unsignedlwordintexponent
argument contains the value of the unsigned longword integer exponent.
Description
The OTS$POWxLU routines return the result of raising a
floatingpoint base to an unsigned longword integer exponent. The
floatingpoint result is as follows:
Base 
Exponent 
Result 
Any

> 0

Product of (
base*2
^{
i
}
), where
i is each nonzero bit position in
longwordintegerexponent.

> 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

Floatingpoint overflow in math library.

MTH$_FLOUNDMAT

Floatingpoint underflow in math library. This can only occur if the
caller has floatingpoint underflow enabled.

MTH$_UNDEXP

Undefined exponentiation. This occurs if both the
floatingpointbase and
unsignedlongwordintegerexponent arguments are zero.

