]> www.ginac.de Git - ginac.git/blobdiff - ginac/numeric.cpp
[BUGFIX] numeric::info(nonnegative): correctly handle complex numbers.
[ginac.git] / ginac / numeric.cpp
index 255ec50003ae4e7bb214e994f14f4e6094f94de1..18725b216cf5e40eeccebe3cc7fe41abec698372 100644 (file)
@@ -7,7 +7,7 @@
  *  of special functions or implement the interface to the bignum package. */
 
 /*
- *  GiNaC Copyright (C) 1999-2009 Johannes Gutenberg University Mainz, Germany
+ *  GiNaC Copyright (C) 1999-2011 Johannes Gutenberg University Mainz, Germany
  *
  *  This program is free software; you can redistribute it and/or modify
  *  it under the terms of the GNU General Public License as published by
@@ -700,7 +700,7 @@ bool numeric::info(unsigned inf) const
                case info_flags::negative:
                        return is_negative();
                case info_flags::nonnegative:
-                       return !is_negative();
+                       return is_zero() || is_positive();
                case info_flags::posint:
                        return is_pos_integer();
                case info_flags::negint: