Path: utzoo!mnetor!uunet!husc6!cmcl2!brl-adm!adm!MAILER%ALASKA.BITNET@CUNYVM.CUNY.EDU From: MAILER%ALASKA.BITNET@CUNYVM.CUNY.EDU Newsgroups: comp.lang.c Subject: Undelivered mail Message-ID: <12347@brl-adm.ARPA> Date: 13 Mar 88 08:59:17 GMT Sender: news@brl-adm.ARPA Lines: 27 Subject: Re: Re: Constant overflow [Non-Deliverable: User does not exist or has never logged on] Reply-To: Info-C@BRL.ARPA Received: From UWAVM(MAILER) by ALASKA with Jnet id 0359 for SXJVK@ALASKA; Sat, 12 Mar 88 23:48 AST Received: by UWAVM (Mailer X1.25) id 6413; Sun, 13 Mar 88 00:47:52 PST Date: Fri, 11 Mar 88 11:47:41 GMT Reply-To: Info-C@BRL.ARPA Sender: Info-C List From: Alan_Rooks_sps Subject: Re: Re: Constant overflow Comments: To: info-c@BRL-SMOKE.arpa To: Vic Kapella In article <2550059@hpisod2.HP.COM> decot@hpisod2.HP.COM (Dave Decot) writes: >It's hard to do this right unless you do some clever comparison >just before multiplying by 10 (or 8 or 16 or 2). A proven (and very simple) way to do this right was given by J. R. Parker in "A General Character to Integer Conversion Method", Software - Practice and Experience, Vol 15(8) (August '85), pp. 761-766. Alan Rooks - Bruel & Kjaer Copenhagen - ...!mcvax!bk!alan or ...!diku!bk!alan