Skip site navigation (1) Skip section navigation (2)

Peripheral Links

Header And Logo

PostgreSQL
| The world's most advanced open source database.

Site Navigation

Search for
  Advanced Search

Re: Float8 precision problem




On Nov 30, 2006, at 19:56 , Hengki Suhartoyo wrote:

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

Then use numeric instead of float. Float by its very nature is not precise.

Michael Glaesemann
grzm seespotcode net





Home | Main Index | Thread Index

Privacy Policy | PostgreSQL Archives hosted by Command Prompt, Inc. | Designed by tinysofa
Copyright © 1996 – 2008 PostgreSQL Global Development Group