2010-03-20, 08:22 PM
Devil's Sunrise Wrote:SAR has a lot of names.
For positive y, can be defined as
SAR(x,y) = x >> y = floor(x/pow(2, y))
SAR(x, -y) = x << y = x * pow(2, y)
And so forth. Also named bitshifting.
and additionally according to the magical numbers rules, each whole positive 32bit integer "a" between 2 and 4,294,967,295 has a magical number m and a shift count s that make the equation (x / a) == SHR((x * m), (s + 32)) where x is a whole signed 32bit integer.
Computer mathematics, pineapple yea.

