Re: [PATCH] C++ math constants

2013-03-02 Thread Paolo Carlini
Hi, On 03/01/2013 03:54 PM, Ulrich Drepper wrote: How about this patch then? As I said, I have code in need of constants lined up and Edward likely also wants to take advantage of them in some of his code. this seems straightforward enough to go in even at this late stage. Thanks, Paolo.

Re: [PATCH] C++ math constants

2013-03-01 Thread Ulrich Drepper
How about this patch then? As I said, I have code in need of constants lined up and Edward likely also wants to take advantage of them in some of his code. Index: include/Makefile.am === --- include/Makefile.am (revision 196362) +++

Re: [PATCH] C++ math constants

2013-03-01 Thread Florian Weimer
On 03/01/2013 05:15 AM, Ulrich Drepper wrote: On Thu, Feb 21, 2013 at 12:38 PM, Benjamin De Kosnik wrote: Not seeing it. Say for: #include // A class for math constants. template struct __math_constants { // Constant @f$ \pi @f$. static constexpr _RealType __pi

Re: [PATCH] C++ math constants

2013-02-28 Thread Ulrich Drepper
On Thu, Feb 21, 2013 at 12:38 PM, Benjamin De Kosnik wrote: > Not seeing it. > > Say for: > > #include > > // A class for math constants. > template > struct __math_constants > { > // Constant @f$ \pi @f$. > static constexpr _RealType __pie = > 3.141592653589793238462643

Re: [PATCH] C++ math constants

2013-02-21 Thread Gabriel Dos Reis
On Thu, Feb 21, 2013 at 4:18 PM, Daniel Krügler wrote: > 2013/2/21 Benjamin De Kosnik : >> >>> > How about the attached file as a start for . I used the >>> > constexpr approach (instead of function calls) and replicated the >>> > constants that are available in in Unix. >> >> then this should r

Re: [PATCH] C++ math constants

2013-02-21 Thread Daniel Krügler
2013/2/21 Benjamin De Kosnik : > >> > How about the attached file as a start for . I used the >> > constexpr approach (instead of function calls) and replicated the >> > constants that are available in in Unix. > > then this should really be > > ext/cmath > >> >> 1) In this case I miss the corres

Re: [PATCH] C++ math constants

2013-02-21 Thread Jakub Jelinek
On Thu, Feb 21, 2013 at 08:06:02PM +0100, Oleg Endo wrote: > On Thu, 2013-02-21 at 17:14 +, Alec Teal wrote: > > On 21/02/13 16:32, Ulrich Drepper wrote: > > > How about the attached file as a start for . I used the > > > constexpr approach (instead of function calls) and replicated the > > >

Re: [PATCH] C++ math constants

2013-02-21 Thread Oleg Endo
On Thu, 2013-02-21 at 17:14 +, Alec Teal wrote: > On 21/02/13 16:32, Ulrich Drepper wrote: > > How about the attached file as a start for . I used the > > constexpr approach (instead of function calls) and replicated the > > constants that are available in in Unix. > > > > What other constant

Re: Re: [PATCH] C++ math constants

2013-02-21 Thread 3dw4rd
On 02/21/13, Alec Teal wrote: On 21/02/13 16:32, Ulrich Drepper wrote: > How about the attached file as a start for . I used the > constexpr approach (instead of function calls) and replicated the > constants that are available in in Unix. > > What other constants to add? Pi/3 ln(3) ln(10) (fo

Re: [PATCH] C++ math constants

2013-02-21 Thread Benjamin De Kosnik
> > How about the attached file as a start for . I used the > > constexpr approach (instead of function calls) and replicated the > > constants that are available in in Unix. then this should really be ext/cmath > > 1) In this case I miss the corresponding variable definitions, because > yo

Re: [PATCH] C++ math constants

2013-02-21 Thread Alec Teal
On 21/02/13 16:32, Ulrich Drepper wrote: How about the attached file as a start for . I used the constexpr approach (instead of function calls) and replicated the constants that are available in in Unix. What other constants to add? Pi/3 ln(3) ln(10) (for base conversions) sqrt(3) sqrt(5) sqr

Re: [PATCH] C++ math constants

2013-02-21 Thread Daniel Krügler
2013/2/21 Ulrich Drepper : > How about the attached file as a start for . I used the > constexpr approach (instead of function calls) and replicated the > constants that are available in in Unix. 1) In this case I miss the corresponding variable definitions, because you violate the ODR, when you

[PATCH] C++ math constants

2013-02-21 Thread Ulrich Drepper
How about the attached file as a start for . I used the constexpr approach (instead of function calls) and replicated the constants that are available in in Unix. What other constants to add? math Description: Binary data