Unfortunately, isNaNthis is a method on java.lang.Double, and it is important to have an implicit conversion to java.lang.Double, so the Scala value class RichDoublecannot override isNaNto be fast, and when you use isNaN, you can specify java.lang.Double.
NaN,
implicit class RicherDouble(val d: Double) extends AnyVal {
def nan = java.lang.Double.isNaN(d)
}
.nan .