Polfatt5 Copyright (C) 2012 Marco Spadini This program comes with ABSOLUTELY NO WARRANTY. This is free software, and you are welcome to redistribute it under certain conditions. See the GNU General Public License for more details. About the author: Marco Spadini Dipartimento di Matematica e Informatica, Via S. Marta 3, 50139 Firenze, ITALY web: http:\\\www.dma.unifi.it\~spadini e-mail: marco.spadini@math.unifi.it Description: This is a port to GNU Pascal, with slight modifications, of a program I wrote in 1993 in TurboPascal as a test. Its purpose is to factorize in Q[X] (actually in Z[X]), polynomials with integer (small) coefficients. Unlike serious and powerful program based on commutative alebra tools, This program is based on the Schubert-Kronecker algorithm which is not very efficient, actually, I think it has an exponential complexity... not good at all for serious factoring. However, for polynomials with rather small coefficients and low degree (let us say smaller than 7 or 8) I find it is fast and reliable. (One should also beware of factors that have rational cofficients with large numerators or denominators.) In fact, there is a limitation built in this program (not in the underlying algorithm, only in the implementation): it cannot correctly treat irreducible factors of degree higher than 5; so, for instance, if a polynomial P of degree 12 has two irreducible factors of degree 6, the program will incorrectly state that P is irreducible (it would also take a _long_ time to say so). For this reason, NEVER use this program to factorize anything of degree larger than 11 (although it might be able to factorize it: an answer with factors of degree at most five is certainly correct). This strange limitation is due to the nasty nested cycle in function calnodi. I could have used some cleverer way to allow for arbitrary degree but, as I said, this was meant to be a test and neither then I felt, nor now I feel, inclined to waste time on a test (one should bear in mind the exponential complexity of the algorithm which make rather pointless to implement a mechanism for arbitrarily large degree). What is more, now (for me) this is merely legacy code (but fun to look at!). One more caveat. Beware that the program wants integer coefficients for the input polynomial but quietly accepts other stuff. If you feed unexpected data you may get what you deserve: unpredictable behaviour! RUNNING the program: This is source code written in GNU Pascal. To run the program obtain the compiler (gpc under Linux) compile the source file and launch the object according to the rules of your system. For instance, in my Linux box I run: gpc POLFATT5.pas -o polfatt ./polfatt For any issues concerning this program please contact the author Have fun!