What is the Time Complexity of the pow function which is predefined in cmath header file ?
Does it use bitwise exponentiation behind the hood ?
Time Complexity of the predefined pow function
hello @souptiksarkar4572
it is log(n) .
nothing much is written about its implemntation -> http://www.cplusplus.com/reference/cmath/pow/
So is using bitwise operators more preferable for calculating exponentiations ?
yeah . . . . . . . . .
Thank you very much for resolving my query.
I hope I’ve cleared your doubt. I ask you to please rate your experience here
Your feedback is very important. It helps us improve our platform and hence provide you
the learning experience you deserve.
On the off chance, you still have some questions or not find the answers satisfactory, you may reopen
the doubt.