|
C Programming Reference >> C Programming Reference Question Bank >> 19/07/07 - 459 Views - Ratings : Question - What is the aritmetic operation performed by function on x in relation with n?
Answer - x^n ( x raised to power n) Explanation - This code is difficult to understand, but here the operation performed is x^n . The mathematical operation is performed by binary doubling strategy. In this strategy if next most significant binary digit of n( power) is one then multiply accumulated product calculatedd using recursion by current val , then we reduce n by a factor of two using integer division . get next val by multiply current value by itself Reader Comments -
|
|||