[racket-dev] nan?, infinite? and regular-real? [Was: Latest Plot Package]

From: Neil Toronto (neil.toronto at gmail.com)
Date: Fri Nov 18 19:03:53 EST 2011

On 11/18/2011 01:35 PM, Stephen Bloch wrote:
> On Nov 18, 2011, at 2:34 PM, "Neil Toronto"<neil.toronto at gmail.com>  wrote:
>
>> ... I'd like to add exact-round, exact-floor, exact-truncate and exact-ceiling. I rarely need to chop off fractional parts without also making the result exact.
>
> That might be convenient, but it's philosophically dubious.  Consider rounding the inexact value 5.49 plus or minus .05.  Saying the answer is "exactly" 5 is claiming more certainty than you actually have: it might be 6.

Is `inexact->exact' the only function in the standard library allowed to 
be used to say, "Aw, screw it, I know it's inexact but I want a rational 
number anyway"?

Or is your objection more about the name?

Neil T


Posted on the dev mailing list.