pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Lee Hachadoorian <lee.hachadoorian@gmail.com>
To: Scott Marlowe <scott.marlowe@gmail.com>
Cc: pgsql-sql@postgresql.org
Subject: Re: Round integer division
Date: Fri, 25 Jun 2010 19:07:40 -0400
Message-ID: <4C2536BC.4090306@gmail.com> (raw)
In-Reply-To: <AANLkTinq3e-fl89_zIdEShmhK2KnUUpZZjUAYhHVnWqr@mail.gmail.com>
References: <4C25334D.4040805@gmail.com>
	<AANLkTinq3e-fl89_zIdEShmhK2KnUUpZZjUAYhHVnWqr@mail.gmail.com>



On 06/25/2010 07:00 PM, Scott Marlowe wrote:
> That all floating point representations are approximate?
>
But if it's error due to approximation, shouldn't the result be random?
I tried this for a handful of larger numbers, and it appears to
consistently round to the even number. Wouldn't that have to be
intentionally programmed that way?

--Lee

-- 
Lee Hachadoorian
PhD Student, Geography
Program in Earth & Environmental Sciences
CUNY Graduate Center




view thread (7+ messages)  latest in thread

Message-ID: <4C2536BC.4090306@gmail.com>
Permalink:  ../4C2536BC.4090306@gmail.com/
Also on:    postgresql.org/message-id/4C2536BC.4090306@gmail.com

 · 

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: lee.hachadoorian@gmail.com, scott.marlowe@gmail.com
  Subject: Re: Round integer division
  In-Reply-To: <4C2536BC.4090306@gmail.com>

* 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