Skip to content
Snippets Groups Projects
Commit 7fc30c48 authored by Tom Lane's avatar Tom Lane
Browse files

Avoid changing the sign of zero. Per buildfarm failures.

parent 6ba9b910
No related branches found
No related tags found
No related merge requests found
......@@ -4,16 +4,16 @@
* rint() implementation
*
* IDENTIFICATION
* $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 $
*
*-------------------------------------------------------------------------
*/
#include "c.h"
#include <math.h>
double
rint(double x)
{
return (x > 0.0) ? floor(x + 0.5) : ceil(x - 0.5);
return (x >= 0.0) ? floor(x + 0.5) : ceil(x - 0.5);
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment