Difference between revisions of "Talk:1275: int(pi)"

Explain xkcd: It's 'cause you're dumb.
Jump to: navigation, search
Line 5: Line 5:
 
I thought this was a reference to [http://www.strangehorizons.com/2000/20001120/secret_number.shtml Bleem] and reminds me of comic [[899]]. <span style="color:green;">Saibot84</span> 06:17, 9 October 2013 (UTC)
 
I thought this was a reference to [http://www.strangehorizons.com/2000/20001120/secret_number.shtml Bleem] and reminds me of comic [[899]]. <span style="color:green;">Saibot84</span> 06:17, 9 October 2013 (UTC)
  
 +
Prudent mathematicians just refer to it as "The Scottish Number". [[User:Dr Pepper|Dr Pepper]] ([[User talk:Dr Pepper|talk]]) 06:58, 9 October 2013 (UTC) Dr Pepper
  
Prudent mathematicians just refer to it as "The Scottish Number". [[User:Dr Pepper|Dr Pepper]] ([[User talk:Dr Pepper|talk]]) 06:58, 9 October 2013 (UTC) Dr Pepper
+
I can give you one '''rational''' reason for spelling out things like INT(PI). Back in the ancient times, there was a piece of electronics dubbed then a ''personal computer'' with an NSA code name of ZXSPECTRUM. It had a built-in interpreter of the ancient language codenamed BASIC. Memory was very precious in those times, every single byte counted. The creators of the interpreter did a (somewhat) clever thing - all keywords of this particular dialect of the BASIC language were stored in memory as single-byte codes, and were only spelled out by the text display routines. On the other hand, CPU cycles were precious, too, so they did another (not so) clever thing by storing number constants (like the cursed number mentioned above) twofold - both in an ASCII decimal form for display purposes and in a 6-byte internal binary form for computing purposes. BASIC hackers exploited this (mis)features to save a few bytes on some commonly-used constants by saying INT PI (parentheses were not needed) or NOT PI (to get 0), thus using only 2 bytes of memory instead of 7 if the numbers were used directly. I had even seen NOT NOT PI to get 1 (saving 4 bytes). [[Special:Contributions/89.174.214.74|89.174.214.74]] 08:43, 9 October 2013 (UTC)

Revision as of 08:43, 9 October 2013

Well, I get the int(Pi) thing, but what's with avoiding 3's? 95.35.58.168 05:10, 9 October 2013 (UTC)

What is "floor pie"? --JakubNarebski (talk) 05:31, 9 October 2013 (UTC)

I thought this was a reference to Bleem and reminds me of comic 899. Saibot84 06:17, 9 October 2013 (UTC)

Prudent mathematicians just refer to it as "The Scottish Number". Dr Pepper (talk) 06:58, 9 October 2013 (UTC) Dr Pepper

I can give you one rational reason for spelling out things like INT(PI). Back in the ancient times, there was a piece of electronics dubbed then a personal computer with an NSA code name of ZXSPECTRUM. It had a built-in interpreter of the ancient language codenamed BASIC. Memory was very precious in those times, every single byte counted. The creators of the interpreter did a (somewhat) clever thing - all keywords of this particular dialect of the BASIC language were stored in memory as single-byte codes, and were only spelled out by the text display routines. On the other hand, CPU cycles were precious, too, so they did another (not so) clever thing by storing number constants (like the cursed number mentioned above) twofold - both in an ASCII decimal form for display purposes and in a 6-byte internal binary form for computing purposes. BASIC hackers exploited this (mis)features to save a few bytes on some commonly-used constants by saying INT PI (parentheses were not needed) or NOT PI (to get 0), thus using only 2 bytes of memory instead of 7 if the numbers were used directly. I had even seen NOT NOT PI to get 1 (saving 4 bytes). 89.174.214.74 08:43, 9 October 2013 (UTC)