On 15 June 2010 05:21, Tom Coates <t.coa...@imperial.ac.uk> wrote: > > Dear sage-devel, > > I believe that the following: > > sage: gamma(x).full_simplify() > factorial(x - 1) > > is not correct, because in Sage factorial(x) is defined only if x is a > non-negative integer. The problem arises because behind the scenes > full_simplify() uses Maxima, and for Maxima factorial(x) is equivalent > to gamma(x+1). > > I can think of two ways to fix this. Given a symbolic expression > symb, we could: > > a) make symb.full_simplify() return an expression in terms of gamma() > rather than an expression in terms of factorial(); > > b) check whether symb contains any subexpression of the form > gamma(foo). If so, symb.full_simplify() should return an expression > in terms of gamma(); if not, symb.full_simplify() should return an > expression in terms of factorial(). > > Option (a) is easy to implement but I think it is the wrong way to > go. There may be many Sage users who would want to simplify > expressions containing factorials (e.g. combinations of binomial > coefficients) but who don't know what the gamma function is.
I'd agree with that. Dave -- 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