Announcement
Collapse
No announcement yet.
If there were code porn, this is it.
Collapse
X
-
Originally 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
-
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
-
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
-
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
-
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.
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