Re: Proposal for resolving casting issues - Mailing list pgsql-hackers

From Ross J. Reedstrom
Subject Re: Proposal for resolving casting issues
Date
Msg-id 20020919160539.GA18024@rice.edu
Whole thread Raw
In response to Re: Proposal for resolving casting issues  ("Zeugswetter Andreas SB SD" <ZeugswetterA@spardat.at>)
List pgsql-hackers
On Thu, Sep 19, 2002 at 06:00:37PM +0200, Zeugswetter Andreas SB SD wrote:
> 
> What if he must display 9 digits and says the result is approximately 2.45678932
> would that be worse than 2.46000000 ? 

Yup. Trailing zeros are not significant. That's why scientific notation is nice:
you don't fill in all those insignificant placeholders.

> 
> For above calculation pg will in the future return 0.00000000000000000000 as an
> answer to 1.00000000000001*1000.0-1000.0 when used in my example context, while
> it currently returns 0.000000000010 ... 
> You both are saying, that 0.00000000000000000000 is a better answer. 

That's right. And correct, as well.

Ross


pgsql-hackers by date:

Previous
From: "Zeugswetter Andreas SB SD"
Date:
Subject: Re: Proposal for resolving casting issues
Next
From: Tom Lane
Date:
Subject: Re: [GENERAL] killing process question