(In reply to Solution
And how does it evaluate when k is not an integer?
where k=1/n : n is an odd positive integer > 1, is equal to -1
where k=1/n : n is an odd positive integer > 1, is not equal to -1
Also note: where n is an even positive integer, (-1)k becomes an imaginary number.
Other considerations are where k = m/n, such that m/n is a reduced fraction. Many applications have trouble providing anything other than an error message or like.
How can we then evaluate (-1)k using only the operators + (addition), - (subtraction), * (multiplication) and % (modulo)?
Edited on January 28, 2008, 1:10 pm
Posted by Dej Mar
on 2008-01-27 22:17:06