From: Christian Bauer Date: Mon, 10 Apr 2000 16:49:07 +0000 (+0000) Subject: - normal() works for relationals: it normalizes both sides X-Git-Tag: release_0-6-0~24 X-Git-Url: https://www.ginac.de/ginac.git//ginac.git?p=ginac.git;a=commitdiff_plain;h=dd2a73f3fbd8d50f935f380e5d32a26b77e4cdb8 - normal() works for relationals: it normalizes both sides --- 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;