[racket] TR: too-narrow type in / ?

From: Vincent St-Amour (stamourv at ccs.neu.edu)
Date: Wed Feb 4 14:07:56 EST 2015

I can't think of any way in which this change could cause problems, and
neither can the random tester. I've pushed a fix.

Thanks for the report!

Vincent


At Tue, 03 Feb 2015 20:51:55 -0500,
Vincent St-Amour wrote:
> 
> That kind of pattern in the type usually happens due to underflow. In
> this case, however, I don't see how it could cause problems.
> 
> A frequent problem case is -0.0, which (for closure property reasons) is
> considered non-negative. But in this case, it's acceptable both as an
> input and as an output.
> 
> I'll look into this, and possibly relax the type (and others like it).
> 
> Thanks for the report!
> 
> Vincent
> 
> 
> 
> At Tue, 3 Feb 2015 15:23:13 -0800,
> John Clements wrote:
> > 
> > 
> > I'm dividing a Nonnegative-Real by an Index, and I want to get back a
> > Nonnegative-Real. The type of / contains this clause:
> > 
> > (-> Positive-Real Positive-Real * Nonnegative-Real)
> > 
> > It appears to me that the first term here should be "Nonnegative-Real",
> > rather than "Positive-Real"... that is, this type:
> > 
> > (-> Nonnegative-Real Positive-Real * Nonnegative-Real)
> > 
> > Am I missing something obvious here?
> > 
> > (Naturally, I can insert a dynamic check, it just seems unnecessary...)
> > 
> > Thanks!
> > 
> > John
> > ____________________
> >   Racket Users list:
> >   http://lists.racket-lang.org/users

Posted on the users mailing list.