Bug #41442 Support ieee754 by supporting INF and NaN
Submitted: 12 Dec 2008 18:57 Modified: 14 Dec 2008 14:27
Reporter: Mark Callaghan Email Updates:
Status: Verified Impact on me:
None 
Category:MySQL Server: Data Types Severity:S4 (Feature request)
Version:5.0 OS:Any
Assigned to: CPU Architecture:Any
Tags: double, FLOAT, ieee754, inf, nan

[12 Dec 2008 18:57] Mark Callaghan
Description:
MySQL does not support INF and NaN because the SQL spec doesn't allow that. If that is the case the spec is broken in this regard and makes SQL useless for scientific apps as INF (+INF and -INF) and NaN are expected values.

At the XLDB conference representatives from the large scale physics projects that generate too much data talked about the need to use databases to manage their metadata. If that metadata includes FP values, then they might not be able to use MySQL.

Oracle has great support for ieee754.

And MySQL still allows INF in some cases using 5.0
mysql> select 1.0e308 * 1.0e10;
+------------------+
| 1.0e308 * 1.0e10 |
+------------------+
|              inf |
+------------------+

But not with 5.1.30
mysql> select 1.0e308 * 1.0e10;
+------------------+
| 1.0e308 * 1.0e10 |
+------------------+
|             NULL |
+------------------+

When sql_mode='', +INF is rounded to MAX_DOUBLE in 5.0. It is NULL regardless of sql_mode in 5.1.

How to repeat:
see above
[16 Feb 2010 19:16] Valeriy Kravchuk
Bug #51217 was marked as a duplicate of this one.
[19 Jul 2016 6:54] Daniƫl van Eeden
Related:
Bug #57519 	Documentation for IEEE 754 compliance is missing