From: root AT gameboutique DOT co (Super-User) Newsgroups: comp.os.msdos.djgpp Subject: Re: fixed point math: NEED HELP QUICK! Date: 29 Jan 1997 19:46:02 GMT Organization: UUNet PIPEX server (post doesn't reflect views of UUNet PIPEX) Lines: 29 Message-ID: <5co9dq$hu3@flex.uunet.pipex.com> References: <5clmjm$ee3 AT nr1 DOT toronto DOT istar DOT net> NNTP-Posting-Host: www.gameboutique.com Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp [Posted and mailed] > I'm having some rather strange problems with fixed point math that I'd > like to clear up really quick. I've already taken to much time on this > function. Anyway, here's my problem; To my understanding the following > are 100% equal: > > other_stuff = stuff / 256; > other_stuff = stuff << 8; well the biggest problem is they aren't equal :) << shifts left by 8 places which is the same as *multiplying* by 256 division would be >> regards, nik -- Graham Tootell GameBoutique Ltd. - THE online gaming experience nikki AT gameboutique DOT com http://www.gameboutique.com