<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=""><div><blockquote type="cite" class=""><div class="">On Jun 12, 2016, at 11:35 PM, Stephen Canon &lt;<a href="mailto:scanon@apple.com" class="">scanon@apple.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=""><br class=""><div class=""><blockquote type="cite" class=""><div class="">On Jun 10, 2016, at 5:20 PM, Darren Mo &lt;<a href="mailto:darren.mo@me.com" class="">darren.mo@me.com</a>&gt; wrote:</div></blockquote><blockquote type="cite" class=""><br class=""></blockquote><blockquote type="cite" class=""><div class=""><div class="" style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;"><div class=""><blockquote type="cite" class="" style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px;"><div class=""><div class="" style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;"><div class="">– They’re not actually the maximum and minimum values of the type. &nbsp;In particular, that `max(Float.infinity, .max)` wouldn’t be `Float.max` is pretty seriously confusing.</div></div></div></blockquote><div style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;" class=""><br class=""></div><div style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;" class="">Infinity is a special value. I would argue that people who use infinity know exactly what they are doing and would not be thrown by<span class="Apple-converted-space">&nbsp;</span><font face="Menlo" class="" style="font-size: 11px;">Float.infinity</font><span class="Apple-converted-space">&nbsp;</span>being greater than<span class="Apple-converted-space">&nbsp;</span><font face="Menlo" class="" style="font-size: 11px;">Float.max</font>. I am willing to bet that most regular users don’t even know that infinity can be represented since it is rarely needed in real-world usage.</div></div></div></div></blockquote><br class=""></div><div class="">For clarity, what use cases do you have in mind where the largest finite value is more appropriate than infinity?</div></div></div></blockquote></div><br class=""><div class="">That… is a very good question.</div><div class=""><br class=""></div><div class="">My main use case was laying out fixed-width text. In the Objective-C days, I would use <font face="Menlo" style="font-size: 11px;" class="">CGFLOAT_MAX</font>. I guess when I started to write the same code in Swift, I didn’t stop to think about whether there was a better value. Now thanks to you, I see that <font face="Menlo" style="font-size: 11px;" class="">CGFloat.infinity</font> is the clearest and most appropriate value.</div><div class=""><br class=""></div><div class="">Proposal cancelled. Thanks! ☺️</div></body></html>