RAISE2

RAISE2(x,n) returns the value x*(2**n).

Read syntax diagramSkip visual syntax diagram
>>-RAISE2(x,n)-------------------------------------------------><

x
Expression. x must have a computational type.
n
Expression. n must have a computational type.

If x is REAL FIXED BIN(p,0) and SIGNED, the result is SIGNED REAL FIXED BIN(r,0) where if p <= M1, r = M1; if p > M1, r = M2.

If x is REAL FIXED BIN(p,0) and UNSIGNED, the result is UNSIGNED REAL FIXED BIN(r+1,0) where if p <= (M1+1), r = (M1+1); if p > (M1+1), r = (M2+1).

Otherwise, x is converted to SIGNED REAL FIXED BIN(p,0) and the result has the same attributes as above.

If n is negative or if n is greater than r, the result is undefined.

Note: RAISE2(x,n) is equivalent to the assembler SLA(x,n).

Example

  raise2(6,1)                    /*  produces 12  */





Published: 23 December 2018