Hi,

In message "Re: "nan".to_f ?"
    on Wed, 13 Oct 2004 23:33:53 +0900, GOTO Kentaro <gotoken / notwork.org> writes:

|  def aNaN
|    s, e, m = rand(2), 2047, rand(2**52-1)+1
|    [sprintf("%1b%011b%052b", s,e,m)].pack("B*").unpack("G").first
|  end
|
|I believe this will generate NaN on environments where 
|pack/unpack works and NaN exists. 

If the platform uses IEEE floating number, right?

							matz.