Is Typed Racket able to replace functions such as +
, sqrt
and sin
with their fl
equivalents when all the arguments are Flonums? For example, is TR able to transform the code below:
(: radians->chlen (-> Flonum Flonum))
(define (radians->chlen r)
(* 2.0 (sin (* 0.5 (min pi r))))))
Into:
(: radians->chlen (-> Flonum Flonum))
(define (radians->chlen r)
(fl* 2.0 (flsin (fl* 0.5 (flmin pi r))))))
Alex.