Re: round() function wrong? - Mailing list pgsql-hackers

From Christopher Kings-Lynne
Subject Re: round() function wrong?
Date
Msg-id 3F9B8384.20300@familyhealth.com.au
Whole thread Raw
In response to Re: round() function wrong?  ("scott.marlowe" <scott.marlowe@ihs.com>)
List pgsql-hackers
>>refering to my math professor thats wrong, at least in germany.
>>select round(2.5); should return 3

Well, I thought mathematics theory says that you should round to the 
nearest even number for a 0.5 value, so as to avoid biasing your data...?

> I just tried that on my 7.2.4 and 7.4 beta 4 machines and I get 2 for 
> round(2.5)

What does 3.5 do?

And -2.5 and -3.5?

Chri




pgsql-hackers by date:

Previous
From: Christopher Kings-Lynne
Date:
Subject: Re: Call for port reports
Next
From: Christopher Kings-Lynne
Date:
Subject: Re: Function Permissions