[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: weird behavior with numbers



sshteingold@cctrading.com writes:
> 
>      clisp on winnt
>      > 1234567.89
>      
>      1234567.9
>      
>      why does it round this number?

Because the default precision is single-float. If you want to change that,
do

   (progn
     (setf *read-default-float-format* 'double-float)
     (setf *default-float-format* 'double-float)
   )

Then the default precision is about 15-16 digits:

       > 1234567.89
       1234567.89
       > 1234567.890123456789
       1234567.8901234567

Bruno