1

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 (typedefs) 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.

SpilledMango
  • 575
  • 7
  • 25

1 Answers1

4

Unless you have a POWER processor, your 128 bit long double is actually an 80 bits extended precision number, plus 48 bit wasted.

gnasher729
  • 51,477
  • 5
  • 75
  • 98