Commit 46db3d2b authored by Mathieu Hemery's avatar Mathieu Hemery
Browse files

Try a bug fix but not convince

parent 5f6ef14e
......@@ -1367,15 +1367,23 @@ normalize_ode(NormalForm) :-
)
)).
normalize_expression(Expr + Term, ListVar, NExpr + NTerm) :- !,
normalize_term(Term, ListVar, NTerm),
normalize_expression(Expr, ListVar, NExpr).
normalize_expression(Expr - Term, ListVar, NExpr + NTerm) :- !,
normalize_term(Term*(-1), ListVar, NTerm),
normalize_expression(Expr, ListVar, NExpr).
normalize_expression(Expr1 + Expr2, ListVar, NExpr1 + NExpr2) :- !,
normalize_expression(Expr1, ListVar, NExpr1),
normalize_expression(Expr2, ListVar, NExpr2).
normalize_expression(Expr1 - Expr2, ListVar, NExpr1 + NExpr2) :- !,
normalize_expression(Expr1, ListVar, NExpr1),
distribute(Expr2*(-1), TExpr2),
normalize_expression(TExpr2, ListVar, NExpr2).
normalize_expression(-Expr, ListVar, NExpr) :- !,
distribute(Expr*(-1), TExpr),
normalize_expression(TExpr, ListVar, NExpr).
normalize_expression(Term, ListVar, NTerm) :-
normalize_term(Term, ListVar, NTerm).
normalize_term(TermRaw, ListVar, NewTerm) :-
simplify(TermRaw, Term),
(
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment