> > Those binary representations can be converted back into precise decimal > representations, but those decimal representations will not be the original > decimal values, because they were translated from decimal strings into > binary floating-point values and back into decimal strings. > > -scott
This explains the deficiency in the SQLite print function, but it doesn't have to be that way. See: Steele, Jr., Guy L., and White, Jon L. How to print floating-point numbers accurately. In Proc. ACM SIGPLAN ?90 Conf. Prog. Lang. Design and Implementation. ACM (White Plains, NY, June 1990), 112?126. ACM SIGPLAN Notices 25, 6 (June 1990). A retrospective by Steele & White is here: http://grouper.ieee.org/groups/754/email/pdfq3pavhBfih.pdf I'm not advocating that SQLite add Steele & White's Dragon algorithm, just pointing out that there are ways to fix the deficiency. e -- Doug Currie doug.currie at gmail.com