home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #18 / NN_1992_18.iso / spool / comp / lang / lisp / 2232 < prev    next >
Encoding:
Internet Message Format  |  1992-08-14  |  1.8 KB

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