Reputation: 615
In C, there is a type called long double
, which on my machine is 16-bytes (128-bit). Is there any way to store a long double
in Swift? I've tried type aliases (typedef
s) of long double
from an Objective-C header, but it doesn't show up in Swift. And functions returning long double
(powl
, sqrtl
) don't show up neither.
I know there's a Float80
but that's only 80 bits, not 128 bits.
Upvotes: 1
Views: 2036
Reputation: 52538
Unless you have a POWER processor, your 128 bit long double is actually an 80 bits extended precision number, plus 48 bit wasted.
Upvotes: 4