NetBSD Problem Report #46301

From jruohone@gmail.com  Fri Apr  6 08:03:13 2012
Return-Path: <jruohone@gmail.com>
Received: from mail.netbsd.org (mail.netbsd.org [149.20.53.66])
	by www.NetBSD.org (Postfix) with ESMTP id 0AFDD63B946
	for <gnats-bugs@gnats.netbsd.org>; Fri,  6 Apr 2012 08:03:13 +0000 (UTC)
Message-Id: <20120406080319.0029F56BD@marx.bitnet>
Date: Fri,  6 Apr 2012 11:03:18 +0300 (EEST)
From: Jukka Ruohonen <jruohonen@iki.fi>
Sender: a b <jruohone@gmail.com>
Reply-To: jruohonen@iki.fi
To: gnats-bugs@gnats.NetBSD.org
Subject: log(3) bugs with positive infinity
X-Send-Pr-Version: 3.95

>Number:         46301
>Category:       port-alpha
>Synopsis:       log(3) bugs with positive infinity
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    port-alpha-maintainer
>State:          closed
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Fri Apr 06 08:05:00 +0000 2012
>Closed-Date:    Mon Feb 09 19:36:42 +0000 2015
>Last-Modified:  Mon Feb 09 19:36:42 +0000 2015
>Originator:     Jukka Ruohonen
>Release:        NetBSD 6.0_BETA
>Organization:
-
>Environment:
>Description:

If a value is +Inf, log10f(3), log1pf(3), log2f(3), and logf(3) should
return +Inf. But this is not the case with Alpha.

>How-To-Repeat:

http://www.netbsd.org/~njoly/alpha-atf/55_atf.html#failed-tcs-summary

>Fix:

Not known.

>Release-Note:

>Audit-Trail:
From: "Jukka Ruohonen" <jruoho@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc: 
Subject: PR/46301 CVS commit: src/tests/lib/libm
Date: Fri, 6 Apr 2012 08:07:32 +0000

 Module Name:	src
 Committed By:	jruoho
 Date:		Fri Apr  6 08:07:32 UTC 2012

 Modified Files:
 	src/tests/lib/libm: t_log.c

 Log Message:
 Point to PR port-alpha/46301 when failing on Alpha.


 To generate a diff of this commit:
 cvs rdiff -u -r1.6 -r1.7 src/tests/lib/libm/t_log.c

 Please note that diffs are not public domain; they are subject to the
 copyright notices on the relevant files.

From: Nicolas Joly <njoly@pasteur.fr>
To: gnats-bugs@NetBSD.org
Cc: port-alpha-maintainer@netbsd.org, gnats-admin@netbsd.org,
	netbsd-bugs@netbsd.org
Subject: Re: port-alpha/46301: log(3) bugs with positive infinity
Date: Sun, 8 Apr 2012 11:27:19 +0200

 On Fri, Apr 06, 2012 at 08:05:01AM +0000, Jukka Ruohonen wrote:
 > >Number:         46301
 > >Category:       port-alpha
 > >Synopsis:       log(3) bugs with positive infinity
 > >Confidential:   no
 > >Severity:       non-critical
 > >Priority:       low
 > >Responsible:    port-alpha-maintainer
 > >State:          open
 > >Class:          sw-bug
 > >Submitter-Id:   net
 > >Arrival-Date:   Fri Apr 06 08:05:00 +0000 2012
 > >Originator:     Jukka Ruohonen
 > >Release:        NetBSD 6.0_BETA
 > >Organization:
 > -
 > >Environment:
 > >Description:
 > 
 > If a value is +Inf, log10f(3), log1pf(3), log2f(3), and logf(3) should
 > return +Inf. But this is not the case with Alpha.

 Looks like a compiler issue. The testcases fail when compiled with -O2
 and succeed without.

 I can reproduce the very same behaviour with the following sample code
 outside ATF. Both values seems correct, that's the comparison which
 fails.

 njoly@thanos [tmp/logf]> cat sample.c
 #include <assert.h>
 #include <math.h>

 int main() {
   const float f = 1.0L / 0.0L;
   assert(isinf(f) != 0);
   assert(isinf(logf(f)) != 0);
   assert(logf(f) == f);
   return 0; }

 njoly@thanos [tmp/logf]> cc -mieee -O2 -o sample sample.c -lm
 njoly@thanos [tmp/logf]> ./sample; echo $?
 assertion "logf(f) == f" failed: file "sample.c", line 8, function "main"
 zsh: abort (core dumped)  ./sample
 134

 njoly@thanos [tmp/logf]> cc -mieee -o sample sample.c -lm
 njoly@thanos [tmp/logf]> ./sample; echo $?
 0

 -- 
 Nicolas Joly

 Projects and Developments in Bioinformatics
 Institut Pasteur, Paris.

State-Changed-From-To: open->closed
State-Changed-By: martin@NetBSD.org
State-Changed-When: Mon, 09 Feb 2015 19:36:42 +0000
State-Changed-Why:
Fixed with the gcc version now in -current and -7


>Unformatted:

NetBSD Home
NetBSD PR Database Search

(Contact us) $NetBSD: query-full-pr,v 1.39 2013/11/01 18:47:49 spz Exp $
$NetBSD: gnats_config.sh,v 1.8 2006/05/07 09:23:38 tsutsui Exp $
Copyright © 1994-2007 The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.