[racket-dev] Hyperbolic functions

From: Eli Barzilay (eli at barzilay.org)
Date: Tue Jun 26 12:53:18 EDT 2012

Three hours ago, Matthias Felleisen wrote:
> On Jun 26, 2012, at 12:07 AM, Neil Toronto wrote:
> > It would, and I'd be happy to do it while I'm on vacation next
> > month. Can you submit a change request?
> > 
> > More generally, what would the Powers That Be think of my adding
> > various special functions (like probit, inverse probit, Bessel
> > functions, gamma, log gamma, etc.) to racket/math? I've already
> > written quite a few in Typed Racket for my own use.
> > 
> > Come to think of it, racket/math is a great candidate for being
> > written in Typed Racket but the racket collection has to be
> > compiled before typed-racket. Is there a way around that?
> I'd love to see math as a TR library. Does it have to be in racket/
> ?

+1 for not being in `racket/math' -- it'll be the same kind of
dependency that brings up the mess factor.

One way to get the benefits of TR without a dependency could be:

  * Write the code (without the types) in "racket/private/math.rktl"

  * Include it as-is in "racket/math.rkt"

  * Have a "typed/racket/math.rkt" that includes the same source and
    adds the types.

But if the goal is to have *much* more mathy functions, then it seems
better to just have a new toplevel collection.

          ((lambda (x) (x x)) (lambda (x) (x x)))          Eli Barzilay:
                    http://barzilay.org/                   Maze is Life!

Posted on the dev mailing list.