Editing Talk:2170: Coordinate Precision

Jump to: navigation, search
Ambox notice.png Please sign your posts with ~~~~

Warning: You are not logged in. Your IP address will be publicly visible if you make any edits. If you log in or create an account, your edits will be attributed to your username, along with other benefits.

The edit can be undone. Please check the comparison below to verify that this is what you want to do, and then save the changes below to finish undoing the edit.
Latest revision Your text
Line 29: Line 29:
  
 
I would like to mention that neither number seems to fit into a standard double float value. I made a fiddle showing this. [https://dotnetfiddle.net/k7yK0Y#] [[User:Ansarya|Ansarya]] ([[User talk:Ansarya|talk]]) 01:48, 2 July 2019 (UTC)
 
I would like to mention that neither number seems to fit into a standard double float value. I made a fiddle showing this. [https://dotnetfiddle.net/k7yK0Y#] [[User:Ansarya|Ansarya]] ([[User talk:Ansarya|talk]]) 01:48, 2 July 2019 (UTC)
:Floats are stored base 2, so representing them exactly as decimal often requires many more digits than is actually necessary (for complicated number theory reasons, a float can always be represented exactly as decimal, which would not be true if floats were stored in base 3). For this reason, programming languages that can format floats round them, usually to a number of digits where it will be possible to reconstruct the original float (though C# apparently takes off a couple extra digits, since those digits are almost never significant). To illustrate this, I used Rust to print many more digits of a float than would be shown normally [https://play.rust-lang.org/?version=stable&mode=debug&edition=2018&gist=6796c2459ceabea1a03d7113b676dd8f]. The latitude coordinate in the comic could be the result of printing a double precision float, but the longitude coordinate could not be. Also note that it takes almost 50 digits to reach an exact base 10 representation, even though only 14 or 15 of those digits are actually needed to reconstruct the original float. [[User:Probably not Douglas Hofstadter|Probably not Douglas Hofstadter]] ([[User talk:Probably not Douglas Hofstadter|talk]]) 18:01, 2 July 2019 (UTC)
+
:Floats are stored base 2, so representing them exactly as decimal often requires many more digits than is actually necessary (for complicated number theory reasons, a float can always be represented exactly as decimal, which would not be true if floats were stored in base 3). For this reason, programming languages that can format floats round them, usually to a number of digits where it will be possible to reconstruct the original float (though C# apparently takes off a couple extra digits, since those digits are almost never significant). To illustrate this, I used Rust to print many more digits of a float than would be shown normally [https://play.rust-lang.org/?version=stable&mode=debug&edition=2018&gist=6796c2459ceabea1a03d7113b676dd8f]. The latitude coordinate given could be the result of printing a double precision float, but the longitude coordinate could not be. Also note that it takes almost 50 digits to reach an exact base 10 representation, even though only 14 or 15 of those digits are needed to reconstruct the original float. [[User:Probably not Douglas Hofstadter|Probably not Douglas Hofstadter]] ([[User talk:Probably not Douglas Hofstadter|talk]]) 18:01, 2 July 2019 (UTC)
  
 
May be my pet peeve... ...but adding an additional error to every piece of input data [and maybe every intermediate result] in order to show that either the precision the original measurement ends here or that all further digits of the measurement read "0" often introduces an error that can add up surprisingly quickly => I personally prefer raw floats that indicate there probably was no error analysis to rounded data and won't get tired on telling people to explicitely state what precision they can expect.[[Special:Contributions/162.158.114.70|162.158.114.70]]
 
May be my pet peeve... ...but adding an additional error to every piece of input data [and maybe every intermediate result] in order to show that either the precision the original measurement ends here or that all further digits of the measurement read "0" often introduces an error that can add up surprisingly quickly => I personally prefer raw floats that indicate there probably was no error analysis to rounded data and won't get tired on telling people to explicitely state what precision they can expect.[[Special:Contributions/162.158.114.70|162.158.114.70]]

Please note that all contributions to explain xkcd may be edited, altered, or removed by other contributors. If you do not want your writing to be edited mercilessly, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource (see explain xkcd:Copyrights for details). Do not submit copyrighted work without permission!

To protect the wiki against automated edit spam, we kindly ask you to solve the following CAPTCHA:

Cancel | Editing help (opens in new window)

Template used on this page: