[Fwd: [PATCH] PR21915, Add acosh, asinh, and atanh to intrinsics]

Steve Kargl sgk@troutmask.apl.washington.edu
Mon Jun 27 00:03:00 GMT 2005


On Sun, Jun 26, 2005 at 05:45:53PM -0600, Roger Sayle wrote:
> 
> Secondly, it's a strange decision to place these three replacement
> functions (acoshf, asinhf and atanhf) in their own new source file,
> intrinsics/hyper.c, and then update Makefile.am and Makefile.in to
> build it.  Instead it would have made more sense to add these to
> the existing instrinsics/c99_functions.c which already serves exactly
> this purpose and contains near identical functions for many of the
> C99-required libm transcendental and trigonometric functions.  Indeed,
> the prototypes for these three float variants were added by your patch
> to the existing c99_protos.h file.
> 

Actually, Jerry asked about putting these functions into
c99_functions.c.  I asked him to leave them in hyper.c
because c99_functions.c is intended for implementing C99
functions that aren't present in libm (or libc).  For example,
atanh[f], asinh[f], and acosh[f] pre-dates C99 by several years.
OTOH, the long double versions [for example atanhl()] first
appeared in C99 and many OS's may not have a atanhl() (for
example FreeBSD).  An implementation f atanhl() should be placed
in c99_functions.c.

Also, note hyper.c is similar to bessel.c.

-- 
Steve



More information about the Gcc-patches mailing list