public inbox for glibc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug math/15901] New: Bessel functions y0, y1, yn are incorrect on non-positive values
@ 2013-08-27 16:25 vincent-srcware at vinc17 dot net
  2013-12-04 14:40 ` [Bug math/15901] " cvs-commit at gcc dot gnu.org
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: vincent-srcware at vinc17 dot net @ 2013-08-27 16:25 UTC (permalink / raw)
  To: glibc-bugs

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain; charset="UTF-8", Size: 4741 bytes --]

http://sourceware.org/bugzilla/show_bug.cgi?id=15901

            Bug ID: 15901
           Summary: Bessel functions y0, y1, yn are incorrect on
                    non-positive values
           Product: glibc
           Version: 2.17
            Status: NEW
          Severity: normal
          Priority: P2
         Component: math
          Assignee: unassigned at sourceware dot org
          Reporter: vincent-srcware at vinc17 dot net

yn(n,±0.0) on odd negative integer n gives -Inf, while the limit is +Inf. This
incorrect result probably comes from a defect in POSIX[*] and should be
changed.

[*] http://austingroupbugs.net/view.php?id=714

yn(n,x) on negative values x gives -Inf instead of NaN. Though the value -Inf
is currently allowed by POSIX, NaN is a much better result (and the only
expected one according to general rules on undefined math functions), just like
log(negative) or sqrt(negative) is NaN.

I've posted a message about such values in the Austin Group list:

  http://permalink.gmane.org/gmane.comp.standards.posix.austin.general/7982

and replies would appear here:

  http://comments.gmane.org/gmane.comp.standards.posix.austin.general/7982

-- 
You are receiving this mail because:
You are on the CC list for the bug.
>From glibc-bugs-return-19420-listarch-glibc-bugs=sources.redhat.com@sourceware.org Tue Aug 27 19:49:34 2013
Return-Path: <glibc-bugs-return-19420-listarch-glibc-bugs=sources.redhat.com@sourceware.org>
Delivered-To: listarch-glibc-bugs@sources.redhat.com
Received: (qmail 25092 invoked by alias); 27 Aug 2013 19:49:34 -0000
Mailing-List: contact glibc-bugs-help@sourceware.org; run by ezmlm
Precedence: bulk
List-Id: <glibc-bugs.sourceware.org>
List-Subscribe: <mailto:glibc-bugs-subscribe@sourceware.org>
List-Post: <mailto:glibc-bugs@sourceware.org>
List-Help: <mailto:glibc-bugs-help@sourceware.org>, <http://sourceware.org/lists.html#faqs>
Sender: glibc-bugs-owner@sourceware.org
Delivered-To: mailing list glibc-bugs@sourceware.org
Received: (qmail 25060 invoked by uid 48); 27 Aug 2013 19:49:30 -0000
From: "berardgui at gmail dot com" <sourceware-bugzilla@sourceware.org>
To: glibc-bugs@sourceware.org
Subject: [Bug dynamic-link/15903] New: INITFIRST flag does not change fini order
Date: Tue, 27 Aug 2013 19:49:00 -0000
X-Bugzilla-Reason: CC
X-Bugzilla-Type: new
X-Bugzilla-Watch-Reason: None
X-Bugzilla-Product: glibc
X-Bugzilla-Component: dynamic-link
X-Bugzilla-Version: unspecified
X-Bugzilla-Keywords:
X-Bugzilla-Severity: normal
X-Bugzilla-Who: berardgui at gmail dot com
X-Bugzilla-Status: NEW
X-Bugzilla-Priority: P2
X-Bugzilla-Assigned-To: unassigned at sourceware dot org
X-Bugzilla-Target-Milestone: ---
X-Bugzilla-Flags:
X-Bugzilla-Changed-Fields: bug_id short_desc product version bug_status bug_severity priority component assigned_to reporter attachments.created
Message-ID: <bug-15903-131@http.sourceware.org/bugzilla/>
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: 7bit
X-Bugzilla-URL: http://sourceware.org/bugzilla/
Auto-Submitted: auto-generated
MIME-Version: 1.0
X-SW-Source: 2013-08/txt/msg00165.txt.bz2
Content-length: 1496

https://sourceware.org/bugzilla/show_bug.cgi?id\x15903

            Bug ID: 15903
           Summary: INITFIRST flag does not change fini order
           Product: glibc
           Version: unspecified
            Status: NEW
          Severity: normal
          Priority: P2
         Component: dynamic-link
          Assignee: unassigned at sourceware dot org
          Reporter: berardgui at gmail dot com

Created attachment 7169
  --> https://sourceware.org/bugzilla/attachment.cgi?idq69&actioníit
git diff of an idea of a fix

It looks like the INITFIRST flag is read by ld.so only for the init order and
not during sorting the fini order.
For instance, if I build a first library (lib1) with -z initfirst and a second
one without, link an executable with these two libraries, and finally run it
with LD_DEBUG, I have:
     26457:    calling init: ../lib1/lib1.so
     26457:    calling init: /lib64/ld-linux-x86-64.so.2
     26457:    calling init: /lib64/libc.so.6
     26457:    calling init: ../lib2/lib2.so
     26457:    calling fini: ./test [0]
     26457:    calling fini: ../lib1/lib1.so [0]
     26457:    calling fini: ../lib2/lib2.so [0]

According to https://sourceware.org/binutils/docs/ld/Options.html the fini
order should be the reverse order of the init order...

Having a closer look to elf/dl-fini.c it seems that there is no check of the
initfirst flag.

Find attached an idea of a fix.

--
You are receiving this mail because:
You are on the CC list for the bug.


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2014-06-13  9:43 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-08-27 16:25 [Bug math/15901] New: Bessel functions y0, y1, yn are incorrect on non-positive values vincent-srcware at vinc17 dot net
2013-12-04 14:40 ` [Bug math/15901] " cvs-commit at gcc dot gnu.org
2013-12-04 14:42 ` jsm28 at gcc dot gnu.org
2014-06-13  9:43 ` fweimer at redhat dot com

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).