[swift-users] FloatingPoint/BinaryFloatingPoint protocol and concrete FloatingPoint types
David Sweeris
davesweeris at mac.com
Fri Dec 1 16:59:30 CST 2017
> On Dec 1, 2017, at 13:18, Jens Persson via swift-users <swift-users at swift.org> wrote:
>
> func maxPrecisionCalculation(input:Float80) -> Float80 {
> return input // but something actually reauiring high precision ...
> }
AFAIK, Float80 is the high precision format on macOS (well, Intel macs, anyway... can’t recall if Swift can target OSs old enough to run on PPC macs). I’d avoid using it, though. AFAIK it’s an x86-only format (it might even be Intel-only... 5-10 minutes of googling didn’t give me a clear answer on whether AMD’s CPUs support it).
I don’t know what we do with it on ARM targets, and I’m not at my computer to try to figure out.
Unless maybe the x86 or ARM vector extensions support 128 or 256 bit floats? I don’t think they do, but I’m not 100% on that.
- Dave Sweeris
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.swift.org/pipermail/swift-users/attachments/20171201/00cbeb17/attachment.html>
More information about the swift-users
mailing list