Received: from maia.hub.org (maia-2.hub.org [200.46.204.251]) by mail.postgresql.org (Postfix) with ESMTP id A6A09632F70 for ; Mon, 28 Jun 2010 02:29:15 -0300 (ADT) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.251]) (amavisd-maia, port 10024) with ESMTP id 10771-04 for ; Mon, 28 Jun 2010 05:29:07 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from moon.antora.ru (moon.antora.ru [89.111.189.180]) by mail.postgresql.org (Postfix) with ESMTP id 8F7EC63276B for ; Mon, 28 Jun 2010 02:29:07 -0300 (ADT) Envelope-to: pgsql-sql@postgresql.org Received: from moon.inner.space ([10.1.1.5] helo=moon.antora.ru) by moon.antora.ru with esmtp (Exim 4.67) (envelope-from ) id 1OT6u0-0001gq-KZ for pgsql-sql@postgresql.org; Mon, 28 Jun 2010 09:29:04 +0400 Received: from [192.168.1.6] [94.233.251.61] by moon.antora.ru (Axigen) with (DHE-RSA-AES256-SHA encrypted) ESMTPSA id 0D6BAC; Mon, 28 Jun 2010 09:29:04 +0400 Message-ID: <4C28331F.1080007@bankir.ru> Date: Mon, 28 Jun 2010 09:29:03 +0400 From: silly sad User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.1.5) Gecko/20100111 Thunderbird/3.0 MIME-Version: 1.0 To: pgsql-sql@postgresql.org Subject: Re: round(Numeric) References: <4C25334D.4040805@gmail.com> In-Reply-To: Content-Type: text/plain; charset=KOI8-R; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=1.57 tagged_above=-5 required=5 tests=BAYES_50=0.8, RCVD_IN_SORBS_WEB=0.77 X-Spam-Level: * X-Archive-Number: 201006/108 X-Sequence-Number: 34299 On 06/26/10 17:09, wrote: > On 2010-06-25, Lee Hachadoorian wrote: >> Is it documented anywhere that floating-point numbers round >> "scientifically", that is 0.5 rounds to the nearest even number? > > That's swiss rounding. And no, as I understand it documented that > most arithmetic) is platform specific. > > Postgres is written in C and the relevant portions of the > C standards douments (and discussions thereof) give a good > picture of the functioning of postgres arithmetic. IT IS REALLY SAD ! the round(Numeric) does not behave as Math science prescribes :( Shame on PostgresQL !