Issue #6784 has been reported by h.shirosaki (Hiroshi Shirosaki).

----------------------------------------
Bug #6784: Test failures related to numeric with x64 mingw
https://bugs.ruby-lang.org/issues/6784

Author: h.shirosaki (Hiroshi Shirosaki)
Status: Open
Priority: Normal
Assignee: luislavena (Luis Lavena)
Category: 
Target version: 
ruby -v: ruby 2.0.0dev (2012-07-23 trunk 36499) [x64-mingw32]


x64 mingw build has many floating point numeric related failures in test-all.

http://ci.rubyinstaller.org/job/test-ruby-trunk-x64/24/console

  2) Failure:
test_plus(TestBignum) [C:/Users/Worker/Jenkins/workspace/git-ruby-trunk/test/ruby/test_bignum.rb:244]:
<2535301200456458802993406410752> expected but was
<2.535301200456461e+30>.

  3) Failure:
test_sub(TestBignum) [C:/Users/Worker/Jenkins/workspace/git-ruby-trunk/test/ruby/test_bignum.rb:232]:
<0> expected but was
<-2.251799813685248e+15>.

  6) Failure:
test_divide(TestFixnum) [C:/Users/Worker/Jenkins/workspace/git-ruby-trunk/test/ruby/test_fixnum.rb:156]:
<2.328306436538698e-10> expected but was
<(1/4294967296)>.

  7) Failure:
test_pow2(TestFixnum) [C:/Users/Worker/Jenkins/workspace/git-ruby-trunk/test/ruby/test_fixnum.rb:184]:
<1.5258789062500007e-05> expected but was
<(1/65536)>.

  8) Failure:
test_divmod2(TestFloat) [C:/Users/Worker/Jenkins/workspace/git-ruby-trunk/test/ruby/test_float.rb:269]:
<4294967296> expected but was
<4294967295>.

  9) Failure:
test_round_with_precision(TestFloat) [C:/Users/Worker/Jenkins/workspace/git-ruby-trunk/test/ruby/test_float.rb:382]:
<1.1> expected but was
<1.0999999999999999>.



This seems cause of broken pow() implementation of x64 mingw.
Using powl() instead of pow() will fix this. I attached the patch.

I tested it with gcc version 4.6.1 (tdm64-1) on Win7.


-- 
http://bugs.ruby-lang.org/