[fpc-devel] MySQL 5.1 and Double (trouble)

Ludo Brands ludo.brands at free.fr
Mon Jul 11 11:53:09 CEST 2011


> 
> 1.) Update Value                  : 40734.825668912039
> 2.) Actual Value after update : 40734.825668912
> 3.) Actual Value on read       : 40734.825668912003
> 

Several things here:
- floattostr(40734.825668912039) equals 40734.825668912.
- update table set t_double = 40734.825668912039 where id =123; in the mysql
client or the MySQL browser returns 40734.825668912 on a subsequent select
(mysql 5.0.51 ubuntu) 
- 40734.825668912003 and 40734.825668912039 are beyond the precision of ieee
double (2^52 = 4503599627370496 values which is 15 digits) 

How do you get the 40734.825668912003 value?

Ludo



 




More information about the fpc-devel mailing list