Message-ID: <3EA57418.2060506@cyberoptics.com> Date: Tue, 22 Apr 2003 11:55:52 -0500 From: Eric Rudd Organization: CyberOptics User-Agent: Mozilla/5.0 (Windows; U; Win98; en-US; rv:1.3) Gecko/20030312 X-Accept-Language: en,pdf MIME-Version: 1.0 Newsgroups: comp.os.msdos.djgpp CC: andnews AT ihug DOT com DOT oz DOT au Subject: Re: Bug 00314 -- div() still broken References: <3e9c6920$0$21928$afc38c87@> <3EA54F78 DOT C46438ED AT phekda DOT freeserve DOT co DOT uk> In-Reply-To: <3EA54F78.C46438ED@phekda.freeserve.co.uk> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Lines: 26 NNTP-Posting-Host: 65.214.98.62 X-Trace: 1051030531 1244 65.214.98.62 To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Reply-To: djgpp AT delorie DOT com Richard Dawe wrote: >I'm having trouble understanding why it doesn't just do % and /. Why is there >all this other code? > div() and ldiv() were originally this way as well. I don't understand why those extra tests were ever in there, since they not only complicate the code, but result in incorrect behavior. At some point one gives up trying to understand why the bugs were there, and just fixes them. Somehow lldiv() was derived from the earlier buggy div() or ldiv(), so it also needs to be fixed in an analogous way. My postings to djgpp-workers somehow aren't showing up there, but perhaps one of the maintainers could take appropriate action. I'd submit a new bug report, but this is an old bug. One big question for me is how div() could get fixed in the CVS tree on 2000-07-08, but the 2.03 libc.a, dated 2001-12-24, still contained the old, buggy div(). It appears that the 2.03 tags didn't get updated. I just looked at the CVS tips, and it appears that div() and ldiv() are correct, but lldiv() is not. -Eric Rudd rudd AT cyberoptics DOT com