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
integermul2exp(i,pow)
integerdivq2exp(i,pow)
i
-
integer
pow
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).
The integermul2exp and integerdivq2exp commands are thread-safe as of Maple 2023.
For more information on thread safety, see index/threadsafe.
integermul2exp⁡10,4−10⁢24
0
integerdivq2exp⁡255,4−trunc⁡25524
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
Download Help Document