home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.arch
- Path: sparky!uunet!rde!ksmith!keith
- From: keith@ksmith.uucp (Keith Smith)
- Subject: Re: IEEE used for Dollars and Cents
- Organization: Keith's Computer, Hope Mills, NC
- Date: Thu, 05 Nov 92 13:23:45 GMT
- Message-ID: <1992Nov05.132345.1642@ksmith.uucp>
- References: <BwyBs0.M88.1@cs.cmu.edu> <1992Nov01.165646.10222@ksmith.uucp> <Bx5xnJ.BC8.1@cs.cmu.edu>
- Lines: 39
-
- In article <Bx5xnJ.BC8.1@cs.cmu.edu> nickh@CS.CMU.EDU (Nick Haines) writes:
- >In article <1992Nov01.165646.10222@ksmith.uucp> keith@ksmith.uucp (Keith Smith) writes:
- >
- > In article <BwyBs0.M88.1@cs.cmu.edu> nickh@CS.CMU.EDU (Nick Haines) writes:
- > >All business software everywhere uses integer arithmetic.
-
- > What do you mean "integer". BASIS BBx (business basic extended) uses 14
- > decimal place BCD math. They also support integers. I don't consider
- > BCD math "integer". There are a TON of Business apps written in
- > Business BASIC, commercial and otherwise.
- >
-
- [ COBAL STRING, ETC ]
-
- >I meant `fixed point decimal,' I guess. I meant the sort of math that
- >COBOL and Business BASIC use. I spent over a year hacking that sort of
- >code (most of it DG Business BASIC versions 5-8, which actually does
- >use integers everywhere), and trying to imagine what it would be like
- >using FP gives me heeby-jeebies.
-
- BASIS uses a FLOATING POINT BCD. Fixed point to me means number have n
- places to the right of the decimal. BASIS BBx stores numbers with 14
- places of PRECISION using 8 bytes with a 7 byte BCD mantissa, and the
- other 8 bits for sign & exponent (+-2^6 exponent I beleive).
-
- I'm not sure about the RPG's, but I think it uses arbitrary precision
- string math. In the COBOLS I beleive most were fixed point.
-
- >It's all a trade-off. If you have to use FP, you have to do rounding
- >on _every_ operation. If you have to use (large) integers, you only
-
- If you do it in FP you will forget to do *SOMETHING* on some operation
- that will *LOOK* right when scanning the code that you will spend many,
- many hours looking for to correct, which will in turn show yet another
- problem ....
- --
- Keith Smith uunet!ksmith!keith 5719 Archer Rd.
- Digital Designs BBS 1-919-423-4216 Hope Mills, NC 28348-2201
- Somewhere in the Styx of North Carolina ...
-