> My vote is to have factorial(n) = n(n-1)...2.1 whenever n is integer.
>
> Cheers,
>
> Florent

We certainly need to allow for symbolic input too, so that Sage can
simplify expressions involving factorials and binomial coefficients
such as:

sage: var('k,n')
(k, n)
sage: f = factorial(k)*factorial(n-k)*binomial(n,k); f
factorial(-k + n)*factorial(k)*binomial(n, k)
sage: f.full_simplify()
factorial(n)

My vote would be to allow symbolic input and to set factorial(n) =
n(n-1)...2.1 whenever n is a non-negative integer, but for
factorial(x) to raise an error whenever the expression x is numerical
but not equal to a non-negative integer.

In this case full_simplify() should not turn expressions involving
factorial() into expressions involving gamma(), or vice versa.

This might be contrary to the philosophy behind the symbolics module,
though.  Let me know what you think.

Best,

Tom

-- 
To post to this group, send an email to sage-devel@googlegroups.com
To unsubscribe from this group, send an email to 
sage-devel+unsubscr...@googlegroups.com
For more options, visit this group at http://groups.google.com/group/sage-devel
URL: http://www.sagemath.org

Reply via email to