Re: Unexpected result using floor() function - Mailing list pgsql-general

From Merlin Moncure
Subject Re: Unexpected result using floor() function
Date
Msg-id CAHyXU0z_zEpZrPUt9ec1b-YLtQX9HQqoGc3aYVw-9fbFd1fteg@mail.gmail.com
Whole thread Raw
In response to Re: Unexpected result using floor() function  (Pujol Mathieu <mathieu.pujol@realfusio.com>)
Responses Re: Unexpected result using floor() function  (Merlin Moncure <mmoncure@gmail.com>)
Re: Unexpected result using floor() function  (Pujol Mathieu <mathieu.pujol@realfusio.com>)
List pgsql-general
On Mon, Mar 14, 2016 at 9:21 AM, Pujol Mathieu
<mathieu.pujol@realfusio.com> wrote:
> Hi
> I reproduce your bug using "PostgreSQL 9.3.6, compiled by Visual C++ build
> 1600, 64-bit" on Windows 8
> I also notice that SELECT floor(4.725 * power(10, 2)::numeric + 0.5) work as
> expected

I don't think this is a bug -- just peculiarities of floating point math.

merlin


pgsql-general by date:

Previous
From: Vick Khera
Date:
Subject: Re: Unexpected result using floor() function
Next
From: Adrian Klaver
Date:
Subject: Re: Unexpected result using floor() function