On Thu, Dec 01, 2011 at 04:28:12PM +0100, Sébastien Brisard wrote:
> Hello,
> >
> > IMHO, no.
> > The fact 0 is signed for doubles is really a trick set up in the IEE754 standard
only for dealing with branch cuts (like the division you present). It is not available for
other types like int or longs where 0 is not signed and special numbers like infinity and
NaN and even subnormals do not exist. Our fractions are both closer to the mathematical Z
set and to the computer science int primitives pairs than to double. There is a conversion
method doubleValue, but it should rather be considered an extension than a core feature.
> >
> > Luc
> >
> I was initially going to answer along these lines, but refrained to do
> so, because I realized that Q is actually closer to R than Z. Indeed,
> you cannot define a limit in Z, but you probably can in Q, since Q is
> dense in R. So, defining a signed zero as being as signed fraction
> with absolute value smaller than 1/Integer.MAX_VALUE might be
> meaningful.
>
> I'm not saying we should do it, but I can see Gilles' point. Gilles,
> do you have any practical application in mind ?
Heu, no. I just thought that it would be, hmm... more consistent. ;)
Gilles

To unsubscribe, email: devunsubscribe@commons.apache.org
For additional commands, email: devhelp@commons.apache.org
