From dd2a73f3fbd8d50f935f380e5d32a26b77e4cdb8 Mon Sep 17 00:00:00 2001 From: Christian Bauer Date: Mon, 10 Apr 2000 16:49:07 +0000 Subject: [PATCH 1/1] - normal() works for relationals: it normalizes both sides --- ginac/normal.cpp | 8 ++++++++ ginac/relational.h | 1 + 2 files changed, 9 insertions(+) diff --git a/ginac/normal.cpp b/ginac/normal.cpp index a4681122..1940d1c0 100644 --- a/ginac/normal.cpp +++ b/ginac/normal.cpp @@ -1762,6 +1762,14 @@ ex pseries::normal(lst &sym_lst, lst &repl_lst, int level) const } +/** Implementation of ex::normal() for relationals. It normalizes both sides. + * @see ex::normal */ +ex relational::normal(lst &sym_lst, lst &repl_lst, int level) const +{ + return (new lst(relational(lh.normal(), rh.normal(), o), _ex1()))->setflag(status_flags::dynallocated); +} + + /** Normalization of rational functions. * This function converts an expression to its normal form * "numerator/denominator", where numerator and denominator are (relatively diff --git a/ginac/relational.h b/ginac/relational.h index 1ca60893..ae78c239 100644 --- a/ginac/relational.h +++ b/ginac/relational.h @@ -73,6 +73,7 @@ public: ex & let_op(int i); ex eval(int level=0) const; ex evalf(int level=0) const; + ex normal(lst &sym_lst, lst &repl_lst, int level=0) const; ex simplify_ncmul(const exvector & v) const; protected: int compare_same_type(const basic & other) const; -- 2.44.0