[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: weird behavior with numbers
- To: <clisp-list@ma2s2.mathematik.uni-karlsruhe.de>
- Subject: Re: weird behavior with numbers
- From: Bruno Haible <haible@ilog.fr>
- Date: Wed, 13 Aug 1997 15:16:45 +0200 (MET DST)
- >received: from halles.ilog.fr (halles.ilog.fr [172.16.1.96]) by ilog.ilog.fr (8.8.7/8.7.3) with ESMTP id PAA04606; Wed, 13 Aug 1997 15:16:46 +0200 (MET DST)
- In-reply-to: <9708128714.AA871412984@inet.stknhlg.com>
- References: <9708128714.AA871412984@inet.stknhlg.com>
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