[swift-evolution] Besides pi, include also e as a builtin mathematical constant into floats
Stephen Canon
scanon at apple.com
Fri Jul 1 13:46:50 CDT 2016
> On Jul 1, 2016, at 2:33 PM, David Waite via swift-evolution <swift-evolution at swift.org> wrote:
>
> That only is about tau, which is a much more controversial operator. Unfortunately, I wasn’t able to find the discussion of pi or E in the archives (but neither pi nor e are very searchable)
https://lists.swift.org/pipermail/swift-evolution/Week-of-Mon-20160411/015021.html
> In general, the line for mathematical functions appears to have been set pretty high for inclusion in SE-0067, focusing instead on IEEE 754 capabilities and general design/naming. There are a number of features missing from a standard math library such as the ability to do trigonometric and hyperbolic operations, exponential and logarithmic operations, and so on. I am not sure what criteria determined where this line was drawn. I suspect it was trying to get to a point of just additive changes.
That’s exactly right.
I expect that math functions and constants will eventually make up a math protocol, separate from FloatingPoint. For the short-term, that niche is filled by the C standard library. `pi` is so frequently used that we made an exception for it.
– Steve
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.swift.org/pipermail/swift-evolution/attachments/20160701/04c4b1b7/attachment.html>
More information about the swift-evolution
mailing list