Article View: comp.std.c
Article #3775Re: Why "long long" doesn't work.
From: FFarance
Date: Fri, 18 Aug 1995 14:48
Date: Fri, 18 Aug 1995 14:48
49 lines
3001 bytes
3001 bytes
> From: halasz@caip.rutgers.edu > > In article <40rfuk$4k3@newsbf02.news.aol.com>, ffarance@aol.com (FFarance) writes > + .... > + As I read them, the implementors could deal with extending some of > + the simpler operations (add, subtract, negate, shift, and, or, not, > + etc.) by simple extensions to the code generator (e.g., add the low > + order part, increment the high order part if the carry bit was set, > + add the high order part). > You understnad that this is not reallie enough? The operation needed > is add-with-carrie, for separatlie handling adding and carrie leavs > twain points in the code where there can be carrie or overflow, > although for anie one sum it can happen on onlie one of them. I don't know what you are saying here. I've asked you privately to use more conventional wording and spellings (which I know you know). I am trying to make sense of your sentences, but cannot. Also, for readers not in English-speaking countries, it makes is difficult to comprehend. What does ``... carrie leavs twain points in the code ...'' mean? > The PDP-11 had it wrong, and the Intel chips and the VAX hav it right. What do they have wrong? The PDP-11 had an ``add carry'' instruction I just verified this with the ``PDP-11 Processor Handbook (1975)''. This point was that only simple extensions were required (like I described above) and it made multi-precision arithmetic easy to implement for some of the basic operations. Whether it's two instructions (add low order, add with carry high order) or three instructions (add low order, add carry, add high order) doesn't make much difference -- they're the best you can do on that architecture. However, for most code generators, this type of (efficient) extension is easy to implement. You don't want to be calling a subroutine for each add or move operation. The problem with arbitrary multi-precision arithmetic is that the applications tend to hide the precision until *run-time*. Since the precision is not known at compile-time, the code generator must parameterize the code. This is usually generated as a call to a multi-precision library with the precision is one of the arguments. Implementors are non-plussed about this type of extension. -FF ------------------------------------------------------------------- (``I only use AOL for reading netnews.'') Frank Farance, Farance Inc. E-mail: frank@farance.com, Telephone: +1 212 486 4700 ISO JTC1/SC22/WG14 & ANSI X3J11 (C Programming Language) Project Editor
Technical Details
Message-ID:
<41298a$6p7@newsbf02.news.aol.com>Path:
arc1-ca.pugleaf.net!newsbf02.news.aol.com!not-for-mailReferences:
<410fqa$8e5@caip.rutgers.edu>Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!newsbf02.news.aol.com!not-for-mail From: ffarance@aol.com (FFarance) Newsgroups: comp.std.c Subject: Re: Why "long long" doesn't work. Date: 18 Aug 1995 10:48:42 -0400 Organization: America Online, Inc. (1-800-827-6364) Sender: root@newsbf02.news.aol.com Message-ID: <41298a$6p7@newsbf02.news.aol.com> References: <410fqa$8e5@caip.rutgers.edu> Reply-To: ffarance@aol.com (FFarance) NNTP-Posting-Host: newsbf02.mail.aol.com