Roots of unity
Richard B. Kreckel
kreckel at thep.physik.uni-mainz.de
Sun Jan 20 18:18:08 CET 2002
Hi,
On Sun, 20 Jan 2002, Bob McElrath wrote:
> > [...]
> > > What I see as needed in order to write some simplification routines are methods
> > > for the ex class like there are in the numeric class:
> > > is_real, is_integer, operator<, etc...
> > > And an assume() functionality to create symbols that are reals, integers, etc.
> >
> > The reason this has not been done is that we have absolutely no idea how
> > to make it consistent.
>
> Really? Maybe I haven't thought about it as much as you...
>
> But it seems you'd need methods:
> is_real
> is_negative
> etc...
> for every function (sqrt, sum, sin, pow, ...), which could then query their
> arguments in the appropriate manner to determine the final result.
The trouble starts already with trivial expressions: If a>0 and b>0, then
(a+b)>0. But (a-b) would have to return false, as would (b-a). This
makes it already difficult for sums. Ternary logic would help a bit,
here. :-)
[...]
> By nested root you mean something like:
> sqrt(a+sqrt(b))
> right?
Yes.
Regards
-richy.
--
Richard Kreckel
<Richard.Kreckel at Uni-Mainz.DE>
<http://wwwthep.physik.uni-mainz.de/~kreckel/>
More information about the GiNaC-list
mailing list