Joerg Arndt on Sun, 11 Dec 2005 10:12:18 +0100


[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]

Re: [Repost due to problems on POP server] matsolve() gp function and PARI matrix allocation in C


* Alessio Rocchi <alexrocchi@gmail.com> [Dec 11. 2005 03:06]:
> Sorry for the inconvenience.
> I don't know if the message has still reached the right address.
> Follows original message.
> ---------------------------------------------------------------
> Hi everybody.
> Today i've two question to ask for...
> I go listing 'em:
> 1) I'm experiencing a problem related to matsolve() gp function.
> I invoke it in the following way:
> 
> matsolve(
 [1,1,0,0,0;
  1,0,0,2,0;
  0,1,1,0,1;
  4,0,0,0,1;
  1,0,0,0,0],

  \\ a 5 x 5 matrix

> [6,98,100,165,176,2]~)
  \\ SIX elements

Such errors are (sometimes) avoided by
M=[...]
B=[...]
matsolve(M,B~)
*** errror zamzink

\\ checking:
matsize(M)
[5,5]
Matsize(B~)
[6,1]

> 
> The output is an error message like "inconsistent data in gauss".

Err msgs are there to be reproduced, you got exactly this:
  *** matsolve: inconsistent data in gauss.

And it make sense to me.


> I didn't find any help about it into the gp tutorial.
> I'm quite sure that the previous systems has solutions, but i can't
> get the way for the matsolve() to work.
> 

A mechanism to look up errors (via IDs) that gives examples
would be, as for all complex systems, useful.  However, I
do not volunteer to implement it  8-)

Second question left to pari hackers.

-- 
p=2^q-1 prime <== q>2, cosh(2^(q-2)*log(2+sqrt(3)))%p=0
Life is hard and then you die.