pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Jasen Betts <jasen@xnet.co.nz>
To: pgsql-sql@postgresql.org
Subject: Re: Round integer division
Date: 26 Jun 2010 13:09:05 GMT
Message-ID: <i04u5h$jc8$1@reversiblemaps.ath.cx> (raw)
References: <4C25334D.4040805@gmail.com>

On 2010-06-25, Lee Hachadoorian <lee.hachadoorian@gmail.com> wrote:
> Is it documented anywhere that floating-point numbers round
> "scientifically", that is 0.5 rounds to the nearest even number? 

That's swiss rounding.  And no, as I understand it documented that 
most arithmetic) is platform specific.

Postgres is written in C and the relevant portions of the 
C standards douments (and discussions thereof) give a good 
picture of the functioning of postgres arithmetic. 





view thread (7+ messages)  latest in thread

Message-ID: <i04u5h$jc8$1@reversiblemaps.ath.cx>
Permalink:  ../i04u5h$jc8$1@reversiblemaps.ath.cx/
Also on:    postgresql.org/message-id/i04u5h$jc8$1@reversiblemaps.ath.cx

 · 

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 using the --to and --cc options:
  reply via email

  To: pgsql-sql@postgresql.org
  Cc: jasen@xnet.co.nz
  Subject: Re: Round integer division
  In-Reply-To: <i04u5h$jc8$1@reversiblemaps.ath.cx>

* 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