Path: utzoo!attcan!utgpu!jarvis.csri.toronto.edu!rutgers!cmcl2!adm!smoke!gwyn From: gwyn@smoke.BRL.MIL (Doug Gwyn) Newsgroups: comp.lang.c Subject: Re: How to multiply two ints and check Message-ID: <10291@smoke.BRL.MIL> Date: 19 May 89 18:30:53 GMT References: <434@skye.ed.ac.uk> <4700038@m.cs.uiuc.edu> Reply-To: gwyn@brl.arpa (Doug Gwyn) Organization: Ballistic Research Lab (BRL), APG, MD. Lines: 7 In article <4700038@m.cs.uiuc.edu> robison@m.cs.uiuc.edu writes: >There is a much simpler, faster, and machine-independent way to check >for multiplication overflow --- check the product by division. ... Nope, for portability you have to avoid signed-integer overflow in the first place. The overflow might (and does in some implementations) cause an ABEND.