[racket] Bug in bitwise-bit-field

From: Matthew Flatt (mflatt at cs.utah.edu)
Date: Tue Jun 17 02:17:36 EDT 2014

I've pushed a repair to `bitwise-bit-field`.

Thanks for the report!

At Tue, 17 Jun 2014 07:32:22 +0400, Roman Klochkov wrote:
> 
> ;; 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____________________
>   Racket Users list:
>   http://lists.racket-lang.org/users



Posted on the users mailing list.