Hi. I have some problems to retrieve the doubles I write in my tables. I use MySQL server 4.0.3-beta-max.
I have not found the solution of my problem on the mailing-lis archive. Following is the problem: mysql> create table double_test (d double); mysql> insert into double_test values(1.7976931348623157E308); mysql> insert into double_test values(0.10012210012209899); mysql> select * from double_test; +-----------------------+ | d | +-----------------------+ | 1.79769313486232e+308 | ==> truncation happened | 0.100122100122099 | ==> truncation happened +-----------------------+ The numbers are truncated. Why and how to avoid it ? I would like store and retrieve the double values without modification. In my Java program when I read back the data, 1.79769313486232e+308 is considered as 'Infinity' because after the truncation and rounding, the value becomes bigger than the maximum double value allowed (1.7976931348623157E308 under Java). When I use double(M,D) instead of double in the table creation, the insertion of 1.7976931348623157E308 leads to the value 'inf' when I read back the value by typing 'select * from ouble_test'). Any idea or experience to share. Thanks in advance, Christophe. *** Christophe DIARRA Institut de Physique Nucleaire 15, Rue Georges Clemenceau Bat 102 - S2I 91406 ORSAY Cedex Tel: (33) 1 69 15 65 60 Fax: (33) 1 69 15 45 03 (33) 1 69 15 64 70 E-mail: [EMAIL PROTECTED] *** --------------------------------------------------------------------- Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail <[EMAIL PROTECTED]> To unsubscribe, e-mail <[EMAIL PROTECTED]> Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php