This is the mail archive of the
mailing list for the GCC project.
Re: [Fwd: [PATCH] PR21915, Add acosh, asinh, and atanh to intrinsics]
On Sun, Jun 26, 2005 at 06:34:16PM -0600, Roger Sayle wrote:
> On Sun, 26 Jun 2005, Steve Kargl wrote:
> > 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.
> Thanks for the explanation, though I still believe this distinction is
> particularly odd (or atleast counter intuitive), given that sqrtf that
> *is* in c99_functions.c also significantly predates C99.
libgfortran could use some clean up.
> My interpretation (as a significant contributor to c99_functions.c :)
> was that c99_functions.c was supposed to implement run-time support for
> targets that don't provide a full C99 run-time. It's not as relevent
> when these functions were first used/introduced, just that they are
> expected to all be present in recent libc/libm implementations.
I guess I should note that my description is the way I think
about c99_functions.c. I don't think it is a firm, written
in stone rule.
> > Also, note hyper.c is similar to bessel.c.
> Indeed. If the libgfortran maintainers prefer these stub implementations
> to be placed in many small source files, I can understand and abide by
> that. The libstdc++-v3 maintainers, on the other hand, prefer to keep
> their equivalent implementations in a single libstdc++-v3/libmath/stubs.c.
> I stand corrected. Sorry for the noise.
It's not noise. It's discussion. If Paul Brook, who I will defer,
wants to move things into c99_functions.c, I certainly won't object.
kargl wc -l c99_functions.c hyper.c bessel.c erf.c
A 600 line file is a reasonable size.