You don't need to take it to 16 digits : mysql 4 :
select 1/666; +-------+ | 1/666 | +-------+ | 0.00 | +-------+ mysql 5.0.18: select 1/666; +--------+ | 1/666 | +--------+ | 0.0015 | +--------+ George Law > -----Original Message----- > From: Chris W [mailto:[EMAIL PROTECTED] > Sent: Tuesday, May 30, 2006 4:39 PM > To: [EMAIL PROTECTED] > Cc: mysql@lists.mysql.com > Subject: Re: select 9000000000000.10*19.80 wrong result 178200000000001.97 > > wang shuming wrote: > > > Hi, > > select 9000000000000.10*19.80 wrong result 178200000000001.97 > > if <= 900000000000.10*19.80 right result 17820000000001.98 > > > This is very typical floating point error. Computers don't have > infinite precision or it would take infinite time to compute the > answer. I have to ask why you need such precise number. In the real > world if you can measure or control something to 4 significant digits > you are doing really good. If you can do 6 you are doing great. If you > can do 8 you are one step from a miracle worker. Measuring or > controlling something to a level of precision of 16 significant digits > is completely impossible. > > -- > Chris W > KE5GIX > > Gift Giving Made Easy > Get the gifts you want & > give the gifts they want > One stop wish list for any gift, > from anywhere, for any occasion! > http://thewishzone.com > > > -- > MySQL General Mailing List > For list archives: http://lists.mysql.com/mysql > To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED] -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED]