This forum is for the individual discussion thread that goes with each new comic.

Moderators: Moderators General, Magistrates, Prelates

Waffles wrote:1) ...
2) ...
3) ...
4) ...
5) ...

... All four of these are real examples that I have witnessed first hand - whether it happened to me, a coworker in my department, or a close relation. I'm not bitter at #4 at all. Of course not. And I'm not frustrated at all that they didn't give me four hours to polish a hack-job process improvement into something that any schlub could use, thus saving four invaluable guys three days about four times per quarter.

Off-by-one error.

lemmings

Posts: 154
Joined: Tue Sep 16, 2008 4:38 am UTC

masher wrote:
tim314 wrote:Randall wrote "0x5f375a86", not "0x5f3759df" . . . Is this a mistake?

See http://www.lomont.org/Math/Papers/2003/InvSqrt.pdf . Chris Lomont finds that 0x5f375a86 is better than 0x5f3759df.

So, sounds like my original post was wrongish...

From the wiki:
It is not known precisely how the exact value for the magic number was determined. Chris Lomont developed a function to minimize approximation error by choosing the magic number R over a range. He predicted the new constant 0x5f375a86, close to 0x5f3759df, but his constant was more accurate before one iteration of Newton's method and less accurate than the original constant after one iteration. He concluded that the exact value of the constant could have been chosen through trial and error.

So... Randall does have the right number in a non-practical sense, it just isn't the number buried in the Q3A code.

<3 Q3A.
thret

Posts: 52
Joined: Fri Mar 14, 2008 11:40 am UTC

thret wrote:From the wiki:
It is not known precisely how the exact value for the magic number was determined. Chris Lomont developed a function to minimize approximation error by choosing the magic number R over a range. He predicted the new constant 0x5f375a86, close to 0x5f3759df, but his constant was more accurate before one iteration of Newton's method and less accurate than the original constant after one iteration. He concluded that the exact value of the constant could have been chosen through trial and error.

Not quite... if you read the paper, you find that new constant that was predicted, which was better as a first approximation, but worse after Newton's method, is 0x5f37642f, a third number.

The ...a86 number was just another number found by trial-and-error, brute-forcing the neighbourhood of numbers around the predicted value. It's better than the ...9df number at all three points (zero, one or two applications of Newton's method) but only negligibly.
While no one overhear you quickly tell me not cow cow.

phlip
Restorer of Worlds

Posts: 6958
Joined: Sat Sep 23, 2006 3:56 am UTC
Location: Australia

Academic: Ah, I see you've finished that little bit of coding for my paper. I'm sure we can fit your name on there somewhere.

Business: Only two hundred lines in 48 hours? You should be careful, what with the restructuring coming up and all.
JeromeWest

Posts: 32
Joined: Wed Oct 21, 2009 9:47 am UTC

Being a computer scientist who publishes papers, I do feel inclined to add a bit of realism to this cartoon

academic "My god.. this will mean a half-dozen papers, a thesis or two, and a paragraph in every textbook on queuing theory!... which nobody reads and even less people give a shit about"

business "My god.. this will sell by the bucketload, make us a fortune and every household in the world will get this machine and thereby make use of your code"
spekkeh

Posts: 17
Joined: Wed Nov 18, 2009 11:13 am UTC

academic "My god.. this will mean a half-dozen papers, a thesis or two, and a paragraph in every textbook on queuing theory!... which nobody reads and even less people give a shit about"

business "My god.. this will sell by the bucketload, make us a fortune and every household in the world will get this machine and thereby make use of your code, though they won't give a shit about your code either because nobody will ever actually see the code, much less reuse it, since we're closing this treasure up behind the strongest patents, eulas, copyright restrictions, NDAs, and DRMs we can imagine."

(strong part mine, added to quote from spekkeh.)

Hem, this fight could go on forever, I guess.
ikajaste

Posts: 3
Joined: Wed Nov 18, 2009 11:30 am UTC

roffle

I am not a computer scientist so I knew I wouldn't get the reference even if I did look it up.

But I think this sort of thing holds true in any specialised profession. I know I have spent hours (days, weeks, months) on things which get reduced to half a paragraph ... which is then printed on some extraordinary proportion of the entire company's output.

