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

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