From owner-freebsd-bugs@FreeBSD.ORG Tue Sep 28 23:59:58 2010 Return-Path: Delivered-To: freebsd-bugs@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 7BDB8106566C for ; Tue, 28 Sep 2010 23:59:58 +0000 (UTC) (envelope-from brde@optusnet.com.au) Received: from mail01.syd.optusnet.com.au (mail01.syd.optusnet.com.au [211.29.132.182]) by mx1.freebsd.org (Postfix) with ESMTP id EF4458FC0A for ; Tue, 28 Sep 2010 23:59:57 +0000 (UTC) Received: from besplex.bde.org (c122-107-116-249.carlnfd1.nsw.optusnet.com.au [122.107.116.249]) by mail01.syd.optusnet.com.au (8.13.1/8.13.1) with ESMTP id o8SNxlAL012970 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Wed, 29 Sep 2010 09:59:49 +1000 Date: Wed, 29 Sep 2010 09:59:47 +1000 (EST) From: Bruce Evans X-X-Sender: bde@besplex.bde.org To: Mark Blackman In-Reply-To: <201009282110.o8SLA7ls078983@freefall.freebsd.org> Message-ID: <20100929094142.B1129@besplex.bde.org> References: <201009282110.o8SLA7ls078983@freefall.freebsd.org> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed Cc: freebsd-bugs@FreeBSD.org Subject: Re: kern/147599: [libm] [patch] Import netbsd complex functions into our libm X-BeenThere: freebsd-bugs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 28 Sep 2010 23:59:58 -0000 On Tue, 28 Sep 2010, Mark Blackman wrote: > The following reply was made to PR kern/147599; it has been noted by GNATS. > > From: Mark Blackman > To: bug-followup@FreeBSD.org, > db@db.net > Cc: > Subject: Re: kern/147599: [libm] [patch] Import netbsd complex functions into our libm > Date: Tue, 28 Sep 2010 21:44:11 +0100 > > I'm guessing that gcc has moved on from the issues in 2005? and wouldn't = > NetBSD have these same > issues? Maybe, but FreeBSD still use an old gcc (from 2007?), and now FreeBSD has clang which seems to be even further from supporting fenv (it does invalid optimizations in nonstandard rounding modes, and seems to have the same amount of fenv pragmas as gcc, that is, none, for turning this off). > In any case, perhaps the apple version is more likely to be suitable? > > = > http://www.opensource.apple.com/source/Libm/Libm-315/Source/Intel/complex.= > c This is much better. Its ccosh() has many similarities to the one that Steve and I wrote many years ago, but is more sophisticated. We only handled special values (Infs, NaNs and +-0) specially. The apple version also avoid overflow and loss of precision by using things like expm1(). The NetBSD version just evaluates the infinite-precision formula. Bruce