The lat/lon floating point delusion
11–20 of 154 posts
Re: The lat/lon floating point delusion
#12Did the author think about the implementation? If we assign semantic meaning to the number of decimal points, now we also need to store the number of significant digits side by side with the actual number. We shouldn't round off internally because we might use it in as an intermediate result in a calculation.
> We shouldn't round off internally because we might use it in as an intermediate result in a calculation. Only if the precision is meaningful. The author's point is that it isn't for geographical coordinates.
Re: The lat/lon floating point delusion
#13I find it hard to get that worked up about this. The positions are accurate at least, and if you're really so hard up for space that saving a couple of digits is going to make all the difference then you can think about it for 5 mins and choose a precision/storage trade off that's appropriate for you.
Re: The lat/lon floating point delusion
#14https://www.thoughtco.com/degree-of-latitude-and-longitude-d...
"At 40 degrees north or south, the distance between a degree of longitude is 53 miles (85 kilometers)."
So while it's appropriate for Melbourne (37.8S) to use (very slightly) lower precision than Sydney (33.9S), they're both using too many digits.
Re: The lat/lon floating point delusion
#15Edit: This is what I get for only skimming the article. Ignore
Re: The lat/lon floating point delusion
#16I find it hard to get that worked up about this. The positions are accurate at least, and if you're really so hard up for space that saving a couple of digits is going to make all the difference then you can think about it for 5 mins and choose a precision/storage trade off that's appropriate for you.
The representation of the numbers doesn't convey any information about accuracy, and it's at least a good practice to store data in a way that conveys the precision it was gathered with.
Re: The lat/lon floating point delusion
#17Re: The lat/lon floating point delusion
#18Earlier quoted context omitted.
> We shouldn't round off internally because we might use it in as an intermediate result in a calculation. Only if the precision is meaningful. The author's point is that it isn't for geographical coordinates.
Error tends to grow as the calculation proceeds. 6th-decimal "insignificant rounding" done over and over as the calculation proceeds can grow to become arbitrarily large.
Re: The lat/lon floating point delusion
#19Earlier quoted context omitted.
> We shouldn't round off internally because we might use it in as an intermediate result in a calculation. Only if the precision is meaningful. The author's point is that it isn't for geographical coordinates.
Error tends to grow as the calculation proceeds. 6th-decimal "insignificant rounding" done over and over as the calculation proceeds can grow to become arbitrarily large.
Moreover, given the author's point that real measurement errors exceed the false precision of published data, if such a calculation were performed and did provide "arbitrarily large" error, it would indicate that the result should in fact be nonsense.
Re: The lat/lon floating point delusion
#20A mystery for the ages.