|
From: William H. <ha...@ya...> - 2007-04-25 00:33:47
|
I got _Zpoly_mpn_add working in all cases with very stringent test code. It allows the longer input polynomial to also be the output polynomial, it allows all different lengths, all different coefficient sizes, accomodates positive, zero and negative coefficients. It is relatively efficient I think, though some of the branches can probably be replaced with some tricky bitwise logic. Because _Zpoly_mpn_add has to deal with negative coefficients, _Zpoly_mpn_sub probably isn't that much more difficult to do. I think these functions are pretty hopelessly slow though. There are so many unpredictable branches related to the various possibilities for signs of coefficients. I think we need some additional versions which make assumptions about the lengths being the same and the number of coefficient bits being the same and the coefficients all being positive or something. Bill. __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com |