function f = factorialSingle(n)
% factorialSingle(n) returns the factorial of n with all calculations of type single.
   f=single(1);
   while(n>1)
       f=f*single(n);
       n=single(n-1);
   end