Library to perform symbolic polynomial arithmetic on generic numeric types.
$ dotnet add package ExtendedArithmetic.GenericPolynomialA multivariate, sparse, generic polynomial arithmetic library. That is, a polynomial in only one indeterminate, X, that only tracks terms with non-zero coefficients. This generic implementation has been tested and supports performing arithmetic on numeric types such as BigInteger, Complex, Decimal, Double, BigComplex, BigDecimal, BigRational, Int32, Int64 and more.
All arithmetic is done symbolically. That means the result of an arithmetic operation on two polynomials is another polynomial, not the result of evaluating those two polynomials and performing arithmetic on the results.
All classes and methods support a generic type T, which can be any data type that has arithmetic operator overloads. Explicitly, the following types have tests exercising all the standard arithmetic operations (Addition, Subtraction, Multiplication, Division, Exponentiation, Modulus, Square Root, Equality and Comparison (where applicable--Complex numbers are not orderable)) and so are well supported and come with verifiable proof that they work:
Supports symbolic multivariate polynomial (generic) arithmetic including:
Polynomial.Field supports addition, multiplication, division/modulus and inverse of a polynomial ring over a finite field. These operations do not support Complex, BigComplex, BigDecimal, or BigRational types.
You can instantiate a polynomial in various ways:
Other methods of interest that are related to, but not necessarily performed on a polynomial (Not all types supported):