Re: [BUGS] BUG #2846: inconsistent and confusing

From: "Joshua D(dot) Drake" <jd(at)commandprompt(dot)com>
To: Bruce Momjian <bruce(at)momjian(dot)us>
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, pgsql-hackers(at)postgresql(dot)org, PostgreSQL-patches <pgsql-patches(at)postgresql(dot)org>, Roman Kononov <kononov195-pgsql(at)yahoo(dot)com>
Subject: Re: [BUGS] BUG #2846: inconsistent and confusing
Date: 2006-12-27 21:43:54
Message-ID: 1167255834.12075.50.camel@localhost.localdomain
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers pgsql-patches


> I get 'inf'. I am on BSD and just tested it on Fedora Core 2 and got
> 'inf' too.

Ubuntu Edgy 64bit on Athlon 64X2 returns inf.

Joshua D. Drake

>
> > A slightly less radical proposal is to reject only the case where
> > isinf(result) and neither input isinf(); and perhaps likewise with
> > respect to NaNs.
>
> Uh, that's what the patch does for 'Inf':
>
> result = arg1 + arg2;
> CheckFloat4Val(result, isinf(arg1) || isinf(arg2));
>
> I didn't touch 'Nan' because that is passed around as a value just fine
> --- it isn't created or tested as part of an overflow.
>
--

=== The PostgreSQL Company: Command Prompt, Inc. ===
Sales/Support: +1.503.667.4564 || 24x7/Emergency: +1.800.492.2240
Providing the most comprehensive PostgreSQL solutions since 1997
http://www.commandprompt.com/

Donate to the PostgreSQL Project: http://www.postgresql.org/about/donate

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Joshua D. Drake 2006-12-27 21:47:41 Re: pg_hba.conf hostname todo
Previous Message Roman Kononov 2006-12-27 21:43:49 Re: [BUGS] BUG #2846: inconsistent and confusing handling of underflows,

Browse pgsql-patches by date

  From Date Subject
Next Message Bruce Momjian 2006-12-27 22:04:34 Re: [BUGS] BUG #2846: inconsistent and confusing handling of
Previous Message Roman Kononov 2006-12-27 21:43:49 Re: [BUGS] BUG #2846: inconsistent and confusing handling of underflows,