Обсуждение: fields with float[48] type question

Поиск
Список
Период
Сортировка

fields with float[48] type question

От
"Sergey S. Rakitin"
Дата:
Hi,
I have two pc's with PostgreSQL 6.4.2r and 6.5beta2and some troubles with both of them.
Well, here's an example:I create some simple table with float field (called field_one), insertvalue 100 in it. Then I
needto increase/decrease it number by 0.06 on
 
every stepmany 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
notthe end of story...

    Can someone explain me such behaviour?..

--Sergey S. Rakitin        ElVistiSSR2-RIPE          Information Center