diff options
author | biouman <biouman> | 2001-05-02 02:47:56 +0000 |
---|---|---|
committer | biouman <biouman> | 2001-05-02 02:47:56 +0000 |
commit | 903e2e8aac5151d505432757048537cc56844bca (patch) | |
tree | 03383bbd7b11b91c4a4ae85f7619043ac747eefa | |
parent | 84bcce474264742f43b9540466eabb2cdb2fed30 (diff) |
*** empty log message ***
-rw-r--r-- | lib/fonctions.c | 39 |
1 files changed, 36 insertions, 3 deletions
diff --git a/lib/fonctions.c b/lib/fonctions.c index 0b859a2..2ef2871 100644 --- a/lib/fonctions.c +++ b/lib/fonctions.c @@ -69,17 +69,50 @@ void appel_fonction(char *nom, int arite, polynome p1, polynome p2, polynome p3) void deriv(polynome p1, polynome p2, polynome p3) { - + polynome resultat = NULL, temp = NULL, t; + + while (p1) { + if (p1->degre) { + t=ply_constr(rat_constr((p1->coef.num)*(p1->coef.degre), p1->coef.denom), (p1->degre-1)); + if (t) { + if (resultat) { + temp->suiv = t; + temp = t; + } else { + resultat = t; + temp = t; + } + } + } + p1=p1->suiv; + } + push_pile_poly(resultat); } void derivn(polynome p1, polynome p2, polynome p3) { - ; + int i; + + } void integ(polynome p1, polynome p2, polynome p3) { - ; + + while (p1) { + t=ply_constr(rat_constr((p1->coef.num), (p1->coef.denom)*(p1->coef.degre+1)), (p1->degre+1)); + if (t) { + if (resultat) { + temp->suiv = t; + temp = t; + } else { + resultat = t; + temp = t; + } + } + p1=p1->suiv; + } + push_pile_poly(resultat); } void printvars(polynome p1, polynome p2, polynome p3) |