Added the Float-Complex type for consistency with the new float types.

Inexact-Complex has been kept as a synonym for backward compatibility.
This commit is contained in:
Vincent St-Amour 2010-10-11 18:19:15 -04:00
parent a59a99c42d
commit 52bd739d00
3 changed files with 6 additions and 5 deletions

View File

@ -1,7 +1,8 @@
#lang s-exp "type-env-lang.rkt" #lang s-exp "type-env-lang.rkt"
[Complex -Number] [Complex -Number]
[Inexact-Complex -InexactComplex] [Float-Complex -InexactComplex] ; for consistency with float vs inexact-real
[Inexact-Complex -InexactComplex] ; for backward compatiblity
[Number -Number] [Number -Number]
[Integer -Integer] [Integer -Integer]
[Real -Real] [Real -Real]

View File

@ -68,7 +68,7 @@ not necessary when using @racket[+] or @racket[-]. When mixing
floating-point numbers of different precisions, results use the floating-point numbers of different precisions, results use the
highest precision possible. highest precision possible.
On a similar note, the @racket[Inexact-Complex] type is preferable to On a similar note, the @racket[Float-Complex] type is preferable to
the @racket[Complex] type for the same reason. Typed Racket can keep the @racket[Complex] type for the same reason. Typed Racket can keep
@tech[#:doc '(lib "scribblings/reference/reference.scrbl") #:key @tech[#:doc '(lib "scribblings/reference/reference.scrbl") #:key
"inexact numbers"]{inexact} "inexact numbers"]{inexact}
@ -93,8 +93,8 @@ present and
@tech[#:doc '(lib "scribblings/reference/reference.scrbl") #:key @tech[#:doc '(lib "scribblings/reference/reference.scrbl") #:key
"inexact numbers"]{inexact} "inexact numbers"]{inexact}
for the literal to be of type for the literal to be of type
@racket[Inexact-Complex]; @racket[0.0+1.0i] is of type @racket[Float-Complex]; @racket[0.0+1.0i] is of type
@racket[Inexact-Complex] but @racket[+1.0i] is not. @racket[Float-Complex] but @racket[+1.0i] is not.
To get the most of To get the most of
Typed Racket's optimizer, you should also favor rectangular Typed Racket's optimizer, you should also favor rectangular
coordinates over polar coordinates. coordinates over polar coordinates.

View File

@ -35,7 +35,7 @@ any expression of this type will not evaluate to a value.}
@deftogether[( @deftogether[(
@defidform[Number] @defidform[Number]
@defidform[Complex] @defidform[Complex]
@defidform[Inexact-Complex] @defidform[Float-Complex]
@defidform[Real] @defidform[Real]
@defidform[Float] @defidform[Float]
@defidform[Nonnegative-Float] @defidform[Nonnegative-Float]