The following bug has been logged online: Bug reference: 4653 Logged by: Marco Vieira Email address: [email protected] PostgreSQL version: 8.3.5 Operating system: x86_64-pc-linux-gnu (ubuntu 4.3.2-1ubuntu11 ) Description: zero with negative sign returned on round(sin) function Details:
If I query select round(sin(2.0*pi()*0.51)) I get "-0" as return but zero is unsigned. but: select sin(2.0*pi()*0.51) returns: -0.0627905195293133 and select round(-0.0627905195293133) returns: 0 (no sign) I used cast to work around it: select round(sin(2.0*pi()*0.51))::int -- Sent via pgsql-bugs mailing list ([email protected]) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-bugs
