From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 30746 invoked by alias); 3 Mar 2017 20:50:33 -0000 Mailing-List: contact libc-alpha-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: libc-alpha-owner@sourceware.org Received: (qmail 30720 invoked by uid 89); 3 Mar 2017 20:50:32 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.9 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_NONE,SPF_PASS,URIBL_RED autolearn=ham version=3.3.2 spammy=gomes X-HELO: relay1.mentorg.com Date: Fri, 03 Mar 2017 20:50:00 -0000 From: Joseph Myers To: "Gabriel F. T. Gomes" CC: Subject: Re: [PATCH 6/8] float128: Expose _Float128 finite math functions. In-Reply-To: <20170303171700.48699970@keller> Message-ID: References: <1478716859-3246-1-git-send-email-gftg@linux.vnet.ibm.com> <1478716859-3246-7-git-send-email-gftg@linux.vnet.ibm.com> <20170303171700.48699970@keller> User-Agent: Alpine 2.20 (DEB 67 2015-01-07) MIME-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" X-ClientProxiedBy: svr-ies-mbx-01.mgc.mentorg.com (139.181.222.1) To svr-ies-mbx-01.mgc.mentorg.com (139.181.222.1) X-SW-Source: 2017-03/txt/msg00055.txt.bz2 On Fri, 3 Mar 2017, Gabriel F. T. Gomes wrote: > On Wed, 9 Nov 2016 22:05:57 +0000 > Joseph Myers wrote: > > > Rather than a load of repetitive boilerplate, the function declarations > > here should be macroized, with only the definition of the macros depending > > on __USE_ISOC99, __MATH_DECLARE_LDOUBLE, __NO_LONG_DOUBLE_MATH and > > float128 presence etc. (for most functions, maybe obsolete and lgamma ones > > are more complicated). > > > > My attempts to macroize the function declarations were a bit > frustrating. While some of the declarations follow a nice pattern > (always declare for double; always declare for float when __USE_ISOC99; > declare for long double based on __USE_ISOC99, __MATH_DECLARE_LDOUBLE, > and __NO_LONG_DOUBLE_MATH), when that is not the case, the declarations > are somewhat less clear and trickier to read, imo. In subsequent discussions I suggested the right approach was like bits/mathcalls.h: make bits/math-finite.h into a header included once for each type, with different macros defined. The inclusions for float and long double would be conditional on __USE_ISOC99 (and the inclusions for _Float128 would be conditional on the same conditions under which bits/mathcalls.h is included for _Float128). An alternative would be merging bits/math-finite.h into bits/mathcalls.h as I suggested in , but I think that would be more complicated to implement. > For exp10 and pow10, the float version is declared *even* when > __USE_ISOC99 is not. This means that I cannot create a macro that That's because __USE_GNU implies __USE_ISOC99. That also means that there is no change in semantics from making the inclusion for float conditional on __USE_ISOC99, as those float versions will still be declared exactly for __USE_GNU. -- Joseph S. Myers joseph@codesourcery.com