Use of C99 extra long double math functions after r236148

Bruce Evans brde at optusnet.com.au
Tue May 28 06:14:47 UTC 2013


On Mon, 27 May 2013, David Schultz wrote:

> ...
> Below is a diff of all the changes needed to integrate it. I have
> a short list of style fixes, but otherwise I think what you have
> is good:
>  - wrap lines to 80 chars, please
>  - spaces between operators
>  - "static inline", not "inline static"
>  - don't use "inline" on large functions

Another reply.

I think I tested "inline" on the large functions (just 2) and found
it useful for efficiency.  This is like inline on large trig support
functions being useful.  The inline parts are duplicated once per
C99-API function, and often the caller only uses on C99-API function.
Actually, the large inlines are not duplicated that much.  cacosh()
and casinh() are just wrappers that call cacos() and casin(),
respectively.  There is no inlining for the last 2 (even larger)
functions.  The overhead for the wrappers is noticeable, but more
inlining didn't seem to reduce it much.

More investigation of the extent of the style bugs:
- only 1 line is longer than 80 columns now and easy to fix.  Other long
   lines are for declarations where I prefer to keep the long comments
   on the same line
- spaces between operations will expand a few lines beyond 80 columns if
   done blindly.  Only a few.

Bruce


More information about the freebsd-numerics mailing list