NetBSD Problem Report #52269
From www@NetBSD.org Fri Jun 2 19:29:43 2017
Return-Path: <www@NetBSD.org>
Received: from mail.netbsd.org (mail.netbsd.org [199.233.217.200])
(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
(Client CN "mail.netbsd.org", Issuer "Postmaster NetBSD.org" (verified OK))
by mollari.NetBSD.org (Postfix) with ESMTPS id 46C6B7A175
for <gnats-bugs@gnats.NetBSD.org>; Fri, 2 Jun 2017 19:29:43 +0000 (UTC)
Message-Id: <20170602192942.5E9D57A291@mollari.NetBSD.org>
Date: Fri, 2 Jun 2017 19:29:42 +0000 (UTC)
From: coypu@sdf.org
Reply-To: coypu@sdf.org
To: gnats-bugs@NetBSD.org
Subject: ctan(1+1000i) is incorrect
X-Send-Pr-Version: www-1.0
>Number: 52269
>Category: lib
>Synopsis: ctan(1+1000i) is incorrect
>Confidential: no
>Severity: serious
>Priority: medium
>Responsible: lib-bug-people
>State: open
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Fri Jun 02 19:30:00 +0000 2017
>Last-Modified: Mon Nov 13 19:24:27 +0000 2017
>Originator: coypu
>Release: NetBSD 7.99.75
>Organization:
>Environment:
NetBSD loggy 7.99.75 NetBSD 7.99.75 (GENERIC) #61: Fri Jun 2 10:34:58 IDT 2017 fly@loggy:/home/fly/obj/sys/arch/amd64/compile/GENERIC amd64
>Description:
#include <complex.h>
#include <math.h>
#include <stdio.h>
int main() {
printf("%f\n", ctan(1 + 1000*I));
}
$ gcc test2.c -lm
$ ./a.out
nan
expected: a number.
>How-To-Repeat:
Run R testsuite.
>Fix:
problem lies in using trigonometric functions which overflow in arg>=710.5 (some correctly)
maybe private taylor expansion is needed.
>Release-Note:
>Audit-Trail:
Responsible-Changed-From-To: lib-bug-people->maya
Responsible-Changed-By: maya@NetBSD.org
Responsible-Changed-When: Fri, 02 Jun 2017 19:30:48 +0000
Responsible-Changed-Why:
Don't want this case to be resolved by importing all of freebsd libm and blindly breaking shit.
Responsible-Changed-From-To: maya->lib-bug-people
Responsible-Changed-By: maya@NetBSD.org
Responsible-Changed-When: Mon, 13 Nov 2017 19:24:27 +0000
Responsible-Changed-Why:
>Unformatted:
(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-2014
The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.