Re: Proposal for resolving casting issues

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

"Zeugswetter Andreas SB SD" <ZeugswetterA(at)spardat(dot)at> writes:
> 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.

Not exactly: we are saying it is not a worse answer. There's no reason
to prefer one over the other, because they are both within the range
of uncertainty given the inherent uncertainty in the float4 input.

If you want exact results, you should be using exact datatypes.

regards, tom lane

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Marc G. Fournier 2002-09-19 16:30:09 SIMILAR TO syntax (Was: Re: The TODO List (Was: Re: O...)
Previous Message Tom Lane 2002-09-19 16:18:56 Re: [GENERAL] Memory Errors...