Peter Eisentraut kirjutas R, 24.10.2003 kell 22:16: > Jochen Westland [invigo] writes: > > > In my version > > select round(2.5); returns 2; > > select round(2.5000001) returns 3; > > > > refering to my math professor thats wrong, at least in germany. > > select round(2.5); should return 3 > > The convention that .5 values should be rounded up is just that, a > convention.
Also, which way is up ? hannu=# select round(0.5); round ------- 1 (1 row) hannu=# select round(-0.5); round ------- -1 (1 row) > On systems with IEEE 754 floating point, the default is > normally to round to the nearest even number. ---------------------------(end of broadcast)--------------------------- TIP 9: the planner will ignore your desire to choose an index scan if your joining column's datatypes do not match