1 function y = power(n , p);
2 % calcul de n^p.
3
4 if p == 0
5 y = 1;
6 elseif rem(p,2) == 1 % p est-il impair ?
7 y = n*powerrusse(n*n, floor(p/2));% floor(a) renvoie le plus grand
8 else % entier infrieur ou gal a
9 y = powerrusse(n*n, floor(p/2));
10 end;