How to represent (-2)^0.325 in Java
Posted on 2005-03-16
According to the documentation on java.lang.Math.pow(double a, double b):
" If the first argument is finite and less than zero
if the second argument is finite and not an integer, then the result is NaN."
In this case, pow(-2,0.325) results in NaN. On my calculator, I get an answer of ~ -1.25. Is there anyway to get java to calculate the correct result of this operation?
Thanks for any help you can offer...