summaryrefslogtreecommitdiff
path: root/lib/polynom.c
diff options
context:
space:
mode:
authorbiouman <biouman>2001-05-01 12:41:41 +0000
committerbiouman <biouman>2001-05-01 12:41:41 +0000
commitb05b13f4f74e253f844d168e057f3be5408d06f5 (patch)
treeed4c9004e0d7974525e6f93af85d0803928bf4aa /lib/polynom.c
parent78dcc3729881bb6b3937da195bc070ca96cb049b (diff)
*** empty log message ***
Diffstat (limited to 'lib/polynom.c')
-rw-r--r--lib/polynom.c10
1 files changed, 2 insertions, 8 deletions
diff --git a/lib/polynom.c b/lib/polynom.c
index 241c2da..f9f3c1c 100644
--- a/lib/polynom.c
+++ b/lib/polynom.c
@@ -274,15 +274,9 @@ char *ply_affichage(polynome poly)
while (poly) {
if (poly->degre != 0) {
- if (poly->coef.denom == 1)
- sprintf(temp, "%+d*%s^%u ", poly->coef.num, mute, poly->degre);
- else
- sprintf(temp, "%+d/%d*%s^%u ", poly->coef.num, poly->coef.denom, mute, poly->degre);
+ sprintf(temp, "%s*%s^%u ", rat_to_string(poly->coef), mute, poly->degre);
} else {
- if (poly->coef.denom == 1)
- sprintf(temp, "%+d ", poly->coef.num);
- else
- sprintf(temp, "%+d/%d ", poly->coef.num, poly->coef.denom);
+ sprintf(temp, "%s ", rat_to_string(poly->coef));
}
count += strlen(temp);
if (count < BUFSIZ)