Skip to content

Commit 7fc30c4

Browse files
committed
Avoid changing the sign of zero. Per buildfarm failures.
1 parent 6ba9b91 commit 7fc30c4

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/port/rint.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,16 +4,16 @@
44
* rint() implementation
55
*
66
* IDENTIFICATION
7-
* $PostgreSQL: pgsql/src/port/rint.c,v 1.3 2010/02/05 03:20:56 momjian Exp $
7+
* $PostgreSQL: pgsql/src/port/rint.c,v 1.4 2010/02/06 05:42:49 tgl Exp $
88
*
99
*-------------------------------------------------------------------------
1010
*/
11-
1211
#include "c.h"
12+
1313
#include <math.h>
1414

1515
double
1616
rint(double x)
1717
{
18-
return (x > 0.0) ? floor(x + 0.5) : ceil(x - 0.5);
18+
return (x >= 0.0) ? floor(x + 0.5) : ceil(x - 0.5);
1919
}

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy