[racket] Bug in bitwise-bit-field
;; from Racket reference 4.2.2.6
(define (bitwise-bit-field* n start end)
(bitwise-and (sub1 (arithmetic-shift 1 (- end start)))
(arithmetic-shift n (- start))))
> (bitwise-bit-field #b11111111111111111111111111100010 0 31)
-30
> (bitwise-bit-field* #b11111111111111111111111111100010 0 31)
2147483618 Racket 6.0.1, Windows XP x86
--
Roman Klochkov
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.racket-lang.org/users/archive/attachments/20140617/9507f518/attachment.html>