This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH 6/8] float128: Expose _Float128 finite math functions.


On Wed, 9 Nov 2016 22:05:57 +0000
Joseph Myers <joseph@codesourcery.com> 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.

For instance:

For exp10 and pow10, the float version is declared *even* when
__USE_ISOC99 is not. This means that I cannot create a macro that
*always* checks for __USE_ISOC99 to declare the float version.
Otherwise, I need to declare the float versions of exp10 and pow10
without using such macro.  I find it less clear [to declare some
functions using macros, while others without] than current code.

Another option would be to create this macro not dependent on
__USE_ISOC99, but then it defeats the purpose [of making the macros
dependent on __USE_ISOC99], which you suggested.


I would like to keep this patch as is for the next iteration of this
series...  Would you be fine with that?  Or maybe you had something
else in mind and I was not able to grasp.


Thanks,
Gabriel


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]