Article View: net.lang.c
Article #9463Re: Expression sequencing query (better test)
From: Gary M. Samuelson
Date: Fri, 03 Oct 1986 20:02
Date: Fri, 03 Oct 1986 20:02
16 lines
1168 bytes
1168 bytes
Instead of a = ((b=1),b) + ((b=2),b) + ((b=3),b); I would like to suggest using a = ((b=1),b) + ((b=4),b) + ((b=16),b); This has the advantage that the result in a is unambiguous. For example, the answer '7' could be 1+3+3 or 2+2+3, but with the modified test case, the same order of evaluation would produce 33 or 24. Furthermore, the (supposedly) correct answer '6' could be incorrectly generated by 2+2+2, instead of 1+2+3. The modified test will produce 12 or 21, respectively. Gary Samuelson
Technical Details
Message-ID:
<1223@bunker.UUCP>Path:
arc1-ca.pugleaf.net!utzoo!decvax!ittatc!bunker!garysReferences:
<4230@brl-smoke.ARPA> <8161@watrose.UUCP> <165@usc-oberon.UUCP>Show Full Headers
Complete Article Headers
Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10.2 9/5/84; site bunker.UUCP Path: arc1-ca.pugleaf.net!utzoo!decvax!ittatc!bunker!garys From: garys@bunker.UUCP (Gary M. Samuelson) Newsgroups: net.lang.c Subject: Re: Expression sequencing query (better test) Message-ID: <1223@bunker.UUCP> Date: Fri, 3-Oct-86 16:02:31 EDT Article-I.D.: bunker.1223 Posted: Fri Oct 3 16:02:31 1986 Date-Received: Sat, 4-Oct-86 07:10:28 EDT References: <4230@brl-smoke.ARPA> <8161@watrose.UUCP> <165@usc-oberon.UUCP> Reply-To: garys@bunker.UUCP (Gary M. Samuelson) Distribution: na Organization: Bunker Ramo, Trumbull Ct Lines: 16