From owner-cvs-all@FreeBSD.ORG Thu Aug 7 15:09:33 2008 Return-Path: Delivered-To: cvs-all@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 7BEA0106564A; Thu, 7 Aug 2008 15:09:33 +0000 (UTC) (envelope-from gabor@kovesdan.org) Received: from server.mypc.hu (server.mypc.hu [87.229.73.95]) by mx1.freebsd.org (Postfix) with ESMTP id 2FD778FC0A; Thu, 7 Aug 2008 15:09:33 +0000 (UTC) (envelope-from gabor@kovesdan.org) Received: from localhost (localhost [127.0.0.1]) by server.mypc.hu (Postfix) with ESMTP id 79DC114D6A03; Thu, 7 Aug 2008 16:49:52 +0200 (CEST) X-Virus-Scanned: amavisd-new at t-hosting.hu Received: from server.mypc.hu ([127.0.0.1]) by localhost (server.mypc.hu [127.0.0.1]) (amavisd-new, port 10024) with LMTP id Fojjm2oRFBED; Thu, 7 Aug 2008 16:49:50 +0200 (CEST) Received: from [192.168.1.146] (catv-50629c59.catv.broadband.hu [80.98.156.89]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by server.mypc.hu (Postfix) with ESMTPSA id 460A414D69F8; Thu, 7 Aug 2008 16:49:50 +0200 (CEST) Message-ID: <489B0B86.5090307@kovesdan.org> Date: Thu, 07 Aug 2008 16:49:42 +0200 From: Gabor Kovesdan User-Agent: Thunderbird 2.0.0.16 (Windows/20080708) MIME-Version: 1.0 To: David Schultz References: <200808071440.m77Ee0mA057169@repoman.freebsd.org> In-Reply-To: <200808071440.m77Ee0mA057169@repoman.freebsd.org> Content-Type: text/plain; charset=ISO-8859-15; format=flowed Content-Transfer-Encoding: 8bit Cc: cvs-src@FreeBSD.org, src-committers@FreeBSD.org, cvs-all@FreeBSD.org Subject: Re: cvs commit: src/lib/msun/src s_cimag.c s_cimagf.c s_cimagl.c s_conj.c s_conjf.c s_conjl.c X-BeenThere: cvs-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: CVS commit messages for the entire tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 07 Aug 2008 15:09:33 -0000 David Schultz ha scritto: > das 2008-08-07 14:39:56 UTC > > FreeBSD src repository > > Modified files: > lib/msun/src s_cimag.c s_cimagf.c s_cimagl.c s_conj.c > s_conjf.c s_conjl.c > Log: > SVN rev 181374 on 2008-08-07 14:39:56Z by das > > Use cpack() and the gcc extension __imag__ to implement cimag() and > conj() instead of using expressions like z * I. The latter is bad for > several reasons: > > 1. It is implemented using arithmetic, which is unnecessary, and can > generate floating point exceptions, contrary to the requirements on > these functions. > > 2. gcc implements complex multiplication using a formula that breaks > down for infinities, e.g., it gives INFINITY * I == nan + inf I. > I've also checked that this part was a bit messy and incomplete and I've thought of working on this, thus I'm happy to see that you are working on improving the C99 complex.h support. My only concern is that, is it a good idea to use GCC extensions in our libc? Isn't this a significant limit of the portability? Regards, Gábor