in reply to Re^2: Perl's bad at arithmetic?
in thread Perl's bad at arithmetic?

BrowserUk:

But the numbers look right (though backwards from the way I expect to see 'em). If you shift your 1 nineteen positions over and subtract one from the result, you'd get what you're showing you'd get. I don't see the issue with the first two.

The last one, however looks like it rotated the 1 bit one end and onto the other.

...roboticus

When your only tool is a hammer, all problems look like your thumb.

Replies are listed 'Best First'.
Re^4: Perl's bad at arithmetic?
by BrowserUk (Patriarch) on Mar 28, 2015 at 00:10 UTC

    You're right of course. (Too late at night! )

    I was ignoring the shift; and expecting to see 19 (not 2**19 -1). I knew I was wrong but ... It's been a looooooooooooong day.


    With the rise and rise of 'Social' network sites: 'Computers are making people easier to use everyday'
    Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
    "Science is about questioning the status quo. Questioning authority". I'm with torvalds on this
    In the absence of evidence, opinion is indistinguishable from prejudice. Agile (and TDD) debunked