<html><head><meta http-equiv="Content-Type" content="text/html charset=us-ascii"></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 Dec 8, 2015, at 10:27 AM, Tuur Anton via swift-evolution &lt;<a href="mailto:swift-evolution@swift.org" class="">swift-evolution@swift.org</a>&gt; wrote:</div><br class="Apple-interchange-newline"><div class="">
  
    <meta http-equiv="content-type" content="text/html; charset=UTF-8" class="">
  
  <div class="">
<div class="">I need a floating-point type with more precision than Double. Would this be possible to add in Swift?</div><div class=""><br class=""></div><div class="">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.</div>  
<img src="https://u2002410.ct.sendgrid.net/wf/open?upn=RoDF4MveSEMYBIqIJA6ub1g8cOZ-2BVYvqV-2FqygPhjPn-2B5p6dZSf726dXmbajCzpAAHxLMRgn-2FpadN-2FFkScDJQoeSuIv3By8OvBdOoO0bQBBxXbuGxawzzVyp-2F5URJaA9t6Cz-2FmMLGF0OwbcZf4QzFay4r-2BjX1N31efi-2BBeYbaVSNJ2Nocz-2FzkZhq1XAU1ji5301yEUzPZv6qhILKfdSPuma8ZZrLcTBLkL2LglgioqYA-3D" alt="" width="1" height="1" border="0" style="height:1px !important;width:1px !important;border-width:0 !important;margin-top:0 !important;margin-bottom:0 !important;margin-right:0 !important;margin-left:0 !important;padding-top:0 !important;padding-bottom:0 !important;padding-right:0 !important;padding-left:0 !important;" class="">
</div></div></blockquote><br class=""></div><div>There's support at the LLVM level for fp128 types. I'm not sure how good or portable its backend support is though. You might look at FloatingPoint.swift.gyb and see what breaks if you extend it to generate a Quad type backed by Builtin.FPIEEE128.</div><div><br class=""></div><div>-Joe</div><br class=""></body></html>