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