From: SourceForge.net <noreply@so...>  20080927 12:27:41

Bugs item #1486452, was opened at 20060511 14:09 Message generated for change (Comment added) made by crategus You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=104933&aid=1486452&group_id=4933 Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: Lisp Core  Simplification Group: None Status: Open Resolution: None Priority: 3 Private: No Submitted By: Barton Willis (willisbl) Assigned to: Nobody/Anonymous (nobody) Summary: minfactorial doesn't look inside "!" Initial Comment: The minfactorial function doesn't look inside the factorial function. So it misses some simplifications that it could do: (%i1) (n!/(n1)!)!; (%o1) (n!/(n1)!)! (%i2) minfactorial(%); (%o2) (n!/(n1)!)! < could be n! (%i3) build_info(); Maxima version: 5.9.3 Maxima build date: 0:52 3/20/2006 host type: i686pcmingw32 lispimplementationtype: GNU Common Lisp (GCL) lispimplementationversion: GCL 2.6.7 Barton  >Comment By: Dieter Kaiser (crategus) Date: 20080927 14:27 Message: When we implement the simplification of expressions like factorial(n+m) and factorial (nm) with integer m, the factorials simplifies immediatly. The simplification depends on the Maxima User flag $factoriol_expand. This could be the implementation of the expansion: ((and $factorial_expand (mplusp y) (integerp (cadr y))) ;; factorial(z+m) and m integer. Expand. (let ((m (cadr y)) (n (simplify (cons '(mplus) (cddr y))))) (cond ((>= m 0) (mul (simplify (list '($pochhammer) (add n 1) m)) (simplify (list '(mfactorial) n)))) ((< m 0) (setq m ( m)) (div (mul (power 1 m) (simplify (list '(mfactorial) n))) (simplify (list '($pochhammer) (mul 1 n) m))))))) This is the result without simplification and minfactorial: (%i15) (n!/(n1)!)!; (%o15) (n!/(n1)!)! (%i16) minfactorial(%); (%o16) (n!/(n1)!)! Now we set the flag to expand the Factorials: (%i18) factorial_expand:true$ (%i20) factorial(n+2); (%o20) (n+1)*(n+2)*n! (%i21) factorial(n2); (%o21) n!/((1n)*n) The epression of this bug report simplifies: (%i22) (n!/(n1)!)!; (%o22) n! Because the simplification is done by the simplifier we have no problems with nested expressions. This mechanism of simplification has already be implemented for Double factorial, the Gamma function and the Incomplete Gamma function. Dieter Kaiser  You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=104933&aid=1486452&group_id=4933 