home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #26 / NN_1992_26.iso / spool / comp / arch / 10523 < prev    next >
Encoding:
Internet Message Format  |  1992-11-08  |  1.6 KB

  1. Path: sparky!uunet!cs.utexas.edu!qt.cs.utexas.edu!yale.edu!spool.mu.edu!agate!overload.lbl.gov!dog.ee.lbl.gov!horse.ee.lbl.gov!torek
  2. From: torek@horse.ee.lbl.gov (Chris Torek)
  3. Newsgroups: comp.arch
  4. Subject: integer/BCD/... dollars (was IEEE used for Dollars and Cents)
  5. Date: 8 Nov 1992 08:16:44 GMT
  6. Organization: Lawrence Berkeley Laboratory, Berkeley
  7. Lines: 22
  8. Message-ID: <27293@dog.ee.lbl.gov>
  9. References: <1917307@zl2tnm.gen.nz>
  10. Reply-To: torek@horse.ee.lbl.gov (Chris Torek)
  11. NNTP-Posting-Host: 128.3.112.15
  12.  
  13. In article <1917307@zl2tnm.gen.nz> don@zl2tnm.gen.nz (Don Stokes) writes:
  14. >... most machines only handle 32 bit or less integers cleanly, and
  15. >with two decimal places that's only up to $21,474,836.47 (assuming signed
  16. >integers).
  17.  
  18. Signed integers are not an absolute must, but precision greater than
  19. one penny is; most businesses seem to keep records to five digits or so.
  20.  
  21. >Machines that can handle 64 bit integers cleanly will make this problem
  22. >largely go away.  8-)
  23.  
  24. Hm, my kitchen arithmetic says that 2^64 only represents 1844 trillion
  25. dollars in mills.  At its current growth rate, the U.S. national debt
  26. will exceed this well within the next century.  Of course, by then the
  27. nation itself will be completely bankrupt, so this will not matter. :-)
  28.  
  29. Current 32-bit microprocessors are capable of handling 64-bit quantities
  30. moderately well.  Current versions of GCC support them directly.  64-bit
  31. integer arithmetic is well on its way to becoming established practise.
  32. -- 
  33. In-Real-Life: Chris Torek, Lawrence Berkeley Lab CSE/EE (+1 510 486 5427)
  34. Berkeley, CA        Domain:    torek@ee.lbl.gov
  35.