diff options
Diffstat (limited to 'polynom.h')
-rw-r--r-- | polynom.h | 37 |
1 files changed, 37 insertions, 0 deletions
diff --git a/polynom.h b/polynom.h new file mode 100644 index 0000000..64a9273 --- /dev/null +++ b/polynom.h @@ -0,0 +1,37 @@ +#ifndef __POLYNOM_H__ +#define __POLYNOM_H__ +#include "scalaires.h" + +typedef struct monome { + rationnel coef; + unsigned int degre; + struct monome *suiv; +} monome; + +typedef monome *polynome; + +polynome ply_constr(rationnel coef, int degre); /* constructeur monome */ + +polynome ply_vide(void); /* cree un polynome */ + +void ply_destruct(polynome poly); /* destructeur */ + +polynome ply_copy(polynome poly); /* recopie */ + +polynome ply_addition(polynome poly1, polynome poly2); /* addition de deux polynomes */ + +polynome ply_soustraction(polynome poly1, polynome poly2); /* soustraction de deux polynomes */ + +polynome ply_multiplication(polynome poly1, polynome poly2); /* multiplication de deux polynomes */ + +polynome ply_division(polynome poly1, polynome poly2); /* division de deux polynomes */ + +polynome ply_modulo(polynome poly1, polynome poly2); /* reste de la division de deux polynomes */ + +polynome ply_exposant(polynome poly, unsigned int exp); /* exponentiation d'un polynome */ + +double ply_valuation(polynome poly, double point); /* valuation d'un polynome en un point */ + +char *ply_affichage(polynome poly); /* routine d'affichage d'un polynome */ + +#endif |