#9240: applying full_simplify() to gamma functions causes an error
-------------------------+--------------------------------------------------
Reporter: tomc | Owner: tomc
Type: defect | Status: new
Priority: major | Milestone: sage-4.4.4
Component: symbolics | Keywords: gamma function, full_simplify,
factorial
Author: | Upstream: N/A
Reviewer: | Merged:
Work_issues: |
-------------------------+--------------------------------------------------
Comment(by tomc):
OK: I had misunderstood the docstring, which says:
{{{
sage: ? factorial
String Form: factorial
Namespace: Interactive
File: /Users/tomc/sage-4.4.1/local/lib/python2.6/site-
packages/sage/functions/other.py
Definition: factorial(self, *args, coerce=True, hold=False,
dont_call_method_on_arg=False)
Docstring:
Returns the factorial of n.
INPUT:
* ``n`` - an integer, or symbolic expression
...
}}}
I suppose that non-integer numerical values (rational numbers, real
numbers, etc) count as symbolic expressions here, as they can be
canonically coerced into the symbolic ring. But then there is definitely
a bug in factorial(), because [in an unpatched version of Sage]:
{{{
sage: factorial(-1/2)
ERROR: An unexpected error occurred while tokenizing input
...
ValueError: factorial -- must be nonnegative
}}}
The patch fixes this.
--
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/9240#comment:2>
Sage <http://www.sagemath.org>
Sage: Creating a Viable Open Source Alternative to Magma, Maple, Mathematica,
and MATLAB
--
You received this message because you are subscribed to the Google Groups
"sage-trac" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/sage-trac?hl=en.