Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!bcm!pavlov.ssctr.bcm.tmc.edu!rick From: rick@pavlov.ssctr.bcm.tmc.edu (Richard H. Miller) Newsgroups: comp.arch Subject: Re: Computers for users not programmers Message-ID: <4158@gazette.bcm.tmc.edu> Date: 16 Feb 91 00:24:21 GMT References: <1991Feb12.192725.21029@Think.COM> <2922@risky.Convergent.COM> <1991Feb14.151831.15426@linus.mitre.org> Sender: usenet@bcm.tmc.edu Organization: Baylor College of Medicine, Houston, Tx Lines: 55 Nntp-Posting-Host: pavlov.ssctr.bcm.tmc.edu In article <1991Feb14.151831.15426@linus.mitre.org> bs@linus.mitre.org (Robert D. Silverman) writes: > >Yes. However, if DOUBLE PRECISION integer arithmetic were supported, the >need for BCD would totally disappear. Not only that, the integer arithmetic >would be at least an order of magnitude FASTER. There is no inherent reason >why the dollars and cents calculations [read: extended precison] cannot be >done in integer arithmetic. > >It would require that the code emitter of some COBOL compilers be modified >to use integer, rather than BCD instructions, but this is not terribly >difficult to do. > >Under these circumstances, both scientific and COBOL users would benefit. > ---- > >:Now I personally don't like COBOL, but I recognize that there is a tremendous >:investment in COBOL programs in industry - and they are not going to go away >:tomorrow. > >No COBOL programs would change -- only the compilers would change. This is certainly not correct. I don't know how much DP application experience you have had, but the calculation aspect of business data processing, although important, is not the primary reason for decimal arithmetic. Most data processing applications are designed to read records, do some processing and report on them. In fact, the majority of data processing is to product reports and reports tend to be in decimal format. Thus, if you eliminated BCD, the calculations would be faster, but every time you wanted to put the results out, you would have to convert the integer values to decimal format, edit the number into the output format and then output it. [Most architectures which support decimal also support EDIT instructions]. Another important consideration is the fact that many files already are set up with decimal fields. If you change to compiler to handle integer only, you will either have to automatically convert input records from decimal to integer so you now have conversion->processing->conversion, or you have to invest a lot of money in doing the systems design and maintenance to convert all of the BCD fields to either integer or character. [You now are talking about a fundemental change to the application which requires (or should) the services of a systems analyst, programmers, testing and quality assurance.] The bottom line is that programs would change or processing time will go up. There actually is a need for certain architectual support for business data processing for our applications. [We don't make scientific programmers use decimal arithmetic in their code and they don't make system programmers write with floating point so don't make us use your approach. Taylor the architecture to the application if possible and do not assume the same architecture will work for all.] -- Richard H. Miller Email: rick@bcm.tmc.edu Asst. Dir. for Technical Support Voice: (713)798-3532 Baylor College of Medicine US Mail: One Baylor Plaza, 302H Houston, Texas 77030