Something to ponder. For the most part, the decimal point is arbitrary. If you are going to work with numbers limited to the range of 0.0 thru 6553.5, just use a WORD type variable, forget about the decimal point, and when a human will read it, plop a "." between the 1st and 2nd digits (counting from the right). It's a simplistic explaination, but hopefully you get the point and can extrapolate from there. More "accuracy", you are limited to 0.00 thru 655.35.
Beyound that, there are FP routines that you can get from MeLabs website. Knock yourself out!
SteveB




Bookmarks