Sairam,

sorry to be so blunt, and please don't feel offended:

Sairam Krishnamurthy wrote:
> [[...]]
> 
> Can somebody help me to find out the problem? I can very well truncate
> the trailing zeros when querying, but I am interested in finding why an
> additional trailing zero returns an empty set.

You have not understood the concept of floating point data and of their
binary representation.
For a starter, please try to write the *exact* value 1.0/3.0 with a
finite number of decimal digits.

A basic paper on this was available here:
http://cch.loria.fr/documentation/IEEE754/ACM/goldberg.pdf

Any attempt to solve your problem by giving a different number of
trailing zeros is bound to fail. You best drop the approach of using
equality predicates for floating point data, it will not work in the
general case.


Jörg

-- 
Joerg Bruehe,  MySQL Build Team,  joerg.bru...@oracle.com
               (+49 30) 417 01 487
ORACLE Deutschland B.V. & Co. KG,   Komturstrasse 18a,   D-12099 Berlin
Geschaeftsfuehrer: Juergen Kunz, Marcel v.d. Molen, Alexander v.d. Ven
Amtsgericht Muenchen: HRA 95603


--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:    http://lists.mysql.com/mysql?unsub=arch...@jab.org

Reply via email to