[racket] Typed Racket Performance Optimization

From: Ray Racine (ray.racine at gmail.com)
Date: Wed May 9 23:52:42 EDT 2012

The Typed Racket Performance button in DrRacket informs me that (log v)
returns a Complex type, despite all its arguments being reals and that if I
do not want or expect a complex number as results, I mam restrict the type
of the arguments.  How does one do that?

#lang typed/racket/base

(: real-log (Float -> Float))
 (define (real-log v)
   (assert (log v) flonum?))
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.racket-lang.org/users/archive/attachments/20120509/abb42eab/attachment.html>

Posted on the users mailing list.