fix numerical issues in pow test