Re: Round integer division - Mailing list pgsql-sql

From Jasen Betts
Subject Re: Round integer division
Date
Msg-id i04un6$jc8$2@reversiblemaps.ath.cx
Whole thread Raw
In response to Round integer division  (Lee Hachadoorian <lee.hachadoorian@gmail.com>)
List pgsql-sql
On 2010-06-25, Lee Hachadoorian <lee.hachadoorian@gmail.com> wrote:
>
>
> 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?

Yes it is, an enginneer at intel made that decision in the 70s when
the 8087 coprocessor was developed.

If you're not running on x86-like hardware the round operation may
do something different.


pgsql-sql by date:

Previous
From: Jasen Betts
Date:
Subject: Re: Round integer division
Next
From: silly sad
Date:
Subject: Re: round(Numeric)