Mercurial > hg > xemacs-beta
diff lisp/cl.el @ 5475:248176c74e6b
Merge with trunk.
author | Mats Lidell <matsl@xemacs.org> |
---|---|
date | Sat, 23 Apr 2011 23:47:13 +0200 |
parents | 00e79bbbe48f 25c10648ffba |
children | f2881cb841b4 |
line wrap: on
line diff
--- a/lisp/cl.el Tue Mar 29 00:02:47 2011 +0200 +++ b/lisp/cl.el Sat Apr 23 23:47:13 2011 +0200 @@ -310,11 +310,11 @@ (defun oddp (integer) "Return t if INTEGER is odd." - (eq (logand integer 1) 1)) + (eql (logand integer 1) 1)) (defun evenp (integer) "Return t if INTEGER is even." - (eq (logand integer 1) 0)) + (eql (logand integer 1) 0)) ;; XEmacs addition (defalias 'cl-abs 'abs) @@ -327,13 +327,35 @@ (defconst most-negative-float nil "The float closest in value to negative infinity.") (defconst least-positive-float nil - "The positive float closest in value to 0.") + "The positive float closest in value to zero.") (defconst least-negative-float nil - "The negative float closest in value to 0.") -(defconst least-positive-normalized-float nil) -(defconst least-negative-normalized-float nil) -(defconst float-epsilon nil) -(defconst float-negative-epsilon nil) + "The negative float closest in value to zero.") +(defconst least-positive-normalized-float nil + "The normalized positive float closest in value to zero. + +A float is normalized if the most significant bit of its mantissa is 1. +Use of denormalized (equivalently, subnormal) floats in calculations will +lead to gradual underflow, though they can be more accurate in representing +individual small values. Normal and subnormal floats are as described in +IEEE 754.") + +(defconst least-negative-normalized-float nil + "The normalized negative float closest in value to zero. + +See `least-positive-normalized-float' for details of normal and denormalized +numbers.") + +(defconst float-epsilon nil + "The smallest float guaranteed not `eql' to 1.0 when added to 1.0. + +That is, (eql 1.0 (+ 1.0 X)) will always give nil if (<= float-epsilon X) , +but it may give t for smaller values.") + +(defconst float-negative-epsilon nil + "The smallest float guaranteed not `eql' to 1.0 when subtracted from 1.0. + +That is, (eql 1.0 (- 1.0 X)) will always give nil if (<= +float-negative-epsilon X) , but it may give t for smaller values.") ;;; Sequence functions. @@ -401,7 +423,7 @@ (car (car x))) (defun cadr (x) - "Return the `car' of the `cdr' of X." + "Return the `car' of the `cdr' of X. Equivalent to `(second X)'." (car (cdr x))) (defun cdar (x) @@ -425,7 +447,8 @@ (car (cdr (car x)))) (defun caddr (x) - "Return the `car' of the `cdr' of the `cdr' of X." + "Return the `car' of the `cdr' of the `cdr' of X. +Equivalent to `(third X)'." (car (cdr (cdr x)))) (defun cdaar (x) @@ -473,7 +496,8 @@ (car (cdr (cdr (car x))))) (defun cadddr (x) - "Return the `car' of the `cdr' of the `cdr' of the `cdr' of X." + "Return the `car' of the `cdr' of the `cdr' of the `cdr' of X. +Equivalent to `(fourth X)'." (car (cdr (cdr (cdr x))))) (defun cdaaar (x)