Received: from localhost (maia-2.hub.org [200.46.204.187]) by postgresql.org (Postfix) with ESMTP id BA13B9F93A2 for ; Wed, 27 Dec 2006 17:44:01 -0400 (AST) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.187]) (amavisd-new, port 10024) with ESMTP id 67884-01 for ; Wed, 27 Dec 2006 17:43:47 -0400 (AST) X-Greylist: delayed 01:16:36.597376 by SQLgrey-1.7.4 Received: from out4.smtp.messagingengine.com (out4.smtp.messagingengine.com [66.111.4.28]) by postgresql.org (Postfix) with ESMTP id EE8DA9F938C for ; Wed, 27 Dec 2006 17:43:50 -0400 (AST) Received: from out1.internal (unknown [10.202.2.149]) by out1.messagingengine.com (Postfix) with ESMTP id 2D26D59F14; Wed, 27 Dec 2006 16:42:45 -0500 (EST) Received: from heartbeat1.messagingengine.com ([10.202.2.160]) by out1.internal (MEProxy); Wed, 27 Dec 2006 16:42:45 -0500 X-Sasl-enc: VvC+eqRNRR6Mv4hAN/sgBxWqNAH9b7ZquAmq/RRTB8PB 1167255764 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 C29651BF2F; Wed, 27 Dec 2006 16:42:44 -0500 (EST) Message-ID: <4592E915.4050901@yahoo.com> Date: Wed, 27 Dec 2006 15:43:49 -0600 From: Roman Kononov User-Agent: Thunderbird 1.5.0.8 (X11/20061117) MIME-Version: 1.0 To: Bruce Momjian CC: PostgreSQL-patches Subject: Re: [BUGS] BUG #2846: inconsistent and confusing handling of underflows, References: <200612272123.kBRLNdg05533@momjian.us> In-Reply-To: <200612272123.kBRLNdg05533@momjian.us> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=3.527 tagged_above=0 required=5 tests=AWL, BAYES_50, FORGED_YAHOO_RCVD X-Spam-Level: *** X-Archive-Number: 200612/161 X-Sequence-Number: 21837 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: ~>uname -a Linux rklinux 2.6.15-27-amd64-generic #1 SMP PREEMPT Fri Dec 8 17:50:54 UTC 2006 x86_64 GNU/Linux ~>gcc --version gcc (GCC) 4.3.0 20061213 (experimental) Copyright (C) 2006 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. ~>cat test.c #include #include int main(int argc, char *argv[]) { float a = 1e30, b = 1e30; double c; c = a * b; printf("%e\n", c); return 0; } ~>gcc test.c ~>./a.out inf ~>gcc -march=i386 -m32 test.c ~>./a.out 1.000000e+60 Roman