Re: [ADMIN] IEEE 754 - Mailing list pgsql-hackers

From Jan Wieck
Subject Re: [ADMIN] IEEE 754
Date
Msg-id 4002B153.7030705@Yahoo.com
Whole thread Raw
In response to Re: [ADMIN] IEEE 754  (Michael Glaesemann <grzm@myrealbox.com>)
Responses Re: [ADMIN] IEEE 754  (Sai Hertz And Control Systems <sank89@sancharnet.in>)
List 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@Yahoo.com #


pgsql-hackers by date:

Previous
From: "Thomas Hallgren"
Date:
Subject: Request for additional SPI functions.
Next
From: Sai Hertz And Control Systems
Date:
Subject: Re: [ADMIN] IEEE 754