Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitfaee5a1

Browse files
committed
Back off output precision in circle.sql regression test.
We were setting extra_float_digits = 0 to avoid platform-dependentoutput in this test, but that's still able to expose platform-specificroundoff behavior in some new test cases added by commita3d2844,as reported by Peter Eisentraut. Reduce it to -1 to hide that.(Over in geometry.sql, we're using -3, which is an ancient decisiondating to337f73b. I wonder whether that's overkill now. Butthere's probably little value in trying to change it.)Back-patch to v12 wherea3d2844 came in; there's no evidence thatwe have any platform-dependent issues here before that.Discussion:https://postgr.es/m/15551268-e224-aa46-084a-124b64095ee3@2ndquadrant.com
1 parentf493d98 commitfaee5a1

File tree

2 files changed

+11
-9
lines changed

2 files changed

+11
-9
lines changed

‎src/test/regress/expected/circle.out

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
11
--
22
-- CIRCLE
33
--
4-
-- avoid bit-exact output here because operations may not be bit-exact.
5-
SET extra_float_digits = 0;
4+
-- Back off displayed precision a little bit to reduce platform-to-platform
5+
-- variation in results.
6+
SET extra_float_digits = -1;
67
CREATE TABLE CIRCLE_TBL (f1 circle);
78
INSERT INTO CIRCLE_TBL VALUES ('<(5,1),3>');
89
INSERT INTO CIRCLE_TBL VALUES ('<(1,2),100>');
@@ -113,12 +114,12 @@ SELECT '' as five, c1.f1 AS one, c2.f1 AS two, (c1.f1 <-> c2.f1) AS distance
113114
five | one | two | distance
114115
------+----------------+----------------+------------------
115116
| <(3,5),0> | <(1,2),3> | 0.60555127546399
116-
| <(3,5),0> | <(5,1),3> |1.47213595499958
117+
| <(3,5),0> | <(5,1),3> | 1.4721359549996
117118
| <(100,200),10> | <(100,1),115> | 74
118-
| <(100,200),10> | <(1,2),100> | 111.370729772479
119-
| <(1,3),5> | <(100,200),10> | 205.476756144497
119+
| <(100,200),10> | <(1,2),100> |111.37072977248
120+
| <(1,3),5> | <(100,200),10> |205.4767561445
120121
| <(5,1),3> | <(100,200),10> | 207.51303816328
121-
| <(3,5),0> | <(100,200),10> | 207.793480159531
122-
| <(1,2),3> | <(100,200),10> | 208.370729772479
122+
| <(3,5),0> | <(100,200),10> |207.79348015953
123+
| <(1,2),3> | <(100,200),10> |208.37072977248
123124
(8 rows)
124125

‎src/test/regress/sql/circle.sql

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,9 @@
22
-- CIRCLE
33
--
44

5-
-- avoid bit-exact output here because operations may not be bit-exact.
6-
SET extra_float_digits=0;
5+
-- Back off displayed precision a little bit to reduce platform-to-platform
6+
-- variation in results.
7+
SET extra_float_digits=-1;
78

89
CREATETABLECIRCLE_TBL (f1circle);
910

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp