Date: Tue, 22 Apr 2003 12:35:32 -0500 From: Eric Rudd Subject: Re: Bug 00314 -- div() still broken In-reply-to: <3EA5789C.F1E0CFBB@phekda.freeserve.co.uk> To: Richard Dawe Cc: djgpp-workers AT delorie DOT com Message-id: <3EA57D64.4030000@cyberoptics.com> Organization: CyberOptics MIME-version: 1.0 Content-type: text/plain; charset=us-ascii; format=flowed Content-transfer-encoding: 7bit X-Accept-Language: en,pdf User-Agent: Mozilla/5.0 (Windows; U; Win98; en-US; rv:1.3) Gecko/20030312 Newsgroups: comp.os.msdos.djgpp References: <3EA54F78 DOT C46438ED AT phekda DOT freeserve DOT co DOT uk> <3EA57418 DOT 2060506 AT cyberoptics DOT com> <3EA5789C DOT F1E0CFBB AT phekda DOT freeserve DOT co DOT uk> Reply-To: djgpp-workers AT delorie DOT com Errors-To: nobody AT delorie DOT com X-Mailing-List: djgpp-workers AT delorie DOT com X-Unsubscribes-To: listserv AT delorie DOT com Precedence: bulk Richard Dawe wrote: >I thought maybe someone knew something I didn't. Like: perhaps this code gives >the correct behaviour with long long, but smaller types don't need it? > According to C99: 7.20.6.2 The div, ldiv, and lldiv functions [#2] The div, ldiv, and lldiv, functions compute numer / denom and numer % denom in a single operation. so if special tests were needed for lldiv, then there would be something wrong with / or % for long longs, which would need to be fixed instead. -Eric Rudd rudd AT cyberoptics DOT com