Week 9 for GSoC ended a couple of days back. I’m still working on the Complex Module.
I started of the week continuing the work on pull 248.
Initially I started working on the
mul functions and integrating the
complex module with them. This part was pretty easy as Complex addition and Complex multiplication was completely implemented. Intially I just added special cases for the case of Complex in
pow. But this quickly ran into issues as
is_canonical failed in some testcases.
Next I simplified the complex power for the following cases:
expis 1 or -1
- When the
baseis purely imaginary and
Following this I made appropriate changes to
Meanwhile @certik sent a couple of PR’s sushant-hiray/csympy/#1 and sushant-hiray/csympy/#2 for implementing the Python wrappers for Complex Module. I spent some time trying to sync the wrappers and make sure they work as intended.
One important fix needed was to improve the printing. Over the entire PR, the printing has been changed multiple times to match the SymPy output. With this PR I’ve updated the current existing printing for
mul as well as
expand function is also updated to handle the case of Complex Numbers. Currently it doesn’t expand terms like:
(2 + 3I)^n. Apart from this all the issues which were found have been fixed.
The Week Ahead
Merge the current PR and send a new PR for handling the cases like
(2 + 3I)^n in
Thats all for now :) Will get back next week!