r.lucchetti(a)univpm.it @ INTERNET skrev 2007-10-29 13:55:18 :
I'm personally against introducing functions (with the
namespace pollution) for things that can easily be programmed
at the user level just like you said. IMO, anyone for which factorial(n)
is not obviously equivalent to gammafunc(n+1) shouldn't be writing
functions in the first place. Of course, I'm fully open to be convinced
of the contrary.
You may say that, by the same logic, one could define floor() as
f = (x>0) ? int(x) : -ceil(-x)
but, like you said, floor() is a standard function that should have been
there right from the start.
Well, IMHO factorial() is a more standard mathematical function then e.g.
floor(), ceil() or int(). Compare e.g. the entries at Wolfram MathWorld: