Move negative base check inside ndigits0z and add a test for (unsigned, signed) case.