<div dir="auto">C++, I believe, does not mandate IEEE 754, and so, yes, I was specifically thinking in decimal, hence the precise wording of my post (...if my architecture...). I fully understand your point though.</div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Sun, 25 Aug 2024, 13:10 Andrey Semashev via Std-Proposals, &lt;<a href="mailto:std-proposals@lists.isocpp.org">std-proposals@lists.isocpp.org</a>&gt; wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">On 8/25/24 14:08, Mike Reed via Std-Proposals wrote:<br>
&gt; Isn&#39;t it possible for a literal constant for tau to be more accurate<br>
&gt; than 2x a literal constant for pi?  E.g if my architecture is only<br>
&gt; accurate to 1dp then the literal for pi is 3.1, and 2x that is 6.2.  But<br>
&gt; the literal constant for tau would be 6.3, which is more accurate.<br>
<br>
You&#39;re thinking in decimal. IEEE-754 binary floating point types<br>
representation, which is used practically by every C++ implementation,<br>
uses powers of two for its digit places. That is, the significand is<br>
represented by a binary mantissa, and the point placement within that<br>
mantissa is described by exponent. Multiplying or dividing the number by<br>
a power of two leaves the mantissa unchanged and only changes the<br>
exponent. This means that the precision of the number remains the same.<br>
At least, that&#39;s how an implementation is expected to behave.<br>
<br>
<a href="https://en.wikipedia.org/wiki/IEEE_754" rel="noreferrer noreferrer" target="_blank">https://en.wikipedia.org/wiki/IEEE_754</a><br>
<br>
-- <br>
Std-Proposals mailing list<br>
<a href="mailto:Std-Proposals@lists.isocpp.org" target="_blank" rel="noreferrer">Std-Proposals@lists.isocpp.org</a><br>
<a href="https://lists.isocpp.org/mailman/listinfo.cgi/std-proposals" rel="noreferrer noreferrer" target="_blank">https://lists.isocpp.org/mailman/listinfo.cgi/std-proposals</a><br>
</blockquote></div>

