Karim BELABAS on Tue, 14 Jan 2003 12:46:09 +0100 (MET)


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

Re: is this the right list for this question?


On Mon, 13 Jan 2003, Ramón Casero Cañas wrote:
> Karim BELABAS wrote:
>> On Mon, 13 Jan 2003, Ramón Casero Cañas wrote:
[...]
>>>       z = cgetg(3, t_INTMOD);
>>>       z[1] = (long)2;
>>>       z[2] = (long)1;
>>
>>
>> Rather
>>
>>   z[1] = lstoi(2);
>>   z[2] = lstoi(1);
>
> Um, what's lstoi()? I suppose everybody knows, but I haven't found it in
> the User's Guide Index (neither 2.1.4, nor 2.2.4). As it has the `l', I
> thought that maybe there's a `gstoi()', but there's none either. Is it a
> C standard function? I do not remember any with that name, and a fast
> search in google didn't show me any result.

It's PARI specific, and stands for (long)stoi.

You can use the ??? index query to quickly browse the manual from gp [ provided
extended help is available ]  ( of course, 'grep' serves the same purpose, with
more flexibility, but it cant interepret TeX code on the fly ):

(12:40) gp > ???stoi

\\ so it's not referenced in Chapter 3. Let's try in the whole manual.
(12:40) gp > ???stoi@

Chapter 4:
==========
Conversions

Chapter 5:
==========
  Assignments, conversions and integer parts

\\ What does 'Conversion in Chapter 4' has to say about stoi ?
(12:40) gp > ??Conversions@4
Conversions:

   The following functions convert C objects to PARI objects (creating them
on the stack as usual):

   GEN stoi(long s): C long integer  ("small") to PARI integer (t_INT)
[...]

Cheers,

    Karim.
-- 
Karim Belabas                    Tel: (+33) (0)1 69 15 57 48
Dép. de Mathématiques, Bât. 425  Fax: (+33) (0)1 69 15 60 19
Université Paris-Sud             Email: Karim.Belabas@math.u-psud.fr
F-91405 Orsay (France)           http://www.math.u-psud.fr/~belabas/
--
PARI/GP Home Page: http://www.parigp-home.de/