Any clever implementations of rounding out there ?
Roman Black email (remove spam text)
Kübek Tony wrote:
Tony, the best way is if you can keep rounding
to a binary mulitple.
Just add half of the rounding total,
then clear the low bits.
Example, to round to the nearest 256;
add 128 to the number,
clear the bottom 8 bits.
http://www.piclist.com hint: The PICList is archived three different
ways. See http://www.piclist.com/#archives for details.
See also: www.piclist.com/techref/microchip/devices.htm?key=pic
You must be a member of the
piclist mailing list
(not only a www.piclist.com member) to post to the