NetBSD Problem Report #45362
From jruohone@gmail.com Tue Sep 13 04:12:46 2011
Return-Path: <jruohone@gmail.com>
Received: from mail.netbsd.org (mail.netbsd.org [204.152.190.11])
by www.NetBSD.org (Postfix) with ESMTP id 0504D63BBA9
for <gnats-bugs@gnats.netbsd.org>; Tue, 13 Sep 2011 04:12:45 +0000 (UTC)
Message-Id: <20110913041236.DB5E456C9@marx.bitnet>
Date: Tue, 13 Sep 2011 07:12:36 +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: corner case floating point bugs (qemu?)
X-Send-Pr-Version: 3.95
>Number: 45362
>Category: lib
>Synopsis: corner case floating point bugs (qemu?)
>Confidential: no
>Severity: non-critical
>Priority: medium
>Responsible: lib-bug-people
>State: open
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Tue Sep 13 04:15:00 +0000 2011
>Last-Modified: Sun Jun 09 16:55:01 +0000 2024
>Originator: Jukka Ruohonen
>Release: 5.99.55
>Organization:
-
>Environment:
>Description:
This is a new tracker bug for specific floating point bugs that may or may
not be related to Qemu.
None of these fail on "native" 5.99.55 NetBSD amd64 system, but all of these
fail on 5.99.55 i386/qemu system:
log1p(-Inf) != NaN
log1p(-1.0) != -HUGE_VAL
log1pf(-Inf) != NaN
log1pf(-1.0) != -HUGE_VALF
In addition, i386/qemu does not detect this as NaN:
const long double x = 0.0L / 0.0L;
>How-To-Repeat:
http://releng.netbsd.org/b5reports/i386/build/2011.09.12.18.07.29/test.html#failed-tcs-summary
>Fix:
NA.
>Audit-Trail:
From: Jukka Ruohonen <jruohonen@iki.fi>
To: gnats-bugs@NetBSD.org
Cc: netbsd-bugs@NetBSD.org
Subject: Re: lib/45362: corner case floating point bugs (qemu?)
Date: Tue, 13 Sep 2011 07:16:53 +0300
On Tue, Sep 13, 2011 at 04:15:01AM +0000, Jukka Ruohonen wrote:
> log1p(-Inf) != NaN
> log1p(-1.0) != -HUGE_VAL
> log1pf(-Inf) != NaN
> log1pf(-1.0) != -HUGE_VALF
Note that the order of comparison is obviously reversed above.
From: "Jukka Ruohonen" <jruoho@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc:
Subject: PR/45362 CVS commit: src/tests/lib/libm
Date: Tue, 13 Sep 2011 04:24:30 +0000
Module Name: src
Committed By: jruoho
Date: Tue Sep 13 04:24:30 UTC 2011
Modified Files:
src/tests/lib/libm: t_log.c t_scalbn.c
Log Message:
When failing, point to the tracker PR lib/45362.
To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 src/tests/lib/libm/t_log.c
cvs rdiff -u -r1.4 -r1.5 src/tests/lib/libm/t_scalbn.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
From: "Jukka Ruohonen" <jruoho@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc:
Subject: PR/45362 CVS commit: src/tests/lib/libm
Date: Wed, 14 Sep 2011 13:29:58 +0000
Module Name: src
Committed By: jruoho
Date: Wed Sep 14 13:29:58 UTC 2011
Modified Files:
src/tests/lib/libm: t_cos.c t_sin.c t_tan.c
Log Message:
Additions to PR lib/45362: the float variants cosf(3), sinf(3), and tanf(3)
do not detect NaN for positive and negative infinity on i386 (qemu).
To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 src/tests/lib/libm/t_cos.c \
src/tests/lib/libm/t_sin.c src/tests/lib/libm/t_tan.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
From: "Taylor R Campbell" <riastradh@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc:
Subject: PR/45362 CVS commit: src/tests/lib/libm
Date: Sun, 9 Jun 2024 16:53:12 +0000
Module Name: src
Committed By: riastradh
Date: Sun Jun 9 16:53:12 UTC 2024
Modified Files:
src/tests/lib/libm: t_cos.c t_log.c t_scalbn.c t_sin.c t_tan.c
Log Message:
tests/lib/libm: Fix various xfails related to PR lib/45362.
Writing
if (condition) {
atf_tc_expect_fail(...);
atf_tc_fail(...);
}
in order to paper over a bug in qemu renders the test nearly useless
because it will never actually fail in the event that something
unexpected is broken.
atf_tc_expect_fail only makes senes _before_ doing the test. If we
want to paper over a bug in qemu, we can do:
if (isQEMU)
atf_tc_expect_fail("qemu is broken, PR lib/...");
ATF_CHECK(condition);
That way, we are still doing the test in non-qemu circumstances, and
if the qemu bug is fixed the test will give the feedback of an
unexpected pass.
While here: Use `volatile double x = ...' as input so the compiler
doesn't optimize calls like sin(x) away at build-time, and print the
bad values with ATF_CHECK_MSG on failure in case anything goes wrong.
To generate a diff of this commit:
cvs rdiff -u -r1.11 -r1.12 src/tests/lib/libm/t_cos.c
cvs rdiff -u -r1.14 -r1.15 src/tests/lib/libm/t_log.c
cvs rdiff -u -r1.17 -r1.18 src/tests/lib/libm/t_scalbn.c
cvs rdiff -u -r1.7 -r1.8 src/tests/lib/libm/t_sin.c \
src/tests/lib/libm/t_tan.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
(Contact us)
$NetBSD: query-full-pr,v 1.47 2022/09/11 19:34:41 kim Exp $
$NetBSD: gnats_config.sh,v 1.9 2014/08/02 14:16:04 spz Exp $
Copyright © 1994-2024
The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.