[GiNaC-list] Can GiNaC set info_flag?
Richard B. Kreckel
kreckel at ginac.de
Wed May 19 00:30:47 CEST 2010
Hi!
Seungyun Cho wrote:
> For example, I want to set a symbol r to be rational, or real, but
> without specifying a value.
> I know one can use info(info_flags::real) to determine if an object is real,
> but I want to do the opposite.
> I found a type 'realsymbol' to do this, but I want many other scopes such as
> rational, prime, positive integer, pure imaginary, etc.
> Is there any solution?
GiNaC doesn't offer that except for what you've already found.
In order to do so in a general way it would also have to track how these
flags propagate across computations. E.g. If you declare x as prime, is
x+1 prime? No. Is x+2 prime? Maybe. What about x+n? This quickly becomes
tricky and of questionable usefulness.
Bye
-richy.
--
Richard B. Kreckel
<http://www.ginac.de/~kreckel/>
More information about the GiNaC-list
mailing list