home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!usc!rpi!think.com!barmar
- From: barmar@think.com (Barry Margolin)
- Newsgroups: comp.lang.lisp
- Subject: Re: floating point precision
- Date: 15 Aug 1992 08:55:48 GMT
- Organization: Thinking Machines Corporation, Cambridge MA, USA
- Lines: 28
- Message-ID: <16igqkINNo4h@early-bird.think.com>
- References: <1992Aug13.213615.28011@cs.yale.edu> <16fnshINN7db@early-bird.think.com> <1992Aug14.175857.7314@cs.yale.edu>
- NNTP-Posting-Host: gandalf.think.com
-
- In article <1992Aug14.175857.7314@cs.yale.edu> yip-ken@CS.YALE.EDU (ken yip) writes:
- >That's what I hope is the case. But apparently in the Lucid implementation,
- >all floats are automatically coerced into double-float (51-bit precision).
- >E.g. (* 1.2 3.4)
- >will still return a float with 51-bit precision. Correct me
- >if I am wrong on this. So my questions are:
- >(1) Can one emulate 13-bit or 24-bit precision in Lucid? (2) Which
- >lisp implementation actually does what Barry said?
-
- This depends on the architecture. LCL/SPARC only has one float type, and
- it's double precision (except they have a special exception for arrays of
- single floats, but they're converted to double floats when they're
- extracted). I think LCL/VAX only has single precision floats. Common Lisp
- permits an implementation to implement any subset of the four float types,
- and Lucid generally only implements one of them.
-
- In an implementation that doesn't have all four float types, some of the
- type names are synonyms. In Lucid, they are all synonyms for FLOAT.
-
- Symbolics impements all four floating point types.
-
- I don't think there's an easy way to get an implementation that only has
- one floating point type to emulate the others. Complain to Lucid.
- --
- Barry Margolin
- System Manager, Thinking Machines Corp.
-
- barmar@think.com {uunet,harvard}!think!barmar
-