This is the mail archive of the
libc-alpha@sources.redhat.com
mailing list for the glibc project.
Re: Implementation of <tgmath.h>
- To: "Joseph S. Myers" <jsm28 at cam dot ac dot uk>
- Subject: Re: Implementation of <tgmath.h>
- From: Ulrich Drepper <drepper at redhat dot com>
- Date: 01 Aug 2000 15:50:40 -0700
- Cc: Joern Rennecke <amylaar at cygnus dot co dot uk>, Geoff Keating <geoffk at cygnus dot com>, libc-alpha at sourceware dot cygnus dot com
- References: <Pine.SOL.4.21.0007290250270.23479-100000@red.csi.cam.ac.uk>
- Reply-To: drepper at cygnus dot com (Ulrich Drepper)
This leaves the path of sanity but so be it. I've taken Joseph's
proposal, added yet more gcc magic and have now in the CVS archive a
version of <tgmath.h> which should be standard compliant (as long as
gcc does not learn about _Imaginary). The code is not comprehensible
anymore without really understanding the language and gcc but it seems
to work. Using this
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#include <tgmath.h>
#ifndef E
#define E 1
#endif
int
main ()
{
return cos (cos (cos (E))) != 0;
}
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
I compile run
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
drepper@myware $ gcc -c co.c -O -g && nm co.o
U cos
00000000 T main
drepper@myware $ gcc -c co.c -O -g -DE=1.0 && nm co.o
U cos
00000000 T main
drepper@myware $ gcc -c co.c -O -g -DE=1.0f && nm co.o
U cosf
00000000 T main
drepper@myware $ gcc -c co.c -O -g -DE=1.0L && nm co.o
U cosl
00000000 T main
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Thanks, Joseph.
--
---------------. ,-. 1325 Chesapeake Terrace
Ulrich Drepper \ ,-------------------' \ Sunnyvale, CA 94089 USA
Red Hat `--' drepper at redhat.com `------------------------