Bug #11114 | wrong rounding in FORMAT() on Windows (test 'func_math' fails) | ||
---|---|---|---|
Submitted: | 6 Jun 2005 13:07 | Modified: | 6 Jun 2005 21:48 |
Reporter: | Carsten Segieth | Email Updates: | |
Status: | Duplicate | Impact on me: | |
Category: | MySQL Server | Severity: | S2 (Serious) |
Version: | 5.0.6-beta | OS: | Windows (Windows XP Home SP2) |
Assigned to: | CPU Architecture: | Any |
[6 Jun 2005 13:07]
Carsten Segieth
[6 Jun 2005 16:17]
Sergei Golubchik
Please do not submit the same bug more than once. An existing bug report already describes this very problem. Even if you feel that your issue is somewhat different, the resolution is likely to be the same. Because of this, we hope you add your comments to the original bug instead. Thank you for your interest in MySQL. Additional info: http://bugs.mysql.com/bug.php?id=8459
[6 Jun 2005 21:48]
Sergei Golubchik
Just to clarify: currently FORMAT(X, N) implicitly casts the argument (X) to double. Thus, the rounding rules of the system libc apply, and results become OS- and architecture-dependent. Fix: FORMAT() should use exact arithmetics when operating with exact numbers.