GSoC Week 4
This week, as planned, was focused on addressing the review comments from the PR.
SingularityFunction._eval_nseries
function was added, as the default series
expansion would check n (the parameter of nseries) times differentiability of
the function, and SingularityFunction
are infinite with n=-1
and n=-2
(n here refers to the power of singularity function), so they would raise a
PoleError. Since the default function did not work, a custom _eval_nseries
was
needed.
mrv_leadterm
now handles logx substitution. Gamma and factorial leading term
methods now raise PoleError if arg is unbounded. They previously returned the
original function itself.
It was also observed that the Limit.doit code for handling leading terms should
invert cdir. Consider the limit as x->oo
. In this case, the cdir parameter is
set to -1, as we can only approach oo
from -
, +
does not make sense. For
finding the limit, the variable is inverted, so x->1/x
and hence oo->0
. So the
limit becomes Limit(a(1/x), x, 0)
. Note that now the direction should be changed
to +
, to agree with oo
. 0-
would correspond to a negative answer, which is
the case of -oo
. Hence, cdir
needs to be inverted.
The PR was merged just at the end of this week. Next, I will try to look at more improvements to Limit.doit, and the corresponding leading term and nseries bugs found would be fixed.