commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From S├ębastien Brisard <sebastien.bris...@m4x.org>
Subject Re: [Math] Fraction parsing bug?
Date Thu, 01 Dec 2011 15:28:12 GMT
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 ?
S├ębastien


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
For additional commands, e-mail: dev-help@commons.apache.org


Mime
View raw message