Karim.Belabas on Sat, 12 May 2001 12:57:25 +0200 (MET DST)


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

Re: Changing PARI types


On Sat, 12 May 2001, Karim.Belabas wrote:
> > > For example, can I do something like:
> > > 
> > > settyp (H [i], 1);
> > > 
> > > for each coefficient, or would this be horribly dangerous?
> > 
> > That would change the type marker of the object whilst leaving
> > the bit pattern as it is, and is very unlikely to result in a
> > recognizable PARI integer!
> 
> As a matter of fact, it will. A "random" 31 bit integer presumably
> (corresponding to the adress of the real part).

Hum, forget that.  Adress of the real part will be interpreted
as second codeword of a t_INT. The subsequent words (number of which
depending on the address modulo LGEFINTBITS) will be taken as the integer
mantissa.

Anyway, you don't want to do that...

    Karim.

-- 
Karim Belabas                    email: Karim.Belabas@math.u-psud.fr
Dep. de Mathematiques, Bat. 425
Universite Paris-Sud             Tel: (00 33) 1 69 15 57 48
F-91405 Orsay (France)           Fax: (00 33) 1 69 15 60 19
--
PARI/GP Home Page: http://www.parigp-home.de/