Use better pow for large ints
Updated with some examples