I was trying to get a cubic root in java using Math.pow(n, 1.0/3) but because it divides doubles, it doesn\'t return the exact answer. For example, with 125, this g
Math.pow(n, 1.0/3)
I'd go for implementing my own function to do this, possibly based on this method.