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=-1.9 required=5.0 tests=BAYES_00 autolearn=ham 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!news4.google.com!border1.nntp.dca.giganews.com!border2.nntp.dca.giganews.com!nntp.giganews.com!wns14feed!worldnet.att.net!209.244.4.230!newsfeed1.dallas1.level3.net!news.level3.com!news.binc.net!clubley From: clubley@remove_me.eisner.decus.org-Earth.UFP (Simon Clubley) Newsgroups: comp.lang.ada Subject: Re: What about big integers in Ada 2005? Date: 4 Oct 2005 12:24:09 -0500 Organization: Encompasserve Message-ID: References: <1581461.uQ1jN63t33@linux1.krischik.com> <5mo0f.529$B14.97@newssvr11.news.prodigy.com> <1x4pe4pv41qsn$.m5c5jawjqcpq.dlg@40tude.net> NNTP-Posting-Host: eisner.encompasserve.org X-Trace: grandcanyon.binc.net 1128446614 31558 192.135.80.34 (4 Oct 2005 17:23:34 GMT) X-Complaints-To: abuse@binc.net NNTP-Posting-Date: Tue, 4 Oct 2005 17:23:34 +0000 (UTC) Xref: g2news1.google.com comp.lang.ada:5383 Date: 2005-10-04T12:24:09-05:00 List-Id: In article , Robert A Duff writes: > clubley@remove_me.eisner.decus.org-Earth.UFP (Simon Clubley) writes: > >> In article <1x4pe4pv41qsn$.m5c5jawjqcpq.dlg@40tude.net>, "Dmitry A. Kazakov" writes: >> > >> > 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. >> >> One reason to use BCD is because it's a compact data representation. > > Heh? Binary is more compact that BCD. > Oops, bad choice of wording on my part. When I wrote that, I thinking of the telephone number example (I've just written code to generate SMS TPDU packets), and was not thinking of encoding a full size integer. (SMS packs 2 telephone digits into a single octet in order to reduce the size of the packet.) > I think the only reason to use BCD these days (instead of binary) is to > interface to something that uses BCD. In the old days, another reason > was to avoid the cost of converting strings to binary integers and > vice-versa, but that seems like an obsolete reason at this > > Am I right? How would you choose to implement big number packages ? Simon. -- Simon Clubley, clubley@remove_me.eisner.decus.org-Earth.UFP Microsoft: The Standard Oil Company of the 21st century