https://www.explainxkcd.com/wiki/api.php?action=feedcontributions&user=173.245.53.199&feedformat=atomexplain xkcd - User contributions [en]2020-04-05T22:32:19ZUser contributionsMediaWiki 1.30.0https://www.explainxkcd.com/wiki/index.php?title=Talk:1047:_Approximations&diff=60725Talk:1047: Approximations2014-02-21T12:38:31Z<p>173.245.53.199: </p>
<hr />
<div>They're actually quite accurate. I've used these in calculations, and they seem to give close enough answers. '''[[User:Davidy22|<span title="I want you."><u><font color="purple" size="2px">David</font><font color="green" size="3px">y</font></u><sup><font color="indigo" size="1px">22</font></sup></span>]]'''[[User talk:Davidy22|<tt>[talk]</tt>]] 14:03, 8 January 2013 (UTC)<br />
<br />
I only see a use for the liters in a gallon one. The rest are for trolling or simple amusement. The cosine identity bit our math team in the butt at a competition. It was painful. --[[User:Quicksilver|Quicksilver]] ([[User talk:Quicksilver|talk]]) 05:27, 17 August 2013 (UTC)<br />
<br />
Annoyingly this explanation does not cover 42 properly, it does not say that Douglas Adams got the number 42 from Lewis Carroll, who is more relevant to the page because he was a mathematician named Charles Lutwidge Dodgson. He was obsessed with the number forty-two. The original plate illustrations of Alice in Wonderland drawn by him numbered forty-two. Rule Forty-Two in Alice in Wonderland is "All persons more than a mile high to leave the court", There is also a Code of Honour in the preface of The Hunting of the Snark, an extremely long poem written by him when he was 42 years old, in which rule forty-two is "No one shall speak to the Man at the Helm". The queens in Alice Through the Looking Glass the White Queen announces her age as "one hundred and one, five months and a day", which - if the best possible date is assumed for the action of Through the Looking-Glass - gives a total of 37,044 days. With the further (textually unconfirmed) assumption that both Queens were born on the same day their combined age becomes 74,088 days, which is 42 x 42 x 42. --[[Special:Contributions/139.216.242.254|139.216.242.254]] 02:43, 29 August 2013 (UTC)<br />
<br />
<br />
:: This explanation covers 42 adequately, and would probably be made slightly worse if such information were added. The very widely known cultural reference is to Adams's interpretation, not Dodgson's original obsession. Adding it would be akin to introducing the MPLM into the explanation for the hijacking of Renaissance artists' names by the TMNT. I definitely concede that it does not cover 42 exhaustively, but I think it can be considered complete and in working order without such an addition. If it really irks you, be bold and add it! --[[User:Quicksilver|Quicksilver]] ([[User talk:Quicksilver|talk]]) 00:37, 30 August 2013 (UTC)<br />
<br />
"sqrt(2) is not even algebraic in the quotient field of Z[pi]" is not correct. Q is part of the quotient field of Z[pi] and sqrt(2) is algebraic of it. The needed facts are that pi is not algebraic, but the formula implies it is in Q(sqrt(2)). --DrMath 06:47, 7 September 2013 (UTC)<br />
<br />
13/15 is a better approximation to sqrt(3)/2 than is e/pi. Continued fraction approximations are great! --DrMath 07:23, 7 September 2013 (UTC)<br />
<br />
<br />
How could he forget 1 gallon ≈ 0.1337 ft³?! [[Special:Contributions/67.188.195.182|67.188.195.182]] 00:51, 8 September 2013 (UTC)<br />
<br />
Worth mentioning that Wolfram Alpha now officially recognizes the [http://www.wolframalpha.com/input/?i=e%5E-%28%281%2B8%5E%281%2F%28e-1%29%29%29%5E%281%2Fpi%29%29 White House switchboard constant] and the [http://www.wolframalpha.com/input/?i=%287%5E%28e-1%2Fe%29-9%29*pi%5E2 Jenny constant]. [[Special:Contributions/86.164.243.91|86.164.243.91]] 18:28, 8 October 2013 (UTC)<br />
<br />
Maybe we should add the [Extension:LaTeXSVG LaTeX extension] to make it easier to transcribe these equations. -- [[Special:Contributions/108.162.219.220|108.162.219.220]] 23:02, 16 December 2013 (UTC)<br />
<br />
<br />
;Protip - Does anyone see the correct equation?<br />
Maybe this is just an other Wolfram Alpha error, like we recently have had here: [[1292: Pi vs. Tau]]. All equations still look invalid to me.<br />
*''√2 = 3/5 + π/(7-π)'': is impossible because √2 is an irrational number and no equation can match.<br />
*''cos(π/7) + cos(3π/7) + cos(5π/7) = 1/2'': could only match if ''cos(x) + cos(3x) + cos(5x) = 1/2'' would be valid, because ''π/7'' is also an irrational number.<br />
*''γ = e/3<sup>4</sup> + e/5 or γ = e/54 + e/5'': would mean that a sum of two irrational numbers do fit to the Gamma Constant. Impossible.<br />
*''√5 = 13 + 4π / 24 - 4π'': √5 and π are irrational numbers, there is no way to match them in any equation like this.<br />
*''Σ 1/n<sup>n</sup> = ln(3)<sup>e</sup>'': doesn't make any sense either.<br />
Maybe [[:Category:Comics featuring Miss Lenhart|Miss Lenhart]] can help.<br />
--[[User:Dgbrt|Dgbrt]] ([[User talk:Dgbrt|talk]]) 21:41, 17 December 2013 (UTC)<br />
<br />
cos(π/7) + cos(3π/7) + cos(5π/7) = 1/2 is exactly correct. <br />
<br />
Let a=π/7, b=3π/7, and c=5π/7, then <br />
(cosa+cosb+cosc)⋅2sina=2cosasina+2cosbsina+2coscsina=sin2a+sin(b+a)−sin(b−a)+sin(c+a)−sin(c−a)=sin(2π/7)+sin(4π/7)−sin(2π/7)+sin(6π/7)−sin(4π/7)=sin(6π/7)=sin(π/7)=sina<br />
<br />
Hence, cos(π/7) + cos(3π/7) + cos(5π/7) = sin(π/7) / 2sin(π/7) = 1/2<br />
[[Special:Contributions/108.162.216.74|108.162.216.74]] 01:57, 16 January 2014 (UTC)<br />
<br />
:What is this: sin(6π/7)=sin(π/7) ? A new math is born... --[[User:Dgbrt|Dgbrt]] ([[User talk:Dgbrt|talk]]) 20:49, 16 January 2014 (UTC)<br />
<br />
::Actually it does. My proof is geometric: the sines of two supplementary angles (angle a + angle b = π (in radians)) are equivalent because they necessarily have the same x height in a Cartesian plane. Look on a unit circle, or even a sine function. Also, Calculus and most other mathematics use radians over degrees because they make the functions simpler and eliminate irrationality when a trig function shows up, but physics uses degrees because it's easier to understand and taught first. Anonymous 01:27, 13 February 2014 (UTC)<br />
::As an aside, just how far along in math are you? Radian measure is taught in high school (at least the good ones). Anonymous 13:24, 13 February 2014 (UTC)<br />
:::Sure, I was wrong at my last statement. sin(6π/7)=sin(π/7) is correct by using the radian measure. But just change π/7 to π/77 would give a very different result on that formular here. I still can't figure out why PI divided by the number 7 should be that unique, PI divided by 77 should be the same. My fault is: I still can't find the Nerd Sniping here. And we all do know that Randall did use wrong WolframAlpha results here. According to the last question: I'm very well on Math, that's because I want to understand this. This is like 0.999=1. --[[User:Dgbrt|Dgbrt]] ([[User talk:Dgbrt|talk]]) 22:01, 13 February 2014 (UTC)<br />
::::Ah, I see. I think it has to do with the way e^i*π breaks down, as one of the answers shown in the corresponding link explains, but other answers rely on various angle identities (including the supplementary sines one in the proof above). Anonymous 03:10, 14 February 2014 (UTC) (PS, have you checked [[545]] lately? I answered your question there, too)<br />
:::::As per the derivation from january 16 , you can use any a,b,c that satisfies this set of equations: 2 a = b - a, a + b = c- a, c + a = π - a. This is due to the fact that sin(x) = sin(π-x), and what was derived the 16th. [[Special:Contributions/173.245.53.199|173.245.53.199]] 12:38, 21 February 2014 (UTC)<br />
<br />
;So, still incomplete?<br />
<br />
Where's our (in)complete judge? [[Special:Contributions/199.27.128.186|199.27.128.186]] 19:21, 18 December 2013 (UTC)<br />
:The protip is still a mystery. I'm calling for help a few lines above. --[[User:Dgbrt|Dgbrt]] ([[User talk:Dgbrt|talk]]) 21:16, 18 December 2013 (UTC)</div>173.245.53.199https://www.explainxkcd.com/wiki/index.php?title=Talk:1313:_Regex_Golf&diff=56772Talk:1313: Regex Golf2014-01-06T20:32:23Z<p>173.245.53.199: </p>
<hr />
<div>This is fairly simple fun little one.<br />
<br />
Regex is sort for regular expressions. A regular expression is a series of characters that denotes a search criteria. For example, you could write a regular expression that would search for anything that looks like an address (a la [http://www.xkcd.com/208/ comic 208]).<br />
<br />
Regex golf is a game in which you attempt to write a regular expression that will search through a list of items and bring back only those items that meet a certain criteria, but not anything else. The joke is that regular expressions are used to search text, but themselves are text strings. This means that you could write a regular expression that would look for another regular expression. You can then apply ''ad infinitum'', and the universe implodes or something.<br />
<br />
--[[User:Holshy|Holshy]] ([[User talk:Holshy|talk]]) 05:40, 6 January 2014 (UTC)<br />
<br />
The last panel includes, of course, a regex "/(meta-)*regex golf/," which represents the phrase "regex golf" preceded by the phrase "meta-" up to ''infinite'' times.<br />
<br />
As a punchline, it also refers to Jamie Zawinski's well-known quote about regex,<br />
<br />
<blockquote>Some people, when confronted with a problem, think "I know, I'll use regular expressions." Now they have two problems.</blockquote><br />
<br />
Thus, the punchline is that the addition of meta layers to regex golf generates more problems for the programmer, but that was also the setup of the comic. So either the punchline is really weak—worth a chuckle if you got the above two references—or I missed the joke.<br />
[[Special:Contributions/199.27.128.63|199.27.128.63]] 06:22, 6 January 2014 (UTC)<br />
<br />
Could anybody comment on the first regex? Do I get it right that<br />
beyond others it will match all strings that contain a "b"? I can hardly believe that is not the case for any star trek subtitle... [[Special:Contributions/173.245.53.194|173.245.53.194]] 06:54, 6 January 2014 (UTC)<br />
:This is the case for all Star Trek Subtitles. Wikipedia's list of movies had no b. It'll match anything containing a word ending in ''m'', any word beginning with ''n'' or ''t'' that is not the first word, or any word with a ''b''. No Trek movies match. Oddly, so far as I can figure out, the regex in the first panel is wrong, in that it doesn't match the second Star Wars movie at all. And before you tell me prequels don't count, the sole purpose of "m " is to match The Phanto''m ''Menace.[[Special:Contributions/199.27.128.138|199.27.128.138]] 07:10, 6 January 2014 (UTC)<br />
Attack of[ t]he Clones (to be read plainly, not as a regular expression). [[Special:Contributions/173.245.53.107|173.245.53.107]] 07:29, 6 January 2014 (UTC)<br />
:Ah, I thought it was ''The Clone Wars''. [[Special:Contributions/199.27.128.138|199.27.128.138]] 15:36, 6 January 2014 (UTC)<br />
So, if I add an "e" to the "tn" and delete the "|b" I'm a better golf player than her? [[Special:Contributions/108.162.212.194|108.162.212.194]] 08:23, 6 January 2014 (UTC)<br />
:Or you could just move the "b" into the "tn" group. --11:08, 6 January 2014 (UTC)<br />
<br />
I got a sneak preview of this comic at about 6:34 EST...at first it appeared to be random text in a irc message, but with this comic it now makes sense to me. [[User:Verticalbar|Verticalbar]] ([[User talk:Verticalbar|talk]]) 09:31, 6 January 2014 (UTC)<br />
<br />
'''Regex golf''' (c.f. {{w|Perl golf}}) is a programming competition / is a pastime of finding regular expression that matches one set of strings while matching none of the other set. See for example http://regex.alf.nu --[[User:JakubNarebski|JakubNarebski]] ([[User talk:JakubNarebski|talk]]) 11:03, 6 January 2014 (UTC)<br />
<br />
The title text isn't exactly true... I haven't tried everything, but that regex doesn't match "gerald ford" at all. [[Special:Contributions/199.27.128.109|199.27.128.109]] 11:23, 6 January 2014 (UTC)<br />
: Gerald Ford wasn't elected, he became President following Nixon's resignation.<br />
[[Special:Contributions/173.245.52.209|173.245.52.209]] 12:12, 6 January 2014 (UTC)<br />
<br />
Inspired by regex.alf.nu, a reader built a page where the objective is to make a regular expression to match all Star Wars and no Star Trek: http://zegnat.github.io/xkcd1313/. [[Special:Contributions/173.245.53.127|173.245.53.127]] 14:00, 6 January 2014 (UTC)<br />
<br />
I added a list of all US elected presidents and the part of the title regex they match. I used a python script to generate it, with input from [http://http://en.wikipedia.org/wiki/List_of_United_States_presidential_candidates here], then I removed all presidents that do not match after finding they really weren't elected. There may still be superflous ones, that weren't elected but do match the regex, please check. [[Special:Contributions/173.245.49.64|173.245.49.64]] 14:29, 6 January 2014 (UTC)<br />
<br />
Does anyone understand the final "No, I had those already"? Is it a reference to regexes in some way or could it be something like that there are infinite problems in life, even when not doing (Meta-)*-Regexes? --[[Special:Contributions/173.245.53.199|173.245.53.199]] 20:32, 6 January 2014 (UTC)</div>173.245.53.199