Delay evaluation of numeric base env types.
This commit is contained in:
parent
f3d22879a2
commit
70aaf6bf24
|
@ -78,6 +78,7 @@
|
|||
|
||||
|
||||
(define round-type ; also used for truncate
|
||||
(lambda ()
|
||||
(from-cases
|
||||
(map unop all-int-types)
|
||||
(-> -NonNegRat -Nat)
|
||||
|
@ -89,12 +90,13 @@
|
|||
-NonNegSingleFlonum -NonPosSingleFlonum -SingleFlonum
|
||||
-InexactRealPosZero -InexactRealNegZero -InexactRealZero
|
||||
-NonNegInexactReal -NonPosInexactReal -InexactReal
|
||||
-RealZero -NonNegReal -NonPosReal -Real))))
|
||||
-RealZero -NonNegReal -NonPosReal -Real)))))
|
||||
|
||||
(define fl-unop (unop -Flonum))
|
||||
(define fl-unop (lambda () (unop -Flonum)))
|
||||
|
||||
;; types for specific operations, to avoid repetition between safe and unsafe versions
|
||||
(define fx+-type
|
||||
(lambda ()
|
||||
(fx-from-cases
|
||||
(binop -Zero)
|
||||
(map (lambda (t) (commutative-binop t -Zero t))
|
||||
|
@ -107,8 +109,9 @@
|
|||
(commutative-binop -NegInt -One -NonPosFixnum)
|
||||
(commutative-binop -NegInt -NonPosInt -NegFixnum)
|
||||
(-NonPosInt -NonPosInt . -> . -NonPosFixnum)
|
||||
(-Int -Int . -> . -Fixnum)))
|
||||
(-Int -Int . -> . -Fixnum))))
|
||||
(define fx--type
|
||||
(lambda ()
|
||||
(fx-from-cases
|
||||
(binop -Zero)
|
||||
(map (lambda (t) (commutative-binop t -Zero t))
|
||||
|
@ -123,8 +126,9 @@
|
|||
(-PosInt -NonPosInt . -> . -PosInt)
|
||||
(-Nat -NegInt . -> . -PosInt)
|
||||
(-Nat -NonPosInt . -> . -Nat)
|
||||
(-Int -Int . -> . -Fixnum)))
|
||||
(-Int -Int . -> . -Fixnum))))
|
||||
(define fx*-type
|
||||
(lambda ()
|
||||
(fx-from-cases
|
||||
(map binop (list -Zero -One))
|
||||
(commutative-binop -Zero -Int)
|
||||
|
@ -136,8 +140,9 @@
|
|||
(-Nat -Nat . -> . -NonNegFixnum)
|
||||
(commutative-binop -Nat -NonPosInt -NonPosFixnum)
|
||||
(-NonPosFixnum -NonPosFixnum . -> . -NonNegFixnum)
|
||||
(-Int -Int . -> . -Fixnum)))
|
||||
(-Int -Int . -> . -Fixnum))))
|
||||
(define fxquotient-type
|
||||
(lambda ()
|
||||
(fx-from-cases
|
||||
(-Zero -Int . -> . -Zero)
|
||||
(map (lambda (t) (-> t -One t)) ; division by one is identity
|
||||
|
@ -148,8 +153,9 @@
|
|||
(-Nat -Nat . -> . -NonNegFixnum)
|
||||
(commutative-binop -Nat -NonPosInt -NonPosFixnum)
|
||||
(-NonPosInt -NonPosInt . -> . -NonNegFixnum)
|
||||
(-Int -Int . -> . -Fixnum)))
|
||||
(-Int -Int . -> . -Fixnum))))
|
||||
(define fxremainder-type ; result has same sign as first arg
|
||||
(lambda ()
|
||||
(fx-from-cases
|
||||
(-One -One . -> . -Zero)
|
||||
(map (lambda (t) (list (-> -Nat t t)
|
||||
|
@ -157,8 +163,9 @@
|
|||
(list -Byte -Index))
|
||||
(-Nat -Int . -> . -NonNegFixnum)
|
||||
(-NonPosInt -Int . -> . -NonPosFixnum)
|
||||
(-Int -Int . -> . -Fixnum)))
|
||||
(-Int -Int . -> . -Fixnum))))
|
||||
(define fxmodulo-type ; result has same sign as second arg
|
||||
(lambda ()
|
||||
(fx-from-cases
|
||||
(-One -One . -> . -Zero)
|
||||
(map (lambda (t) (list (-> -Int t t)
|
||||
|
@ -166,13 +173,15 @@
|
|||
(list -Byte -Index))
|
||||
(-Int -Nat . -> . -NonNegFixnum)
|
||||
(-Int -NonPosInt . -> . -NonPosFixnum)
|
||||
(-Int -Int . -> . -Fixnum)))
|
||||
(-Int -Int . -> . -Fixnum))))
|
||||
(define fxabs-type
|
||||
(lambda ()
|
||||
(fx-from-cases
|
||||
(map unop (list -Zero -One -PosByte -Byte -PosIndex -Index))
|
||||
((Un -PosInt -NegInt) . -> . -PosFixnum)
|
||||
(-Int . -> . -NonNegFixnum)))
|
||||
(-Int . -> . -NonNegFixnum))))
|
||||
(define fx=-type
|
||||
(lambda ()
|
||||
(fx-from-cases
|
||||
;; we could rule out cases like (= Pos Neg), but we currently don't
|
||||
(map (lambda (l) (apply exclude-zero l))
|
||||
|
@ -183,8 +192,9 @@
|
|||
(list -Int (Un -PosFixnum -NegFixnum))))
|
||||
(map (lambda (t) (commutative-equality/filter -Int t))
|
||||
(list -One -PosByte -Byte -PosIndex -Index -PosFixnum -NonNegFixnum -NegFixnum -NonPosFixnum))
|
||||
(comp -Int)))
|
||||
(comp -Int))))
|
||||
(define fx<-type
|
||||
(lambda ()
|
||||
(fx-from-cases
|
||||
(-> -Pos -One B : (-FS (-filter (Un) 0) -top)) ; can't happen
|
||||
(-> -Nat -One B : (-FS (-filter -Zero 0) -top))
|
||||
|
@ -219,8 +229,9 @@
|
|||
(-> -Int -NonPosInt B : (-FS (-filter -NegFixnum 0) -top))
|
||||
(-> -NegInt -Int B : (-FS -top (-filter -NegFixnum 1)))
|
||||
(-> -NonPosInt -Int B : (-FS -top (-filter -NonPosFixnum 1)))
|
||||
(comp -Int)))
|
||||
(comp -Int))))
|
||||
(define fx>-type
|
||||
(lambda ()
|
||||
(fx-from-cases
|
||||
(-> -One -Pos B : (-FS (-filter (Un) 1) -top)) ; can't happen
|
||||
(-> -One -Nat B : (-FS (-filter -Zero 1) -top))
|
||||
|
@ -252,8 +263,9 @@
|
|||
(-> -NonPosInt -Int B : (-FS (-filter -NegFixnum 1) -top))
|
||||
(-> -Int -NegInt B : (-FS -top (-filter -NegFixnum 0)))
|
||||
(-> -Int -NonPosInt B : (-FS -top (-filter -NonPosFixnum 0)))
|
||||
(comp -Int)))
|
||||
(comp -Int))))
|
||||
(define fx<=-type
|
||||
(lambda ()
|
||||
(fx-from-cases
|
||||
(-> -Pos -One B : (-FS (-filter -One 0) -top))
|
||||
(-> -Byte -Zero B : (-FS (-filter -Zero 0) (-filter -PosByte 0)))
|
||||
|
@ -285,8 +297,9 @@
|
|||
(-> -Int -NegInt B : (-FS (-filter -NegFixnum 0) -top))
|
||||
(-> -Int -NonPosInt B : (-FS (-filter -NonPosFixnum 0) -top))
|
||||
(-> -NonPosInt -Int B : (-FS -top (-filter -NegFixnum 1)))
|
||||
(comp -Int)))
|
||||
(comp -Int))))
|
||||
(define fx>=-type
|
||||
(lambda ()
|
||||
(fx-from-cases
|
||||
(-> -One -Pos B : (-FS (-filter -One 1) -top))
|
||||
(-> -Zero -Byte B : (-FS (-filter -Zero 1) (-filter -PosByte 1)))
|
||||
|
@ -318,8 +331,9 @@
|
|||
(-> -NegInt -Int B : (-FS (-filter -NegFixnum 1) -top))
|
||||
(-> -NonPosInt -Int B : (-FS (-filter -NonPosFixnum 1) -top))
|
||||
(-> -Int -NonPosInt B : (-FS -top (-filter -NegFixnum 0)))
|
||||
(comp -Int)))
|
||||
(comp -Int))))
|
||||
(define fxmin-type
|
||||
(lambda ()
|
||||
(fx-from-cases
|
||||
(binop -Zero)
|
||||
(binop -One)
|
||||
|
@ -332,8 +346,9 @@
|
|||
(-> -Nat -Nat -NonNegFixnum)
|
||||
(commutative-binop -NegInt -Int -NegFixnum)
|
||||
(commutative-binop -NonPosInt -Int -NonPosInt)
|
||||
(-> -Int -Int -Fixnum)))
|
||||
(-> -Int -Int -Fixnum))))
|
||||
(define fxmax-type
|
||||
(lambda ()
|
||||
(fx-from-cases
|
||||
(binop -Zero)
|
||||
(commutative-binop -One (Un -Zero -One) -One)
|
||||
|
@ -343,8 +358,9 @@
|
|||
(map binop (list -Index -NegFixnum -NonPosFixnum))
|
||||
(commutative-binop -PosInt -Int -PosFixnum)
|
||||
(commutative-binop -Nat -Int -NonNegFixnum)
|
||||
(-> -Int -Int -Fixnum)))
|
||||
(-> -Int -Int -Fixnum))))
|
||||
(define fxand-type
|
||||
(lambda ()
|
||||
(fx-from-cases
|
||||
(commutative-binop -Zero -Int -Zero)
|
||||
(commutative-binop -Byte -Int -Byte)
|
||||
|
@ -352,8 +368,9 @@
|
|||
(binop -Nat -NonNegFixnum)
|
||||
(binop -NegInt -NegFixnum)
|
||||
(binop -NonPosInt -NonPosFixnum)
|
||||
(binop -Int -Fixnum)))
|
||||
(binop -Int -Fixnum))))
|
||||
(define fxior-type
|
||||
(lambda ()
|
||||
(fx-from-cases
|
||||
(binop -Zero)
|
||||
(commutative-binop -One -Zero -One)
|
||||
|
@ -364,8 +381,9 @@
|
|||
(commutative-binop -PosInt -Nat -PosFixnum)
|
||||
(binop -Nat -NonNegFixnum)
|
||||
(commutative-binop -NegInt -Int -NegFixnum) ; as long as there's one negative, the result is negative
|
||||
(binop -Int -Fixnum)))
|
||||
(binop -Int -Fixnum))))
|
||||
(define fxxor-type
|
||||
(lambda ()
|
||||
(fx-from-cases
|
||||
(binop -Zero)
|
||||
(binop -One -Zero)
|
||||
|
@ -375,13 +393,15 @@
|
|||
(binop -NonPosInt -NonNegFixnum)
|
||||
(commutative-binop -NegInt -Nat -NegFixnum)
|
||||
(commutative-binop -NonPosInt -Nat -NonPosFixnum)
|
||||
(binop -Int -Fixnum)))
|
||||
(binop -Int -Fixnum))))
|
||||
(define fxnot-type
|
||||
(lambda ()
|
||||
(fx-from-cases
|
||||
(-Nat . -> . -NegFixnum)
|
||||
(-NegInt . -> . -NonNegFixnum)
|
||||
(-Int . -> . -Fixnum)))
|
||||
(-Int . -> . -Fixnum))))
|
||||
(define fxlshift-type
|
||||
(lambda ()
|
||||
(fx-from-cases
|
||||
(map (lambda (x) (-> x -Zero x))
|
||||
(list -Zero -One -PosByte -Byte -PosIndex -Index))
|
||||
|
@ -389,32 +409,38 @@
|
|||
(-> -Nat -Int -NonNegFixnum)
|
||||
(-> -NegInt -Int -NegFixnum)
|
||||
(-> -NonPosInt -Int -NonPosFixnum)
|
||||
(binop -Int -Fixnum)))
|
||||
(binop -Int -Fixnum))))
|
||||
(define fxrshift-type
|
||||
(lambda ()
|
||||
(fx-from-cases
|
||||
(map (lambda (x) (-> x -Zero x))
|
||||
(list -Zero -One -PosByte -Byte -PosIndex -Index))
|
||||
(-> -Nat -Int -NonNegFixnum) ; can reach 0
|
||||
(-> -NegInt -Int -NegFixnum) ; can't reach 0
|
||||
(-> -NonPosInt -Int -NonPosFixnum)
|
||||
(binop -Int -Fixnum)))
|
||||
(binop -Int -Fixnum))))
|
||||
|
||||
|
||||
(define flabs-type (cl->* (-> (Un -PosFlonum -NegFlonum) -PosFlonum)
|
||||
(-> -Flonum -NonNegFlonum)))
|
||||
(define flabs-type
|
||||
(lambda ()
|
||||
(cl->* (-> (Un -PosFlonum -NegFlonum) -PosFlonum)
|
||||
(-> -Flonum -NonNegFlonum))))
|
||||
(define fl+-type
|
||||
(lambda ()
|
||||
(from-cases (map (lambda (t) (commutative-binop t -FlonumZero t))
|
||||
all-flonum-types)
|
||||
(commutative-binop -NonNegFlonum -PosFlonum -PosFlonum)
|
||||
(map binop (list -NonNegFlonum -NegFlonum -NonPosFlonum -Flonum))
|
||||
(-Flonum -Flonum . -> . -Flonum)))
|
||||
(-Flonum -Flonum . -> . -Flonum))))
|
||||
(define fl--type
|
||||
(lambda ()
|
||||
(from-cases (binop -FlonumZero)
|
||||
(-NegFlonum (Un -NonNegFlonum -FlonumZero) . -> . -NegFlonum)
|
||||
((Un -NonPosFlonum -FlonumZero) -PosFlonum . -> . -NegFlonum)
|
||||
(-NonPosFlonum -NonNegFlonum . -> . -NonPosFlonum)
|
||||
(binop -Flonum)))
|
||||
(binop -Flonum))))
|
||||
(define fl*-type
|
||||
(lambda ()
|
||||
(from-cases (map binop (list -FlonumPosZero -FlonumNegZero))
|
||||
(commutative-binop -FlonumNegZero -FlonumPosZero -FlonumNegZero)
|
||||
(binop -FlonumNegZero -FlonumPosZero)
|
||||
|
@ -424,8 +450,9 @@
|
|||
(binop -NegFlonum -NonNegFlonum)
|
||||
(commutative-binop -NonPosFlonum -NonNegFlonum -NonPosFlonum)
|
||||
(binop -NonPosFlonum -NonNegFlonum)
|
||||
(binop -Flonum)))
|
||||
(binop -Flonum))))
|
||||
(define fl/-type
|
||||
(lambda ()
|
||||
(from-cases (-FlonumPosZero -PosFlonum . -> . -FlonumPosZero)
|
||||
(-FlonumPosZero -NegFlonum . -> . -FlonumNegZero)
|
||||
(-FlonumNegZero -PosFlonum . -> . -FlonumNegZero)
|
||||
|
@ -433,16 +460,18 @@
|
|||
(-PosFlonum -PosFlonum . -> . -NonNegFlonum) ; possible underflow
|
||||
(commutative-binop -PosFlonum -NegFlonum -NonPosFlonum)
|
||||
(-NegFlonum -NegFlonum . -> . -NonNegFlonum)
|
||||
(binop -Flonum)))
|
||||
(binop -Flonum))))
|
||||
(define fl=-type
|
||||
(lambda ()
|
||||
(from-cases (map (lambda (l) (exclude-zero (car l) (cadr l) -FlonumZero))
|
||||
(list (list -NonNegFlonum -PosFlonum)
|
||||
(list -NonPosFlonum -NegFlonum)))
|
||||
(map (lambda (t) (commutative-equality/filter -Flonum t))
|
||||
(list -FlonumZero -PosFlonum -NonNegFlonum
|
||||
-NegFlonum -NonPosFlonum))
|
||||
(comp -Flonum)))
|
||||
(comp -Flonum))))
|
||||
(define fl<-type
|
||||
(lambda ()
|
||||
(from-cases
|
||||
(-> -FlonumZero -Flonum B : (-FS (-filter -PosFlonum 1) (-filter (Un -NonPosFlonum -FlonumPosZero) 1)))
|
||||
(-> -Flonum -FlonumZero B : (-FS (-filter -NegFlonum 0) (-filter (Un -NonNegFlonum -FlonumNegZero) 0)))
|
||||
|
@ -454,8 +483,9 @@
|
|||
(-> -Flonum -NegFlonum B : (-FS (-filter -NegFlonum 0) -top))
|
||||
(-> -NonPosFlonum -Flonum B : (-FS -top (-filter (Un -NonPosFlonum -FlonumPosZero) 1)))
|
||||
(-> -Flonum -NonPosFlonum B : (-FS (-filter -NegFlonum 0) -top))
|
||||
(comp -Flonum)))
|
||||
(comp -Flonum))))
|
||||
(define fl>-type
|
||||
(lambda ()
|
||||
(from-cases
|
||||
(-> -FlonumZero -Flonum B : (-FS (-filter -NegFlonum 1) (-filter (Un -NonNegFlonum -FlonumNegZero) 1)))
|
||||
(-> -Flonum -FlonumZero B : (-FS (-filter -PosFlonum 0) (-filter (Un -NonPosFlonum -FlonumPosZero) 0)))
|
||||
|
@ -467,8 +497,9 @@
|
|||
(-> -Flonum -NegFlonum B : (-FS -top (-filter -NegFlonum 0)))
|
||||
(-> -NonPosFlonum -Flonum B : (-FS (-filter -NegFlonum 1) -top))
|
||||
(-> -Flonum -NonPosFlonum B : (-FS -top (-filter (Un -NonPosFlonum -FlonumPosZero) 0)))
|
||||
(comp -Flonum)))
|
||||
(comp -Flonum))))
|
||||
(define fl<=-type
|
||||
(lambda ()
|
||||
(from-cases
|
||||
(-> -FlonumZero -Flonum B : (-FS (-filter (Un -NonNegFlonum -FlonumNegZero) 1) (-filter -NegFlonum 1)))
|
||||
(-> -Flonum -FlonumZero B : (-FS (-filter (Un -NonPosFlonum -FlonumPosZero) 0) (-filter -PosFlonum 0)))
|
||||
|
@ -480,8 +511,9 @@
|
|||
(-> -Flonum -NegFlonum B : (-FS (-filter -NegFlonum 0) -top))
|
||||
(-> -NonPosFlonum -Flonum B : (-FS -top (-filter -NegFlonum 1)))
|
||||
(-> -Flonum -NonPosFlonum B : (-FS (-filter (Un -NonPosFlonum -FlonumPosZero) 0) -top))
|
||||
(comp -Flonum)))
|
||||
(comp -Flonum))))
|
||||
(define fl>=-type
|
||||
(lambda ()
|
||||
(from-cases
|
||||
(-> -FlonumZero -Flonum B : (-FS (-filter (Un -NonPosFlonum -FlonumPosZero) 1) (-filter -PosFlonum 1)))
|
||||
(-> -Flonum -FlonumZero B : (-FS (-filter (Un -NonNegFlonum -FlonumNegZero) 0) (-filter -NegFlonum 0)))
|
||||
|
@ -493,46 +525,56 @@
|
|||
(-> -Flonum -NegFlonum B : (-FS -top (-filter -NegFlonum 0)))
|
||||
(-> -NonPosFlonum -Flonum B : (-FS -top (-filter -PosFlonum 1)))
|
||||
(-> -Flonum -NonPosFlonum B : (-FS (-filter (Un -NonPosFlonum -FlonumPosZero) 0) -top))
|
||||
(comp -Flonum)))
|
||||
(comp -Flonum))))
|
||||
(define flmin-type
|
||||
(lambda ()
|
||||
(from-cases (map binop
|
||||
(list -PosFlonum -NonNegFlonum -NegFlonum -NonPosFlonum -Flonum))))
|
||||
(list -PosFlonum -NonNegFlonum -NegFlonum -NonPosFlonum -Flonum)))))
|
||||
(define flmax-type
|
||||
(lambda ()
|
||||
(from-cases (commutative-case -PosFlonum -Flonum -PosFlonum)
|
||||
(commutative-case -NonNegFlonum -Flonum -NonNegFlonum)
|
||||
(binop -NegFlonum)
|
||||
(commutative-case -NegFlonum -NonPosFlonum -NonPosFlonum)
|
||||
(binop -Flonum)))
|
||||
(binop -Flonum))))
|
||||
(define flround-type ; truncate too
|
||||
(lambda ()
|
||||
(from-cases (map unop (list -FlonumPosZero -FlonumNegZero -FlonumZero
|
||||
-NonNegFlonum -NonPosFlonum -Flonum))))
|
||||
-NonNegFlonum -NonPosFlonum -Flonum)))))
|
||||
(define flfloor-type
|
||||
(lambda ()
|
||||
(from-cases (map unop (list -FlonumPosZero -FlonumNegZero -FlonumZero
|
||||
-NonNegFlonum -NegFlonum -NonPosFlonum -Flonum))))
|
||||
-NonNegFlonum -NegFlonum -NonPosFlonum -Flonum)))))
|
||||
(define flceiling-type
|
||||
(lambda ()
|
||||
(from-cases (map unop (list -FlonumPosZero -FlonumNegZero -FlonumZero
|
||||
-PosFlonum -NonNegFlonum -NonPosFlonum -Flonum))))
|
||||
-PosFlonum -NonNegFlonum -NonPosFlonum -Flonum)))))
|
||||
(define fllog-type
|
||||
(lambda ()
|
||||
(from-cases (-> -FlonumZero -NegFlonum) ; -inf
|
||||
(-> -PosFlonum -NonNegFlonum) ; possible underflow
|
||||
(unop -Flonum)))
|
||||
(unop -Flonum))))
|
||||
(define flexp-type
|
||||
(lambda ()
|
||||
(from-cases ((Un -NonNegFlonum -FlonumNegZero) . -> . -PosFlonum)
|
||||
(-NegFlonum . -> . -NonNegFlonum)
|
||||
(-Flonum . -> . -Flonum))) ; nan is the only non nonnegative case (returns nan)
|
||||
(-Flonum . -> . -Flonum)))) ; nan is the only non nonnegative case (returns nan)
|
||||
(define flsqrt-type
|
||||
(lambda ()
|
||||
(from-cases (map unop (list -FlonumPosZero -FlonumNegZero -FlonumZero
|
||||
-NonNegFlonum ; we don't have positive case, possible underflow
|
||||
-Flonum)))) ; anything negative returns nan
|
||||
(define fx->fl-type (fx-from-cases
|
||||
-Flonum))))) ; anything negative returns nan
|
||||
(define fx->fl-type
|
||||
(lambda ()
|
||||
(fx-from-cases
|
||||
(-PosInt . -> . -PosFlonum)
|
||||
(-Nat . -> . -NonNegFlonum)
|
||||
(-NegInt . -> . -NegFlonum)
|
||||
(-NonPosInt . -> . -NonPosFlonum)
|
||||
(-Int . -> . -Flonum)))
|
||||
(define make-flrectangular-type (-Flonum -Flonum . -> . -FloatComplex))
|
||||
(define flreal-part-type (-FloatComplex . -> . -Flonum))
|
||||
(define flimag-part-type (-FloatComplex . -> . -Flonum))
|
||||
(-Int . -> . -Flonum))))
|
||||
(define make-flrectangular-type (lambda () (-Flonum -Flonum . -> . -FloatComplex)))
|
||||
(define flreal-part-type (lambda () (-FloatComplex . -> . -Flonum)))
|
||||
(define flimag-part-type (lambda () (-FloatComplex . -> . -Flonum)))
|
||||
|
||||
;; There's a repetitive pattern in the types of each comparison operator.
|
||||
;; As explained below, this is because filters don't do intersections.
|
||||
|
@ -1461,8 +1503,8 @@
|
|||
-InexactRealPosZero -InexactRealNegZero -InexactRealZero
|
||||
-PosInexactReal -NonNegInexactReal -NonPosInexactReal -InexactReal
|
||||
-RealZero -PosReal -NonNegReal -NonPosReal -Real)))]
|
||||
[truncate round-type]
|
||||
[round round-type]
|
||||
[truncate (round-type)]
|
||||
[round (round-type)]
|
||||
|
||||
[make-rectangular (cl->* (-Rat -Rat . -> . -ExactNumber)
|
||||
(-Flonum -Real . -> . -FloatComplex)
|
||||
|
@ -1747,117 +1789,117 @@
|
|||
|
||||
|
||||
;; scheme/fixnum
|
||||
[fx+ fx+-type]
|
||||
[fx- fx--type]
|
||||
[fx* fx*-type]
|
||||
[fxquotient fxquotient-type]
|
||||
[fxremainder fxremainder-type]
|
||||
[fxmodulo fxmodulo-type]
|
||||
[fxabs fxabs-type]
|
||||
[fx+ (fx+-type)]
|
||||
[fx- (fx--type)]
|
||||
[fx* (fx*-type)]
|
||||
[fxquotient (fxquotient-type)]
|
||||
[fxremainder (fxremainder-type)]
|
||||
[fxmodulo (fxmodulo-type)]
|
||||
[fxabs (fxabs-type)]
|
||||
|
||||
[fxand fxand-type]
|
||||
[fxior fxior-type]
|
||||
[fxxor fxxor-type]
|
||||
[fxnot fxnot-type]
|
||||
[fxlshift fxlshift-type]
|
||||
[fxrshift fxrshift-type]
|
||||
[fxand (fxand-type)]
|
||||
[fxior (fxior-type)]
|
||||
[fxxor (fxxor-type)]
|
||||
[fxnot (fxnot-type)]
|
||||
[fxlshift (fxlshift-type)]
|
||||
[fxrshift (fxrshift-type)]
|
||||
|
||||
[fx= fx=-type]
|
||||
[fx< fx<-type]
|
||||
[fx> fx>-type]
|
||||
[fx<= fx<=-type]
|
||||
[fx>= fx>=-type]
|
||||
[fxmin fxmin-type]
|
||||
[fxmax fxmax-type]
|
||||
[fx= (fx=-type)]
|
||||
[fx< (fx<-type)]
|
||||
[fx> (fx>-type)]
|
||||
[fx<= (fx<=-type)]
|
||||
[fx>= (fx>=-type)]
|
||||
[fxmin (fxmin-type)]
|
||||
[fxmax (fxmax-type)]
|
||||
|
||||
[unsafe-fx+ fx+-type]
|
||||
[unsafe-fx- fx--type]
|
||||
[unsafe-fx* fx*-type]
|
||||
[unsafe-fxquotient fxquotient-type]
|
||||
[unsafe-fxremainder fxremainder-type]
|
||||
[unsafe-fxmodulo fxmodulo-type]
|
||||
[unsafe-fxabs fxabs-type]
|
||||
[unsafe-fx+ (fx+-type)]
|
||||
[unsafe-fx- (fx--type)]
|
||||
[unsafe-fx* (fx*-type)]
|
||||
[unsafe-fxquotient (fxquotient-type)]
|
||||
[unsafe-fxremainder (fxremainder-type)]
|
||||
[unsafe-fxmodulo (fxmodulo-type)]
|
||||
[unsafe-fxabs (fxabs-type)]
|
||||
|
||||
[unsafe-fxand fxand-type]
|
||||
[unsafe-fxior fxior-type]
|
||||
[unsafe-fxxor fxxor-type]
|
||||
[unsafe-fxnot fxnot-type]
|
||||
[unsafe-fxlshift fxlshift-type]
|
||||
[unsafe-fxrshift fxrshift-type]
|
||||
[unsafe-fxand (fxand-type)]
|
||||
[unsafe-fxior (fxior-type)]
|
||||
[unsafe-fxxor (fxxor-type)]
|
||||
[unsafe-fxnot (fxnot-type)]
|
||||
[unsafe-fxlshift (fxlshift-type)]
|
||||
[unsafe-fxrshift (fxrshift-type)]
|
||||
|
||||
[unsafe-fx= fx=-type]
|
||||
[unsafe-fx< fx<-type]
|
||||
[unsafe-fx> fx>-type]
|
||||
[unsafe-fx<= fx<=-type]
|
||||
[unsafe-fx>= fx>=-type]
|
||||
[unsafe-fxmin fxmin-type]
|
||||
[unsafe-fxmax fxmax-type]
|
||||
[unsafe-fx= (fx=-type)]
|
||||
[unsafe-fx< (fx<-type)]
|
||||
[unsafe-fx> (fx>-type)]
|
||||
[unsafe-fx<= (fx<=-type)]
|
||||
[unsafe-fx>= (fx>=-type)]
|
||||
[unsafe-fxmin (fxmin-type)]
|
||||
[unsafe-fxmax (fxmax-type)]
|
||||
|
||||
|
||||
;; flonum ops
|
||||
[flabs flabs-type]
|
||||
[fl+ fl+-type]
|
||||
[fl- fl--type]
|
||||
[fl* fl*-type]
|
||||
[fl/ fl/-type]
|
||||
[fl= fl=-type]
|
||||
[fl<= fl<=-type]
|
||||
[fl>= fl>=-type]
|
||||
[fl> fl>-type]
|
||||
[fl< fl<-type]
|
||||
[flmin flmin-type]
|
||||
[flmax flmax-type]
|
||||
[flround flround-type]
|
||||
[flfloor flfloor-type]
|
||||
[flceiling flceiling-type]
|
||||
[fltruncate flround-type]
|
||||
[flsin fl-unop] ; special cases (0s) not worth special-casing
|
||||
[flcos fl-unop]
|
||||
[fltan fl-unop]
|
||||
[flatan fl-unop]
|
||||
[flasin fl-unop]
|
||||
[flacos fl-unop]
|
||||
[fllog fllog-type]
|
||||
[flexp flexp-type]
|
||||
[flsqrt flsqrt-type]
|
||||
[->fl fx->fl-type]
|
||||
[make-flrectangular make-flrectangular-type]
|
||||
[flreal-part flreal-part-type]
|
||||
[flimag-part flimag-part-type]
|
||||
[flabs (flabs-type)]
|
||||
[fl+ (fl+-type)]
|
||||
[fl- (fl--type)]
|
||||
[fl* (fl*-type)]
|
||||
[fl/ (fl/-type)]
|
||||
[fl= (fl=-type)]
|
||||
[fl<= (fl<=-type)]
|
||||
[fl>= (fl>=-type)]
|
||||
[fl> (fl>-type)]
|
||||
[fl< (fl<-type)]
|
||||
[flmin (flmin-type)]
|
||||
[flmax (flmax-type)]
|
||||
[flround (flround-type)]
|
||||
[flfloor (flfloor-type)]
|
||||
[flceiling (flceiling-type)]
|
||||
[fltruncate (flround-type)]
|
||||
[flsin (fl-unop)] ; special cases (0s) not worth special-casing
|
||||
[flcos (fl-unop)]
|
||||
[fltan (fl-unop)]
|
||||
[flatan (fl-unop)]
|
||||
[flasin (fl-unop)]
|
||||
[flacos (fl-unop)]
|
||||
[fllog (fllog-type)]
|
||||
[flexp (flexp-type)]
|
||||
[flsqrt (flsqrt-type)]
|
||||
[->fl (fx->fl-type)]
|
||||
[make-flrectangular (make-flrectangular-type)]
|
||||
[flreal-part (flreal-part-type)]
|
||||
[flimag-part (flimag-part-type)]
|
||||
|
||||
[unsafe-flabs flabs-type]
|
||||
[unsafe-fl+ fl+-type]
|
||||
[unsafe-fl- fl--type]
|
||||
[unsafe-fl* fl*-type]
|
||||
[unsafe-fl/ fl/-type]
|
||||
[unsafe-fl= fl=-type]
|
||||
[unsafe-fl<= fl<=-type]
|
||||
[unsafe-fl>= fl>=-type]
|
||||
[unsafe-fl> fl>-type]
|
||||
[unsafe-fl< fl<-type]
|
||||
[unsafe-flmin flmin-type]
|
||||
[unsafe-flmax flmax-type]
|
||||
[unsafe-flabs (flabs-type)]
|
||||
[unsafe-fl+ (fl+-type)]
|
||||
[unsafe-fl- (fl--type)]
|
||||
[unsafe-fl* (fl*-type)]
|
||||
[unsafe-fl/ (fl/-type)]
|
||||
[unsafe-fl= (fl=-type)]
|
||||
[unsafe-fl<= (fl<=-type)]
|
||||
[unsafe-fl>= (fl>=-type)]
|
||||
[unsafe-fl> (fl>-type)]
|
||||
[unsafe-fl< (fl<-type)]
|
||||
[unsafe-flmin (flmin-type)]
|
||||
[unsafe-flmax (flmax-type)]
|
||||
|
||||
;These are currently the same binding as the safe versions
|
||||
;and so are not needed. If this changes they should be
|
||||
;uncommented. There is a check in the definitions part of
|
||||
;the file that makes sure that they are the same binding.
|
||||
;
|
||||
;[unsafe-flround flround-type]
|
||||
;[unsafe-flfloor flfloor-type]
|
||||
;[unsafe-flceiling flceiling-type]
|
||||
;[unsafe-fltruncate flround-type]
|
||||
;[unsafe-flsin fl-unop]
|
||||
;[unsafe-flcos fl-unop]
|
||||
;[unsafe-fltan fl-unop]
|
||||
;[unsafe-flatan fl-unop]
|
||||
;[unsafe-flasin fl-unop]
|
||||
;[unsafe-flacos fl-unop]
|
||||
;[unsafe-fllog fllog-type]
|
||||
;[unsafe-flexp flexp-type]
|
||||
;[unsafe-flround (flround-type)]
|
||||
;[unsafe-flfloor (flfloor-type)]
|
||||
;[unsafe-flceiling (flceiling-type)]
|
||||
;[unsafe-fltruncate (flround-type)]
|
||||
;[unsafe-flsin (fl-unop)]
|
||||
;[unsafe-flcos (fl-unop)]
|
||||
;[unsafe-fltan (fl-unop)]
|
||||
;[unsafe-flatan (fl-unop)]
|
||||
;[unsafe-flasin (fl-unop)]
|
||||
;[unsafe-flacos (fl-unop)]
|
||||
;[unsafe-fllog (fllog-type)]
|
||||
;[unsafe-flexp (flexp-type)]
|
||||
;
|
||||
[unsafe-flsqrt flsqrt-type]
|
||||
[unsafe-fx->fl fx->fl-type]
|
||||
[unsafe-make-flrectangular make-flrectangular-type]
|
||||
[unsafe-flreal-part flreal-part-type]
|
||||
[unsafe-flimag-part flimag-part-type]
|
||||
[unsafe-flsqrt (flsqrt-type)]
|
||||
[unsafe-fx->fl (fx->fl-type)]
|
||||
[unsafe-make-flrectangular (make-flrectangular-type)]
|
||||
[unsafe-flreal-part (flreal-part-type)]
|
||||
[unsafe-flimag-part (flimag-part-type)]
|
||||
|
|
Loading…
Reference in New Issue
Block a user