<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 <<a href="mailto:erica@ericasadun.com" class="">erica@ericasadun.com</a>> 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: 2016: at 11:56 AM: Joe Groff via swift-evolution <<a href="mailto:swift-evolution@swift.org" class="">swift-evolution@swift.org</a>> 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: 2016: at 8:20 AM: Stephen Canon via swift-evolution <<a href="mailto:swift-evolution@swift.org" class="">swift-evolution@swift.org</a>> wrote:<br class=""><br class="">“e” is a great bike-shedding example. While it would definitely allow a fluent style if you know what you’re looking at: I worry a little bit about readability of `Float.e` or `.e` in source. Most programmers are at least passingly familiar with pi: but that familiarity doesn’t necessarily extend to e. IDEs and docstrings make this palatable: 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: <b class="">109</b></div><div class="">M_LOG2E: <b class="">23</b></div><div class="">M_LOG10E: <b class="">19</b></div><div class="">M_LN2: <b class="">24</b></div><div class="">M_LN10: <b class="">10</b></div><div class="">M_PI: <b class="">2,231</b></div><div class="">M_PI_2: <b class="">255</b></div><div class="">M_PI_4: <b class="">54</b></div><div class="">M_1_PI: <b class="">27</b></div><div class="">M_2_PI: <b class="">25</b></div><div class="">M_2_SQRTPI: <b class="">23</b></div><div class="">M_SQRT2: <b class="">31</b></div><div class="">M_SQRT1_2: <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. Since Swift quite reliably does this transformation, I would prefer to simply use the more explicit .pi / 2. How does that strike you as a user?</div><div><br class=""></div><div>– Steve</div></body></html>