MySQL Forums
Forum List  »  Newbie

Re: Bug in the floating point value
Posted by: Mark Snyder
Date: April 09, 2009 08:40AM

Bug or feature?

From the manual:

MySQL allows a non-standard syntax: FLOAT(M,D) or REAL(M,D) or DOUBLE PRECISION(M,D). Here, “(M,D)” means than values can be stored with up to M digits in total, of which D digits may be after the decimal point. For example, a column defined as FLOAT(7,4) will look like -999.9999 when displayed. MySQL performs rounding when storing values, so if you insert 999.00009 into a FLOAT(7,4) column, the approximate result is 999.0001.

http://dev.mysql.com/doc/refman/5.0/en/numeric-types.html

Options: ReplyQuote


Subject
Written By
Posted
Re: Bug in the floating point value
April 09, 2009 08:40AM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.