Added methods for taking real and imaginary parts.
[ginac.git] / ginac / numeric.cpp
index 278741f1e43aec63aa875dd56dd8092687ff58b6..cc72565a22b460b6c1a292e1091219d7dabb5057 100644 (file)
@@ -687,6 +687,16 @@ ex numeric::conjugate() const
        return numeric(cln::conjugate(this->value));
 }
 
        return numeric(cln::conjugate(this->value));
 }
 
+ex numeric::real_part() const
+{
+       return numeric(cln::realpart(value));
+}
+
+ex numeric::imag_part() const
+{
+       return numeric(cln::imagpart(value));
+}
+
 // protected
 
 int numeric::compare_same_type(const basic &other) const
 // protected
 
 int numeric::compare_same_type(const basic &other) const