Commit 321ced44416bc5141b5306bc18f440eb179c4327

Authored by Raymond Toy
1 parent efbf11a6

Oops. In FLOAT, if it's already a float, don't change it if the

second arg is not given.
Showing 1 changed file with 5 additions and 1 deletions
qd-methods.lisp
... ... @@ -289,7 +289,11 @@
289 289  
290 290 (declaim (inline float))
291 291 (defun float (x &optional num-type)
292   - (qfloat x (or num-type 0.0)))
  292 + (if num-type
  293 + (qfloat x num-type)
  294 + (if (or (cl:floatp x) (typep x 'qd-real))
  295 + x
  296 + (qfloat x 0.0))))
293 297  
294 298 (defmethod qrealpart ((x number))
295 299 (cl:realpart x))
... ...