Xref: utzoo comp.lang.c++:11435 comp.std.c++:568 Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!usc!zaphod.mps.ohio-state.edu!sdd.hp.com!spool.mu.edu!news.cs.indiana.edu!msi.umn.edu!cs.umn.edu!ux.acs!vx.acs.umn.edu!dhoyt From: dhoyt@vx.acs.umn.edu (DAVID HOYT) Newsgroups: comp.lang.c++,comp.std.c++ Subject: Re: Add-with-carry operator Message-ID: <3189@ux.acs.umn.edu> Date: 4 Feb 91 17:19:11 GMT References: <1991Feb3.202530.14874@julius.cs.uiuc.edu> Sender: news@ux.acs.umn.edu Reply-To: dhoyt@vx.acs.umn.edu Followup-To: comp.lang.c++ Organization: University of Minnesota, Academic Computing Services Lines: 12 News-Software: VAX/VMS VNEWS 1.3-4 In article <1991Feb3.202530.14874@julius.cs.uiuc.edu>, zweig@cs.uiuc.edu (Johnny Zweig) writes... >The problem: there is not an add-with-carry operator in C++, so there isn't >any way of writing portable code to use this. You can write add with carry code that will work portably with all 2's complement machines. Unless you're writing code for some special embedded processor you can hit 100% of the machines out there with one source program and no ifdefs, and if you are writing for an embedded processor you aren't interested in portable code anyway. I vote no for this one. The algorithm is, of course, left up to the reader (hint it was solved a looong time ago). david | dhoyt@vx.acs.umn.edu | dhoyt@vx.acs.umn.edu