[plt-scheme] Numeric Comparison Contracts

From: Robby Findler (robby at eecs.northwestern.edu)
Date: Wed Oct 28 12:04:49 EDT 2009

Thanks. That's fixed now (in SVN).

Robby

On Wed, Oct 28, 2009 at 10:44 AM, Doug Williams
<m.douglas.williams at gmail.com> wrote:
> I have a question about numeric comparisons (inequality operators) in
> contracts.I'm not sure if it's a documentation bug or an implementation bug,
> but </c specifies a real? argument, while >/c, <=/c, and >=/c (and between/c
> and possibly others) specifies a number? argument. Unfortunately, they
> actually error (as opposed to giving a contract violation) when given a
> complex number. [The actual inequality operators require real numbers.] So,
> you actually need to write (and/c real? (<=/c 0.0)), for example, to guard
> the <=/c contract. It seems that the inequality operators should require
> (and enforce) a real number as its argument.
>
> Doug
>
> _________________________________________________
>  For list-related administrative tasks:
>  http://list.cs.brown.edu/mailman/listinfo/plt-scheme
>
>


Posted on the users mailing list.