fix: int overflow
fix: wrong computation of pth root due to int overflow
chg: added test for bug 482