James wrote regarding 'RE: [EE] calculation accuracy in compilers' on Fri, Dec 02 at 12:36: > Any yet there is not a SINGLE computer language that tracks the actual > precision of calculations! E.g. When you multiply 1 byte times another 1 > byte the result should be stored in 2 bytes. If you add 1 bytes to another 1 > byte, the result should be stored in 2 bytes with only the lowest bit of the > second byte used. I'm pretty sure that calculational precision and proper use of significant figures are distinct topics if you include division. :) Is 1.0/3.0 0.333 (two significant digits plus one additional estimated figure) or 0.33333... (infinitely precise)? Is .1 - .0006 equal to .10 or .0004? The language needs to know that .1 isn't the same as .1000 somehow. Besides, aren't the lots of arbitrary precision math libraries out there? Or are we limiting this to "things that generate code for PICs"? http://www.perl.com/doc/manual/html/lib/Math/BigInt.html comes to mind first (since I use it regularly), as does Math::BigFloat, but similar packages exist for most high-level languages I'm familiar with. --Danny -- http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist