42 lines
1009 B
Plaintext
42 lines
1009 B
Plaintext
;; Function To Be Tested: MINUSP
|
|
;;
|
|
;; Source: Guy L Steele's CLTL
|
|
;; Section: 12.2 Predicates on Numbers
|
|
;; Page: 196
|
|
;;
|
|
;; Created By: John Park
|
|
;;
|
|
;; Creation Date: July 12,1986
|
|
;;
|
|
;; Last Update: July 12,1986
|
|
;;
|
|
;; Filed As: {ERIS}<LISPCORE>CML>TEST>12-2-MINUSP.TEST
|
|
;;
|
|
;;
|
|
;; Syntax: (MINUSP NUMBER)
|
|
;;
|
|
;; Function Description:
|
|
;; This predicate is true if NUMBER is strictly less than zero,
|
|
;; and is false otherwise.
|
|
;; Regardless of whether an implementation provides distinct representations
|
|
;; for positive and negative floating-point zeros,
|
|
;; (MINUSP -0.0) is always false.
|
|
;; (The function function FLOAT-SIGN may be used to distinguish a negative zero.)
|
|
;; It is an error if the argument NUMBER is not a non-complex number.
|
|
;;
|
|
;; Argument(s): NUMBER - a number
|
|
;;
|
|
;; Returns: T or NIL
|
|
;;
|
|
|
|
|
|
|
|
(do-test minusp-test
|
|
(and (minusp -1)
|
|
(minusp -4.0)
|
|
(minusp -79)
|
|
(not (minusp -0.0))
|
|
(not (minusp 1000))))
|
|
|
|
STOP
|