fields with float[48] type question

From: "Sergey S(dot) Rakitin" <ssr(at)visti(dot)net>
To: pgsql-sql(at)postgresql(dot)org
Subject: fields with float[48] type question
Date: 1999-06-09 15:45:17
Message-ID: 375E8C0D.1A8B5FDD@visti.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql


Hi,

I have two pc's with PostgreSQL 6.4.2r and 6.5beta2
and some troubles with both of them.

Well, here's an example:
I create some simple table with float field (called field_one), insert
value 100 in it. Then I need to increase/decrease it number by 0.06 on
every step
many times (from trigger/SPI or simple shell script contains just _21_
(or less)
lines like this: 'update <class_name> set field_one = field_one [-+]
0.06')...
Here'we go. If I put _22+_ lines I got very interesting results. For
example:
100 - 22 times by 0.06 == 98.6799999999999 instead of 98.68... And it's
not
the end of story...

Can someone explain me such behaviour?..

--
Sergey S. Rakitin ElVisti
SSR2-RIPE Information Center

Browse pgsql-sql by date

  From Date Subject
Next Message Stuart Rison 1999-06-10 08:56:10 Re: [SQL] fields with float[48] type question
Previous Message Nikolay Mijaylov 1999-06-09 15:40:05 Re: [SQL] automatic incrementation