I might not understand the question, but shouldn't D just be:
Code:
double D(int dummy) {
return pow(8,(1.0/8));
}
Obviously there are some precision issues, but perhaps you meant something more general, like:
Write a function D such that D(X) raised to the power of X evaluates to X.
I may have also misinterpreted the problem. i read that as math, where ^ is exponentiation and = is equivalence. If = were assignment, 8 isn't a modifiable lvalue, so... no matter what D is, that's not compiling... unless...
#define D =
so after the preprocessor you got
which would evaluate to true...
If you meant bitwise XOR, but = is equivalence... then D just needs to return its argument, or always return 0.
Do i get the job? =)
-Lee