Announcement
Collapse
No announcement yet.
If there were code porn, this is it.
Collapse
X
-
1) What did he doOriginally posted by DRoseDARs
Yeah, if he'd keep his mouth shut (where appropriate) he'd be pretty tolerable. But he crossed my manager/friend of 7 years, so I'd be hard pressed not to hurt him intentionally.
2) Have sex with him, then say "by the way I gots CRABS.""The issue is there are still many people out there that use religion as a crutch for bigotry and hate. Like Ben."
Ben Kenobi: "That means I'm doing something right. "
Comment
-
I'm waiting for the math geeks to come on to marvel over why this code works.Originally posted by DRoseDARs
At least we're not debating whether or not .9-repeating equals 1. That was like porn for math geeks.
"The issue is there are still many people out there that use religion as a crutch for bigotry and hate. Like Ben."
Ben Kenobi: "That means I'm doing something right. "
Comment
-
1) Constantly working behind her back to get her in trouble with the other owners. Even going so far as slyly trying to implicate she'd be stealing money little by little from the daily deposit. Questioning her management skills and her ability to create new membership (nevermind we opened this location a full year before the new Gold's and 24-Hour Fitness locations nearby, which supposedly opened today) in spite of the fact that we had one of the fastest growths in the area. We had several hundred members before we even opened and that quickly grew in the months that followed. She's been in this business for 15 years and her name is well known and sought after by area businesses (she gets job offers now and then without even trying). He's either a few months younger than me (I'm 25) or up to 27 years old. He made a mess of the facility down south of here and she had to clean up after him. And now he's trying to do it again.Originally posted by Asher
1) What did he do
2) Have sex with him, then say "by the way I gots CRABS."
2) We've all wondered how this know-nothing moron ever became an co-owner of this chain and have come to the conclusion this is exactly what he did: Slept with one of the owners. He's certainly a good-looking guy, too bad he lacks any integrity or business wherewithal.The cake is NOT a lie. It's so delicious and moist.
The Weighted Companion Cube is cheating on you, that slut.
Comment
-
I must admit I don't understand how this code works. There are no loops. How can you calculate a square root to any accuracy withour a loop? Seems flat out impossible.
So this code probably gives a smart 1st order approximation using a very smart guess for the zeroth order one. Even so, I can not see it being more accurate than a few digits...
Comment
-
It's just Newton's method. We covered this in the first week of Numerical Analysis last year. You find the zero of a function by iterating x = x - f(x)/f'(x). The first 5 lines are just setting it up so the derivative is calculated numerically. The special bit is that constant in hex, 0xstuff. It's a good first approximation.
edit: and I forgot, the magical performance gain comes from the *(int*)& cast, which means that most of this is done as an integer operation.Last edited by Kuciwalker; December 5, 2006, 01:56.
Comment
-
It has no loops because it always does the same number of iterations. You're essentially correct, though I think I read it gets something like 1% accuracy. Enough for graphics.Originally posted by Diadem
I must admit I don't understand how this code works. There are no loops. How can you calculate a square root to any accuracy withour a loop? Seems flat out impossible.
So this code probably gives a smart 1st order approximation using a very smart guess for the zeroth order one. Even so, I can not see it being more accurate than a few digits...
Comment
-
Can you explain how the 0xstuff was derived or why it's magic?Originally posted by Kuciwalker
It's just Newton's method. We covered this in the first week of Numerical Analysis last year. You find the zero of a function by iterating x = x - f(x)/f'(x). The first 5 lines are just setting it up so the derivative is calculated numerically. The special bit is that constant in hex, 0xstuff. It's a good first approximation.
That's only part of it. In fact, it's not much of a gain at all in the age of 64-bit integers and fast FPUs.edit: and I forgot, the magical performance gain comes from the *(int*)& cast, which means that most of this is done as an integer operation."The issue is there are still many people out there that use religion as a crutch for bigotry and hate. Like Ben."
Ben Kenobi: "That means I'm doing something right. "
Comment
Comment