home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #27 / NN_1992_27.iso / spool / comp / lang / scheme / 2626 < prev    next >
Encoding:
Text File  |  1992-11-21  |  933 b   |  21 lines

  1. Newsgroups: comp.lang.scheme
  2. Path: sparky!uunet!spool.mu.edu!darwin.sura.net!jvnc.net!nj.nec.com!zilla
  3. From: zilla@ccrl.nj.nec.com (John Lewis)
  4. Subject: Re: Why is the exact/inexact distinction built into Scheme?
  5. Message-ID: <1992Nov21.235203.22285@research.nj.nec.com>
  6. Sender: news@research.nj.nec.com
  7. Organization: C&C Research Labs, NEC USA, Princeton, N.J.
  8. References: <1992Nov17.182740.11194@cs.brown.edu>
  9. Date: Sat, 21 Nov 92 23:52:03 GMT
  10. Lines: 9
  11.  
  12. r.e. the exact/inexact distinction, I think you want to use (truncate x).
  13. I also find the exact/inexact distinction to be a nuisance, 
  14. along with the whole scheme numerical system, 
  15. despite the beauty of the rest of the language.
  16.  
  17. (/ 5 3) and (/ 5. 3.) will give answers such as 5/3, 1.666666, and 1
  18. in different dialects.  I end up coding in terms of constructs
  19. such as (tofloat x) and (toint x) which I then attempt to implement 
  20. using the behavior of the particular dialect.
  21.