Fix types of magnitude and angle.

Closes PR13025.
This commit is contained in:
Vincent St-Amour 2012-08-14 12:14:03 -04:00
parent 36f519fe64
commit af8fc1f26a
2 changed files with 6 additions and 2 deletions

View File

@ -210,6 +210,10 @@
(tc-e (flexpt 0.5 0.3) -NonNegFlonum)
(tc-e (flexpt 0.00000000001 100000000000.0) -NonNegFlonum)
(tc-e (flexpt -2.0 -0.5) -Flonum) ; NaN
(tc-e (angle -1) -Real)
(tc-e (angle 2.3) -Zero)
(tc-e (magnitude 3/4) -Rat)
(tc-e (magnitude 3+2i) -Real)
[tc-e/t (lambda: () 3) (t:-> -PosByte : -true-lfilter)]
[tc-e/t (lambda: ([x : Number]) 3) (t:-> N -PosByte : -true-lfilter)]

View File

@ -1567,11 +1567,11 @@
(-FloatComplex . -> . -Flonum)
(-InexactComplex . -> . -InexactReal)
(N . -> . -Real))]
[magnitude (cl->* (-ExactNumber . -> . -Rat)
[magnitude (cl->* (-Rat . -> . -Rat)
(-FloatComplex . -> . -Flonum)
(-InexactComplex . -> . -InexactReal)
(N . -> . -Real))]
[angle (cl->* (-ExactNumber . -> . -Rat)
[angle (cl->* (-PosReal . -> . -Zero)
(-FloatComplex . -> . -Flonum)
(-InexactComplex . -> . -InexactReal)
(N . -> . -Real))]