Mail Archives: djgpp/2003/04/22/13:15:21
Hello.
Eric Rudd wrote:
>
> 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.
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?
> 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.
I haven't seen any posts to djgpp-workers. Thanks for posting to
comp.os.msdos.djgpp too!
> 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.
The new 2.03 releases were made off the 2.03 maintenance branch. I can't
remember the tag. It probably branches off the 2.03 release tag, which means
that it wouldn't have any fixes made in CVS after the 2.03 release.
> I just looked at the CVS tips, and it appears that div() and ldiv() are
> correct, but lldiv() is not.
Andrew added lldiv. If he agrees, I'll fix lldiv in CVS. 2.04 alpha 1 is due
on the 28th April, so we should fix it before that!
Thanks, bye, Rich =]
--
Richard Dawe [ http://www.phekda.freeserve.co.uk/richdawe/ ]
- Raw text -