Fix overflow bug in iroot<N>(x)