This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [Fwd: [PATCH] PR21915, Add acosh, asinh, and atanh to intrinsics]
- From: Steve Kargl <sgk at troutmask dot apl dot washington dot edu>
- To: Roger Sayle <roger at eyesopen dot com>
- Cc: Jerry DeLisle <jvdelisle at verizon dot net>, fortran at gcc dot gnu dot org, gcc-patches at gcc dot gnu dot org
- Date: Sun, 26 Jun 2005 17:03:46 -0700
- Subject: Re: [Fwd: [PATCH] PR21915, Add acosh, asinh, and atanh to intrinsics]
- References: <42BC6E3A.6080507@verizon.net> <Pine.LNX.4.44.0506261726270.32055-100000@www.eyesopen.com>
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