Re: [GENERAL] [GENARAL] round() bug

2014-04-16 Thread Albe Laurenz
Raymond O'Donnell wrote: >>> Interestingly, I get different results (on both 9.1.4 and 9.3.0) on >>> Windows: >> I'm not particularly surprised that Windows is not being IEEE compliant, and >> instead chooses the more common round-away-from-zero behavior, here though I >> am unsure where the depen

Re: [GENERAL] [GENARAL] round() bug

2014-04-15 Thread Adrian Klaver
On 04/15/2014 10:21 AM, Raymond O'Donnell wrote: On 15/04/2014 17:34, David G Johnston wrote: Oh, so does the rounding code use OS facilities, then, rather than being implemented in Postgres? - Didn't know that, though I was aware PG does that in other areas (collation, for example). See th

Re: [GENERAL] [GENARAL] round() bug

2014-04-15 Thread Raymond O'Donnell
On 15/04/2014 17:34, David G Johnston wrote: > Raymond O'Donnell wrote >> On 15/04/2014 17:20, David G Johnston wrote: >>> Willy-Bas Loos-3 wrote Hi, I ran into some strange behavior. Seems like a bug to me? wbloos=# select round(0.5::numeric), round(0.5::double precision); rou

Re: [GENERAL] [GENARAL] round() bug

2014-04-15 Thread David G Johnston
Raymond O'Donnell wrote > On 15/04/2014 17:20, David G Johnston wrote: >> Willy-Bas Loos-3 wrote >>> Hi, I ran into some strange behavior. Seems like a bug to me? >>> >>> wbloos=# select round(0.5::numeric), round(0.5::double precision); >>> round | round ---+--- 1 | 0 (1 row) >> >>

Re: [GENERAL] [GENARAL] round() bug

2014-04-15 Thread Raymond O'Donnell
On 15/04/2014 17:20, David G Johnston wrote: > Willy-Bas Loos-3 wrote >> Hi, I ran into some strange behavior. Seems like a bug to me? >> >> wbloos=# select round(0.5::numeric), round(0.5::double precision); >> round | round ---+--- 1 | 0 (1 row) > > Not a bug; and likely to simple t

Re: [GENERAL] [GENARAL] round() bug

2014-04-15 Thread David G Johnston
Willy-Bas Loos-3 wrote > Hi, > I ran into some strange behavior. > Seems like a bug to me? > > wbloos=# select round(0.5::numeric), round(0.5::double precision); > round | round > ---+--- > 1 | 0 > (1 row) Not a bug; and likely to simple to have escaped notice this long so the f

[GENERAL] [GENARAL] round() bug?

2014-04-15 Thread Willy-Bas Loos
Hi, I ran into some strange behavior. Seems like a bug to me? wbloos=# select round(0.5::numeric), round(0.5::double precision); round | round ---+--- 1 | 0 (1 row) wbloos=# select version(); version --