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 Florian Weimer
On 03/01/2013 05:15 AM, Ulrich Drepper wrote: On Thu, Feb 21, 2013 at 12:38 PM, Benjamin De Kosnik b...@redhat.com wrote: Not seeing it. Say for: #include iostream // A class for math constants. templatetypename _RealType struct __math_constants { // Constant @f$ \pi

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-02-28 Thread Ulrich Drepper
On Thu, Feb 21, 2013 at 12:38 PM, Benjamin De Kosnik b...@redhat.com wrote: Not seeing it. Say for: #include iostream // A class for math constants. templatetypename _RealType struct __math_constants { // Constant @f$ \pi @f$. static constexpr _RealType __pie =

[PATCH] C++ math constants

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

Re: [PATCH] C++ math constants

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

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 ext/math. I used the constexpr approach (instead of function calls) and replicated the constants that are available in math.h in Unix. What other constants to add? Pi/3 ln(3) ln(10) (for base conversions)

Re: [PATCH] C++ math constants

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

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

2013-02-21 Thread 3dw4rd
On 02/21/13, Alec Teala.t...@warwick.ac.uk wrote: On 21/02/13 16:32, Ulrich Drepper wrote: How about the attached file as a start for ext/math. I used the constexpr approach (instead of function calls) and replicated the constants that are available in math.h in Unix. What other constants

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 ext/math. I used the constexpr approach (instead of function calls) and replicated the constants that are available in math.h in Unix. What other

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 ext/math. I used the constexpr approach (instead of function calls) and replicated the

Re: [PATCH] C++ math constants

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

Re: [PATCH] C++ math constants

2013-02-21 Thread Gabriel Dos Reis
On Thu, Feb 21, 2013 at 4:18 PM, Daniel Krügler daniel.krueg...@gmail.com wrote: 2013/2/21 Benjamin De Kosnik b...@redhat.com: How about the attached file as a start for ext/math. I used the constexpr approach (instead of function calls) and replicated the constants that are available in