Re: [Mysql-cocoa-users] decimal(5,2) strange behaviour wityh value "0.07"
Brought to you by:
sergecohen
From: Serge C. <ser...@us...> - 2005-07-27 11:10:18
|
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Hi Ferdinando; Indeed it is somehow a bug, the problem is that when the framework is =20= retrieving a decimal number from the database, it uses a =20 NSNumberWithFloat (basicaly a float or a double), for which the two =20 values are identical (within the precision range of the binary =20 representation). I have to check how 'decimal' columns are flagged by the =20 libmysqlcient... if there is a way to tell from the API it is a =20 decimal and not a REAL (or float...), then it is eeasy to modify the =20 framework so that it will use NSDecimalNumber instead of NSNumber for =20= these columns. I'll try to check in the next days and mail back to =20 give more precisions. Serge. Le 25 juil. 05 =E0 19:06, Ferdinando Pucci a =E9crit : > Hi, when i insert the value o.07 in a decimal field (lenght 5,2) =20 > cocoamysql inserts 0,07000000000000001. Is that a little bug? Thank =20= > you > > > > > > ___________________________________ Yahoo! Mail: gratis 1GB per i =20 > messaggi e allegati da 10MB http://mail.yahoo.it > > > > ------------------------------------------------------- > SF.Net email is sponsored by: Discover Easy Linux Migration Strategies > from IBM. Find simple to follow Roadmaps, straightforward articles, > informative Webcasts and more! Get everything you need to get up to > speed, fast. http://ads.osdn.com/?ad_id=3D7477&alloc_id=3D16492&op=3Dcli= ck > _______________________________________________ > Mysql-cocoa-users mailing list > Mys...@li... > https://lists.sourceforge.net/lists/listinfo/mysql-cocoa-users > > -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.1 (Darwin) iD8DBQFC52uJ5EPeG5y7WPsRAnWFAKCK8nFXGmkMwIyVCKLS0VJ7GfaIlgCfcGW2 05mpCagzRu4AxhIfXVsgyDY=3D =3DkmA3 -----END PGP SIGNATURE----- |