]> www.ginac.de Git - ginac.git/commitdiff
- normal() works for relationals: it normalizes both sides
authorChristian Bauer <Christian.Bauer@uni-mainz.de>
Mon, 10 Apr 2000 16:49:07 +0000 (16:49 +0000)
committerChristian Bauer <Christian.Bauer@uni-mainz.de>
Mon, 10 Apr 2000 16:49:07 +0000 (16:49 +0000)
ginac/normal.cpp
ginac/relational.h

index a4681122a662a0b03cb0e333f024aa360bc9d7b2..1940d1c0d17a0cd9639affcc3475e392def2632a 100644 (file)
@@ -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
index 1ca6089336c71d3517df247c2b1a678c37172767..ae78c239bff03d72eed4fbe7ebbe87c3e6364d7e 100644 (file)
@@ -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;