Karim Belabas on Mon, 23 Jan 2017 00:39:04 +0100


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

Re: Question on printing a matrix...


* wraithx@morpheus.net [2017-01-22 23:52]:
> 
> On 1/22/2017 4:06 PM, Bill Allombert wrote:
[...]
> > There used to be a function printp, but it has been removed.
> > You can try that instead:
> > 
> > ? printf("%d", factor(12));
> > [2 2]
> > 
> > [3 1]
> > 
> > Or
> > ? printm(M)=apply(s->print(s),Col(M));print1()
> > [2, 2]
> > [3, 1]
> 
> Thank you Karim and Bill for your suggestions.  For some reason the first
> suggestion will sometimes crash on me, but the second one works great for
> me. Here is the problem I see, not that I need it since the other method
> works.
> 
> (16:37) gp > printf("%d",factor(12001))
> [11 1]
> 
> [1091 1]
> 
> (16:37) gp > printf("%d",factor(120001))
>   ***   at top-level: printf("%d",factor(1
>   ***                 ^--------------------
>   *** printf: bug in PARI/GP (Segmentation Fault), please report.

Indeed; a long standing bug... 

Now fixed in 'master' branch.

Thanks for finding this !!!

    K.B.
--
Karim Belabas, IMB (UMR 5251)  Tel: (+33) (0)5 40 00 26 17
Universite de Bordeaux         Fax: (+33) (0)5 40 00 21 23
351, cours de la Liberation    http://www.math.u-bordeaux.fr/~kbelabas/
F-33405 Talence (France)       http://pari.math.u-bordeaux.fr/  [PARI/GP]
`