[polygamma] Fix integer arithmetic bug.