scalapuzzlers/scalapuzzlers.github.com — pull request #62 by demobox (2013-02-14 00:39:44+00:00)
Title: Adding puzzler 29 ('Double Trouble')

Note that, as discussed in the [scala-lang thread](https://groups.google.com/forum/?fromgroups=#!topic/scala-language/fWnULi1SH44), this behaviour was changed in 2.10 as part of the fix for [SI-5104](https://issues.scala-lang.org/browse/SI-5104):

https://github.com/scala/scala/commit/460bbc1276fb4ba83b9bcbdc7f7ba475b352b7c6

So this would unfortunately have to move straight to the archive section, although (again, as pointed out in the thread) there is a nice follow-up puzzler:
```
val a = Array(1.0, Double.NaN, 2.0)
util.Sorting.stableSort(a)
println(a.mkString(" "))
```
prints `1.0 2.0 NaN` in 2.9.2 but `1.0 NaN 2.0` in 2.10.0 because `Double` now violates the assumptions of `Ordering`.