Page MenuHomePhabricator

SPARQL shouldn't display more digits of accuracy than are available
Closed, InvalidPublic

Description

New York has an area of 1,214±1 square kilometres and a population of 8,405,837±0. The given that only 4 digits of accuracy are known for the area the resulting division for the density that's displayed in http://tinyurl.com/y7m8u7c9 shouldn't show more than 4 digits of accuracy. Currently, it shows the value "7043.16803953871499" and that's a lot of digits than warrented.

Event Timeline

Restricted Application added a subscriber: Aklapper. · View Herald TranscriptJun 27 2017, 10:51 AM
thiemowmde closed this task as Invalid.Jun 28 2017, 6:35 PM
thiemowmde triaged this task as Lowest priority.

What happens in your example is that your query contains a calculation, but the result contains only, well, the result. The resulting number does not contain any hint how it was calculated, and what the precision of the other numbers used in this calculation was.

You should use ROUND in your query. Doing some rounding magically in a way that is consistent and does not have any bad side effects is technically not possible.

Restricted Application added a project: Discovery. · View Herald TranscriptJun 28 2017, 6:35 PM