[swift-evolution] Thoughts on clarity of Double and Float type names?
scanon at apple.com
Mon Jun 20 09:44:12 CDT 2016
On Jun 20, 2016, at 7:22 AM, Ben Rimmington via swift-evolution <swift-evolution at swift.org> wrote:
> DEC64 <http://dec64.com <http://dec64.com/>> as the default number type!
At some danger of going off on a tangent, I should point out that DEC64 has very little to recommend it. It’s not much more efficient performance-wise than IEEE-754 decimal types and has significantly less exponent range (it effectively throws away almost three bits in order to have the exponent fit in a byte; 2**56 is ~7.2E16, which means that it can represent some, but not all, 17-digit significands; the effective working precision is 16 digits, which actually requires only ~53.15 bits. Even if you weren’t going to use those extra bits for exponent, they could be profitably used for other purposes. The fact that the dec-64 scheme allows one to use byte operations has only a tiny benefit, and really only on x86).
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the swift-evolution