On 25-Mar-2003 Black, Kelly W [PCS] wrote:
> 
> On 25-Mar-2003 Black, Kelly W [PCS] wrote:
>>> Hello.
>>> 
>>> Sorry for the long post. This has been a big problem for me, and I 
>>> hope someone will help...
>>> 
>>> I have a long standing problem with an MySQL query. 
>>> Or perhaps a couple of sql query problems...
>>> 
>>> Firstly I have been told I cannot use sum() on a value while using
>>> group by "parm" because it's not accurate. This is obvious as the
>>> result sets are often quite wrong...
>>> 
> 
>>I'm not sure where you got that. I've never seen it.
> 
> 
> See attached screen shot. It's common knowledge that when comparing
> six or eight there's no problem. But once you move into the millions 
> there's quite a margin for error.
> 
> 

mysql> select 3333.33333334455  * 94343473264278464  as test;
+-----------------------------------+
| test                              |
+-----------------------------------+
| 314478244215319756800.00000000000 |
+-----------------------------------+
1 row in set (0.00 sec)

Since you'll only get 15 significant digits w/ a 64bit float, you're in
for considerable margins of error.

MySQL is _NOT_ an arbitrary precision calculator.
If you need that kind of precision, you should be working with DECIMAL().

Regards,
-- 
Don Read                                       [EMAIL PROTECTED]
-- It's always darkest before the dawn. So if you are going to 
   steal the neighbor's newspaper, that's the time to do it.
                            (53kr33t w0rdz: sql table query)


-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:    http://lists.mysql.com/[EMAIL PROTECTED]

Reply via email to