piclist 1999\10\01\130113a >
Thread: Doing percentage or ratio-Thanks
www.piclist.com/techref/index.htm?key=doing+percentage
picon face BY : Harold M Hallikainen email (remove spam text)



On Fri, 1 Oct 1999 07:41:24 +0100 Michael Rigby-Jones
<spammrjones@spam@spamRemoveMENORTELNETWORKS.COM> writes:
{Quote hidden}

       What I did in this situation was to divide by 256 (throw away the
lower 8 bits) AND, if the MSB of the second operand was set, I
incremented the result.  This seemed to work pretty well.  An obvious
error of one bit appears at the low end (using 0x00 and 0xff results in
0x01)...  Maybe I'll mess with it a bit more...   Anyone see a quick and
dirty way to divide a 16 bit number by 255?

Harold


Harold Hallikainen
@spam@haroldspamhallikainen.com
Hallikainen & Friends, Inc.
See the FCC Rules at http://hallikainen.com/FccRules and comments filed
in LPFM proceeding at http://hallikainen.com/lpfm

___________________________________________________________________
Get the Internet just the way you want it.
Free software, free e-mail, and free Internet access for a month!
Try Juno Web: dl.http://www.juno.com/dynoget/tagj.

<19991001.100249.12663.2.HaroldHallikainen@juno.com>

See also: www.piclist.com/techref/index.htm?key=doing+percentage
Reply You must be a member of the piclist mailing list (not only a www.piclist.com member) to post to the piclist. This form requires JavaScript and a browser/email client that can handle form mailto: posts.
Subject (change) Doing percentage or ratio-Thanks

month overview.

new search...