zn_poly is a C library for polynomial arithmetic in Z/nZ[x], where n is any modulus that fits into an unsigned long.


The tarball has a README that explains how to build and install it, but there's no library documentation yet.

Get the source

Latest version

Older versions

Current status

zn_poly is no longer maintained.

July 2012: Andrew Sutherland reports a compilation problem with newer versions of GCC. He writes:

I just wanted to let you know that, as of gcc version 4.6.3,
the tuning component of zn_poly will not build due to the
compilation error:

"jump into scope of identifier with variably modified type"

(if you do "make tune" you will get several instances of this).

This error is caused by various "goto done" statements that
jump over the declaration of variables that are in-scope at
the point of the done label.  It's easy enough to fix, just
move all the variable declarations to the top of the function
(or at least before any "goto done" statements).

Dec 2012: Jan Engelhardt writes:

I am proposing this automake patch that greatly simplifies 
packaging zn_poly for Linux distributions.

Here is the file provided by Jan: znpoly-automake.diff (I have not inspected it, and disclaim all responsibility for its contents!)

Jul 2013: zn_poly has been re-released under a BSD-style license. I will not update the distribution tarballs here, but see this announcement for details.

Back to the main page