highlights of this week’s work are:
This was a long pending issue. Previously, in the codebase the
series expansion of b**ewas computed by breaking the code into different cases, depending on the values of the exponent or if the exponent has a symbol etc. Moreover, there was code to handle specific cases, and it was not written in a general way. As a result, the code was very long and it was difficult to debug it when some issue popped up.
Hence, it was very important to completely rewrite and clean-up
Pow._eval_nseries(), so that many issues get resolved and it becomes easy to debug any further issues related to series expansions or limit evaluations.
Thus, we came up with a
general algorithmcovering all the cases.
The series expansion of
b**eis computed as follows:
- We express
f*(1 + g)where
fis the leading term of
dis strictly positive.
(f**e)*((1 + g)**e)where,
(1 + g)**eis computed using the concept of
The major challenge which we had to face was the fragile nature of the existing code of
Pow._eval_nseries(). Changing the code even a bit resulted in many test failures, as this function plays an important role in both series expansions and limit evaluations.
At times, it became extremely difficult to debug the cause of failures because there were several other functions as well on which the code of this function depended. Not only this, fixing one failure caused several others to pop-up.
Ultimately, after a week of hard-work, we got everything working. After which, we further optimised the code ensuring that we are not compromising with efficiency. At last, this issue was resolved and we ended up adding an extremely optimised implementation of the function to the codebase.
- We express