<html><head><meta http-equiv="Content-Type" content="text/html charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><br class=""><div><blockquote type="cite" class=""><div class="">On Apr 15, 2016, at 11:14 AM, Erica Sadun &lt;<a href="mailto:erica@ericasadun.com" class="">erica@ericasadun.com</a>&gt; wrote:</div><br class="Apple-interchange-newline"><div class=""><meta http-equiv="Content-Type" content="text/html charset=utf-8" class=""><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class="">On Apr 15:&nbsp;2016:&nbsp;at 11:56 AM:&nbsp;Joe Groff via swift-evolution &lt;<a href="mailto:swift-evolution@swift.org" class="">swift-evolution@swift.org</a>&gt; wrote:<br class=""><div class=""><blockquote type="cite" class=""><br class="Apple-interchange-newline"><div class=""><div class=""><br class=""><blockquote type="cite" class="">On Apr 15:&nbsp;2016:&nbsp;at 8:20 AM:&nbsp;Stephen Canon via swift-evolution &lt;<a href="mailto:swift-evolution@swift.org" class="">swift-evolution@swift.org</a>&gt; wrote:<br class=""><br class="">“e” is a great bike-shedding example. &nbsp;While it would definitely allow a fluent style if you know what you’re looking at:&nbsp;I worry a little bit about readability of `Float.e` or `.e` in source. &nbsp;Most programmers are at least passingly familiar with pi:&nbsp;but that familiarity doesn’t necessarily extend to e. &nbsp;IDEs and docstrings make this palatable:&nbsp;of course.<br class=""></blockquote><br class="">It's also questionable to me how often `e` itself is interesting independent of an exp() or log() operation.<br class=""></div></div></blockquote></div><br class=""><div class="">I'm sure it gets used but I'd imagine it would be at an order of magnitude or more less than PI. Quick gist count:</div><div class=""><br class=""></div><div class=""><div class="">M_E:&nbsp;<b class="">109</b></div><div class="">M_LOG2E:&nbsp;<b class="">23</b></div><div class="">M_LOG10E:&nbsp;<b class="">19</b></div><div class="">M_LN2:&nbsp;<b class="">24</b></div><div class="">M_LN10:&nbsp;<b class="">10</b></div><div class="">M_PI:&nbsp;<b class="">2,231</b></div><div class="">M_PI_2:&nbsp;<b class="">255</b></div><div class="">M_PI_4:&nbsp;<b class="">54</b></div><div class="">M_1_PI:&nbsp;<b class="">27</b></div><div class="">M_2_PI:&nbsp;<b class="">25</b></div><div class="">M_2_SQRTPI:&nbsp;<b class="">23</b></div><div class="">M_SQRT2:&nbsp;<b class="">31</b></div><div class="">M_SQRT1_2:&nbsp;<b class="">26</b></div></div><div class=""><br class=""></div><div class="">That said, I use M_PI_4 a lot because it's really handy for sample code. I'm one of the</div><div class="">outlier users whose use is not reflective of this quick check.</div></div></div></blockquote><br class=""></div><div>M_PI_2 and M_PI_4 are interesting cases; they date back to a time when compilers couldn’t be trusted to constant-fold computations like M_PI / 2. &nbsp;Since Swift quite reliably does this transformation, I would prefer to simply use the more explicit .pi / 2. &nbsp;How does that strike you as a user?</div><div><br class=""></div><div>– Steve</div></body></html>