From: Yukihiro Matsumoto Date: 2004-10-13T08:31:17+09:00 Subject: Re: "nan".to_f ? Hi, In message "Re: "nan".to_f ?" on Wed, 13 Oct 2004 05:22:00 +0900, Thomas Fini Hansen writes: |I would say that 'NaN' is a the string representation of a float, so |logically it should be parsed to such, that's why I'm wondering why |this behaviour was *removed*. It's not valid string representation of a float. ruby -e 'nan' -e:1: undefined local variable or method `nan' for main:Object (NameError) ruby -e 'NaN' -e:1: uninitialized constant NaN (NameError) Ruby used to use system's strtod(3), which gives you "nan" an "inf" for free, but its interpretation varies a little from platform to platform. Now it uses its own version of strtod that interprets only valid float representation in Ruby. matz.