Oooh, oooh, I know!

The difference is that, for example, .01 can be represented exactly in
decimal; but float types are binary, so .01 cannot be represented exactly.
This can lead to all kinds of trouble when doing arithmetic, the errors
accumulate. It's one reason why most people write their loops with "< x + 1"
rather than "= x". That gets past the problem, but if you are adding
together many values the final answer may be wrong.

Look at 23.1 of the manual.


Regards,

Jerry Schwartz
Global Information Incorporated
195 Farmington Ave.
Farmington, CT 06032

860.674.8796 / FAX: 860.674.8341

-----Original Message-----
From: Bruno Rodrigues Silva [mailto:[EMAIL PROTECTED]
Sent: Thursday, September 07, 2006 6:47 AM
To: mysql@lists.mysql.com
Subject: Decimal versus Float Point Type

Dear all.

The MySQL Manual inform that Decimal Data Type is used
for represent exact-number, but like Float Point Data
Type, Decimal use rounding case the fractional part is
not sufficient. Therefore, what the difference?

Regards


Bruno R. Silva




_______________________________________________________
Novidade no Yahoo! Mail: receba alertas de novas mensagens no seu celular.
Registre seu aparelho agora!
http://br.mobile.yahoo.com/mailalertas/



--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:
http://lists.mysql.com/[EMAIL PROTECTED]





-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:    http://lists.mysql.com/[EMAIL PROTECTED]

Reply via email to