Changeset 12941 for branches/working0711/ccl/lib/numbers.lisp
 Timestamp:
 Oct 9, 2009, 4:28:17 PM (10 years ago)
 File:

 1 edited
Legend:
 Unmodified
 Added
 Removed

branches/working0711/ccl/lib/numbers.lisp
r11101 r12941 47 47 (ccl:setfpumode :divisionbyzero divisionbyzero)))) 48 48 49 49 (defconstant doublefloatnan 50 #.(let ((invalid (getfpumode :invalid))) 51 (unwindprotect 52 (progn 53 (setfpumode :invalid nil) 54 (+ doublefloatpositiveinfinity doublefloatnegativeinfinity)) 55 (setfpumode :invalid invalid)))) 50 56 51 57 (defun parsefloat (str len off) … … 109 115 (nan 110 116 (returnfrom parsefloat 111 (let* ((invalid (ccl:getfpumode :invalid))) 112 (unwindprotect 113 (progn 114 (ccl:setfpumode :invalid nil) 115 (coerce 116 ;; we could also have used a doublefloatnan 117 ;; variable binding here: 118 (+ doublefloatpositiveinfinity 119 doublefloatpositiveinfinity) 120 type)) 121 (ccl:setfpumode :invalid invalid))))) 117 (coerce doublefloatnan type))) 122 118 (expt (setq expt (%i+ expt (* esign eexp)))) 123 119 (t (returnfrom parsefloat nil)))))
Note: See TracChangeset
for help on using the changeset viewer.