Project

General

Profile

Actions

Bug #10642

closed

2.2: TestMath#test_gamma test failure (MinGW)

Added by luislavena (Luis Lavena) over 9 years ago. Updated about 8 years ago.

Status:
Third Party's Issue
Target version:
-
ruby -v:
ruby 2.2.0dev (2014-12-24) [i386-mingw32]
[ruby-core:67108]

Description

Hello,

Running tests against ruby_2_2 branch, mingw-w64 4.7.2, Windows 7 x64:

TestMath#test_gamma [C:/Users/Luis/Code/ruby/ruby/test/ruby/test_math.rb:237]:
Math.gamma(2147483648) should be INF.
Expected NaN to be infinite?.

Related issues 1 (0 open1 closed)

Related to Ruby master - Bug #12249: Math.gamma(-0.0) should return -InfinityClosedActions

Updated by wanabe (_ wanabe) over 9 years ago

http://sourceforge.net/p/mingw-w64/mingw-w64/ci/8a67ab4541226a80b3ec2047347890d915126de1/tree/mingw-w64-crt/math/tgamma.c#l122
tgamma() of mingw32-w64 is buggy in x > 709.782712893384 because pow(x, 0.5 * x - 0.25) / exp(x) == Inf / Inf == NaN.
It doesn't care of x > 172.

I guess the ticket should be "3rd party's issue", shouldn't it?
If you're going to insist, how about using missing/tgamma.c on mingw32-w64?

Updated by naruse (Yui NARUSE) over 9 years ago

  • Status changed from Assigned to Third Party's Issue

Updated by moritat (Tsuyoshi Morita) about 8 years ago

This issue keep failing in ruby_2_2 branch.
Please backport r49913.

Actions #4

Updated by usa (Usaku NAKAMURA) about 8 years ago

  • Related to Bug #12249: Math.gamma(-0.0) should return -Infinity added
Actions

Also available in: Atom PDF

Like0
Like0Like0Like0Like0