saucecode / colynomials

C polynomial math library

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

colynomials

Polynomial math library in C, and with one of those annoying names that has to have the host language in it. Only supports real polynomials, so real (floating point) coefficients and complex roots.

Read polynomials.h for the functions currently implemented.

Development

This project is written in C99, and follows the openage tabs_n_spaces.md style for indentation.

This project has no dependencies. Tests are written using criterion and code coverage using gcovr.

Internal Structure

polynomial_t is a double* under the hood, but the first element is an unsigned int specifying the order of the polynomial. Therefore, polynomial_t can be treated as an array starting at 1. To access the order, use plnm_order() or simply *((unsigned int *) polynomial).

Coefficients are stored in ascending order of order, i.e 2x^2 + 10x - 5 is stored as [-5, 10, 2].

About

C polynomial math library

License:Other


Languages

Language:C 91.9%Language:Makefile 8.1%