[racket-dev] Inferring numeric function types from representative argument values

From: Matthew Flatt (mflatt at cs.utah.edu)
Date: Fri Jan 4 09:17:44 EST 2013

At Thu, 03 Jan 2013 21:09:52 -0700, Neil Toronto wrote:
>   1. Implementation of `sqrt': most Single-Float-Complex inputs yield
>      Float-Complex outputs. The type is sane, but the behavior isn't:
> 
>      > (sqrt 1.0f0+5.2f0i)
>      - : Single-Flonum-Complex
>      1.7741590586312472+1.465482980223009i

Yes, I find problems with 

 * `sqrt' and `expt' on single-flonum complex numbers
 * `asin' and `acos' on single-flonum arguments
 * `atan' on mixtures of single-flonum and exact arguments
 * `gcd' on mixtures of single-flonum and flonum arguments

I'll push repairs soon.


Posted on the dev mailing list.