Calculate higher powers (#831)