This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
libm to-do list addition
- From: Richard Henderson <rth at twiddle dot net>
- To: libc-alpha at sourceware dot org
- Date: Thu, 09 May 2013 13:00:49 -0700
- Subject: libm to-do list addition
- References: <Pine dot LNX dot 4 dot 64 dot 1305091922380 dot 29757 at digraph dot polyomino dot org dot uk>
On 05/09/2013 12:23 PM, Joseph S. Myers wrote:
> static const long double c[] = {
> +/* 113 bits of pi/2 */
> #define PI_2_1 c[0]
> + 0x1.921fb54442d18469898cc51701b8p+0L,
Putting compile-time constants into static data variables, as is done here, is
probably self-defeating. If we use the literals directly, gcc ought to be
putting them into mergable .rodata sections. Then common constants like PI/2
can be shared between math object files.
Whether this increases the code size for symbol lookup is target-specific. But
I would hope that most targets would do well with got- or pc-relative relocations.
r~