From 1276906800864754127
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: f78e5,fed4da4ddd62c919
X-Google-Attributes: gidf78e5,public
X-Google-ArrivalTime: 1995-01-03 02:11:44 PST
Newsgroups: comp.std.c++
Path: nntp.gmd.de!newsserver.jvnc.net!netnews.upenn.edu!dsinc!spool.mu.edu!howland.reston.ans.net!news.sprintlink.net!hookup!newshost.marcam.com!charnel.ecst.csuchico.edu!csusac!csus.edu!netcom.com!jgk
From: jgk@netcom.com (Joe Keane)
Subject: Re: Packed Decimal and C++
Message-ID: <jgkD1tpoA.AB4@netcom.com>
Summary: No.
Keywords: binary
Organization: none
References: <D1pB3B.Eyo@world.std.com> <ncmD1sxAA.9vD@netcom.com>
Date: Tue, 3 Jan 1995 09:43:22 GMT
Lines: 24

In article <D1pB3B.Eyo@world.std.com>
Michael Trachtman <miket@world.std.com> writes:
>Will C++ ever have a standard set of types and operations for
>packed decimal based numbers ?

I hope not.

>However, a compiler vendor would be free
>to implement it internally, and generate high quality assembler
>on those machines that have hardware support for Packed decimal.

Even if you have a VAX, do you know that using these instructions will help?
Fortunately most RISC machines have tossed support for this sort of thing.

If you use g++, you should note that there's already a class Integer.  Read in
some integers, do arithmetic on them, write them out.  It works no matter how
big the numbers are, and you don't care how it works inside.  There's also a
class Rational for exact rational arithmetic, which i think is very useful.

radix 10: bad
radix 2^16: good

--
Joe Keane, amateur mathematician


