[#75225] [Ruby trunk Feature#12324] Support OpenSSL 1.1.0 (and drop support for 0.9.6/0.9.7) — k@...
Issue #12324 has been reported by Kazuki Yamaguchi.
6 messages
2016/04/27
[#78693] Re: [Ruby trunk Feature#12324] Support OpenSSL 1.1.0 (and drop support for 0.9.6/0.9.7)
— Eric Wong <normalperson@...>
2016/12/17
k@rhe.jp wrote:
[#78701] Re: [Ruby trunk Feature#12324] Support OpenSSL 1.1.0 (and drop support for 0.9.6/0.9.7)
— Kazuki Yamaguchi <k@...>
2016/12/17
On Sat, Dec 17, 2016 at 01:31:12AM +0000, Eric Wong wrote:
[#78702] Re: [Ruby trunk Feature#12324] Support OpenSSL 1.1.0 (and drop support for 0.9.6/0.9.7)
— Eric Wong <normalperson@...>
2016/12/17
Kazuki Yamaguchi <k@rhe.jp> wrote:
[ruby-core:74823] [Ruby trunk Bug#12249] Math.gamma(-0.0) should return -Infinity
From:
cremno@...
Date:
2016-04-05 20:46:39 UTC
List:
ruby-core #74823
Issue #12249 has been updated by cremno phobia.
Regarding `Math.lgamma(-0.0)` (r54494,r54495):
It's actually caused by the `lgamma_r()` fallback implementation. A non-invasive fix (I don't think adding `if(x==0)` would be worthwhile):
~~~diff
diff --git a/missing/lgamma_r.c b/missing/lgamma_r.c
index 6d2f38f..01066d2 100644
--- a/missing/lgamma_r.c
+++ b/missing/lgamma_r.c
@@ -66,7 +66,7 @@ lgamma_r(double x, int *signp)
double i, f, s;
f = modf(-x, &i);
if (f == 0.0) { /* pole error */
- *signp = 1;
+ *signp = signbit(x) ? -1 : 1;
errno = ERANGE;
return HUGE_VAL;
}
~~~
----------------------------------------
Bug #12249: Math.gamma(-0.0) should return -Infinity
https://bugs.ruby-lang.org/issues/12249#change-57949
* Author: Benoit Daloze
* Status: Closed
* Priority: Normal
* Assignee:
* ruby -v: ruby 2.2.4p230 (2015-12-16 revision 53155) [i386-mingw32]
* Backport: 2.1: REQUIRED, 2.2: REQUIRED, 2.3: REQUIRED
----------------------------------------
On Windows, Math.gamma(-0.0) returns +Infinity instead of -Infinity,
which is the correct result according to tgamma(3) and the behavior on other platforms.
Is this OK to fix in Ruby?
There is already a similar fix for #10642.
--
https://bugs.ruby-lang.org/
Unsubscribe: <mailto:ruby-core-request@ruby-lang.org?subject=unsubscribe>
<http://lists.ruby-lang.org/cgi-bin/mailman/options/ruby-core>