220 31428 <097e0a3f-275d-45e7-babb-d3f80e1fa83d@isocpp.org> article
Path: news.gmane.org!.POSTED!not-for-mail
From: lev@compuserve.com
Newsgroups: gmane.comp.lang.c++.isocpp.proposals
Subject: Re: Re: Math constants
Date: Sat, 4 Mar 2017 13:40:13 -0800 (PST)
Lines: 118
Approved: news@gmane.org
Message-ID: <097e0a3f-275d-45e7-babb-d3f80e1fa83d@isocpp.org>
References: <ad05f2f2-609d-4fd3-90f7-d66c74e168b7@isocpp.org>
 <8aec2d3e-60e3-4dbf-890d-3450a32ca6d3@isocpp.org> <7327f25a-3d77-4d97-808e-678b3458ee52@isocpp.org>
 <CAGNvRgC0OAaFxsdgJHWJ34A8a4cc=LEdU05kigWjtOmEOg3_ZQ@mail.gmail.com>
Reply-To: std-proposals@isocpp.org
NNTP-Posting-Host: blaine.gmane.org
Mime-Version: 1.0
Content-Type: multipart/mixed; 
	boundary="----=_Part_672_1959060678.1488663613107"
X-Trace: blaine.gmane.org 1488663616 30154 195.159.176.226 (4 Mar 2017 21:40:16 GMT)
X-Complaints-To: usenet@blaine.gmane.org
NNTP-Posting-Date: Sat, 4 Mar 2017 21:40:16 +0000 (UTC)
To: ISO C++ Standard - Future Proposals <std-proposals@isocpp.org>
Original-X-From: std-proposals+bncBCL6TUMOQUJRBPPI5TCQKGQENINRJPQ@isocpp.org Sat Mar 04 22:40:10 2017
Return-path: <std-proposals+bncBCL6TUMOQUJRBPPI5TCQKGQENINRJPQ@isocpp.org>
Envelope-to: gclcip-std-proposals@m.gmane.org
Original-Received: from mail-yw0-f199.google.com ([209.85.161.199])
	by blaine.gmane.org with esmtp (Exim 4.84_2)
	(envelope-from <std-proposals+bncBCL6TUMOQUJRBPPI5TCQKGQENINRJPQ@isocpp.org>)
	id 1ckHPM-0007BU-Th
	for gclcip-std-proposals@m.gmane.org; Sat, 04 Mar 2017 22:40:09 +0100
Original-Received: by mail-yw0-f199.google.com with SMTP id v76sf2501458ywg.4
        for <gclcip-std-proposals@m.gmane.org>; Sat, 04 Mar 2017 13:40:15 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=isocpp-org.20150623.gappssmtp.com; s=20150623;
        h=date:from:to:message-id:in-reply-to:references:subject:mime-version
         :x-original-sender:reply-to:precedence:mailing-list:list-id
         :x-spam-checked-in-group:list-post:list-help:list-archive
         :list-subscribe:list-unsubscribe;
        bh=RKtqYtK8Z+wVyopUF7+Ja42dFR0FUS3zH7hsAStIpRg=;
        b=1eWDSFs+OlL5RHSxLthB71HOgNnVcOMFUxkDtmCCd4P8E2zXbi3pJciuRUoSDLzUvO
         /iLKaclPRI3DgZ2HKnPdkuW+8bkootwuxk4l1lQOoJeIwDADmynsCuajf/iLYpQIo6uS
         BhWLRe5nWiFPa0greDKJc+2NRm0Q3tRmdKo7ZTC80T06ecOZUs6wjhb9X5beSrbiYyc0
         bltTP1T9wLWH/ceKMAVe+5kTNgrmQSzNJ0QDWu81p/nzUfJ3kNRimXkQTIidntV5uEbH
         vo3eHTx5uEL316MDJG5FZnU93q4T37W18oRFtd2BwC42fx3+szxtxGRMJSpuaR9vMSY7
         52+w==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=1e100.net; s=20161025;
        h=x-gm-message-state:date:from:to:message-id:in-reply-to:references
         :subject:mime-version:x-original-sender:reply-to:precedence
         :mailing-list:list-id:x-spam-checked-in-group:list-post:list-help
         :list-archive:list-subscribe:list-unsubscribe;
        bh=RKtqYtK8Z+wVyopUF7+Ja42dFR0FUS3zH7hsAStIpRg=;
        b=ixwbP9WZjolzcC4qjlGBx1VhEhj+rp6YeZDqBXYOPj9yrDRHG3Zcr4F7jTV75gC+xe
         taXQzraC6/nJGE5eVgI5fRl2qGlS9baELG8n9QDg6EfDzb5CbnJSQytW0ixEo6fLrG63
         vVaVta9AsMB4ZogmZvKTfn+gQeuvf9b5xMjnA3Ls67McSxI3TLRnrcqdVt+2UNRFrjMu
         X69YF1DZPn64+OTl1oQkCQyTSeJPjCpLjrm/TPSFObCT9Iq0EbVQ/mtRj7FEwB4vvbso
         sm3o7WxeAmCjL5LOyvjtnULMYnvDQeDJpM8CztVtEFzxBMaI51DaTtR9p8CY4s3Augvt
         z4SA==
