Thanks. Is there more efficient than this?

On 24 August 2011 00:59, 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
>

-- 
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