git.postgresql.org Git - postgresql.git/commitdiff

git projects / postgresql.git / commitdiff
? search:
summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: fb17eab)
Restore handling of -0 in the C field of lines in line_construct().
2018年7月29日 18:35:18 +0000 (20:35 +0200)
2018年7月29日 19:11:05 +0000 (21:11 +0200)
Commit a7dc63d904 inadvertedly removed this bit originally introduced
by 43fe90f66a, causing regression test failures on some platforms,
due to producing {1,-1,-0} instead of {1,-1,0}.


diff --git a/src/backend/utils/adt/geo_ops.c b/src/backend/utils/adt/geo_ops.c
index 1fb2ff2603ca4b4292c195b170feb3b0f791fdc5..621b5c33ef1b1bc1fba98c9eca73a786fa3198d2 100644 (file)
--- a/src/backend/utils/adt/geo_ops.c
+++ b/src/backend/utils/adt/geo_ops.c
@@ -1024,6 +1024,9 @@ line_construct(LINE *result, Point *pt, float8 m)
result->A = m;
result->B = -1.0;
result->C = pt->y - m * pt->x;
+ /* on some platforms, the preceding expression tends to produce -0 */
+ if (result->C == 0.0)
+ result->C = 0.0;
}
}
This is the main PostgreSQL git repository.
RSS Atom

AltStyle によって変換されたページ (->オリジナル) /