Credit crunch pah.
Dudes, I'm a woman.

littlelj

Posts: 140
Joined: Wed Feb 18, 2009 10:40 am UTC

Ah. So this is why I never went into computer science. Either approach sounds rubbish.

(I'm doing Physics instead. Much more relevant, apparently ¬_¬)
...And before you ask: yes, I do like to listen to myself talk!

Fat Zombie

Posts: 588
Joined: Wed Jun 06, 2007 10:28 am UTC
Location: The comfy chair.

FYI, the top Google result for "5f375a86" attempts to install malware under the guise of scanning for malware. Not fun when Firefox wants to reopen the tabs after restarting.
tempacct5f375a86

Posts: 1
Joined: Wed Nov 18, 2009 1:10 pm UTC

This particular webcomic reads like it was written by someone who has not had a sufficient amount of experience in either academia or business.

At the end of the day, the question is: which world poses more interesting problems, and which world makes it more likely that your code actually gets used. The answer will vary from person to person, but for me the business world has proven more challenging, fruitful, and just plain fun than academia ever did.
peterb

Posts: 1
Joined: Wed Nov 18, 2009 1:11 pm UTC

spekkeh wrote:academic "My god.. this will mean a half-dozen papers, a thesis or two, and a paragraph in every textbook on queuing theory!... which nobody reads and even less people give a shit about"

I'll just drop my 2 cents here.

The thing with academic research is that it's not meant to produce breakthroughs everyday. You do some original research that will probably contribute to nothing right away. But someday, someone will find your work and develop it a little further and so on. So little stone, by little stone something good will come out in the end and you'll know that you had your part on this.

This is my point of view (at the moment). However, I can fully understand the people that won't approve it (and their reasons for not doing so).
Avon

Posts: 1
Joined: Wed Nov 18, 2009 12:51 pm UTC

While both academics and businesspeople can feel underappreciated, let's not forget that the guy in industry is probably earning about 5 times more while the academic can barely feed his family...
Let's have a fervent argument, mostly over semantics, where we all claim the burden of proof is on the other side!

Posts: 648
Joined: Sat Oct 27, 2007 5:51 pm UTC

phlip wrote:Yeah, the P vs NP thing is a matter of significant importance to computer scientists, reasonable importance to programmers in general, and potentially interesting to people who find maths interesting, but pretty much irrelevant to anyone else.

Well, that's if they're not equal. On the off-chance that they are equal...
SocialSceneRepairman

Posts: 200
Joined: Sat May 24, 2008 4:17 am UTC

Waffles wrote:Only hardcore maths people spell it with an 's' at the end

I thought it was "maths" = British, "math" = US.
Waffles wrote:I'm not bitter at #4 at all.

Okay, I covered language, you've got sarcasm, and the comic did math. Now we're just missing romance.
Ben'); DROP TABLE Users;--

GENERATION 42: The first time you see this, copy it into yοur sig on any forum and stick a fork in yοur еyе. Social experiment.

DragonHawk

Posts: 457
Joined: Sat Sep 15, 2007 1:20 am UTC
Location: NH, US, Earth

spekkeh wrote:business "My god.. this will sell by the bucketload, make us a fortune and every household in the world will get this machine and thereby make use of your code"

The problem with the business line is that you're assuming the boss knows anything about computers.
Carteeg_Struve

Posts: 76
Joined: Mon Jun 08, 2009 12:56 pm UTC

Plasma Man wrote:Good and true comic. In my experience (in business), the only reward for being competent at your job is that your job becomes to fix other people's incompetence.

That IS my job. It's clear that as long as I work in this field, I'll never find the next 0xdeadbeef, erm... 0x5f3759df.

I can say, though, that in my ten years in business, I've had my fair share of experiences seeing brilliance unnoticed and "can you make that cell green" gratuitously rewarded. It can be awfully demoralizing.
Last edited by woktiny on Wed Nov 18, 2009 2:44 pm UTC, edited 1 time in total.
woktiny

Posts: 97
Joined: Tue Sep 11, 2007 2:42 pm UTC

The Business part should be "My god, this code is utterly unreadable and unmaintainable! Re-write it until you can explain it to me in under a minute."
FireZs

Posts: 375
Joined: Wed Sep 03, 2008 3:18 pm UTC

I'm currently in business and applying for CS grad school, yet recognize this comic for the wishful thinking that it is. Neither future is all rainbows and unicorns, both have their different perks. Genius can go unrecognized or well rewarded in each.
That's all I have to say about that.

Oh wait, one more thing, "Randall, get out of my head!"
nealh

Posts: 31
Joined: Fri Aug 15, 2008 4:20 pm UTC

FireZs wrote:The Business part should be "My god, this code is utterly unreadable and unmaintainable! Re-write it until you can explain it to me in under a minute."

"You know that thing you needed doing? Well, I've done it and billed it out."

Usually works for me
Dudes, I'm a woman.

littlelj

Posts: 140
Joined: Wed Feb 18, 2009 10:40 am UTC

I dunno from academia. But the business response should be more like: "That's great! Send an explanation to our Center of Excellence in Hyderabad. And make sure you do it before the end of the month!"
Sure, there are always unintended consequences -- but I can't do nothin' about 'em.
nirvana_grace

Posts: 25
Joined: Thu Apr 02, 2009 7:26 pm UTC

Peripatetic wrote:The crucial detail missing from this comic is that only three of the papers will ever get read. Those papers will be read by a total of two people. One of them was just looking for papers to fill out the citations section of his dissertation.

Haha so true. The other complaint I have is that the comic almost glorifies academia too much. Instead, it should be hundreds of papers, all proposing theoretical improvements on the idea taht are so incremental over the next twenty years, creating a huge flood of useless papers that nobody cares about.

Still, havnig been on both sides of this comic, I love it.
rnbguru

Posts: 38
Joined: Fri Nov 06, 2009 4:42 pm UTC

As someone who has both an academic appointment and works professionally as a developer, the business experience in this comic is roughly accurate, although there might be some more reward for the developer in a good shop.

The academic view is all wrong, though, both for reasons others have pointed out and because very little academic research is still published freely if there is any potential commercial value. The next move in the academic panel would be to call the university's IP office and get that sucker locked up, delaying publication and focusing the researchers on writing patent documents rather than academic papers.

I have brilliant, beyond-state-of-the-academic-art image registration code locked up inside commercial codebases, and I have brilliant, beyond-state-of-the-commercial-art cancer diagnostics stuff locked up inside university patent applications.

The patented stuff will eventually get out into the world, but then, so will the commercial codebase stuff, in some form or another.

Moral: humans are humans, and taking a bunch of humans and calling them a "business" doesn't make them behave any better than taking a bunch of humans and calling them a "university" or a "government". Believing that is just the kind of addled ideology that made so much of the 20th century a bloodbath.
Coming on Midsummer's Day to a Web Browser Near You: http://www.songsofalbion.com

Posts: 137
Joined: Mon Mar 03, 2008 8:57 pm UTC

littlelj wrote:
FireZs wrote:The Business part should be "My god, this code is utterly unreadable and unmaintainable! Re-write it until you can explain it to me in under a minute."

"You know that thing you needed doing? Well, I've done it and billed it out."

Usually works for me

You should always aim for your code to be readable and maintainable in a business situation. Most of the brilliance of your code in business comes from other people being able to read, modify, and reuse your code as easily as humanly possible (along with it being functional and not eating up more resources than it needs to). I maintain an application written by someone who did things the 'cool' way. . . I feel like driving his head through the wall.
Dudely

Posts: 13
Joined: Mon Jun 30, 2008 6:23 pm UTC

While both academics and businesspeople can feel underappreciated, let's not forget that the guy in industry is probably earning about 5 times more while the academic can barely feed his family...

I've always been surprised at this claim. From what data I've seen (for the US only, admittedly), even starting profs make significantly more than the US median income. If you're doing better than more than 50% of the population, you can't claim "trouble feeding [your] family". Hell, my wife and I lived just fine on a PhD stipend (now with the addition of her part time job) in one of the most expensive US cities, with a huge place to live and swarms of pets (admittedly neither of us want any human larvae).

Are things *really* that harsh outside of organismal biology?
"With malleus aforethought, mammals got an earful of their ancestor's jaw" - J. Burns, Biograffiti

Mokele

Posts: 641
Joined: Fri Aug 21, 2009 8:18 pm UTC
Location: Providence, RI

why no paper?

What would prevent a programmer in business to try and get a paper published? Do their employers (the companies) own all the code that they write? If I was a programmer that wrote a brilliant bit of code that I think could be published, I'd check if I would need permission from the company, get it if needed (what company would not want to put a part of their software on the academic podium?), write a paper and and submit it to a journal...

Disclaimer: I am not a CS student and I have published exactly 0 articles in peer-reviewed journals.
bleghsqueek

Posts: 1
Joined: Wed Nov 18, 2009 4:48 pm UTC

This is why freelancing is a great choice: You get to get all the credit you want, do whatever you want, and there's no stupid boss stopping you like in either of the two conditions in the comic!

Sadly, though, freelancing in web design has clients going "BUT I WANT COMIC SANSSSSS!" when you're trying to explain and get them to choose a content management system, instead of a boss. Same demoralizing experience everywhere, I guess.
In Minecraft, I use the username Rirez.

Steax

Posts: 2857
Joined: Sat Jan 12, 2008 12:18 pm UTC

Academia: My goodness, this dramatically decreases the time to compute the answer-- but you didn't do it recursively (the slower way with more application overhead, yet an assignment requirement) -- sorry it doesn't count.

Unfortunately, most of this particular Computer Science program was a bunch of stupid puzzle problems and not as much real-life application. Fortunately, there are more schools and different academic programs.
4lph4num3r1c

Posts: 1
Joined: Wed Nov 18, 2009 5:27 pm UTC

Mokele wrote:
While both academics and businesspeople can feel underappreciated, let's not forget that the guy in industry is probably earning about 5 times more while the academic can barely feed his family...

I've always been surprised at this claim. From what data I've seen (for the US only, admittedly), even starting profs make significantly more than the US median income. If you're doing better than more than 50% of the population, you can't claim "trouble feeding [your] family". Hell, my wife and I lived just fine on a PhD stipend (now with the addition of her part time job) in one of the most expensive US cities, with a huge place to live and swarms of pets (admittedly neither of us want any human larvae).

Are things *really* that harsh outside of organismal biology?

I'm not sure how much you made, but PhD stipend here is low. Like, hahaha, you should have considered working in retail, low. PostDoc salary isn't much better, about 2-4k more then I make as a lab tech, which is a particularly lowish paying position. Obviously prof's make goodly funds, but how many positions are available for that?
How many are the enemy, but where are they? Within, without, never ceases the fight.

Izawwlgood
WINNING

Posts: 14986
Joined: Mon Nov 19, 2007 3:55 pm UTC
Location: There may be lovelier lovelies...

Wait. Are you guys suggesting that P=NP hasn't been solved yet? I mean I did it like 7 years ago... crap, where did I put that perl code.
Read My Book. Cost less than coffee. Will probabaly keep you awake longer.

neoliminal

Posts: 610
Joined: Wed Feb 18, 2009 6:39 pm UTC

I'm not sure how much you made, but PhD stipend here is low. Like, hahaha, you should have considered working in retail, low. PostDoc salary isn't much better, about 2-4k more then I make as a lab tech, which is a particularly lowish paying position.

I wonder why? It seems as if some fields have great grad support, while others have "go live in a cardboard box" support. You work in cellular (or close to that level), right? That's not terribly far off from my work (organism level), yet there seems to be a massive difference in support levels.

Could it simply be supply & demand? Because more people want to go into cell level stuff (since there is an industry side as well), they can get away with offering lower stipends? Or is it an issue of lab size and how many grad students you need to run a successful lab (my field is an outlier, with only the biggest labs even having 5 students, and most having 2-3), thus cannot afford to pay each very much without draining the grant funds dry?

For a reference on salary without actual numbers, a typical one-bedroom (but not studio) apartment here would cost me ~40% of my after-tax stipend.
"With malleus aforethought, mammals got an earful of their ancestor's jaw" - J. Burns, Biograffiti

Mokele

Posts: 641
Joined: Fri Aug 21, 2009 8:18 pm UTC
Location: Providence, RI

Mokele wrote:
While both academics and businesspeople can feel underappreciated, let's not forget that the guy in industry is probably earning about 5 times more while the academic can barely feed his family...

I've always been surprised at this claim. From what data I've seen (for the US only, admittedly), even starting profs make significantly more than the US median income. If you're doing better than more than 50% of the population, you can't claim "trouble feeding [your] family". Hell, my wife and I lived just fine on a PhD stipend (now with the addition of her part time job) in one of the most expensive US cities, with a huge place to live and swarms of pets (admittedly neither of us want any human larvae).

Are things *really* that harsh outside of organismal biology?

Academic can also refer to a grad student. (in the comic, that's probably the case, the professor being the lady behind the desk.) and student = almost no pay and a low paying second job since you have to spend so much time w/ research & studies

--=-=-=-=--

bleghsqueek wrote:What would prevent a programmer in business to try and get a paper published? Do their employers (the companies) own all the code that they write? If I was a programmer that wrote a brilliant bit of code that I think could be published, I'd check if I would need permission from the company, get it if needed (what company would not want to put a part of their software on the academic podium?), write a paper and and submit it to a journal...

Disclaimer: I am not a CS student and I have published exactly 0 articles in peer-reviewed journals.

The company usually makes you sign a contract where they own all code you write while working for them. . . so yes they own the code unless you're freelance (which also means you probably have no work since everyone has their own programmers)
Postalpacifist

Posts: 1
Joined: Wed Nov 18, 2009 6:53 pm UTC

Re: why no paper?

bleghsqueek wrote:What would prevent a programmer in business to try and get a paper published? Do their employers (the companies) own all the code that they write? If I was a programmer that wrote a brilliant bit of code that I think could be published, I'd check if I would need permission from the company, get it if needed (what company would not want to put a part of their software on the academic podium?), write a paper and and submit it to a journal...

Yes, they own your code, and yes, they can stop you. First because a lot of businesses treat secrecy as the norm and never release information unless they have to, second because the people who would most directly benefit from your work are their competitors, and third because they don't like the idea that you might jump ship and move to academia with the knowledge/skills you developed working for them. There certainly are some companies that value contributing to the scientific community, but it's their prerogative.

I'm in a very different field of science (psychology and medicine), but here the way you keep a foot in both worlds is by getting an academic position and spending part of your time consulting for business, not the other way around.

inhumandecency

Posts: 20
Joined: Mon Apr 02, 2007 4:17 am UTC
Location: Ann Arbor, MI

tempacct5f375a86 wrote:FYI, the top Google result for "5f375a86" attempts to install malware under the guise of scanning for malware. Not fun when Firefox wants to reopen the tabs after restarting.

Hmm. XKCD needs to link each word, pair of words, triple of words, and quad of words in the alt text and content of the comic to the top google searches on the subject before it comes out, and stuff it somewhere on the front page.

SEO hackers seem to detect new googles that XKCD provokes and direct them at malware sights.
One of the painful things about our time is that those who feel certainty are stupid, and those with any imagination and understanding are filled with doubt and indecision - BR

Last edited by JHVH on Fri Oct 23, 4004 BCE 6:17 pm, edited 6 times in total.

Yakk
Poster with most posts but no title.

Posts: 10207
Joined: Sat Jan 27, 2007 7:27 pm UTC
Location: E pur si muove

ikajaste, spekkeh wrote:business "My god.. this will sell by the bucketload, make us a fortune and every household in the world will get this machine and thereby make use of your code, though they won't give a shit about your code either because nobody will ever actually see the code, much less reuse it, since we're closing this treasure up behind the strongest patents, eulas, copyright restrictions, NDAs, and DRMs we can imagine."

Which I guess is one good reason certain people throw so much of themselves into open source coding instead ... you might not actually get any financial recompense for it, but there's less (i'm not going to be an idiot and assume "no") disregard for your effort or beaurocratic dicking-around with what you've made. Knowledgable, refining dicking-around, or just dicking around for the hell of it, but less of the {academic|business} dicking. Which means maybe you can get a good feeling from indulging your area of expertise for altruistic reasons without needing to rely on it also as your source of income. You can do something similarly lucrative but less soul crushing. Like being a trashman, or a lumberjack (or as xkcd is an equal-opportunity-stereotype employer, needlepoint).

Also on the unrecognised achievement / celebrations for mastering the excel "colour" button front... I recognise this has really just descended into yet-another group bitching session... but I do know exactly what y'all mean. I'm in a funny position of working at the "business end" of an academic establishment - i.e. I'm one of the guys who gets paid on a regular basis and does a job that is a step removed from the actual educational side (we just have to deal with the academics instead of being them). So... I/we tend to get a bit of both. I feel ALL your pain.

*Previously keyboard-scrawled bitching deleted because I really don't fancy becoming the subject of the net's next big "stupid person who emailed his boss telling him to get fucked" chain-letter*
...despite the pseudonym and second pass I did even anonymising my CITY... Some of the pertinent details were just too unique. The more relevant of the stuff involved people I work with. And this being an IT department, I know _some_ of my colleagues also read xkcd at least. They may also visit the forums. I don't know if that would include the ones I would kvetch about (and, seriously, some of the things? Classic "I know this stuff; I was hired because I know pretty much specifically this stuff, whilst I've seen you demonstrate your own incompetence at and ignorance of the subject over the past {long period}. So why, at my one chance to properly exercise my area of expertise after months of LITERALLY showing people where the "on" switch is (and, excel cell-colour fans, getting multiple accolades for this blood-simple task - there's no justice, is there) are you the one still trying to dictate to me that we can - and WILL - do a thing I've categorically said is impossible (not without bending physics, and possibly travelling back through time to tweak the blueprints for a certain set-in-stone industry standard connector to our own devious ends) enough times already?"... oh well), but I don't fancy the chance of an ass whupping or worse. Never mind that they weren't mentioned by name... they'd probably twig.

Shit sucks, can't even complain about the stupidity that occasionally surrounds me outside of it

Just sort of imagine yourself reading it instead. It probably wouldn't have been any different from most of the other things on here, just from a strange, different perspective with its own unique setpieces.
Last edited by tahrey on Wed Nov 18, 2009 8:16 pm UTC, edited 2 times in total.
tahrey

Posts: 94
Joined: Tue Nov 25, 2008 9:48 am UTC

But anyway.

What I really wanted to ask, before seeing the thread and brewing up the steam I had to blow off.

Is.

Can anyone explain this inverse square magic number thing to me and the other curious, yet unwashed non-math-genius masses WITHOUT it descending into an inpenetrable fucking mess of algebra? Even the wiki page - which I was hoping would be at "duh, look, i can read!" after seeing several other sites that made my eyes bleed - couldn't resist.

Seriously, I don't want the full theory of how 32 bit numbers are stored (already got a reasonable idea of it anyway) and walls of Bx.log(2-p) whatever. Just tell us why the number made people go "what? oh... wow! how did they do that?" and a flavour of how it works / how they DID do it. Please.

I'm not exactly terrible at maths OR algebra, but I'm somewhere at either the red or violet end of the dyslexic/calculic/practic spectrum* that makes digesting reams of unfamiliar mathematic theory that I haven't spent the last three years studying a bit challenging. But somehow I doubt it's much better for anyone else who didn't do a degree in this stuff (... I did a degree and then a diploma that both had parts that used math (stats, then basic calculus), does that count?). We can has praese plz?
* Yeah, I could actually be using this as sarcasm and some kind of bad taste joke at the expense of the truly dys-etc-ic crowd, but it turns out I'm actually being truthful. I wouldn't like to be trying to understand that stuff if I was more towards, say, the yellow ~ green areas.
And yes, ha ha, very hypocritical for that complaint to be coming from someone who text spams every now and then ... but that's just because I've a lot to say, at least it's in an earth language, a very common one in the most common script in fact, and I *try* to make it fit sensible constraints of sentence and paragraph length. Some of the wibble is apparently down to the spectromocity, I'm told.
tahrey

Posts: 94
Joined: Tue Nov 25, 2008 9:48 am UTC

So, you are trying to calculate 1/square root(x).

One traditional way is via a taylor series -- implemented manually, or possibly implemented in hardware -- where you end up evaluating a many-term polynomial in order to get a decent result. This takes ... a while.

So here is the infamous quake code:
Code: Select all
`x2 = number * 0.5F;y  = number;i  = * ( long * ) &y;i  = 0x5f3759df - ( i >> 1 );y  = * ( float * ) &i;y  = y * ( threehalfs - ( x2 * y * y ) );// y  = y * ( threehalfs - ( x2 * y * y ) );`

Code: Select all
`x2 = number * 0.5F; // store the number/2y  = number; // store the numberi  = * ( long * ) &y; // reinterpret the bits of the floating point number as a 32 bit integeri  = 0x5f3759df - ( i >> 1 ); // the infamous line (?!)y  = * ( float * ) &i; // convert the bits back to a floating point numbery  = y * ( threehalfs - ( x2 * y * y ) ); // do a single pass Newton's method improvement// y  = y * ( threehalfs - ( x2 * y * y ) ); // commented out second pass of Newton's method`

Now, yet another way to do the above is by doing a bunch of 'Newton's method' passes on an initial approximation. This requires a good initial approximation, or lots of passes on newton's method. (You can see a use of Newton's method above).

What this trick does is generate a pretty good first approximation, from which you can run Newton's method. Newtons method then takes an approximation, and makes it better.

(Newton's method is a method that Isaac Newton (you know, Newton's Law of Gravitation, Newton's Laws of Motion?) invented ... or, really, he invented a primitive version of it that was later refined by various folks that we name after him.)

Source of the source code:
http://www.jakevoytko.com/blog/2008/01/ ... -function/
plus more indepth (and accurate) commentary.

...

As for P = NP, no it isn't an algebraic equation. It is shorthand for the sentence:
Polynomial Decision Problems (aka, P) are the same as Non-Deterministic Polynomial Decision Problems (aka, NP)

Yes, the letters stand for a particularly long, technical thing. That is because they are pretty fundamental to the discipline: most of the above words are also defined in very particular ways. And I skipped details (like these are questions for which the answer "yes" comes out in the bound; the "no" answers may be intractable), because we are talking about the most famous undecided problem in computer science.
Last edited by Yakk on Wed Nov 18, 2009 8:29 pm UTC, edited 1 time in total.
One of the painful things about our time is that those who feel certainty are stupid, and those with any imagination and understanding are filled with doubt and indecision - BR

Last edited by JHVH on Fri Oct 23, 4004 BCE 6:17 pm, edited 6 times in total.

Yakk
Poster with most posts but no title.

Posts: 10207
Joined: Sat Jan 27, 2007 7:27 pm UTC
Location: E pur si muove

I remember P=NP
I'm surprised my friend hasn't commented on it yet. *shiver* it's like Schrödinger's cat, it integrates itself without telling you... ;;_;;
Maximus_Light

Posts: 37
Joined: Sun Aug 16, 2009 9:56 pm UTC

It's things like this that make me glad that I'm planning on having an electrical engineering major.
naetoru

Posts: 6
Joined: Mon Oct 19, 2009 2:02 pm UTC

Spelled "queueing theory" wrong.
From http://en.wikipedia.org/wiki/Queueing_theory:
Most researchers in the field prefer the spelling "queueing" over "queuing", although the latter is somewhat more common in other contexts.
GENERATION -i: The first time you see this, copy it into your sig on any forum. Square it, and then add i to the generation.
PREVIOUS GENERATION: 1-i

theta4

Posts: 130
Joined: Wed Aug 27, 2008 5:16 am UTC

Wow, condescending much?

Some people write code to get the job done, others do it for the recognition. I know what kind of coder I am, and now sadly, I know what Randall is too.
pedant wrote:You drove your car off a cliff. Moments before your car hit the ground, I plugged you right between the eyes with a sniper rifle. Your car hits the ground and creates a dramatic fireball. How did you die?

Awesomely.

lazarus89

Posts: 485
Joined: Tue Oct 16, 2007 2:22 am UTC
Location: God's Armpit, USA

PreviousNext