[racket] Inconsistency of `in-range` and numerical issues

From: Konrad Hinsen (konrad.hinsen at fastmail.net)
Date: Fri Feb 27 09:37:32 EST 2015

Robby Findler writes:

 > Should we consider making in-range signal an error for floats? I
 > guess backwards compatibility says "no" but maybe in a future
 > racket? With a note in the error message that points people in the
 > right direction?

In a future Racket or perhaps in a specialized language (teaching
language, DSL, ...)  specifically aimed at numerical tasks. I believe
that Racket has an enormous unexploited potential there.

Some ideas:

 - A teaching and research language for numerical problems, with
   first-class syntactical support for rationals, floats, bigfloats,
   and (dreaming...) exact reals.

 - A DSL for numerical optimization, which eliminates all constructs
   that can reduce efficiency.

 - A DSL restricted to computations that can be offloaded to a GPU.

Sam Tobin-Hochstadt writes:

 > At a minimum, we could (a) log a warning and (b) put a note in the
 > docs suggesting that people use Neil's library for floats.

That sounds good for immediate action.


Posted on the users mailing list.