[Gretl-devel] Making the programming of user defined functions
easier
andreas.rosenblad at ltv.se
andreas.rosenblad at ltv.se
Mon Oct 29 09:53:11 EDT 2007
r.lucchetti at univpm.it @ INTERNET skrev 2007-10-29 13:55:18 :
> I'm personally against introducing functions (with the associated
> 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:
* http://mathworld.wolfram.com/Factorial.html (34 references)
* http://mathworld.wolfram.com/FloorFunction.html (12 references)
* http://mathworld.wolfram.com/CeilingFunction.html (6 references)
* http://mathworld.wolfram.com/IntegerPart.html (2 references)
Best regards
Andreas
More information about the Gretl-devel
mailing list