[racket-dev] Something wrong with check-within

From: Nadeem Abdul Hamid (nadeem at acm.org)
Date: Thu Nov 11 19:34:39 EST 2010

The check-within in the follow program (in BSL/ISL) seems to hang.
This is sort of the simplest example I can reproduce, but my students
have been running into this with some more complicated test cases. I
thought it might have to do with the inexact numbers, but even if you
change the #i0.501 to 0.501, it still hangs. I'm seeing this problem
in version 5.0.2, but I believe my students are running 5.0.1...


(define-struct anim (ctrl-pts curve-pts t running?))

(define SAMPLE-WORLD-NEXT (make-anim (list (make-posn 20 190) (make-posn 10 10)
                                      (make-posn 100 10) (make-posn 125 190)
                                      (make-posn 150 30))
                                (list (make-posn 20 190))
                                0.501 true))

(check-within SAMPLE-WORLD-NEXT
              (make-anim (list (make-posn 20 190) (make-posn 10 10)
                                      (make-posn 100 10) (make-posn 125 190)
                                      (make-posn 150 30))
                                (list (make-posn 20 190))
                                #i0.501 true)
              0.001)


Posted on the dev mailing list.