Compound inequation inconsistency

Bugs

Modérateur : xcasadmin

nenad.miksa
Messages : 11
Inscription : mar. août 04, 2015 8:17 am

Compound inequation inconsistency

Message par nenad.miksa » mar. août 04, 2015 8:46 am

Hello!

We are using Giac v1.2.0 compiled from source. We have found some inconsistencies in handling compound inequations. Namely:

Input:

Code : Tout sélectionner

solve((y)^(2) - 3.5 < 5 < y + 9, y)
Output:

Code : Tout sélectionner

Inequation inside inequation not implemented (y^2-7/2-y-9)<(5-y-9) Error: Bad Argument Value
However, if we just slightly change the input to:

Input:

Code : Tout sélectionner

solve((y)^(2) - 3.5 < y < y + 9, y)
we get much more friendly output:

Code : Tout sélectionner

list[((y>((-sqrt(15)+1)/2)) and (y<((sqrt(15)+1)/2)))]
which is the same as when inputting

Code : Tout sélectionner

solve(list[(y)^(2) - 3.5 < y, y < y + 9], y)
Currently, we have a workaround for this to automatically detect compound inequalities in our code and make sure list of inequations form is used when invoking GIAC.

parisse
Messages : 5739
Inscription : mar. déc. 20, 2005 4:02 pm
Contact :

Re: Compound inequation inconsistency

Message par parisse » mar. août 04, 2015 8:26 pm

The parser does not accept double inequations (otherwise I would get reduce/reduce conflicts with bison), there is only one exception, if the middle term is a symbol (like y in your 2nd example).

nenad.miksa
Messages : 11
Inscription : mar. août 04, 2015 8:17 am

Re: Compound inequation inconsistency

Message par nenad.miksa » mer. août 05, 2015 9:48 am

Thank you for explanation!

Répondre