"Saurabh Mittal" <[EMAIL PROTECTED]> writes: > select ROUND(0.5) ; returns 0 > select ROUND(1.5) ; returns 2; > select ROUND(2.5) ; returns 2; > select ROUND(3.5) ; returns 4;....so on .=20 > I'm sure you would have figured out what's happening !!! Why ??
Because the IEEE float math standard says so. Round-to-nearest-even is considered good practice. > How do I get to approximate any number x.5 as x+1 ?? Try FLOOR(x + 0.5) if you really want the other behavior. regards, tom lane ---------------------------(end of broadcast)--------------------------- TIP 5: Have you checked our extensive FAQ? http://www.postgresql.org/users-lounge/docs/faq.html