-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathpoly.h
37 lines (22 loc) · 856 Bytes
/
poly.h
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
/*
polyf_t : structure polynome
p_polyf_t : pointeur sur un polynome
*/
#define max(a,b) ((a)>(b)?(a):(b))
#define min(a,b) ((a)<(b)?(a):(b))
typedef struct {
int degre ;
float *coeff;
} polyf_t, *p_polyf_t;
p_polyf_t creer_polynome (int degre) ;
void init_polynome (p_polyf_t p, float x) ;
void detruire_polynome (p_polyf_t p) ;
p_polyf_t lire_polynome_float (char *nom_fichier) ;
void ecrire_polynome_float (p_polyf_t p) ;
int egalite_polynome (p_polyf_t p1, p_polyf_t p2) ;
p_polyf_t addition_polynome (p_polyf_t p1, p_polyf_t p2) ;
p_polyf_t multiplication_polynome_scalaire (p_polyf_t p, float alpha) ;
float eval_polynome (p_polyf_t p, float x) ;
p_polyf_t multiplication_polynomes (p_polyf_t p1, p_polyf_t p2) ;
p_polyf_t puissance_polynome (p_polyf_t p, int n) ;
p_polyf_t composition_polynome (p_polyf_t p, p_polyf_t q) ;