piclist 2001\06\01\132950a >
Thread: Brain Burp Rounding??
www.piclist.com/techref/index.htm?key=brain+burp+rounding
flavicon
face BY : Paul Hutchinson email (remove spam text)



You got the rounding correct, by anyone's method :-).

But, if the input value can be > 0.99804 it will overflow the 8 bits.

To make it work for any value < 1 you should multiply by 255.

Paul

{Quote hidden}

--
http://www.piclist.com hint: PICList Posts must start with ONE topic:
[PIC]:,[SX]:,[AVR]: ->uP ONLY! [EE]:,[OT]: ->Other [BUY]:,[AD]: ->Ads


<NEBBIAPOKDMDBDIDBPJPGEMCDIAA.phutchinson@imtra.com> 7bit

In reply to: <3B17B80A.903@ezy.net.au>
See also: www.piclist.com/techref/index.htm?key=brain+burp+rounding
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) Brain Burp Rounding??

month overview.

new search...