I have good evidence that you guys -- the readers that I slave for -- are very smart.
But we still have no winner on last week's Friday Free Stuff. What's that all about?
Have I "Stumped the Chump?" (good writers borrow; great writers steal.)
This is the last call...
What does the following function compute?
// Assumes val is odd
static int mysteryFunction(int val) {
int t = val;
t *= 2 - val*t;
t *= 2 - val*t;
t *= 2 - val*t;
t *= 2 - val*t;
return t;
}
I got the question from "Click and Hack, the type-it brothers" .....

...aka Dr. Joshua Bloch and Dr. Neal Gafter. (Did you know they have two JavaOne sessions: One, Two.)
The prize (Duke dolls) ...

... courtesy of Mary.
Friday Free Stuff is not a contest. Mary is giving away something she personally owns to somebody she picks. She pays for shipping. Sun employees can play but can't "win."
mary
Posted by dl on June 24, 2004 at 09:39 AM PDT #
Posted by Ron Yang on June 24, 2004 at 10:40 AM PDT #
Posted by Ryan Ripley on June 24, 2004 at 11:02 AM PDT #
Posted by Ryan Ripley on June 24, 2004 at 11:05 AM PDT #