big int exponential function