Received: from wm.hub.org (wm.hub.org [200.46.204.128]) by postgresql.org (Postfix) with ESMTP id B76C79FB2B1; Wed, 24 Jan 2007 20:27:24 -0400 (AST) Received: from maia (wm.hub.org [200.46.204.128]) by wm.hub.org (Postfix) with ESMTP id AFEC2DF97E9; Thu, 25 Jan 2007 00:27:24 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.4 X-Greylist: domain auto-whitelisted by SQLgrey-1.7.4 Received: from svr4.postgresql.org (svr4.postgresql.org [66.98.251.159]) by postgresql.org (Postfix) with ESMTP id 6DF849FA49D; Wed, 27 Dec 2006 16:27:15 -0400 (AST) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.3 X-Greylist: domain auto-whitelisted by SQLgrey-1.7.3 Received: from out4.smtp.messagingengine.com (out4.smtp.messagingengine.com [66.111.4.28]) by svr4.postgresql.org (Postfix) with ESMTP id B178D5AF8A4; Wed, 27 Dec 2006 20:27:14 +0000 (GMT) Received: from out1.internal (unknown [10.202.2.149]) by out1.messagingengine.com (Postfix) with ESMTP id D3C6C5A0EC; Wed, 27 Dec 2006 15:26:08 -0500 (EST) Received: from heartbeat1.messagingengine.com ([10.202.2.160]) by out1.internal (MEProxy); Wed, 27 Dec 2006 15:26:08 -0500 X-Sasl-enc: DrQ9VbThyDO2VGH2SaE4VZEexpOy6Hq/6t/WVO6QrD5P 1167251168 Received: from [10.10.0.130] (adsl-68-75-163-199.dsl.emhril.ameritech.net [68.75.163.199]) by mail.messagingengine.com (Postfix) with ESMTP id 166A01A605; Wed, 27 Dec 2006 15:26:06 -0500 (EST) Message-ID: <4592D71E.8070401@yahoo.com> Date: Wed, 27 Dec 2006 14:27:10 -0600 From: Roman Kononov User-Agent: Thunderbird 1.5.0.8 (X11/20061117) MIME-Version: 1.0 To: pgsql-hackers@postgresql.org Cc: Tom Lane , Bruce Momjian , PostgreSQL-patches Subject: Re: [PATCHES] [BUGS] BUG #2846: inconsistent and confusing handling References: <200612271844.kBRIiVb18465@momjian.us> <19208.1167246902@sss.pgh.pa.us> In-Reply-To: <19208.1167246902@sss.pgh.pa.us> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Archive-Number: 200701/469 X-Sequence-Number: 277 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.