Menu

#83 Factorial - basic function

open
nobody
None
5
2019-05-07
2014-09-17
Marios
No

Hello,

Would it be possible to include the factorial function in the set of built-in functions?
i.e.,
3! = 3x2x1 = 6

It could be implemented as factorial(3) = 6

Thank you in advance

Discussion

  • David Goldenberg

    I, too, would find the factorial function very useful!

    David

     
  • Steuard Jensen

    Steuard Jensen - 2019-05-07

    For anyone who happens to be looking for this feature in the future, let me share a simple workaround: in terms of the built-in function gamma(x), you can write

    factorial(x) = gamma(x+1)

    So, e.g., gamma(4) = 6. (The gamma function is also defined for non-integer values of x. It is only undefined for negative integers.)

     

Log in to post a comment.