Re: [HACKERS] IEEE 754

From: Jan Wieck <JanWieck(at)Yahoo(dot)com>
To: Michael Glaesemann <grzm(at)myrealbox(dot)com>
Cc: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>, pgsql-admin(at)postgresql(dot)org, pgsql-hackers(at)postgresql(dot)org, aspire420(at)hotpop(dot)com
Subject: Re: [HACKERS] IEEE 754
Date: 2004-01-12 14:38:11
Message-ID: 4002B153.7030705@Yahoo.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin pgsql-hackers

Michael Glaesemann wrote:
> On Jan 4, 2004, at 6:51 PM, Bruce Momjian wrote:
>
>> Michael Glaesemann wrote:
>>>
>>> On Dec 29, 2003, at 11:28 AM, Sai Hertz And Control Systems wrote:
>>>> I would like to share my concerns about the IEEE 754 specification
>>>> and
>>>> floating point handling by PostgreSQL .
>>>
>>> What specifically are your concerns regarding floating point handling
>>> and PostgreSQL? I'm not in a position to address your concerns, but I
>>> would like to know what they are.
>>
>> Floating point math itself is not precise, but rather an approximation,
>> usually of 8 or 14 digits. You can't approximate money. This isn't a
>> PostgreSQL issue but rather a general programming issue.
>
> Thanks, Bruce. I assume the arbitrary precision arithmetic Jan
> mentioned which is used for the NUMERIC type takes care of this.

That was the whole intention. Although Bruce is wrong, since most of the
time money is approximated. It is only in "bookkeeping" where this is
not allowed.

Jan

--
#======================================================================#
# It's easier to get forgiveness for being wrong than for being right. #
# Let's break this rule - forgive me. #
#================================================== JanWieck(at)Yahoo(dot)com #

In response to

Responses

Browse pgsql-admin by date

  From Date Subject
Next Message Tom Lane 2004-01-12 14:46:58 Re: pg_dump/pg_restore
Previous Message Alexey Bobkov 2004-01-12 11:45:16 pg_dump/pg_restore

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2004-01-12 14:42:15 Re: LWLock/ShmemIndex startup question
Previous Message Robert Treat 2004-01-12 13:17:46 Re: OLE DB driver