2072 |
;;; inexact->exact |
;;; inexact->exact |
2073 |
;;; |
;;; |
2074 |
|
|
2075 |
|
(with-test-prefix "inexact->exact" |
2076 |
|
|
2077 |
|
(pass-if-exception exception:numerical-overflow "+inf" |
2078 |
|
(inexact->exact +.inf)) |
2079 |
|
|
2080 |
|
(pass-if-exception exception:numerical-overflow "-inf" |
2081 |
|
(inexact->exact -.inf)) |
2082 |
|
|
2083 |
|
(pass-if-exception exception:numerical-overflow "nan" |
2084 |
|
(inexact->exact +.nan)) |
2085 |
|
|
2086 |
|
(with-test-prefix "2.0**i to exact and back" |
2087 |
|
(do ((i 0 (1+ i)) |
2088 |
|
(n 1.0 (* 2.0 n))) |
2089 |
|
((> i 100)) |
2090 |
|
(pass-if (list i n) |
2091 |
|
(= n (inexact->exact (exact->inexact n))))))) |
2092 |
|
|
2093 |
;;; |
;;; |
2094 |
;;; integer-length |
;;; integer-length |
2095 |
;;; |
;;; |