[swift-evolution] Add a type like Double but with much more precision?

tuuranton at tutanota.de tuuranton at tutanota.de
Tue Dec 8 12:27:47 CST 2015


I need a floating-point type with more precision than Double. Would this be 
possible to add in Swift?
Here is just one use case: Measuring time using seconds since the first 
instant of 1970. For example, the first instant of 2016 is 1451602800.0 
seconds since the first instance of 1970. But with 1451602800.0, I'm already 
at 11 significant digits. This means I cannot add a nanosecond (1e-9) to this 
number within Double's precision because that would require a lot more 
significant digits than Double can handle.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.swift.org/pipermail/swift-evolution/attachments/20151208/46401de6/attachment.html>


More information about the swift-evolution mailing list