Extend FloatingPoint with tau!

+1

Lots of win for very small effort.

···

Hello community,

Tau day <http://tauday.com/&gt; was yesterday, and reminded me that we forgot to provide a `tau` next to `FloatingPoint`’s `pi` property. How about we write a proposal to brind this forward-thinking constant to a forward-thinking language?

Proposal: Extend `FloatingPoint` with tau

  /// The mathematical constant tau = 6.28318...
  ///
  /// Extensible floating-point types might provide additional APIs to obtain
  /// this value to caller-specified precision.
  static var tau: Self { get }

David.

Lots of win for very small effort.

"Lots" like in not having to type "2 *"?

-1 from me.

Best regards,
Rimantas

-1

Tau, unlike pi, is not a commonly understood mathematical constant. Even in the realm of mathematics, tau is used to represent multiple concepts and other constants, such as the golden ratio.

Finally, tau is easily computed from pi and should not result in a loss of precision. This makes it an excellent candidate for addition via an extension for third party code which desires it and understands what "tau" means in their domain

-DW

···

Sent with my Thumbs

On Jun 30, 2016, at 6:02 AM, Rimantas Liubertas via swift-evolution <swift-evolution@swift.org> wrote:

Lots of win for very small effort.

"Lots" like in not having to type "2 *"?

-1 from me.

Best regards,
Rimantas
_______________________________________________
swift-evolution mailing list
swift-evolution@swift.org
https://lists.swift.org/mailman/listinfo/swift-evolution