home *** CD-ROM | disk | FTP | other *** search
- 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
- From: torek@horse.ee.lbl.gov (Chris Torek)
- Newsgroups: comp.arch
- Subject: integer/BCD/... dollars (was IEEE used for Dollars and Cents)
- Date: 8 Nov 1992 08:16:44 GMT
- Organization: Lawrence Berkeley Laboratory, Berkeley
- Lines: 22
- Message-ID: <27293@dog.ee.lbl.gov>
- References: <1917307@zl2tnm.gen.nz>
- Reply-To: torek@horse.ee.lbl.gov (Chris Torek)
- NNTP-Posting-Host: 128.3.112.15
-
- In article <1917307@zl2tnm.gen.nz> don@zl2tnm.gen.nz (Don Stokes) writes:
- >... most machines only handle 32 bit or less integers cleanly, and
- >with two decimal places that's only up to $21,474,836.47 (assuming signed
- >integers).
-
- Signed integers are not an absolute must, but precision greater than
- one penny is; most businesses seem to keep records to five digits or so.
-
- >Machines that can handle 64 bit integers cleanly will make this problem
- >largely go away. 8-)
-
- Hm, my kitchen arithmetic says that 2^64 only represents 1844 trillion
- dollars in mills. At its current growth rate, the U.S. national debt
- will exceed this well within the next century. Of course, by then the
- nation itself will be completely bankrupt, so this will not matter. :-)
-
- Current 32-bit microprocessors are capable of handling 64-bit quantities
- moderately well. Current versions of GCC support them directly. 64-bit
- integer arithmetic is well on its way to becoming established practise.
- --
- In-Real-Life: Chris Torek, Lawrence Berkeley Lab CSE/EE (+1 510 486 5427)
- Berkeley, CA Domain: torek@ee.lbl.gov
-