Re: [HACKERS] float value is rounded

2009-11-25 Thread David Fetter
On Wed, Nov 25, 2009 at 07:46:11PM +0100, Pavel Stehule wrote: > 2009/11/25 Tom Lane : > > Pavel Stehule writes: > >> I was surprised with rounding relative not big value. Is it > >> correct? > > > > You do realize float4 has only 6 decimal digits of precision? > > > > To today I though so float4

Re: [HACKERS] float value is rounded

2009-11-25 Thread Pavel Stehule
2009/11/25 Tom Lane : > Pavel Stehule writes: >> I was surprised with rounding relative not big value. Is it correct? > > You do realize float4 has only 6 decimal digits of precision? > To today I though so float4 is more practical :). I am smarter now Pavel >                        regards, to

Re: [HACKERS] float value is rounded

2009-11-25 Thread Tom Lane
Pavel Stehule writes: > I was surprised with rounding relative not big value. Is it correct? You do realize float4 has only 6 decimal digits of precision? regards, tom lane -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your sub

[HACKERS] float value is rounded

2009-11-25 Thread Pavel Stehule
Hello I was surprised with rounding relative not big value. Is it correct? postgres=# select 499188.546875::real; float4 499189 (1 row) regards Pavel Stehule -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postg