6 messages in com.mysql.lists.bugsRe: Fatal error in comparing numbers| From | Sent On | Attachments |
|---|---|---|
| Marek | 25 Mar 2002 02:41 | |
| BICHOT Guilhem 172613 | 25 Mar 2002 03:44 | |
| Sinisa Milivojevic | 25 Mar 2002 06:57 | |
| Mats Remman | 25 Mar 2002 07:18 | |
| Sinisa Milivojevic | 25 Mar 2002 07:45 | |
| Michael Widenius | 25 Mar 2002 09:37 |
| Subject: | Re: Fatal error in comparing numbers![]() |
|---|---|
| From: | Mats Remman (ma...@carr.no) |
| Date: | 03/25/2002 07:18:39 AM |
| List: | com.mysql.lists.bugs |
mysql> \s
-------------- mysql Ver 11.19 Distrib 4.0.1-alpha, for Win95/Win98 (i32)
<znip>
--------------
mysql> select 11.4+18.90=30.30; +------------------+ | 11.4+18.90=30.30 | +------------------+ | 0 | +------------------+ 1 row in set (0.07 sec)
mysql> select (11.4+18.90)=30.30; +--------------------+ | (11.4+18.90)=30.30 | +--------------------+ | 0 | +--------------------+ 1 row in set (0.00 sec)
mysql>
Thats from 4.0.1 on a Windows 2000 box, so it cant have been fixed that long ago.
mysql> select round(11.4+18.90,4)=30.30; +---------------------------+ | round(11.4+18.90,4)=30.30 | +---------------------------+ | 1 | +---------------------------+ 1 row in set (0.01 sec)
does work however.
just wanted to let you know.
Mats Remman
----- Original Message ----- From: "Sinisa Milivojevic" <sin...@mysql.com> To: <wmar...@kki.net.pl> Cc: <bu...@lists.mysql.com> Sent: Monday, March 25, 2002 3:58 PM Subject: Re: Fatal error in comparing numbers
Marek writes:
From: <wmar...@kki.net.pl> To: mysq...@lists.mysql.com Subject: [Fatal error in comparing numbers]
Description: When you use in a query (at least) two figures 11.4 and 18.9 the results are incorrect. It seems something like malicious numbers but it is quite annuying and disqualifying. In a query select (11.4+18.90)=30.30 the result will be "0". although select 11.4+18.9 will give 30.30 ie correct answer. I don't think the summe 30.30 is fatal figure because for example trying with 11.5 and 18.8 gives good answers. Trying with for example 111.4 and 118.9 etc gives good results.
Hi!
I have tried all your examples with 4.0.2 and all worked fine. This is some bug fixed long time ago.
I did not try it with current 3.23 branch though ....
-- Regards, __ ___ ___ ____ __ / |/ /_ __/ __/ __ \/ / Mr. Sinisa Milivojevic <sin...@mysql.com> / /|_/ / // /\ \/ /_/ / /__ MySQL AB, Fulltime Developer /_/ /_/\_, /___/\___\_\___/ Larnaca, Cyprus <___/ www.mysql.com
--------------------------------------------------------------------- Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive)
To request this thread, e-mail bugs...@lists.mysql.com To unsubscribe, e-mail <bugs...@lists.mysql.com>




