[swift-evolution] Besides pi, include also e as a builtin mathematical constant into floats

Björn Forster bjoern.forster at googlemail.com
Fri Jul 1 07:12:24 CDT 2016


In SE-0067: Enhanced Floating Point Protocols
<https://github.com/apple/swift-evolution/blob/master/proposals/0067-floating-point-protocols.md>
is
stated that pi will be a built in constant from Swift 3 onwards.
Is there a specific reason why pi as a constant will be included but not e?
e is also ubiquitous in scientific, engineering and economic calculations.
I seems odd to me to include pi but then not e as well. Also Python
provides both pi and e. Shouldn't Swift provide also at least both pi and e
as constants for its floating point types?
It is also not nice if different numerical packages for swift will come up
all with their own different definitions of e. I think Swift 3 should use
the opportunity to get this thing right from the beginning and provided
both pi AND e.

Is there a new proposal necessary to still get e as a built in constant
into Swift 3?

Kind Regards,
Björn
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.swift.org/pipermail/swift-evolution/attachments/20160701/0304d22b/attachment-0001.html>


More information about the swift-evolution mailing list