Time taken by pow function in c++ library

how much time is taken by c++ function for the same input a^n

The time taken is O(log N) if its a ^ N and a space complexity of O(1)

You can mark the doubt as resolved if your doubt has been resolved. Feel free to ask if any other doubts exist.