From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-0.3 required=5.0 tests=BAYES_00, REPLYTO_WITHOUT_TO_CC autolearn=no autolearn_force=no version=3.4.4 X-Google-Thread: 103376,245c84afd1e393ce X-Google-Attributes: gid103376,public X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news1.google.com!news3.google.com!border1.nntp.dca.giganews.com!nntp.giganews.com!cyclone1.gnilink.net!gnilink.net!nx02.iad01.newshosting.com!newshosting.com!newsfeed.icl.net!newsfeed.fjserv.net!colt.net!peernews3.colt.net!newsfeed.stueberl.de!news.germany.com!newsfeed.arcor.de!news.arcor.de!not-for-mail From: "Dmitry A. Kazakov" Subject: Re: What about big integers in Ada 2005? Newsgroups: comp.lang.ada User-Agent: 40tude_Dialog/2.0.14.1 MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Reply-To: mailbox@dmitry-kazakov.de Organization: cbb software GmbH References: <1581461.uQ1jN63t33@linux1.krischik.com> <5mo0f.529$B14.97@newssvr11.news.prodigy.com> Date: Tue, 4 Oct 2005 10:25:40 +0200 Message-ID: <1x4pe4pv41qsn$.m5c5jawjqcpq.dlg@40tude.net> NNTP-Posting-Date: 04 Oct 2005 10:25:39 MEST NNTP-Posting-Host: fc646aaf.newsread4.arcor-online.net X-Trace: DXC=nP8MgCCFiJ[l:ejgIfPPlddjW\KbG]kaMhXY;eg@jLYelG7I848_8HFb[6LHn;2LCVn7enW;^6ZC`d<=9bOTW=MNn X-Complaints-To: abuse@arcor.de Xref: g2news1.google.com comp.lang.ada:5369 Date: 2005-10-04T10:25:39+02:00 List-Id: On Tue, 04 Oct 2005 05:24:17 GMT, adaworks@sbcglobal.net wrote: > "Dennis Lee Bieber" wrote in message > news:imsuj1h8vevg4un71rmh0nc41pnee5ihjl@4ax.com... >> >> Of course, my college mainframe actually had a 32-digit hardware BCD >> ALU (which failed one term -- COBOL classes were stuck, but FORTRAN, >> using integer and floating ALU hardware, proceeded apace). >> >> I'll admit I'm somewhat surprised GNAT (and likely others) >> implemented fixed-point math using scaled integers -- rather than a BCD >> package. >> -- > I wonder if anyone has implemented a BCD package? Also, in COBOL, > programmers routinely design using packed decimal. I don't know of any > corresponding package in Ada. I suspect this is one of the many reasons > Ada has consistently failed to win any support in the information systems > world. > > Unfortunately, the Information Systems annex falls short of what COBOL > programmers really want. Perhaps we could re-design the Information > Systems Annex someday to bring it into conformity with common IS > practice. Probably too late. The damage is already done. > > Also, I am teaching a class in functional programming languages this Quarter > and wrote a little factorial program in Scheme that shows that we can do > > (factorial 45) > > and get a perfectly good answer. Anyone know of an Ada package that > can do that? Curious, why somebody would like to use BCD for 45!? I cannot imagine any use of BCD except than to speed up conversions to ASCII, which is not an issue in these days. But even so, whoever is expected to read 45! on the screen, he can always say - I did, though can't remember the 25th digit from the left! (:-)) [decimal fixed point numbers is a different issue] But I agree that Ada should have Universal_Integer or its equivalent available for users. And this time one should not repeat errors made with Unbounded_String! -- Regards, Dmitry A. Kazakov http://www.dmitry-kazakov.de