Re: and_bits() behavior

new topic     » goto parent     » topic index » view thread      » older message » newer message

Jason Gade wrote:
> 
> Juergen Luethje wrote:
> > 
> > That's OK.
> > Run the following code, and maybe then you can solve the riddle yourself.
> > smile
> > }}}
<eucode>
> > include machine.e
> > ? int_to_bits(-1, 8)
> > </eucode>
{{{


> 
> BTW, I experimented with this today. The highest bit count that I could go to
> and still get all ones was 53. At 54 and above, I got all zeroes.

I believe that you've hit the precision limit of a double, which is probably
the reason for this.

Matt

new topic     » goto parent     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu