Changeset efbf11a6f5cd7e15f51cdb52fefd1584ab58c3d9
- Timestamp:
- 03/23/12 09:47:16 (14 months ago)
- Author:
- Raymond Toy <rtoy@…>
- Children:
- 321ced44416bc5141b5306bc18f440eb179c4327
- Parents:
- bc851c79e6fffe06c4383142bc2dfeb154fbde14
- git-committer:
- Raymond Toy <rtoy@…> (03/23/12 09:47:16)
- 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:
-
Legend:
- Unmodified
- Added
- Removed
-
|
r06f8a5
|
refbf11
|
|
| 289 | 289 | |
| 290 | 290 | (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))) |
| 293 | 293 | |
| 294 | 294 | (defmethod qrealpart ((x number)) |
| … |
… |
|
| 1112 | 1112 | +pi+) |
| 1113 | 1113 | |
| | 1114 | (defmethod float-nan-p ((x cl:float)) |
| | 1115 | ;; CMUCL has ext:float-nan-p. Should we use that instead? |
| | 1116 | (not (= x x))) |
| | 1117 | |
| | 1118 | (defmethod float-nan-p ((x qd-real)) |
| | 1119 | (float-nan-p (qd-parts (qd-value x)))) |
| | 1120 | |
| 1114 | 1121 | |
| 1115 | 1122 | (define-condition domain-error (simple-error) |
-
|
r6b8dc5
|
refbf11
|
|
| 212 | 212 | #:rationalize |
| 213 | 213 | ) |
| | 214 | #+cmu |
| | 215 | (:shadow ext:float-nan-p) |
| 214 | 216 | ;; Export types |
| 215 | 217 | (:export #:qd-real |