Skip to content

Commit 74294c7

Browse files
committed
Restore handling of -0 in the C field of lines in line_construct().
Commit a7dc63d inadvertedly removed this bit originally introduced by 43fe90f, causing regression test failures on some platforms, due to producing {1,-1,-0} instead of {1,-1,0}.
1 parent fb17eab commit 74294c7

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/backend/utils/adt/geo_ops.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1024,6 +1024,9 @@ line_construct(LINE *result, Point *pt, float8 m)
10241024
result->A = m;
10251025
result->B = -1.0;
10261026
result->C = pt->y - m * pt->x;
1027+
/* on some platforms, the preceding expression tends to produce -0 */
1028+
if (result->C == 0.0)
1029+
result->C = 0.0;
10271030
}
10281031
}
10291032

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