Modified the numeric base type environment.

This commit is contained in:
Vincent St-Amour 2010-06-09 12:45:00 -04:00
parent 04e618388c
commit 2fd1e3ac9f

View File

@ -78,16 +78,38 @@
[> real-comp] [> real-comp]
[* (apply cl->* (for/list ([t all-num-types]) (->* (list) t t)))] [* (apply cl->*
[+ (apply cl->* (for/list ([t all-num-types]) (->* (list) t t)))] (append (for/list ([t (list -Pos -Nat -Integer -ExactRational -Flonum)]) (->* (list) t t))
(list (->* (list (Un -Integer -ExactRational -Real -Flonum))
(Un -Integer -ExactRational -Real -Flonum)
-Flonum))
(list (->* (list) -Real -Real))
(list (->* (list) N N))))]
[+ (apply cl->*
(append (for/list ([t (list -Pos -Nat -Integer -ExactRational -Flonum)]) (->* (list) t t))
(list (->* (list (Un -Integer -ExactRational -Real -Flonum))
(Un -Integer -ExactRational -Real -Flonum)
-Flonum))
(list (->* (list) -Real -Real))
(list (->* (list) N N))))]
[- (apply cl->* [- (apply cl->*
(for/list ([t (list -Integer -ExactRational -Flonum -Real N)]) (append (for/list ([t (list -Integer -ExactRational -Flonum)])
(->* (list t) t t)))] (->* (list t) t t))
(list (->* (list (Un -Integer -ExactRational -Real -Flonum))
(Un -Integer -ExactRational -Real -Flonum)
-Flonum))
(list (->* (list -Real) -Real -Real))
(list (->* (list N) N N))))]
[/ (apply cl->* [/ (apply cl->*
(->* (list -Integer) -Integer -ExactRational) (append (list (->* (list -Integer) -Integer -ExactRational))
(for/list ([t (list -ExactRational -Flonum -Real N)]) (for/list ([t (list -ExactRational -Flonum)])
(->* (list t) t t)))] (->* (list t) t t))
(list (->* (list (Un -Integer -ExactRational -Real -Flonum))
(Un -Integer -ExactRational -Real -Flonum)
-Flonum))
(list (->* (list -Real) -Real -Real))
(list (->* (list N) N N))))]
[max (apply cl->* (->* (list -Pos) -Integer -Pos) (->* (list -Nat) -Integer -Nat) (for/list ([t all-num-types]) (->* (list t) t t)))] [max (apply cl->* (->* (list -Pos) -Integer -Pos) (->* (list -Nat) -Integer -Nat) (for/list ([t all-num-types]) (->* (list t) t t)))]
[min (apply cl->* (for/list ([t all-num-types]) (->* (list t) t t)))] [min (apply cl->* (for/list ([t all-num-types]) (->* (list t) t t)))]
@ -137,7 +159,8 @@
[denominator (-Real . -> . -Real)] [denominator (-Real . -> . -Real)]
[rationalize (-Real -Real . -> . N)] [rationalize (-Real -Real . -> . N)]
[expt (cl->* (-Nat -Nat . -> . -Nat) [expt (cl->* (-Nat -Nat . -> . -Nat)
(-Integer -Integer . -> . -Integer) (-Integer -Nat . -> . -Integer)
(-Real -Integer . -> . -Real)
(N N . -> . N))] (N N . -> . N))]
[sqrt (cl->* [sqrt (cl->*
(-Nat . -> . -Real) (-Nat . -> . -Real)