X-Gm-Message-State: AMke39kHQa8pLdbU/dHZxVx2Khlf6ms2cAAaLKhEXl6xVTrci4C8qmBqq3fzEhAbOdGseQ==
X-Received: by 10.129.105.130 with SMTP id e124mr4216993ywc.2.1488663614689;
        Sat, 04 Mar 2017 13:40:14 -0800 (PST)
X-BeenThere: std-proposals@isocpp.org
Original-Received: by 10.157.7.18 with SMTP id 18ls1141665ote.1.gmail; Sat, 04 Mar 2017
 13:40:13 -0800 (PST)
X-Received: by 10.157.22.200 with SMTP id s8mr184627ots.16.1488663613674;
        Sat, 04 Mar 2017 13:40:13 -0800 (PST)
In-Reply-To: <CAGNvRgC0OAaFxsdgJHWJ34A8a4cc=LEdU05kigWjtOmEOg3_ZQ@mail.gmail.com>
X-Original-Sender: lev@compuserve.com
Precedence: list
Mailing-list: list std-proposals@isocpp.org; contact std-proposals+owners@isocpp.org
List-ID: <std-proposals.isocpp.org>
X-Google-Group-Id: 399137483710
List-Post: <https://groups.google.com/a/isocpp.org/group/std-proposals/post>, <mailto:std-proposals@isocpp.org>
List-Help: <https://support.google.com/a/isocpp.org/bin/topic.py?topic=25838>, <mailto:std-proposals+help@isocpp.org>
List-Archive: <https://groups.google.com/a/isocpp.org/group/std-proposals/>
List-Subscribe: <https://groups.google.com/a/isocpp.org/group/std-proposals/subscribe>,
 <mailto:std-proposals+subscribe@isocpp.org>
List-Unsubscribe: <mailto:googlegroups-manage+399137483710+unsubscribe@googlegroups.com>,
 <https://groups.google.com/a/isocpp.org/group/std-proposals/subscribe>
Xref: news.gmane.org gmane.comp.lang.c++.isocpp.proposals:31428
Archived-At: <http://permalink.gmane.org/gmane.comp.lang.c++.isocpp.proposals/31428>

------=_Part_672_1959060678.1488663613107
Content-Type: multipart/alternative; 
	boundary="----=_Part_673_1957152851.1488663613107"

------=_Part_673_1957152851.1488663613107
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: quoted-printable

Yes, the variable templates would be a logical next step. There may be some=
=20
additional issues with them, and I would very much prefer such issues not=
=20
to be an impediment for the core idea. As to the spelling, in my view all=
=20
upper case doesn't necessarily imply a macro but rather a constant=20
expression. I do not have a strong opinion in that regard however.

On Saturday, March 4, 2017 at 4:18:14 PM UTC-5, Daniel Kr=C3=BCgler wrote:
>
> 2017-03-04 21:30 GMT+01:00  <l...@compuserve.com <javascript:>>:=20
> Given that we have variable templates now, why should the standard=20
> library provide these constants for a specific floating point type?=20
> Furthermore the UPPERCASE names look like macros, I would instead=20
> suggest to switch to a different spelling (I would be ok if only the=20
> first letter would be uppercase).=20
>
> Depending on the outcome of CWG issue 1729, we could define pi as=20
> follows (in namespace std, not shown below, concrete values are just=20
> indicated):=20
>
> template<class T>=20
> extern T pi;=20
>
> template<>=20
> inline constexpr long double pi<long double> =3D 3.1415926535897932384...=
L;=20
>
> template<>=20
> inline constexpr double pi<double> =3D 3.1415926535...;=20
>
> template<>=20
> inline constexpr float pi<float> =3D 3.141592...F;=20
>
> - Daniel=20
>

