Subject: Re: Castings...
To: Chris G. Demetriou <cgd@Pa.dec.com>
From: Neil A. Carson <neil@causality.com>
List: tech-kern
Date: 10/08/1997 18:13:27
Chris G. Demetriou wrote:
> 
> > 'BSD retains this functionality for ints, but for quads the one hilited
> > above different (gives -2). Does this mean that the NetBSD moddi3
> > function should not return negative numbers?
> 
> I don't know what moddi3 does.

It's at src/lib/libc/quad/moddi3.c, and handles the operators with quad
qords. On the hypothesis that

> The fact that you're getting a different result for that case makes
> _me_ think that that the code giving you that result is buggy.

then it is broken, as it deliberately goes to long lengths to preserve
the sign. I'll sendpr it shortly.

	Regards,

	Neil

-- 
Neil A. Carson                         Marketing Director
E-mail: neil@causality.com             Causality Limited (London, UK)
Mobile: +44 (0)370 593183              Tel/Fax: +44 (0)181 930 7408
Sent from a 233MHz StrongARM NC!       Web: http://www.causality.com.