diff options
Diffstat (limited to 'lib/pile.c')
-rw-r--r-- | lib/pile.c | 13 |
1 files changed, 7 insertions, 6 deletions
@@ -411,17 +411,18 @@ void act_pile(int func) break; case T_POLY: if (operande2.poly) { - if (operande1.poly->degre == 0) { - - + if (operande1.val != 1) { + exception(1, _("act_pile: OP_FUNC_CALL need only one argument for a polynom evaluation")); + } + if (operande[0].poly->degre == 0) { push_pile_poly(ply_constr (rat_constr_from_double (ply_valuation - (operande2.poly, rat_to_double(operande1.poly->coef))), + (operande2.poly, rat_to_double(operande[0].poly->coef))), 0)); - if (operande1.poly) - ply_destruct(operande1.poly); + if (operande[0].poly) + ply_destruct(operande[0].poly); ply_destruct(operande2.poly); } else { exception(1, _("act_pile: OP_FUNC_CALL incorrect value for 2nd arg")); |