SCALE

Elemental Intrinsic Function (Generic): Returns the value of the exponent part (of the model for the argument) changed by a specified value.

Syntax

result = SCALE (x, i)

x
(Input) Must be of type real.

i
(Input) Must be of type integer.

Results:

The result type is the same as x. The result has the value x x bi. Parameter b is defined in Model for Real Data.

Compatibility

CONSOLE STANDARD GRAPHICS QUICKWIN GRAPHICS WINDOWS DLL LIB

See Also: LSHIFT, Data Representation Models

Examples

If 3.0 is a REAL(4) value, SCALE (3.0, 2) has the value 12.0 and SCALE (3.0, 3) has the value 24.0.

The following shows another example:

REAL r
r = SCALE(5.2, 2)     !returns 20.8