Float8 precision problem

From: Hengki Suhartoyo <hengman03(at)yahoo(dot)com>
To: pgsql-general(at)postgresql(dot)org
Subject: Float8 precision problem
Date: 2006-11-30 10:56:08
Message-ID: 20061130105608.69500.qmail@web57701.mail.re3.yahoo.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Hi all,

I got problem in postgrsql 8.0 when subtraction in float8, this is my query :
select 6.1::float8-6::float8

Result>>> 0.099999999999996

I need the result like natural subtraction is 0.1

Help me please....


____________________________________________________________________________________
Do you Yahoo!?
Everyone is raving about the all-new Yahoo! Mail beta.
http://new.mail.yahoo.com

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Dann Corbit 2006-11-30 11:03:07 Re: Float8 precision problem
Previous Message hubert depesz lubaczewski 2006-11-30 10:38:28 postgresql 8.2 rc1 - crash