List Info

Thread: Ruby fails float 80 test in stable tarball (2 May 2006) when compiled with Mingw




Ruby fails float 80 test in stable tarball (2 May 2006) when compiled with Mingw
user name
2006-05-02 18:56:55
Bugs item #4339, was opened at 2006-05-02 19:56
You can respond by visiting: 
http://rubyforge.org/tracke
r/?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/tracke
r/?func=detail&atid=1698&aid=4339&group_id=426

Ruby fails float 80 test in stable tarball (2 May 2006) when compiled with Mingw
user name
2006-05-03 17:48:26
Hi,

In message "Re: [ ruby-Bugs-4339 ] Ruby fails float 80
test in stable tarball (2 May 2006) when compiled with
Mingw"
    on Wed, 3 May 2006 03:56:55 +0900, noreplyrubyforge.org writes:

|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 think I fixed it.  Try it again with the latest stable
snapshot,
please.

							matz.

[1-2]

about | contact  Other archives ( Real Estate discussion Medical topics )