Implement a function that computes , where is a floating-point number and is an integer (possibly negative).
For example, and .
Before reading on, think: how would you do this? A loop that multiplies times? That's one way. But can you do better?
##### ###### ##### ### # # ### # # ###### ## ## ## ## ## ## ## # # # # # ## ##### #### ##### # # # # # # # #### ## # ## ## ## ## # # # # # ## ## # ###### ## ### # ### # ######
##### ###### ##### ### # # ### # # ###### ## ## ## ## ## ## ## # # # # # ## ##### #### ##### # # # # # # # #### ## # ## ## ## ## # # # # # ## ## # ###### ## ### # ### # ######
LeetCode 50
Implement a function that computes , where is a floating-point number and is an integer (possibly negative).
For example, and .
Before reading on, think: how would you do this? A loop that multiplies times? That's one way. But can you do better?