pg.ddx.io  pgsql-hackers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Roman Kononov <kononov195-pgsql@yahoo.com>
To: Tom Lane <tgl@sss.pgh.pa.us>
Cc: pgsql-hackers@postgresql.org, Bruce Momjian <bruce@momjian.us>
Cc: PostgreSQL-patches <pgsql-patches@postgresql.org>
Subject: Re: [BUGS] BUG #2846: inconsistent and confusing handling
Date: Wed, 27 Dec 2006 17:47:05 -0600
Message-ID: <459305F9.1060403@yahoo.com> (raw)
In-Reply-To: <25444.1167261571@sss.pgh.pa.us>
References: <200612272123.kBRLNdg05533@momjian.us>
	<4592E915.4050901@yahoo.com>
	<25444.1167261571@sss.pgh.pa.us>

On 12/27/2006 05:19 PM, Tom Lane wrote:
> Roman Kononov <kononov195-pgsql@yahoo.com> writes:
>> On 12/27/2006 03:23 PM, Bruce Momjian wrote:
>>> Are you sure?  As I remember, computation automatically upgrades to
>>> 'double'.  See this program and output:
> 
>> This is platform- and compiler- dependent:
> 
> ... and probably irrelevant, too.  We should store the result into a
> float4 variable and then test for isinf() on that; that eliminates the
> question of whether the compiler did the multiply in a wider format or
> not.

You are right provided that you want to ignore underflows and silently
produce zeros instead.

If you go this way, I recommend to ignore overflows as well, and silently
produce infinities and NaNs.

Roman



view thread (12+ messages)

Message-ID: <459305F9.1060403@yahoo.com>
Permalink:  ../459305F9.1060403@yahoo.com/
Also on:    postgresql.org/message-id/459305F9.1060403@yahoo.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-hackers@postgresql.org
  Cc: kononov195-pgsql@yahoo.com, tgl@sss.pgh.pa.us, bruce@momjian.us, pgsql-patches@postgresql.org
  Subject: Re: [BUGS] BUG #2846: inconsistent and confusing handling
  In-Reply-To: <459305F9.1060403@yahoo.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox