Article View: comp.std.c
Article #3870Re: Why "long long" doesn't work.
From: halasz
Date: Sat, 26 Aug 1995 21:56
Date: Sat, 26 Aug 1995 21:56
19 lines
1334 bytes
1334 bytes
In article <41g24f$rf9@newsbf02.news.aol.com>, ffarance@aol.com (FFarance) writes : .... : Yes, this is true. In fact Martin Kealey pointed out that the number : of operations you need for some hardware (adds and carries) is : proportional to about (N+1)*N/2 instructions, where N is the number of : segments. Making 128-bit arithmetic out of 32-bit segments is too : bad, but making 1024-bit arithmetic out of 8-bit segments would be : a pain (assuming no hardware support for extended arithmetic). I'll : raise this as an open issue in the SBEIR paper. For machines with no add/subtract with carrie? For thoze that hav it, the cost is linear in the length of the numeral: add y,x adc y+4,x+4 adc y+8,x+8 adc y+12,x+12 for 128-bit integer out of 32-bit parts, stord from low to high. This is found in the Intel chips, the VAX, Motorola chips, and doubtless more. The instructions found in the PDP-11 are not enough to make this this simple.
Technical Details
Message-ID:
<41o5ag$1u2@caip.rutgers.edu>Path:
arc1-ca.pugleaf.net!caip.rutgers.edu!not-for-mailReferences:
<3bsOwQ9ytdOV084yn@csn.net> <41g24f$rf9@newsbf02.news.aol.com>Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!caip.rutgers.edu!not-for-mail From: halasz@caip.rutgers.edu Newsgroups: comp.std.c Subject: Re: Why "long long" doesn't work. Date: 26 Aug 1995 17:56:32 -0400 Organization: Rutgers University Message-ID: <41o5ag$1u2@caip.rutgers.edu> References: <3bsOwQ9ytdOV084yn@csn.net> <41g24f$rf9@newsbf02.news.aol.com> NNTP-Posting-Host: caip.rutgers.edu