MySQL Forums
Forum List  »  Connector/JDBC and Java

Re: Problems with extreme float values
Posted by: Mark Matthews
Date: July 30, 2008 12:09PM

Steve Appling Wrote:
> How can I store any of these valid float values in
> a float column? I thought the float datatype
> could hold any IEEE 754 4 byte value. Is this a
> bug or am I doing something wrong?


You can't, at least not without coding something up yourself to round or floor it, or having another column that holds +/-INF or NaN bits/flags. Standard SQL's FLOAT (not just MySQL's) is *not* an IEEE754 float, and doesn't allow for +/-INF of NaN.


Mark Matthews
Consulting Member Technical Staff - MySQL Enterprise Tools

Options: ReplyQuote

Written By
Re: Problems with extreme float values
July 30, 2008 12:09PM

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.