From mboxrd@z Thu Jan 1 00:00:00 1970 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 102b75,85404311f8041f7a X-Google-Attributes: gid102b75,public X-Google-Thread: 1164f8,5747331edea7cbab X-Google-Attributes: gid1164f8,public X-Google-ArrivalTime: 2001-07-20 03:29:45 PST Path: archiver1.google.com!newsfeed.google.com!newsfeed.stanford.edu!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!news-xfer.newsread.com!netaxs.com!newsread.com!POSTED.newshog.newsread.com!not-for-mail From: Michael Lee Finney Newsgroups: comp.sys.dec,comp.arch Subject: Re: using memory beyond the "top" of stack Message-ID: References: <994616870.688233@haldjas.folklore.ee> <9iuka3$rku$1@mach.thp.univie.ac.at> <9j0jts$r2u$1@sword.avalon.net> <1bn163xzf0.fsf@cs.nmsu.edu> <9j5fd2$bgu$1@sword.avalon.net> <1br8vdbokt.fsf@cs.nmsu.edu> <3b56e0ad.662709412@News.CIS.DFN.DE> <995553466.29686@haldjas.folklore.ee> <3b56f884.668813508@News.CIS.DFN.DE> <995562469.848165@haldjas.folklore.ee> <9j85bf$8oc$1@sunnews.cern.ch> <3B57A5E7.26C2B49E@jetnet.ab.ca> Reply-To: michael.finney@acm.org X-Newsreader: MicroPlanet Gravity v2.30 Date: Fri, 20 Jul 2001 10:29:43 GMT NNTP-Posting-Host: 216.207.180.230 X-Complaints-To: Abuse Role , We Care X-Trace: newshog.newsread.com 995624983 216.207.180.230 (Fri, 20 Jul 2001 06:29:43 EDT) NNTP-Posting-Date: Fri, 20 Jul 2001 06:29:43 EDT Organization: Lynchburg.net (lynchburg.net) Xref: archiver1.google.com comp.sys.dec:6042 comp.arch:14362 In article <3B57A5E7.26C2B49E@jetnet.ab.ca>, bfranchuk@jetnet.ab.ca says... > > So, those who need an 128-bit type on a 64-bit platform are out of luck, > > at least for the time being. Although int128_t would be the solution for > > their needs, I'm not aware of any implementation providing it. > > The thing is you have to have a type 2x the longest word size in some > form to handle multiply and divide components. It will show up but it is not > something that marketing brags about. That's not even true in hardware. And certainly not in C or C++. In C/C++ there is a largest size integral value represented by the compiler -- usually long or long long. Those values can be multiplied and divided, but there is not even internal support for a value twice that size. Not only that, but for C++ where there is a long long type, multiplying two longs may result in a long instead of a long long because long long is not yet part of the C++ standard and widening the result would violate the existing standard. You have to explicitly widen the operands before you multiply. On the hardware side, there are machines which have multiply instructions that provide only the bottom half or the top half of the double precision result. I see nothing fundamental, even in hardware, that requires the top half of the result ever be available. Likewise, the hardware might do a divide by internally widening the result, dividing and then providing the quotient and remainder -- all without ever exposing a double precision value.