ECJ-INTEREST-L Archives

March 2014

ECJ-INTEREST-L@LISTSERV.GMU.EDU

Options: Use Proportional Font
Show Text Part by Default
Condense Mail Headers

Message: [<< First] [< Prev] [Next >] [Last >>]
Topic: [<< First] [< Prev] [Next >] [Last >>]
Author: [<< First] [< Prev] [Next >] [Last >>]

Print Reply
Mime-Version:
1.0
Sender:
ECJ Evolutionary Computation Toolkit <[log in to unmask]>
Subject:
From:
Raymond Shpeley <[log in to unmask]>
Date:
Fri, 28 Mar 2014 11:54:03 -0400
Content-Transfer-Encoding:
8bit
Content-Type:
text/plain; charset="ISO-8859-1"
Reply-To:
ECJ Evolutionary Computation Toolkit <[log in to unmask]>
Parts/Attachments:
text/plain (22 lines)
Thanks Siggy. I'll keep that in mind. I thought there may be these kinds of 
issues.
--

>If you go with BigDecimal, be aware that it breaks the
>equals-hashcode-compareTo contract, in that "2.0" does not equal()
>"2.00"
<http://docs.oracle.com/javase/6/docs/api/java/math/BigDecimal.html#equals
%28java.lang.Object%29>,
>and they will almost always have different hashCodes, even though
>compareTo() will tell you they are equal.
>
>This can cause problems if you put BigDecimals in a Set or Map and expect
>them to behave intuitively.
>
>Siggy
>
>Ph.D student in Computer Science
>George Mason University
>http://mason.gmu.edu/~escott8/
>

ATOM RSS1 RSS2