Proposal: Sameness operators

Mark Thornton mthornton at optrak.co.uk
Thu Apr 2 11:31:51 PDT 2009


Reinier Zwitserloot wrote:
>
> BI/BD's comparison methods can't just convert the incoming primitive 
> to a BI/BD, because NaN and the infinities don't convert, yet the 
> answer to this expression:
>
> Double.NEGATIVE_INFINITY < BigInteger.ZERO
>
> should clearly be true. The above plan can make that happen by adding 
> more logic to BI/BD's compareTo methods.
The 754R decimal format does include NaN and +-infinite, so perhaps the 
answer here is to modify Java's BigDecimal to match.

Joe could probably tell us more about the possibility of such a change.

Mark Thornton




More information about the coin-dev mailing list