- Notifications
You must be signed in to change notification settings - Fork15
Fix output precision limit for double values (issue #118)#119
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Merged
Uh oh!
There was an error while loading.Please reload this page.
Merged
Changes fromall commits
Commits
Show all changes
4 commits Select commitHold shift + click to select a range
b7e12f3
Fix output precision limit for double values (issue #118)
vitcppc2116ae
Update upgrade script (reset_sphere_output_precision function)
vitcppd9d5461
Add test for pgSphere output precision with different settings
vitcpp7b3b114
Add extra_float_digits = 2 for epochprop and bounding_box_gist tests
vitcppFile filter
Filter by extension
Conversations
Failed to load comments.
Loading
Uh oh!
There was an error while loading.Please reload this page.
Jump to
Jump to file
Failed to load files.
Loading
Uh oh!
There was an error while loading.Please reload this page.
Diff view
Diff view
There are no files selected for viewing
3 changes: 2 additions & 1 deletionMakefile
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.Learn more about bidirectional Unicode characters
37 changes: 19 additions & 18 deletionsexpected/bounding_box_gist.out
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.Learn more about bidirectional Unicode characters
37 changes: 19 additions & 18 deletionsexpected/bounding_box_gist_1.out
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.Learn more about bidirectional Unicode characters
13 changes: 7 additions & 6 deletionsexpected/epochprop.out
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.Learn more about bidirectional Unicode characters
108 changes: 108 additions & 0 deletionsexpected/epochprop_1.out
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,108 @@ | ||
SET extra_float_digits = 2; | ||
SELECT | ||
to_char(DEGREES(tp[1]), '999D9999999999'), | ||
to_char(DEGREES(tp[2]), '999D9999999999'), | ||
to_char(tp[3], '999D999'), | ||
to_char(DEGREES(tp[4])*3.6e6, '999D999'), | ||
to_char(DEGREES(tp[5])*3.6e6, '99999D999'), | ||
to_char(tp[6], '999D999') | ||
FROM ( | ||
SELECT epoch_prop(spoint(radians(269.45207695), radians(4.693364966)), | ||
546.9759, | ||
RADIANS(-801.551/3.6e6), RADIANS(10362/3.6e6), -110, | ||
-100) AS tp) AS q; | ||
to_char | to_char | to_char | to_char | to_char | to_char | ||
-----------------+-----------------+----------+----------+------------+---------- | ||
269.4742714391 | 4.4072939987 | 543.624 | -791.442 | 10235.412 | -110.450 | ||
(1 row) | ||
SELECT | ||
to_char(DEGREES(tp[1]), '999D9999999999'), | ||
to_char(DEGREES(tp[2]), '999D9999999999'), | ||
to_char(tp[3], '999D999'), | ||
to_char(DEGREES(tp[4])*3.6e6, '999D999'), | ||
to_char(DEGREES(tp[5])*3.6e6, '99999D999'), | ||
to_char(tp[6], '999D999') | ||
FROM ( | ||
SELECT epoch_prop(spoint(radians(269.45207695), radians(4.693364966)), | ||
0, | ||
RADIANS(-801.551/3.6e6), RADIANS(10362/3.6e6), -110, | ||
-100) AS tp) AS q; | ||
to_char | to_char | to_char | to_char | to_char | to_char | ||
-----------------+-----------------+---------+----------+------------+--------- | ||
269.4744079540 | 4.4055337210 | | -801.210 | 10361.762 | | ||
(1 row) | ||
SELECT | ||
to_char(DEGREES(tp[1]), '999D9999999999'), | ||
to_char(DEGREES(tp[2]), '999D9999999999'), | ||
to_char(tp[3], '999D999'), | ||
to_char(DEGREES(tp[4])*3.6e6, '999D999'), | ||
to_char(DEGREES(tp[5])*3.6e6, '99999D999'), | ||
to_char(tp[6], '999D999') | ||
FROM ( | ||
SELECT epoch_prop(spoint(radians(269.45207695), radians(4.693364966)), | ||
NULL, | ||
RADIANS(-801.551/3.6e6), RADIANS(10362/3.6e6), -110, | ||
-100) AS tp) AS q; | ||
to_char | to_char | to_char | to_char | to_char | to_char | ||
-----------------+-----------------+---------+----------+------------+--------- | ||
269.4744079540 | 4.4055337210 | | -801.210 | 10361.762 | | ||
(1 row) | ||
SELECT | ||
to_char(DEGREES(tp[1]), '999D9999999999'), | ||
to_char(DEGREES(tp[2]), '999D9999999999'), | ||
to_char(tp[3], '999D999'), | ||
to_char(DEGREES(tp[4])*3.6e6, '999D999'), | ||
to_char(DEGREES(tp[5])*3.6e6, '99999D999'), | ||
to_char(tp[6], '999D999') | ||
FROM ( | ||
SELECT epoch_prop(spoint(radians(269.45207695), radians(4.693364966)), | ||
23, | ||
RADIANS(-801.551/3.6e6), RADIANS(10362/3.6e6), NULL, | ||
20) AS tp) AS q; | ||
to_char | to_char | to_char | to_char | to_char | to_char | ||
-----------------+-----------------+----------+----------+------------+---------- | ||
269.4476085384 | 4.7509315989 | 23.000 | -801.617 | 10361.984 | 2.159 | ||
(1 row) | ||
SELECT | ||
to_char(DEGREES(tp[1]), '999D9999999999'), | ||
to_char(DEGREES(tp[2]), '999D9999999999'), | ||
to_char(tp[3], '999D999'), | ||
to_char(DEGREES(tp[4])*3.6e6, '999D999'), | ||
to_char(DEGREES(tp[5])*3.6e6, '99999D999'), | ||
to_char(tp[6], '999D999') | ||
FROM ( | ||
SELECT epoch_prop(spoint(radians(269.45207695), radians(4.693364966)), | ||
23, | ||
NULL, RADIANS(10362/3.6e6), -110, | ||
120) AS tp) AS q; | ||
to_char | to_char | to_char | to_char | to_char | to_char | ||
-----------------+-----------------+----------+----------+------------+---------- | ||
269.4520769500 | 5.0388680565 | 23.007 | -.000 | 10368.061 | -97.120 | ||
(1 row) | ||
SELECT epoch_prop(NULL, | ||
23, | ||
0.01 , RADIANS(10362/3.6e6), -110, | ||
120); | ||
ERROR: NULL position not supported in epoch propagation | ||
SELECT epoch_prop_pos(spoint(radians(269.45207695), radians(4.693364966)), | ||
23, | ||
RADIANS(-801.551/3.6e6), RADIANS(10362/3.6e6), -110, | ||
20) AS tp; | ||
tp | ||
------------------------------------------- | ||
(4.702747926583129 , 0.08291945093459933) | ||
(1 row) | ||
SELECT epoch_prop_pos(spoint(radians(269.45207695), radians(4.693364966)), | ||
RADIANS(-801.551/3.6e6), RADIANS(10362/3.6e6), | ||
20) AS tp; | ||
tp | ||
------------------------------------------- | ||
(4.702747930619516 , 0.08291939893808763) | ||
(1 row) | ||
Oops, something went wrong.
Uh oh!
There was an error while loading.Please reload this page.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.