<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 Jul 1, 2016, at 1:20 PM, 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=""><br class=""><div class=""><blockquote type="cite" class=""><div class="">On Jul 1, 2016, at 11:13 AM, Stephen Canon via swift-evolution <<a href="mailto:swift-evolution@swift.org" class="">swift-evolution@swift.org</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=""><div class=""></div><blockquote type="cite" class=""><div class="">On Jul 1, 2016, at 1:11 PM, Jordan Rose via swift-evolution <<a href="mailto:swift-evolution@swift.org" class="">swift-evolution@swift.org</a>> wrote:</div></blockquote><div class=""><blockquote type="cite" class=""><br class="Apple-interchange-newline"><div class=""><meta http-equiv="Content-Type" content="text/html charset=us-ascii" class=""><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class="">[Proposal: <a href="https://github.com/apple/swift-evolution/blob/master/proposals/0113-rounding-functions-on-floatingpoint.md" class="">https://github.com/apple/swift-evolution/blob/master/proposals/0113-rounding-functions-on-floatingpoint.md</a> ]<div class=""><br class=""></div><div class="">Just wondering, why no 'awayFromZero' case?</div></div></div></blockquote><br class=""></div><div class="">It’s not defined or required by IEEE 754. The others are. I wouldn’t be opposed to adding some other rounding modes, but the IEEE 754 set is as good as any as a starting point.</div></div></div></blockquote><br class=""></div><div class="">I'm hearing a lot of "Wouldn't it be nice if"s, for items falling outside IEEE 754. Could we have a native Math module that offered such niceties under a separate umbrella proposal? Would it be too cluttery to allow things like Double.tau, etc via a Math.Double extension or however that might work?</div></div></div></blockquote><br class=""></div><div>I expect we will at some point in the future!</div><div><br class=""></div><div>For constants specifically, while I would still want to keep them out of the top-level namespace on the types, I think it would make a lot of sense to have something like Double.Constant.xxx which could swallow pretty much anything that there’s a reasonable argument to justify.</div><div><br class=""></div><div>We also wouldn’t want these to be a requirement of FloatingPoint, unless there were default implementations to *compute* all of them to full precision, to avoid placing too high of a burden on folks who want to conform to the protocol.</div><div><br class=""></div><div>That would be pretty solidly in the “post swift 3” pile, however.</div></body></html>