Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1V1FhX-0000rF-Gn for pgsql-bugs@arkaria.postgresql.org; Mon, 22 Jul 2013 12:58:55 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.80) (envelope-from ) id 1V1FhW-0001I6-Vn for pgsql-bugs@arkaria.postgresql.org; Mon, 22 Jul 2013 12:58:55 +0000 Received: from makus.postgresql.org ([2001:4800:7903:4::125]) by malur.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1V1CgY-0001Vk-8r for pgsql-bugs@postgresql.org; Mon, 22 Jul 2013 09:45:42 +0000 Received: from mahout.postgresql.org ([2001:4800:7903:4::123]) by makus.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1V1Cfw-0007Wi-QT for pgsql-bugs@postgresql.org; Mon, 22 Jul 2013 09:45:41 +0000 Received: from [204.145.124.246] (helo=wrigleys.postgresql.org) by mahout.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1V1Cfw-0004pb-20 for pgsql-bugs@postgresql.org; Mon, 22 Jul 2013 09:45:04 +0000 Received: from www-data by wrigleys.postgresql.org with local (Exim 4.80) (envelope-from ) id 1V1Cfq-00076T-El for pgsql-bugs@postgresql.org; Mon, 22 Jul 2013 09:44:58 +0000 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: BUG #8317: ROUND(double*1/2) != ROUND(1/2*double) To: pgsql-bugs@postgresql.org From: remi.cura@gmail.com Message-Id: Date: Mon, 22 Jul 2013 09:44:58 +0000 X-Pg-Spam-Score: 0.3 (/) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-bugs Precedence: bulk Sender: pgsql-bugs-owner@postgresql.org The following bug has been logged on the website: Bug reference: 8317 Logged by: Rémi Email address: remi.cura@gmail.com PostgreSQL version: 9.2.4 Operating system: Ubuntu 12.0.4 32 bits hosted by a VirtualBox Description: Hello; I ran into a strange behaviour. Initially it showed in a group by, but is also happens in regular select : example : SELECT 2*ROUND(1/2*3.2) --> gives 0 SELECT 2*ROUND(3.2*1/2) --> gives 3 Obviously both should return the same thing, preferably 3. It looks like a bug to me, or at least a non desirable behaviour. Cheers, Rémi -- Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-bugs