Shr()

From TinyMUX
Jump to navigation Jump to search

Description

FUNCTION: shr(number,count)

Performs a rightwards bit-shift on number, shifting it <count> times. This is equivalent to idiv('number,pow(2,count), but much faster.

Related Topics: shl(), band(), bnand(), bor(), bxor().

Examples

> think shr(1309,5)
40


(--Soylent 00:39, 3 December 2005 (EST))