Re: Proposal for resolving casting issues

From: "Ross J(dot) Reedstrom" <reedstrm(at)rice(dot)edu>
To: Zeugswetter Andreas SB SD <ZeugswetterA(at)spardat(dot)at>
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: Proposal for resolving casting issues
Date: 2002-09-19 16:05:39
Message-ID: 20020919160539.GA18024@rice.edu
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2002-09-19 16:07:54 Re: killing process question
Previous Message Zeugswetter Andreas SB SD 2002-09-19 16:00:37 Re: Proposal for resolving casting issues