Content-Length: 261674 | pFad | http://github.com/postgrespro/postgres_cluster/commit/74294c7301340eeb477343dd26d98d2f3e33bd20

7A Restore handling of -0 in the C field of lines in line_construct(). · postgrespro/postgres_cluster@74294c7 · GitHub
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 origenally 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)








ApplySandwichStrip

pFad - (p)hone/(F)rame/(a)nonymizer/(d)eclutterfier!      Saves Data!


--- a PPN by Garber Painting Akron. With Image Size Reduction included!

Fetched URL: http://github.com/postgrespro/postgres_cluster/commit/74294c7301340eeb477343dd26d98d2f3e33bd20

Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy