Difference between revisions of "Talk:3102: Reading a Big Number"
(Single quotes as a digit separator) |
|||
| Line 21: | Line 21: | ||
By my reckoning, if you set a 78RPM record playing, and waited for it to have spun the amount of arcseconds specified (by that point in the "number", you'd be waiting a tad over 7 ''billion'' times the current age of the universe. I might have erred by a magnifude or three (forgot if I divided number of days down to get number of years, etc, and I much prefer to work with Long Scale billions, so maybe I did it slightly wrong when working with the inferior kind), but... Well, it doesn't really matter ''quite'' so much, I suspect. ;) [[Special:Contributions/82.132.246.216|82.132.246.216]] 17:11, 13 June 2025 (UTC) | By my reckoning, if you set a 78RPM record playing, and waited for it to have spun the amount of arcseconds specified (by that point in the "number", you'd be waiting a tad over 7 ''billion'' times the current age of the universe. I might have erred by a magnifude or three (forgot if I divided number of days down to get number of years, etc, and I much prefer to work with Long Scale billions, so maybe I did it slightly wrong when working with the inferior kind), but... Well, it doesn't really matter ''quite'' so much, I suspect. ;) [[Special:Contributions/82.132.246.216|82.132.246.216]] 17:11, 13 June 2025 (UTC) | ||
| + | |||
| + | I remember, years ago, seeing calculators using single quotes as thousands-separators. But never a double-quote. Interestingly, the C++ standard (as of the 2014 release) permits single-quote characters as an arbitrary digit separator for numeric literals. They are ignored by the compiler, but can be useful for making code more readable (e.g. every 3 decimal digits or every 4 hex digits). See also https://en.cppreference.com/w/cpp/language/integer_literal.html. [[User:Shamino|Shamino]] ([[User talk:Shamino|talk]]) 19:02, 13 June 2025 (UTC) | ||
Revision as of 19:02, 13 June 2025
avrayter Avrayter (talk) 12:27, 13 June 2025 (UTC) how do you add links
Is the final character a 6, or is it a theta? 2A02:F6E:A36E:0:F0F1:E624:A18C:EDC2 14:05, 13 June 2025 (UTC)
I would have to fire any programmer that output hex in lowercase (or put commas in triplets for hex). SDSpivey (talk) 14:14, 13 June 2025 (UTC)
- You may be firing about half of the programmers then :) I don't think there is a rule here, both forms are common, but I guess that there are holy wars to fight. 90.73.80.27 15:41, 13 June 2025 (UTC)
r/unexpectedfactorial Randall Monroe, shame on you!
Surely this is just one line of a CSV file... 86.144.197.52 15:51, 13 June 2025 (UTC)
- That is actually a strong justification!! I'd like to see the headers, tho xD
- Also an unusual and possibly broken CSV. 000 values are uncommon (they are usually just 0), and the " (or '') may be used for quoting. There is no way to tell how it will parse as CSV is not a well defined format. There is a standard, RFC 4180, but it is not always followed. 90.73.80.27 18:03, 13 June 2025 (UTC)
Remember, kids: always end your strings with a NUL 93.36.184.28 15:56, 13 June 2025 (UTC)
By my reckoning, if you set a 78RPM record playing, and waited for it to have spun the amount of arcseconds specified (by that point in the "number", you'd be waiting a tad over 7 billion times the current age of the universe. I might have erred by a magnifude or three (forgot if I divided number of days down to get number of years, etc, and I much prefer to work with Long Scale billions, so maybe I did it slightly wrong when working with the inferior kind), but... Well, it doesn't really matter quite so much, I suspect. ;) 82.132.246.216 17:11, 13 June 2025 (UTC)
I remember, years ago, seeing calculators using single quotes as thousands-separators. But never a double-quote. Interestingly, the C++ standard (as of the 2014 release) permits single-quote characters as an arbitrary digit separator for numeric literals. They are ignored by the compiler, but can be useful for making code more readable (e.g. every 3 decimal digits or every 4 hex digits). See also https://en.cppreference.com/w/cpp/language/integer_literal.html. Shamino (talk) 19:02, 13 June 2025 (UTC)
