X-Original-To: pgsql-sql-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.2]) by svr1.postgresql.org (Postfix) with ESMTP id C9F75D1B53F for ; Tue, 28 Oct 2003 18:21:49 +0000 (GMT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (neptune.hub.org [200.46.204.2]) (amavisd-new, port 10024) with ESMTP id 35274-07 for ; Tue, 28 Oct 2003 14:21:18 -0400 (AST) Received: from smtp.istop.com (dci.doncaster.on.ca [66.11.168.194]) by svr1.postgresql.org (Postfix) with ESMTP id 923E7D1B538 for ; Tue, 28 Oct 2003 14:21:17 -0400 (AST) Received: from stark.dyndns.tv (gsstark.mtl.istop.com [66.11.160.162]) by smtp.istop.com (Postfix) with ESMTP id 604C136ABF; Tue, 28 Oct 2003 13:21:17 -0500 (EST) Received: from localhost ([127.0.0.1] helo=stark.dyndns.tv ident=foobar) by stark.dyndns.tv with smtp (Exim 3.36 #1 (Debian)) id 1AEYSz-0000sm-00; Tue, 28 Oct 2003 13:21:17 -0500 To: =?iso-8859-1?q?SZ=DBCS_G=E1bor?= Cc: Subject: Re: numeric and float converts to int differently? References: <072c01c39d65$65f83950$0403a8c0@fejleszt4> <20031028154536.GA29427@it.is.rice.edu> <074b01c39d72$6f512f90$0403a8c0@fejleszt4> In-Reply-To: <074b01c39d72$6f512f90$0403a8c0@fejleszt4> From: Greg Stark Organization: The Emacs Conspiracy; member since 1992 Date: 28 Oct 2003 13:21:17 -0500 Message-ID: <87brs1gr4y.fsf@stark.dyndns.tv> Lines: 14 User-Agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.3 MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit X-Virus-Scanned: by amavisd-new at postgresql.org X-Archive-Number: 200310/370 X-Sequence-Number: 15770 "SZÛCS Gábor" writes: > > cannot see is that the float values are not actually exactly 0.5 > > Yes I could guess that (floating point vs fixed), but is this a coincidence > that both '0.5'::float and '-0.5'::float are closer to 0, whereas they could > be closer to +/-1, as well as both closer to the lower or upper bound. Wouldn't 0.5 and -0.5 be representable exactly as floats? -- greg