--=20
You received this message because you are subscribed to the Google Groups "=
ISO C++ Standard - Future Proposals" group.
To unsubscribe from this group and stop receiving emails from it, send an e=
mail to std-proposals+unsubscribe@isocpp.org.
To post to this group, send email to std-proposals@isocpp.org.
To view this discussion on the web visit https://groups.google.com/a/isocpp=
..org/d/msgid/std-proposals/097e0a3f-275d-45e7-babb-d3f80e1fa83d%40isocpp.or=
g.

------=_Part_673_1957152851.1488663613107
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr">Yes, the variable templates would be a logical next step. =
There may be some additional issues with them, and I would very much prefer=
 such issues not to be an impediment for the core idea. As to the spelling,=
 in my view all upper case doesn&#39;t necessarily imply a macro but rather=
 a constant expression. I do not have a strong opinion in that regard howev=
er.<br><br>On Saturday, March 4, 2017 at 4:18:14 PM UTC-5, Daniel Kr=C3=BCg=
ler wrote:<blockquote class=3D"gmail_quote" style=3D"margin: 0;margin-left:=
 0.8ex;border-left: 1px #ccc solid;padding-left: 1ex;">2017-03-04 21:30 GMT=
+01:00 =C2=A0&lt;<a href=3D"javascript:" target=3D"_blank" gdf-obfuscated-m=
ailto=3D"-YwsZPqxCgAJ" rel=3D"nofollow" onmousedown=3D"this.href=3D&#39;jav=
ascript:&#39;;return true;" onclick=3D"this.href=3D&#39;javascript:&#39;;re=
turn true;">l...@compuserve.com</a>&gt;:
<br>Given that we have variable templates now, why should the standard
<br>library provide these constants for a specific floating point type?
<br>Furthermore the UPPERCASE names look like macros, I would instead
<br>suggest to switch to a different spelling (I would be ok if only the
<br>first letter would be uppercase).
<br>
<br>Depending on the outcome of CWG issue 1729, we could define pi as
<br>follows (in namespace std, not shown below, concrete values are just
<br>indicated):
<br>
<br>template&lt;class T&gt;
<br>extern T pi;
<br>
<br>template&lt;&gt;
<br>inline constexpr long double pi&lt;long double&gt; =3D 3.14159265358979=
32384...L;
<br>
<br>template&lt;&gt;
<br>inline constexpr double pi&lt;double&gt; =3D 3.1415926535...;
<br>
<br>template&lt;&gt;
<br>inline constexpr float pi&lt;float&gt; =3D 3.141592...F;
<br>
<br>- Daniel
<br></blockquote></div>

<p></p>

-- <br />
You received this message because you are subscribed to the Google Groups &=
quot;ISO C++ Standard - Future Proposals&quot; group.<br />
To unsubscribe from this group and stop receiving emails from it, send an e=
mail to <a href=3D"mailto:std-proposals+unsubscribe@isocpp.org">std-proposa=
ls+unsubscribe@isocpp.org</a>.<br />
To post to this group, send email to <a href=3D"mailto:std-proposals@isocpp=
..org">std-proposals@isocpp.org</a>.<br />
To view this discussion on the web visit <a href=3D"https://groups.google.c=
om/a/isocpp.org/d/msgid/std-proposals/097e0a3f-275d-45e7-babb-d3f80e1fa83d%=
40isocpp.org?utm_medium=3Demail&utm_source=3Dfooter">https://groups.google.=
com/a/isocpp.org/d/msgid/std-proposals/097e0a3f-275d-45e7-babb-d3f80e1fa83d=
%40isocpp.org</a>.<br />

------=_Part_673_1957152851.1488663613107--

------=_Part_672_1959060678.1488663613107--

.
