[GiNaC-list] can ginac solve inequalities ?

Jens Vollinga jensv at nikhef.nl
Thu Mar 25 10:51:31 CET 2010


Hi,

Am 19.03.2010 01:44, schrieb Frederic:
> for now, using lsolve(), I can make GiNaC answer "x == -y" for
> equality "x+y  == 0" (looking at 'x').
>
> My question is :  if I'm looking for 'x', in the inequality " x+y<
> 0", how can GiNaC give me "x<  -y" ?

there is no build-in facility in GiNaC to do such a thing. You would 
have to write your own code for that, for example, a function that takes 
an relational, manipulates the rhs and lhs and returns the new 
relational. The relational class can indeed represent a inequality, but 
nothing more.

Regards,
Jens




More information about the GiNaC-list mailing list