Fix the type of abs on negative zeros.

This commit is contained in:
Eric Dobson 2015-05-20 08:32:35 -07:00 committed by Vincent St-Amour
parent 0892e23892
commit 0498f548c1
2 changed files with 3 additions and 1 deletions

View File

@ -652,7 +652,8 @@
(define abs-cases ; used both for abs and magnitude
(list
(-NonNegReal . -> . -NonNegReal : -true-filter : (-arg-path 0))
;; abs is not the identity on negative zeros.
((Un -Zero -PosReal) . -> . (Un -Zero -PosReal) : -true-filter : (-arg-path 0))
;; abs may not be closed on fixnums. (abs min-fixnum) is not a fixnum
((Un -PosInt -NegInt) . -> . -PosInt)
(-Int . -> . -Nat)

View File

@ -3638,6 +3638,7 @@
[tc-e/t ((inst values Any) "a") -String]
[tc-e ((inst second Any Any Any) (list "a" "b")) -String]
[tc-e/t (abs 4) -PosByte]
[tc-e (abs -0.0) -NonNegFlonum]
;; PR 125: Tests for flonum predicate typechecking
[tc-e/t