diff options
author | Pixel <Pixel> | 2001-05-03 02:00:48 +0000 |
---|---|---|
committer | Pixel <Pixel> | 2001-05-03 02:00:48 +0000 |
commit | 1c20afc6bfdbdc24fc59e68d3095ce6141c84cd6 (patch) | |
tree | 63c6fcfc2fae65c71e525df591465a29db563e9f /lib/pile.c | |
parent | 6afd90cf26b9dec429664fdda06d2b7ea9702548 (diff) |
Hop
Diffstat (limited to 'lib/pile.c')
-rw-r--r-- | lib/pile.c | 16 |
1 files changed, 10 insertions, 6 deletions
@@ -459,14 +459,18 @@ void act_pile(int func) _ ("act_pile: OP_FUNC_CALL need only one argument for a polynom evaluation")); } - if (operande[0].poly->degre == 0) { - push_pile_poly(ply_constr - (ply_valuation(operande2.poly, operande[0].poly->coef), 0)); - if (operande[0].poly) + if (operande[0].poly) { + if (operande[0].poly->degre == 0) { + push_pile_poly(ply_constr + (ply_valuation(operande2.poly, operande[0].poly->coef), 0)); ply_destruct(operande[0].poly); - ply_destruct(operande2.poly); + ply_destruct(operande2.poly); + } else { + exception(1, _("act_pile: OP_FUNC_CALL incorrect value for 2nd arg")); + } } else { - exception(1, _("act_pile: OP_FUNC_CALL incorrect value for 2nd arg")); + push_pile_poly(ply_constr(ply_valuation(operande2.poly, rat_constr_zero()), 0)); + ply_destruct(operande2.poly); } } else { exception(1, _("act_pile: OP_FUNC_CALL arg2 is an empty polynom")); |