This is the mail archive of the
mailing list for the glibc project.
Re: [PATCHv2 06/14] Replace M_PI2l with pi_2_d in libm-test.inc
- From: Joseph Myers <joseph at codesourcery dot com>
- To: "Paul E. Murphy" <murphyp at linux dot vnet dot ibm dot com>
- Cc: <libc-alpha at sourceware dot org>
- Date: Mon, 23 May 2016 16:56:53 +0000
- Subject: Re: [PATCHv2 06/14] Replace M_PI2l with pi_2_d in libm-test.inc
- Authentication-results: sourceware.org; auth=none
- References: <cover dot 1463779745 dot git dot murphyp at linux dot vnet dot ibm dot com> <82462d6a31a07e67c8142a7b5b506c8e0c508a62 dot 1463779745 dot git dot murphyp at linux dot vnet dot ibm dot com>
On Fri, 20 May 2016, Paul E. Murphy wrote:
> This is useful in situations where the long double type is
> less precise than the type under test.
> * libm-test.inc: Replace usage of M_PI2l with
> [pi_2_d]: New macro.
I'm not convinced that adding several extra local constants is the right
For the API for float128 to be feature-complete compared to long double,
it should include constants such as M_PI_2f128 for all the long double
constants in <math.h>. Which means that there is always a constant from
<math.h> that can be used in these cases; you don't need yet another copy
of the digits of this constant. You might, for example, have a macro MCST
defined for each type and use MCST (PI_2) here (which would expand to
M_PI_2 for float and double - there aren't float versions of these
<math.h> constants - M_PI_2l for long double, M_PI_2f128 for float128).
Joseph S. Myers