On 13 Nov 2001 02:02:47PM +0800, fooler ([EMAIL PROTECTED]) said:

> id rather use binary AND than MOD if the modulus is power of 2
> x =  y MOD 16
> is equal to
> x = y AND (NOT 16)

I'll do a little nitpicking here and point out that generally

x = y & 15

would be better, since ~16 not only takes up a bit more processing but
also could result in some very strange answers depending on your
computer's idea of not... <g> I've never tried it, but it sorta makes
sense considering what we learned in computer architecture.
-- 
Sacha Chua <[EMAIL PROTECTED]>                       3 BS CS geek =)
Ateneo Cervini-Eliazo Networks (ACENT) tel: 63(2) 426-6001 loc 5925
BOFH excuse #341: HTTPD Error 666 : BOFH was here
_
Philippine Linux Users Group. Web site and archives at http://plug.linux.org.ph
To leave: send "unsubscribe" in the body to [EMAIL PROTECTED]

To subscribe to the Linux Newbies' List: send "subscribe" in the body to 
[EMAIL PROTECTED]

Reply via email to