[swift-evolution] [Discussion] Breaking precedence

Anton Zhilin antonyzhilin at gmail.com
Tue Aug 2 16:49:39 CDT 2016


2016-08-03 0:46 GMT+03:00 Xiaodi Wu <xiaodi.wu at gmail.com>:

> It's not that << will overflow and / will not. Substitute * for / and the
> argument would be the same. The difference is that << traps when you shift
> more than the total number of bits but does *not* trap when you shift
> numbers off as would arithmetic exponentiation; * traps on overflow. Thus,
> what << is concerned about is the bits (as it should), but * is concerned
> about the max representable value.


Substitute * for / and my argument would also be the same :)
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.swift.org/pipermail/swift-evolution/attachments/20160803/e95d197e/attachment.html>


More information about the swift-evolution mailing list