Changeset efbf11


Ignore:
Timestamp:
03/23/12 16:47:16 (3 years ago)
Author:
Raymond Toy <rtoy@…>
Branches:
master
Children:
321ced
Parents:
bc851c
Message:

Fix bug in FLOAT: second arg is optional! Add FLOAT-NAN-P method.

qd-methods.lisp:

  • Second arg to FLOAT is optional.
  • Add FLOAT-NAN-P.

qd-package.lisp:

  • Need to shadow EXT:FLOAT-NAN-P on cmucl.
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • qd-methods.lisp

    r06f8a5 refbf11  
    289289
    290290(declaim (inline float))
    291 (defun float (x num-type)
    292   (qfloat x num-type))
     291(defun float (x &optional num-type)
     292  (qfloat x (or num-type 0.0)))
    293293
    294294(defmethod qrealpart ((x number))
     
    11151115  +pi+)
    11161116
     1117(defmethod float-nan-p ((x cl:float))
     1118  ;; CMUCL has ext:float-nan-p.  Should we use that instead?
     1119  (not (= x x)))
     1120
     1121(defmethod float-nan-p ((x qd-real))
     1122  (float-nan-p (qd-parts (qd-value x))))
     1123
    11171124
    11181125
  • qd-package.lisp

    r6b8dc5 refbf11  
    212212           #:rationalize
    213213           )
     214  #+cmu
     215  (:shadow ext:float-nan-p)
    214216  ;; Export types
    215217  (:export #:qd-real
Note: See TracChangeset for help on using the changeset viewer.