# This file is an introductory example to # the python language of programmation. import numpy; def power(x,n): """ The function "power" takes two arguments : x is a real number n is an integer and returns the value y = x^n""" if (n == 0): y = np.uint32(1); elif (n == 1): y = np.uint32(x);; elif ((n %2) == 0): tmp = power (x,n/2); y = tmp*tmp; else: tmp = power(x,(n-1)/2); y = tmp*tmp*x; return y