#9240: applying full_simplify() to gamma functions causes an error
----------------------------------------------+-----------------------------
Reporter: tomc | Owner: tomc
Type: defect | Status: needs_review
Priority: major | Milestone: sage-4.7.1
Component: symbolics | Keywords: gamma
function, full_simplify, factorial
Work_issues: | Upstream: N/A
Reviewer: Dan Drake, Karl-Dieter Crisman | Author: Tom Coates,
Burcin Erocal
Merged: | Dependencies: #11415
----------------------------------------------+-----------------------------
Comment(by fbissey):
Well I am not sure because I don't know the code well. But python_func is
an unsigned and used to be a boolean according to comment in the code.
What I think happens here is the code tries to match a precise type of
python_func.
0 is just a c++ function but different from 0 it is a python construct and
it can take different value depending on the construct. So if I am not
mistaken it is bitwise because we are trying to match the construct code.
This can be seen in the follwing snippet from function.cpp
{{{
function_options& function_options::eval_func(PyObject* e)
{
python_func |= eval_python_f;
eval_f = eval_funcp(e);
return *this;
}
function_options& function_options::evalf_func(PyObject* ef)
{
python_func |= evalf_python_f;
evalf_f = evalf_funcp(ef);
return *this;
}
function_options& function_options::conjugate_func(PyObject* c)
{
python_func |= conjugate_python_f;
conjugate_f = conjugate_funcp(c);
return *this;
}
function_options& function_options::real_part_func(PyObject* c)
{
python_func |= real_part_python_f;
real_part_f = real_part_funcp(c);
return *this;
}
function_options& function_options::imag_part_func(PyObject* c)
{
python_func |= imag_part_python_f;
imag_part_f = imag_part_funcp(c);
return *this;
}
function_options& function_options::derivative_func(PyObject* d)
{
python_func |= derivative_python_f;
derivative_f = derivative_funcp(d);
return *this;
}
function_options& function_options::power_func(PyObject* d)
{
python_func |= power_python_f;
power_f = power_funcp(d);
return *this;
}
function_options& function_options::series_func(PyObject* s)
{
python_func |= series_python_f;
series_f = series_funcp(s);
return *this;
}
}}}
Notice how they match the bitwise comparison later in the patched code?
--
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/9240#comment:11>
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.