[swift-evolution] Extend FloatingPoint with tau!
Joe Groff
jgroff at apple.com
Thu Jun 30 11:49:35 CDT 2016
> On Jun 30, 2016, at 9:01 AM, David Waite via swift-evolution <swift-evolution at swift.org> wrote:
>
>
>> On Jun 30, 2016, at 9:22 AM, Stephen Canon via swift-evolution <swift-evolution at swift.org> wrote:
>>
>> This was discussed as part of SE-0067.
>>
>> The consensus was that pi deserved special treatment, as it is used in general-purpose code an order of magnitude more often than the all other constants combined. I don’t think that anyone argued against it’s inclusion.
>
> To me, it also makes sense to offer a common transcendental constant with the highest precision available to a particular floating point type.
'2 * x' is a precise operation (assuming it doesn't overflow the exponent), so '2 * .pi' will always be as accurate as '.pi' itself.
-Joe
More information about the swift-evolution
mailing list