Values in double fields are not stored as I specified.

2009-08-28 Thread sarah.kho
Hi I have some double field in my tables and when I looked into the database using sql client I saw that values that I inserted into the database are changed. for example: 2.30 is stored as 2.29952316284 1.7 is stored as 1.700476837158 I am using JPA, the property type in JPA entities

Re: Values in double fields are not stored as I specified.

2009-08-28 Thread Sylvain Leroux
sarah.kho a écrit : Hi I have some double field in my tables and when I looked into the database using sql client I saw that values that I inserted into the database are changed. for example: 2.30 is stored as 2.29952316284 1.7 is stored as 1.700476837158 I am using JPA, the property

Re: Values in double fields are not stored as I specified.

2009-08-28 Thread Mark Thornton
Sylvain Leroux wrote: sarah.kho a écrit : Hi I have some double field in my tables and when I looked into the database using sql client I saw that values that I inserted into the database are changed. for example: 2.30 is stored as 2.29952316284 1.7 is stored as 1.700476837158 I am

Re: Values in double fields are not stored as I specified.

2009-08-28 Thread Sylvain Leroux
Bien vu, Mark! In this particular case the original double value is also being cast to 'float' at some point and thus losing about 7 extra digits of accuracy. Mark Thornton Was the table be created by JPA? What's the type of the corresponding column? -- Website: http://www.chicoree.fr