Martin Albrecht points out that my stringification is a waste:

ZZ(A,2)

works fine.

On Tue, Aug 23, 2011 at 12:29 PM, Tom Boothby <[email protected]> wrote:
> Treat it as a binary number:
>
> s = ''.join(str(i) for i in A)
> ZZ(s, base=2)
>
> On Tue, Aug 23, 2011 at 12:08 PM, Santanu Sarkar
> <[email protected]> wrote:
>> Let A=(1,1,0,0,0,1) be an binary array. How efficiently can we calculate the
>> corresponding integer?
>>
>> --
>> To post to this group, send email to [email protected]
>> To unsubscribe from this group, send email to
>> [email protected]
>> For more options, visit this group at
>> http://groups.google.com/group/sage-support
>> URL: http://www.sagemath.org
>>
>

-- 
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/sage-support
URL: http://www.sagemath.org

Reply via email to