From: noreply@... Date: 2006-05-03T03:56:55+09:00 Subject: [ ruby-Bugs-4339 ] Ruby fails float 80 test in stable tarball (2 May 2006) when compiled with Mingw Bugs item #4339, was opened at 2006-05-02 19:56 You can respond by visiting: http://rubyforge.org/tracker/?func=detail&atid=1698&aid=4339&group_id=426 Category: Core Group: None Status: Open Resolution: None Priority: 3 Submitted By: Jos�� Soares Augusto (jasa) Assigned to: Nobody (None) Summary: Ruby fails float 80 test in stable tarball (2 May 2006) when compiled with Mingw Initial Comment: Hi all After compiling Ruby stable with Mingw I get $ ./ruby -v ruby 1.8.4 (2006-05-01) [i386-mingw32] the 'make check' command produces: $ make check not ok float 80 -- ./sample/test.rb:1209 test failed make: *** [test] Error 1 I changed the sample/test.rb code to have more info on the issue: ........ start at line 1204 in sample/test.rb ..... #s = "3.7517675036461267e+17" #test_ok(s == sprintf("%.16e", s.to_f)) # NEXT 2 LINES ADDED BY ME ####### print ">>>",f,"\n" print ">>>",sprintf("%.16e", f).to_f,"\n" f = 3.7517675036461267e+17 test_ok(f == sprintf("%.16e", f).to_f) ............................................. The result: $ ./ruby sample/test.rb assignment ok 1 ok 2 ok 3 ....................... ok 77 ok 78 ok 79 >>>3.75176750364613e+017 >>>3.75176750364613e+017 not ok float 80 -- sample/test.rb:1209 bignum ok 1 ........................... Apparently the two strings are equal. Has this something to do with the '==' operator? Thanks Jos�� Soares Augusto ---------------------------------------------------------------------- You can respond by visiting: http://rubyforge.org/tracker/?func=detail&atid=1698&aid=4339&group_id=426