Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

Could you please report this bug by sending a message to sage-devel [1]? You only need say that the following looks weird:

sage: log(int(8),2)
log(8)/log(2)
sage: log(8,2)
3

About your problem: you can easily solve it by explicitly turning len(A) into a Sage integer:

sage: e=[None]*8
sage: log(len(e),2)
log(8)/log(2)
sage: log(Integer(len(e)),2)
3

https://groups.google.com/forum/#!forum/sage-devel

Could you please report this bug by sending a message to sage-devel [1]? You only need say that the following looks weird:

sage: log(int(8),2)
log(8)/log(2)
sage: log(8,2)
3

About your problem: you can easily solve it by explicitly turning len(A) into a Sage integer:

sage: e=[None]*8
sage: log(len(e),2)
log(8)/log(2)
sage: log(Integer(len(e)),2)
3

[1] https://groups.google.com/forum/#!forum/sage-devel