We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 6ba9b91 commit 7fc30c4Copy full SHA for 7fc30c4
src/port/rint.c
@@ -4,16 +4,16 @@
4
* rint() implementation
5
*
6
* IDENTIFICATION
7
- * $PostgreSQL: pgsql/src/port/rint.c,v 1.3 2010/02/05 03:20:56 momjian Exp $
+ * $PostgreSQL: pgsql/src/port/rint.c,v 1.4 2010/02/06 05:42:49 tgl Exp $
8
9
*-------------------------------------------------------------------------
10
*/
11
-
12
#include "c.h"
+
13
#include <math.h>
14
15
double
16
rint(double x)
17
{
18
- return (x > 0.0) ? floor(x + 0.5) : ceil(x - 0.5);
+ return (x >= 0.0) ? floor(x + 0.5) : ceil(x - 0.5);
19
}
0 commit comments