Carpet

Carpet

2M Downloads

Bitwise shift docs are wrong

altrisi opened this issue ยท 0 comments

commented

Currently, the docs for shifts state that shift amounts above 63 will clear the number to 0.

However, that's wrong, given they're implemented using Java's shift operators, whose implementation is as if the amount is masked with & 0b111111.

Docs should be updated to reflect that, or we could add checks to allow for bigger shifts, though I don't think that'd be very useful, but add some overhead.

Reported by @slashOwO in #1666.