Pow and sqrt on long integers and tests for it