Bug #9708 | calculation error | ||
---|---|---|---|
Submitted: | 7 Apr 2005 9:13 | Modified: | 7 Apr 2005 12:12 |
Reporter: | Oliver Peters | Email Updates: | |
Status: | Not a Bug | Impact on me: | |
Category: | MySQL Server | Severity: | S3 (Non-critical) |
Version: | 4.1.11 | OS: | Windows (Windows2000) |
Assigned to: | Sergei Golubchik | CPU Architecture: | Any |
[7 Apr 2005 9:13]
Oliver Peters
[7 Apr 2005 12:12]
Sergei Golubchik
Well, as you know Perl, you can see that problem is intrinsic deficiency of floating point numbers - they are not precise: $ perl -e 'printf "%.15f\n", 2.1/0.3' 7.000000000000001 $ perl -e 'printf "%.16f\n", 2.1/0.3' 7.0000000000000009 But MySQL 5.0.3 uses a precision math library that performs arithmetic calculatiions exactly, without precision loss.
[7 Apr 2005 12:41]
Oliver Peters
thank you very much - now I understand and can sleep better Oliver Peters