Bug #9037 | Negative Zero | ||
---|---|---|---|
Submitted: | 8 Mar 2005 1:37 | Modified: | 8 Mar 2005 17:50 |
Reporter: | Frederick Aubert | Email Updates: | |
Status: | Not a Bug | Impact on me: | |
Category: | MySQL Server | Severity: | S2 (Serious) |
Version: | 5.0.2 | OS: | MacOS (MacOS X) |
Assigned to: | CPU Architecture: | Any |
[8 Mar 2005 1:37]
Frederick Aubert
[8 Mar 2005 17:50]
Alexander Keremidarski
Thank you for taking the time to write to us, but this is not a bug. Please double-check the documentation available at http://www.mysql.com/documentation/ and the instructions on how to report a bug at http://bugs.mysql.com/how-to-report.php Additional info: mysql> SELECT * FROM Test; +--------------+ | Value | +--------------+ | 1693.620000 | | -1608.939000 | | -84.681000 | +--------------+ 3 rows in set (0.00 sec) mysql> SELECT ROUND(SUM(Value), 20) FROM Test; +-------------------------+ | ROUND(SUM(Value), 20) | +-------------------------+ | -0.00000000000018474111 | +-------------------------+ 1 row in set (0.00 sec)
[16 Jan 2008 17:39]
Dave May
This is a terrible bug. It turns out that any sum totalling -0.00 is less than a constant of -0.00. MySQL seriously needs to fix this.
[17 Jan 2008 8:23]
Kristian Nielsen
Version 5.0.2 is very old, you should try with the newest version of 5.0. According to documentation, precision math was introduced only in version 5.0.3: http://dev.mysql.com/doc/refman/5.0/en/precision-math.html