LoÃc Grenià on Thu, 06 Sep 2012 07:49:18 +0200


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

Re: number of lines of matrices


2012/9/5 Bill Allombert <Bill.Allombert@math.u-bordeaux1.fr>:
> Dear PARI Developers,
>
> Maybe we should add a function to query the number of lines of a non-empty matrix.
>
> There are lot of instances of lg(x[1]) in the code, and this should be replaced
> by lg(gel(x,1)) because it causes problem with strict aliasing.
>
> something like
> INLINE long
> nblin(GEN x) { return lg(gel(x,1))-1; }
>
> But how should we call it ? widthmat() ?

  heightmat maybe ? In that case widthmat should also be implemented I
  think. matwidth/height sound better (most matrix functions start with mat)
  but degpol is degpol and not poldeg.

         Thanks,

                 LoÃc