linsolve and giacpy

Bugs

Modérateur : xcasadmin

jocaps
Messages : 118
Inscription : lun. avr. 17, 2017 4:32 pm

linsolve and giacpy

Message par jocaps » sam. déc. 09, 2017 6:04 pm

Hi,

linsolve behaves unlike Xcas when solving linear system of equations that has no solutions. Consider for instance the simple

Code : Tout sélectionner

linsolve([x+y,x+y-2],[x,y])
in python using giacpy (x,y are defined as pygen types) the output is

Code : Tout sélectionner

[[undef,undef],[undef,y]]
while in Xcas the output is simply an empty list. I believe the python output is unwanted by most users and the empty list output by Xcas is the correct output. Can this be changed or is this what the developers really want?

Jose

frederic han
Messages : 1113
Inscription : dim. mai 20, 2007 7:09 am
Localisation : Paris
Contact :

Re: linsolve and giacpy

Message par frederic han » lun. déc. 11, 2017 9:14 am

Strange, I am not able to reproduce this. How is your x, is it really a free symbol?

Code : Tout sélectionner

Python 2.7.13 (v2.7.13:a06454b1afa1, Dec 17 2016, 20:42:59) [MSC v.1500 32 bit (Intel)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> from giacpy import linsolve,giac
Help file doc/fr/aide_cas not found
Added 0 synonyms
>>> x,y=giac('x,y')
>>> linsolve([x+y,x+y-2],[x,y])
[]

jocaps
Messages : 118
Inscription : lun. avr. 17, 2017 4:32 pm

Re: linsolve and giacpy

Message par jocaps » lun. déc. 11, 2017 10:11 pm

Hi,

I'm not able to reproduce it anymore myself. My apologies! Maybe I made a mistake somewhere in my code. But if I encounter this again I will post it in this thread (with the exact code that reproduces it). Thank you for verifying this. Most probably there was a wrong initiation of the variables "x" and "y" from my side.

Jose

Répondre