nonnegative-integer -> exact-nonnegative-integer
This commit is contained in:
parent
1ac2e77d00
commit
1ebb3d5ef3
|
@ -1299,7 +1299,7 @@ Returns @racket[#t] if @racket[x] is @racket[+inf.0], @racket[-inf.0], @racket[+
|
|||
@racket[#t] for non-negative @racket[inexact?] integers.}
|
||||
|
||||
@defproc[(natural? [x any/c]) boolean?]{
|
||||
An alias for @racket[nonnegative-integer?].}
|
||||
An alias for @racket[exact-nonnegative-integer?].}
|
||||
|
||||
@; ----------------------------------------------------------------------
|
||||
@close-eval[math-eval]
|
||||
|
|
|
@ -178,12 +178,12 @@
|
|||
;; natural?
|
||||
|
||||
(test #t natural? 1)
|
||||
(test #t natural? 1.0)
|
||||
(test #t natural? 3/3)
|
||||
(test #t natural? 0)
|
||||
(test #t natural? -0)
|
||||
(test #t natural? 0.0)
|
||||
(test #t natural? -0.0)
|
||||
(test #f natural? 1.0)
|
||||
(test #f natural? 0.0)
|
||||
(test #f natural? -0.0)
|
||||
(test #f natural? 3/2)
|
||||
(test #f natural? 0.5)
|
||||
(test #f natural? -5)
|
||||
|
|
|
@ -47,7 +47,7 @@
|
|||
(define (nonnegative-integer? x)
|
||||
(and (integer? x) (not (negative? x))))
|
||||
|
||||
(define natural? nonnegative-integer?)
|
||||
(define natural? exact-nonnegative-integer?)
|
||||
|
||||
;; z^2
|
||||
(define (sqr z)
|
||||
|
|
Loading…
Reference in New Issue
Block a user