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

  1. Path: sparky!uunet!europa.asd.contel.com!darwin.sura.net!zaphod.mps.ohio-state.edu!usc!elroy.jpl.nasa.gov!decwrl!decwrl!waikato.ac.nz!comp.vuw.ac.nz!zl2tnm!toyunix!don
  2. Newsgroups: comp.arch
  3. Subject: Re: integer/BCD/... dollars (was IEEE used for Dollars and Cents)
  4. Message-ID: <2664312@zl2tnm.gen.nz>
  5. From: don@zl2tnm.gen.nz (Don Stokes)
  6. Date: 8 Nov 92 10:54:34 GMT
  7. Sender: news@zl2tnm.gen.nz (GNEWS Version 2.0 news poster.)
  8. Distribution: world
  9. Organization: The Wolery
  10. Lines: 38
  11.  
  12. torek@horse.ee.lbl.gov (Chris Torek) writes:
  13. > Signed integers are not an absolute must, but precision greater than
  14. > one penny is; most businesses seem to keep records to five digits or so.
  15.  
  16. Figures are only _published_ to five digits or so.  Bookkeeping must be
  17. to the last cent, and auditors get upset if systems don't balance.  I've
  18. seen programmers work their guts out to persuade things to balance to the
  19. last few cents, usually because of floating point arithmetic on dollar 
  20. (rather than cent) values....
  21.  
  22. Think about it: keeping only five digits of a billion dollar bottom line
  23. could hide some pretty major fraud....  
  24.  
  25. I stuck to signed integers (a) for generality, and (b) because the places
  26. where business bignums turn up are in things like balances and profit
  27. figures, which can (unfortunately) be negative.
  28.  
  29. > >Machines that can handle 64 bit integers cleanly will make this problem
  30. > >largely go away.  8-)
  31. > Hm, my kitchen arithmetic says that 2^64 only represents 1844 trillion
  32. > dollars in mills.  At its current growth rate, the U.S. national debt
  33. > will exceed this well within the next century.  Of course, by then the
  34. > nation itself will be completely bankrupt, so this will not matter. :-)
  35.  
  36. My bc says that it's more like $184,647 trillion dollars.  That makes the US
  37. national debt a potential problem if you calculate it in Bolivian pesos. 8-)
  38.  
  39. > Current 32-bit microprocessors are capable of handling 64-bit quantities
  40. > moderately well.  Current versions of GCC support them directly.  64-bit
  41. > integer arithmetic is well on its way to becoming established practise.
  42.  
  43. And about time too. 
  44.  
  45. --
  46. Don Stokes, ZL2TNM (DS555)                        don@zl2tnm.gen.nz (home)
  47. Network Manager, Computing Services Centre            don@vuw.ac.nz (work)
  48. Victoria University of Wellington, New Zealand              +64-4-495-5052
  49.