lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


I must confess I learned something new from this discution. From now
one, whenever I teach the factorial function in C, I will write it like
this:

double fact (double n) {
  double a = 1;
  while (n > 0) a *= n--;
  return a;
}

After all, it gives "better" results then the old-fashined version :-)

-- Roberto