]> www.ginac.de Git - ginac.git/commit
[bugfix] fix elusive bug in quo, rem,...
authorRichard Kreckel <kreckel@ginac.de>
Fri, 5 Feb 2016 23:47:08 +0000 (00:47 +0100)
committerRichard Kreckel <kreckel@ginac.de>
Fri, 5 Feb 2016 23:53:22 +0000 (00:53 +0100)
commit958b72c93a20eaf27ed9e2092d1c342a3c8b8ecf
treec84011d73e128b78a6886d9afed3ce5b03fd0f5f
parent63f9b0510fecd2b50f75df37c9525bc215dc2578
[bugfix] fix elusive bug in quo, rem,...

The power of two rational numeric objects needs not be rational. As a
result, some care is required when transforming (b^e)*l -> (b*l^(1/e))^e
for some rational e and l. This is a common transformation in order to
convert a polynomial over Q into a polynomial over Z when computing
their quotient, remainder, etc. Failure to be careful can potentially
introduce spurious non-rational numbers into rational polynomials and
make those operations fail. This patch avoids this transformation when
l^(1/e) is not a rational number.
ginac/normal.cpp