Hi wolfi323,
OK I made a mistake, because I was tired.
/usr/include/math.h
wasn’t the only cryptic code.
/usr/include/bits/mathcalls.h
added to this.
The motivation behind the code in mathcalls.h is quite obvious:
Try to avoid similar declarations for exp2(), exp2l(), exp2f, … etc., but do it once and for all.
However, my point remains, that this might not be helpful, if the resulting code gets too sophisticated.
I wrote header files myself, because I had to, in order to produce maintainable code.
As a C programmer, foreign header files for me usually are a source to see what’s in stock,
and what isn’t.
In the given case we finally may be talking about the difference between the repeated (and thus boring?) declarations of
double exp2(double);
long double exp2l(long double);
float exp2f(float);
etc.
which is simple,
compared to code in math.h like
#define _Mdouble_ double
#define __MATH_PRECNAME(name,r) __CONCAT(name,r)
#define _Mdouble_BEGIN_NAMESPACE __BEGIN_NAMESPACE_STD
#define _Mdouble_END_NAMESPACE __END_NAMESPACE_STD
#include <bits/mathcalls.h>
#undef _Mdouble_
#undef _Mdouble_BEGIN_NAMESPACE
#undef _Mdouble_END_NAMESPACE
#undef __MATH_PRECNAME
...
# ifndef _Mfloat_
# define _Mfloat_ float
# endif
# define _Mdouble_ _Mfloat_
# define __MATH_PRECNAME(name,r) name##f##r
# define _Mdouble_BEGIN_NAMESPACE __BEGIN_NAMESPACE_C99
# define _Mdouble_END_NAMESPACE __END_NAMESPACE_C99
# include <bits/mathcalls.h>
# undef _Mdouble_
# undef _Mdouble_BEGIN_NAMESPACE
# undef _Mdouble_END_NAMESPACEwolfi323,
# undef __MATH_PRECNAME
...
# ifndef _Mlong_double_
# define _Mlong_double_ long double
# endif
# define _Mdouble_ _Mlong_double_
# define __MATH_PRECNAME(name,r) name##l##r
# define _Mdouble_BEGIN_NAMESPACE __BEGIN_NAMESPACE_C99
# define _Mdouble_END_NAMESPACE __END_NAMESPACE_C99
# define __MATH_DECLARE_LDOUBLE 1
# include <bits/mathcalls.h>
# undef _Mdouble_
# undef _Mdouble_BEGIN_NAMESPACE
# undef _Mdouble_END_NAMESPACE
# undef __MATH_PRECNAME
...
etc. etc.
Yes, OK, a float, a double, and a long double, etc., may be something different on different machines,
and provisions have to be made for that in a header file for math functions.
And further, there may be inline code to be defined as a macro to speed up things.
But there really is no use in making code that complicated.
In order to make a really crude comparison:
just compare the lines of code required for each of the two versions - i.e. the ‘numb’ explicit declaration of functions
using types ‘double’, ‘float’, ‘long double’ etc., vs. macro definitions as in the 2nd example above !
wolfi323,
you’re friendly, and I acknowledge that.
But as a C programmer, at the end of the day, I would still like to be able to understand the header files (as well as the code) that I make use of.
Therefore:
No, that’s not my stance, and it shouldn’t be yours either 
Another aspect of this: on the basis of beleiving the documentation, how could you ever be able to find serious bugs in the tools that you use,
or to judge whether some source code may implement some worm or virus (I mean the source code basis, not binary executables).
Look, coding an elastic-plastic Finite Element program using MPW under MacOS8 on PowerPC processors, I had the impression
(or made the experience) that the PowerPC processors (up to G3 at least) obviously produced wrong results - at least occasionally -
whenever fused multiply-add was used, because the convergence of the algorithm then broke down by an order of magnitude.
Even believe in correct calculations of your main processor ?
As much as in foreign code, like header files ?
I didn’t work with gcc yet.
So I still miss the routine experience that things (usually) work fine.
Perhaps that’s my current fault.
Still I prefer to understand what I do - or better what code I make use of.
Best wishes
Mike