pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Sergey S. Rakitin <ssr@visti.net>
To: pgsql-sql@postgresql.org
Subject: fields with float[48] type question
Date: Wed, 09 Jun 1999 18:45:17 +0300
Message-ID: <375E8C0D.1A8B5FDD@visti.net> (raw)


		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



view thread (3+ messages)  latest in thread

Message-ID: <375E8C0D.1A8B5FDD@visti.net>
Permalink:  ../375E8C0D.1A8B5FDD@visti.net/
Also on:    postgresql.org/message-id/375E8C0D.1A8B5FDD@visti.net

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-sql@postgresql.org
  Cc: ssr@visti.net
  Subject: Re: fields with float[48] type question
  In-Reply-To: <375E8C0D.1A8B5FDD@visti.net>
  References: <375E8C0D.1A8B5FDD@visti.net>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox