Skip site navigation (1) Skip section navigation (2)

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

From: Roman Kononov <kononov195-pgsql(at)yahoo(dot)com>
To: pgsql-hackers(at)postgresql(dot)org
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Bruce Momjian <bruce(at)momjian(dot)us>,PostgreSQL-patches <pgsql-patches(at)postgresql(dot)org>
Subject: Re: [PATCHES] [BUGS] BUG #2846: inconsistent and confusing handling
Date: 2006-12-27 20:27:10
Message-ID: 4592D71E.8070401@yahoo.com (view raw or flat)
Thread:
Lists: pgsql-hackerspgsql-patches
On 12/27/2006 01:15 PM, Tom Lane wrote:
> I'm not convinced that you're fixing things so much as doing your best
> to destroy IEEE-compliant float arithmetic behavior.
> 
> I think what we should probably consider is removing CheckFloat4Val
> and CheckFloat8Val altogether, and just letting the float arithmetic
> have its head.  Most modern hardware gets float arithmetic right per
> spec, and we shouldn't be second-guessing it.

I vote for complete IEEE-compliance. No exceptions with pure floating
point math. Float -> int conversions should reject overflow, INF and
NaN. Float -> numeric conversions should reject INF.

> 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.

This might look like another possibility for confusion. For example
INF-INF=NaN.

Regards,
Roman.



In response to

Responses

pgsql-hackers by date

Next:From: Tom LaneDate: 2006-12-27 20:29:48
Subject: Re: Allow the identifier length to be increased via a configure option
Previous:From: Alvaro HerreraDate: 2006-12-27 20:22:35
Subject: Re: Allow the identifier length to be increased via a configure option

pgsql-patches by date

Next:From: Tom LaneDate: 2006-12-27 20:29:48
Subject: Re: Allow the identifier length to be increased via a configure option
Previous:From: Alvaro HerreraDate: 2006-12-27 20:22:35
Subject: Re: Allow the identifier length to be increased via a configure option

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group