[sage-support] Re: int() on real numbers broken?

2014-03-25 Thread Zeda Thomas
Thanks much, that helps and I am pretty sure I understand what is going on! On Monday, March 24, 2014 10:49:18 AM UTC-4, Peter Bruin wrote: > > Hello, > > > I am working on a Z80 project and I needed 72 bits of precision for 64 > > elements of the form log2(1+2^-i) (so log2(3/2), log2(5/4),...)

[sage-support] Re: int() on real numbers broken?

2014-03-24 Thread Peter Bruin
Hello, > I am working on a Z80 project and I needed 72 bits of precision for 64 > elements of the form log2(1+2^-i) (so log2(3/2), log2(5/4),...). I > needed to convert these to hexadecimal, and it worked until I tried > the following for i=56: > int(256*log(1+2^-56,2)) > > This returns 1, when in