Hi, This is what I got on a Windows 2000 platform....
mysql> create table ft (id INT AUTO_INCREMENT, val FLOAT, PRIMARY KEY(id)); Query OK, 0 rows affected (0.01 sec) mysql> insert ft(val) values('3.4'); Query OK, 1 row affected (0.00 sec) mysql> insert ft(val) values('0.3'); Query OK, 1 row affected (0.00 sec) mysql> insert ft(val) values('1.24'); Query OK, 1 row affected (0.00 sec) mysql> select sum(val) from ft; +-----------------+ | sum(val) | +-----------------+ | 4.9400001168251 | +-----------------+ 1 row in set (0.02 sec) mysql> select version(); +------------+ | version() | +------------+ | 3.23.45-nt | +------------+ 1 row in set (0.00 sec) Regards, Kevin ----- Original Message ----- From: "Wojciech Drążek" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Thursday, December 13, 2001 3:12 PM Subject: Problems with function sum() on float values > I wonder if it is only question of configuration but my MySQL server has > problems with suming of float values. > Look at that script: > > # mysql Ver 11.15 Distrib 3.23.41, for redhat-linux-gnu (i386) > # ---------------------- > > create table ft (id INT AUTO_INCREMENT, val FLOAT, PRIMARY KEY(id)); > insert ft(val) values('3.4'); > insert ft(val) values('0.3'); > insert ft(val) values('1.24'); > > select * from ft; > select sum(val) from ft; > > ----------------------------- > It will generate this (at the end) : > > ... > > mysql> select sum(val) from ft; > +-----------------+ > | sum(val) | > +-----------------+ > | 4.9400001168251 | <------------ > ?????????????????????????????????????????? > +-----------------+ > 1 row in set (0.00 sec) > > ----------------------------- > > Is it repeatable in someone else's MySQL server ? > > Wojtek Drazek > > > > --------------------------------------------------------------------- > 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 <[EMAIL PROTECTED]> > To unsubscribe, e-mail <[EMAIL PROTECTED]> > Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php > > > --------------------------------------------------------------------- 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 <[EMAIL PROTECTED]> To unsubscribe, e-mail <[EMAIL PROTECTED]> Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php