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.4 required=5.0 tests=AC_FROM_MANY_DOTS,BAYES_00 autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,7cda96e9413b780c X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2002-07-24 01:42:35 PST Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!fr.usenet-edu.net!usenet-edu.net!fr.clara.net!heighliner.fr.clara.net!news-x2.support.nl!psinet-eu-nl!psiuk-p4!uknet!psiuk-p3!uknet!psiuk-n!news.pace.co.uk!nh.pace.co.uk!not-for-mail From: "Marin David Condic" Newsgroups: comp.lang.ada Subject: Re: Floating Decimal Package/Library? Date: Tue, 23 Jul 2002 09:16:09 -0400 Organization: Posted on a server owned by Pace Micro Technology plc Message-ID: References: <3D345DB3.5080609@cogeco.ca> <3D3571E4.6060503@cogeco.ca> <3D3C963D.5020304@attbi.com> NNTP-Posting-Host: dhcp-200-133.miami.pace.co.uk X-Trace: nh.pace.co.uk 1027430169 6701 136.170.200.133 (23 Jul 2002 13:16:09 GMT) X-Complaints-To: newsmaster@news.cam.pace.co.uk NNTP-Posting-Date: 23 Jul 2002 13:16:09 GMT X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 5.50.4522.1200 X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4522.1200 Xref: archiver1.google.com comp.lang.ada:27354 Date: 2002-07-23T13:16:09+00:00 List-Id: More out of curiosity than anything else: Some hardware supports Binary Coded Decimal (BCD) which was there to support Cobol-like numeric values. (Its been a while, but IIRC, the MC680x0 supported it.) I'd suspect that BCD would be suitable for Ada's decimal types. How would this apply here? What would it likely look like under the hood? Would it be a better answer than using some sort of scaled integer? MDC -- Marin David Condic Senior Software Engineer Pace Micro Technology Americas www.pacemicro.com Enabling the digital revolution e-Mail: marin.condic@pacemicro.com "Robert I. Eachus" wrote in message news:3D3C963D.5020304@attbi.com... > > Ada decimal fixed point types are decimal. Unless you insist on peeking > under the covers, you need know nothing else. But if you insist on > peeking, read on. > > Decimal types are implemented as (almost always twos-complement) binary > integer representations, with a static divisor that is a power of ten. > So if you say: