Hi Bill,
Apologies!
I misunderstood the definition of "ispower"!
I wanted a function that identify directly if some integer is a power of 2
cordially,
luis
***
[email protected] a écrit :
> Brest, January 12, 2023.
>
> Hi Bill,
>
> While working on a problem I landed at:
>
> Reading GPRC: gprc.txt
> GPRC Done.
>
>
> GP/PARI CALCULATOR Version 2.15.0 (released)
>
> amd64 running mingw (x86-64/GMP-6.1.2 kernel) 64-bit version
>
> compiled: Sep 19 2022, gcc version 10-posix 20210110 (GCC)
>
> threading engine: single
>
> (readline v8.0 enabled, extended help enabled)
>
>
> Copyright (C) 2000-2022 The PARI Group
>
> PARI/GP is free software, covered by the GNU General Public License,
> and comes WITHOUT ANY WARRANTY WHATSOEVER.
>
> Type ? for help, \q to quit.
> Type ?18 for how to get moral (and possibly technical) support.
>
> parisize = 8000000, primelimit = 500000
> (01:00) gp > ispower(8,2)
> %1 = 0
> (01:00) gp > ispower(16,2)
> %2 = 1
> (01:00) gp > ispower(9,3)
> %3 = 0
> (01:00) gp > ispower(27,3)
> %4 = 1
> (01:01) gp > ispower(4,2)
> %5 = 1
> (01:01) gp >
>
>
> ***
> I checked other versions of GP, including a linux one:
>
> same problem!
>
> Cordially,
>
> luis
> ***
>
> Lis H. Gallardo
>
>
> Bill Allombert <[email protected]> a écrit :
>
>> On Sat, Oct 15, 2022 at 11:05:56AM +0200, [email protected] wrote:
>>> Hi,
>>>
>>> Nice new version!
>>>
>>> What about to add some basic versions of sum and prod?
>>>
>>> sum by steps
>>>
>>> prod by steps
>>
>> Hi Luis,
>>
>> Could you give an example ?
>>
>> Thanks for using PARI/GP!
>> Bill.
lmpx.com only provides a reader for public news (NNTP) servers. It is not
affiliated with the servers or forums shown here and is not responsible for
the content of articles, which is written by their respective authors.