summaryrefslogtreecommitdiff
path: root/include/polynom.h
blob: 64a92739c4635f165828cac5743b757480550947 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
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