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 15:07:22 +0000 (16:07 +0100)
commit6cac49558b75dce07f607e26ba74aa9148f92720
tree3dadc57b54d2c55b3ce2d4b01b2231f11137b367
parent1fa7d19af08892800dfdb0b700bc0a9362a3fae8
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