Re: dividing money by money - Mailing list pgsql-hackers

From Andy Balholm
Subject Re: dividing money by money
Date
Msg-id 4D1A6144-3423-4D92-AEF3-FF05DC4D603D@balholm.com
Whole thread Raw
In response to Re: dividing money by money  (Peter Eisentraut <peter_e@gmx.net>)
Responses Re: dividing money by money
List pgsql-hackers
On Jul 17, 2010, at 3:20 AM, Peter Eisentraut wrote:

> On fre, 2010-07-16 at 10:31 -0400, Tom Lane wrote:
>> The other argument that I found convincing was that if the
>> operator was defined to yield numeric, people might think that
>> the result was exact ... which of course it won't be, either way.
>> Choosing float8 helps to remind the user it's an approximate quotient.
> 
> Why is it approximate?  Aren't money values really integers?

$1.00 / 3.00 = 0.333333333333333333333333333333333333333333333333...


pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: suppress automatic recovery after back crash
Next
From: Tom Lane
Date:
Subject: Re: dividing money by money