Re: round() function wrong?

From: Christopher Kings-Lynne <chriskl(at)familyhealth(dot)com(dot)au>
To: "scott(dot)marlowe" <scott(dot)marlowe(at)ihs(dot)com>
Cc: "Jochen Westland [invigo]" <jochen(dot)westland(at)invigo(dot)de>, "'pgsql-hackers(at)postgresql(dot)org'" <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: round() function wrong?
Date: 2003-10-26 08:19:16
Message-ID: 3F9B8384.20300@familyhealth.com.au
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Christopher Kings-Lynne 2003-10-26 08:28:29 Re: Function Permissions
Previous Message Christopher Kings-Lynne 2003-10-26 08:17:28 Re: Call for port reports