Kenji Yoshida @xuwei_k scala> val a = BigDecimal(42) a: scala.math.BigDecimal = 42 scala> a == a.toDouble res0: Boolean = true scala> List(a, a.toDouble).distinct res1: List[Any] = List(42, 42.0) 2017-12-30 00:55:02 Phil Derome @philderome @xuwei_k scala> List(a.toDouble.asInstanceOf[Any] , a.asInstanceOf[Any]).toSet res2: scala.collection.immutable.Set[Any] = Set(42.0) scala> List(a.toDouble.asIn
![ScalaのmutableのHashSetの面白い挙動](https://cdn-ak-scissors.b.st-hatena.com/image/square/8daca9fffd3cfe6acb687489dbaa754c5a1da601/height=288;version=1;width=512/https%3A%2F%2Fs.togetter.com%2Fogp2%2F9210d50b5b1f90719317008f4a37cf5f-1200x630.png)