integerdivq2exp - Maple Help
For the best experience, we recommend viewing online help using Google Chrome or Microsoft Edge.

Online Help

All Products    Maple    MapleSim


integermul2exp

multiply an integer by a power of 2

integerdivq2exp

divide an integer by a power of 2

 

Calling Sequence

Parameters

Description

Thread Safety

Examples

Compatibility

Calling Sequence

integermul2exp(i,pow)

integerdivq2exp(i,pow)

Parameters

i

-

integer

pow

-

integer

Description

• 

The integerdivq2exp and integermul2exp commands provide what are considered hardware bit-shift operations.  They are fast methods for dividing or multiplying an integer by a power of 2.  integermul2exp computes i*2^pow, and integerdivq2exp calculates trunc(i / 2^pow).  

Thread Safety

• 

The integermul2exp and integerdivq2exp commands are thread-safe as of Maple 2023.

• 

For more information on thread safety, see index/threadsafe.

Examples

integermul2exp10,41024

0

(1)

integerdivq2exp255,4trunc25524

0

(2)

Compatibility

• 

The integermul2exp and integerdivq2exp commands were introduced in Maple 2023.

• 

For more information on Maple 2023 changes, see Updates in Maple 2023.

See Also

Bits