-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 El Jueves 15 Noviembre 2001 13:15, escribiste: > Gyulay Gabor wrote: > > The problem is that I need to store numbers with lot more > > than 16 decimal digits - e.g. 1234567890123456789012345.12 > > [...] > > > > The reason is why we need this that there're several > > currencies (like italian lire) which requires this kind of > > precision. > > Excellent answer from Carl. > > Generally, you don't want to store currencies in floating point, > anyway, and it's unfortunate that MySQL implements DECIMAL as > floating point rather than a variable-length BCD (which is exact).
The manual defines DECIMAL as an "exact numeric data type" (page 141), since it stores the number as a string, preserving its exactness. How you manipulate this number inside your program is another story, and this may be the cause of confusion. I program accounting systems and always use at least a double. Unfortunately, BCD math is not available for all compilers (Borland is where I saw it last). - -- Alfredo J. Cole Tegucigalpa, D. C., Honduras http://www.acyc.com (Accounting Systems) http://www.clshonduras.com (Linux Hardware) -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.0.6 (GNU/Linux) Comment: For info see http://www.gnupg.org iD8DBQE79ByQu5DxuPWE298RAg7wAJ0VEmTKBAqRR8id4P5GtTcujm4qwgCeNKnI mGE8Qs1eZUAMK1RuztZCvc4= =KRNI -----END PGP SIGNATURE----- --------------------------------------------------------------------- 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