liubin liu wrote: > Now I use the sqlite3_mprintf() and the "%f" to get the double num. My code > is below. > > Now there is a num like "212345678901234567890123456.988290112". With the > way of "sqlite3_mprintf()" and "%f", the num is cut to > "212345678901234600000000000.000000". > > > How to input the num "212345678901234567890123456.988290112"?
double has 53 bits to represent the mantissa. This is good for 15-16 decimal digits, which is what you see. You can't possibly hope to accurately represent 36 significant digits in a double - even at 3 bits per digit, that would require at least 14 bytes, and double is only 8 bytes large. See also http://dlc.sun.com/pdf/800-7895/800-7895.pdf Igor Tandetnik _______________________________________________ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users