fixed a bug in Exp overflow, enhance miller-rabin demo