> As shown by my previous post, this is really not necessary. You > can just scan the value from left to right, pretending it is an integer, > but remembering where the decimal point is. When you are done > you simply multiply by 10 as many times as needed to scale the > final result to two decimal places After I made a correction to a post "My mistake - 1023 * ( 13.5 / 15 )" I realised that some of what I was looking for is right there. Using your method above, the 13.5 is converted to 13500 so it can be compared to 15000. It looks like some magnitude detection is going to be necessary, whichever method is used. I see now that there is no "magic" way (fingers crossed for a table) to do this and also to cover so many permutations, except for the brute force way that Olin suggested. This is what I'd been trying up to now, partly to test the system, partly to see code working in front of me in the hope of an epiphany It's helped to see that I wasn't too far off the mark, and I appreciate everyone's ideas -- http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist