[#28015] RCR: RUBY_VERSION_INT — Roger Pack <rogerdpack2@...>

Situation:

14 messages 2010/02/02

[#28113] [Bug #2723] $: length affects re-require time of already loaded files — Greg Hazel <redmine@...>

Bug #2723: $: length affects re-require time of already loaded files

16 messages 2010/02/08

[#28151] [Bug #2739] ruby 1.8.7 built with pthreads hangs under some circumstances — Joel Ebel <redmine@...>

Bug #2739: ruby 1.8.7 built with pthreads hangs under some circumstances

31 messages 2010/02/11

[#28188] [Bug #2750] build fails on win32/MinGW: "executable host ruby is required." even when --with-baseruby is used — Christian Bodt <redmine@...>

Bug #2750: build fails on win32/MinGW: "executable host ruby is required." even when --with-baseruby is used

9 messages 2010/02/16

[#28206] Is Math module a wrapper of libm? — Yusuke ENDOH <mame@...>

Hi matz --

23 messages 2010/02/18
[#28212] Re: Is Math module a wrapper of libm? — Yukihiro Matsumoto <matz@...> 2010/02/18

Hi,

[#28219] Re: Is Math module a wrapper of libm? — Yusuke ENDOH <mame@...> 2010/02/18

Hi,

[#28225] Re: Is Math module a wrapper of libm? — Marc-Andre Lafortune <ruby-core-mailing-list@...> 2010/02/18

Hi,

[#28233] Re: Is Math module a wrapper of libm? — Kenta Murata <muraken@...> 2010/02/18

Hi,

[#28265] Re: Is Math module a wrapper of libm? — Marc-Andre Lafortune <ruby-core-mailing-list@...> 2010/02/20

Hi,

[#28286] Re: Is Math module a wrapper of libm? — Kenta Murata <muraken@...> 2010/02/21

Hi

[#28291] Re: Is Math module a wrapper of libm? — Marc-Andre Lafortune <ruby-core-mailing-list@...> 2010/02/22

Hi!

[#28235] [Feature #2759] Regexp /g and /G options — Michael Fellinger <redmine@...>

Feature #2759: Regexp /g and /G options

35 messages 2010/02/18
[#28459] [Feature #2759] Regexp /g and /G options — caleb clausen <redmine@...> 2010/03/04

Issue #2759 has been updated by caleb clausen.

[#28329] [ANN] Ruby 1.9.2dev has passed RubySpec! — Yusuke ENDOH <mame@...>

Hi,

12 messages 2010/02/24

[#28355] [ANN] Toward rich diversity of Ruby development. — Urabe Shyouhei <shyouhei@...>

A short announcement: thanks to some helps of GitHub people, I now have

12 messages 2010/02/27

[#28365] Indentifying key MRI-on-Windows issues — Jon <jon.forums@...>

In an effort to begin summarizing key MRI-on-Windows open issues I'm starting this thread in hopes that those interested will respond with details on the key MRI issues they feel need resolution for Windows users.

11 messages 2010/02/27
[#28690] Re: Indentifying key MRI-on-Windows issues — Roger Pack <rogerdpack2@...> 2010/03/16

> My key concern is http://blade.nagaokaut.ac.jp/cgi-bin/scat.rb/ruby/ruby-core/24968

[ruby-core:28206] Is Math module a wrapper of libm?

From: Yusuke ENDOH <mame@...>
Date: 2010-02-18 03:17:08 UTC
List: ruby-core #28206
Hi matz --

I'd like to hear your opinion about the policy of Math module.

I have considered Math module is just a wrapper of libm.  But
current Math absorbs a part of platform-dependent behavior of
libm:

- in [ruby-core:7019] and r10626, you decided Ruby absorbed
  FreeBSD's peculiar behavior for sqrt(-1) by explicit NaN
  checking, in spite of (maybe) the FreeBSD's spec.

- in [ruby-core:26647], you also rejected consistency against
  Linux's bizarre behavior for atanh(1), in spite of the
  Linux's *bug* (even written explicitly as bug in manpage)
  http://www.kernel.org/doc/man-pages/online/pages/man3/atanh.3.html


It is good to decide the policy of Math.  Please choice:

1) Math is still just a wrapper of libm
2) Math is (aims to be) platform-independent math module
   (though it is very similar to libm's API)

If you choice #1, I think the NaN check of r10626 should be
removed because it goes against the policy.


BTW, recently I found that libm is not so portable; it has
different behavior depending on platform.  Also, libm of
glibc seems not to be stable enough yet; the above behavior
of atanh(1) was changed (fixed?) in 2009-04-26:
http://sourceware.org/cgi-bin/cvsweb.cgi/~checkout~/libc/ChangeLog?rev=1.11655.2.1&content-type=text/plain&cvsroot=glibc

So I prefer #2.  If Math is just a wrapper, users must know
and care the difference.  For example, when atanh fails, it
may return NaN or Infinity or raise Errno::EDOM or Errno::
ERANGE.  Each user must check them manually to write portable
Ruby script.  It is too cumbersome.

To aim platform-independent math module, it is first needed
to do explicit bound check to avoid the different exception
raised.  It may need human-resource, but I think it is now ok
only to decide the policy.  We can insert each check whenever
someone registers bug tickets.  And we can refer SUSv3 etc.,
so we don't have to worry what and how to check.


What do you think?

-- 
Yusuke ENDOH <mame@tsg.ne.jp>

In This Thread

Prev Next