Hi,
This is because any power 1/p is only defined for positive numbers.
But negative number at the power 3,5, etc gives negative numbers.
So you get nan.
PS: You should use backtick ` and not " to format code in a nicer way. I edited you post to make it look better.