home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #26 / NN_1992_26.iso / spool / comp / arch / 10573 < prev    next >
Encoding:
Text File  |  1992-11-09  |  1.7 KB  |  47 lines

  1. Newsgroups: comp.arch
  2. Path: sparky!uunet!sun-barr!cs.utexas.edu!usc!rpi!psinntp!psinntp!ficc!peter
  3. From: peter@ferranti.com (peter da silva)
  4. Subject: Re: integer/BCD/... dollars (was IEEE used for Dollars and Cents)
  5. Message-ID: <id.W5UU.T7@ferranti.com>
  6. Organization: Xenix Support, FICC
  7. References: <2664312@zl2tnm.gen.nz> <27311@dog.ee.lbl.gov>
  8. Date: Mon, 9 Nov 1992 16:10:26 GMT
  9. Lines: 36
  10.  
  11. In article <27311@dog.ee.lbl.gov> torek@horse.ee.lbl.gov (Chris Torek) writes:
  12. > Sorry, I meant `five digits past the decimal point', the decimal point
  13. > being dollars.  These are apparently called `mills', i.e., thousanths
  14. > of a cent ($0 + 0 cents + 0.001 cents = 1/1000 cents = 0.00001
  15. > dollars).
  16.  
  17. Sorry, a "mil" is 1/1000 of a dollar. Gasoline is sold in even mil amounts
  18. in this country. The derivation is:
  19.  
  20.     dollar
  21.     dime, from latin for 10, 1/10 dollar
  22.     cent, from latin for 100, 1/100 dollar
  23.     mil, from latin for 1000, 1/1000 dollar
  24.  
  25. Previously, dollars had been divided in halves, quarters, and eighths (hence
  26. "pieces of eight"). I don't know if a 125 mil coin (1/8 dollar) was ever
  27. issued by any bank or mint, but it wouldn't surprise me.
  28.  
  29. Another consideration is that some goods (stocks, for example) are listed
  30. down to the 1/8 or even 1/16th of a cent, so you need a word arranged like
  31. this:
  32.  
  33.     type BIT[4] BCD;
  34.  
  35.     BCD cents[ndigits];
  36.     union {
  37.         BCD mils;
  38.         BIT fraction[4];
  39.     }
  40.  
  41. Plus, I would guess, a flag indicating the precision class of the value.
  42. -- 
  43. % Peter da Silva % 77487-5012 % +1 713 274 5180 %
  44. true(<<VV$@\\$'&O 9$O%'$LT$&$"V6"$&$<4$?'&$ #I&&?$=$<<@)24 24 scale 3 21 moveto
  45. {dup 36 eq{pop not}{dup 7 and 4 sub exch 56 and 8 div 4 sub 2 index{rlineto}{
  46. rmoveto}ifelse}ifelse}forall stroke pop showpage % Har du kramat din varg idag?
  47.