Speed up power::real_part() and power::imag_part().
authorRichard Kreckel <kreckel@ginac.de>
Thu, 5 Nov 2015 12:30:48 +0000 (13:30 +0100)
committerRichard Kreckel <kreckel@ginac.de>
Thu, 5 Nov 2015 12:30:48 +0000 (13:30 +0100)
commitcc308418b3e239e05a7f1f0f6cfc5919672fccfd
treeaef5e985c3c0db64f48a43bbc00184a3f137ee6f
parente9350141809e90921b793ef0e5ee2ece71c96fad
Speed up power::real_part() and power::imag_part().

Add special case for real base and exponent (not just integer exponent).
Improve special case for integer exponent by explicitly constructing
the result using the Binomial expansion.
Add a test case for real/imaginary part expansion.
check/Makefile.am
check/exam_real_imag.cpp [new file with mode: 0644]
ginac/power.cpp