[racket] typo in signatures?

From: Hendrik Boom (hendrik at topoi.pooq.com)
Date: Tue Oct 4 16:26:17 EDT 2011

On Tue, Oct 04, 2011 at 02:23:16PM -0400, Shriram Krishnamurthi wrote:
> check-within
> 
> http://docs.racket-lang.org/test-engine/index.html#(def._((lib._test-engine/racket-tests..rkt)._check-within))

Yes.  That's exactly what students should be using ubstead of anything 
that even looks like an equality-test.  The only time you'd want an 
actual equality test on inexact numbers is whan you're using it 
algorithmically instead of numerically, such as attaching a memo-pad to 
a function on inexactt numbers.

-- hendrik

> 
> On Tue, Oct 4, 2011 at 1:48 PM, Hendrik Boom <hendrik at topoi.pooq.com> wrote:
> > On Tue, Oct 04, 2011 at 12:50:36PM -0400, Matthias Felleisen wrote:
> >>
> >> For testing, you want to use check-within because check-expects fails.
> >>
> >> For real programming, you actually want to use inequality comparisons,
> >> so that they see how to program with Doubles elsewhere.
> >>
> >> For teaching abstraction, you may ask why repeat all these (<= n x n+epsilon)
> >> everywhere. Oh, let's write inexact=?
> >
> > Not sure what inexact=? does.  What's needed is something like a
> > three-argument function that tests |x-y| < epsilon.  Epsilon should
> > not be implicit.
> >
> > This can generalise to inexact points in any metric space, and the
> > like.
> >
> > -- hendrik
> > _________________________________________________
> >  For list-related administrative tasks:
> >  http://lists.racket-lang.org/listinfo/users
> >


Posted on the users mailing list.