Are there are any floating points more accurate than Double
available in Swift? I know that in C there is the long double
, but I can't seem to find its equivalent in Apple's new programming language.
Any help would be greatly appreciated!
Are there are any floating points more accurate than Double
available in Swift? I know that in C there is the long double
, but I can't seem to find its equivalent in Apple's new programming language.
Any help would be greatly appreciated!
Currently iOS 11+ runs on 64 Bit platform, Double holds Highest among all.
However in CGFloat The native type used to store the CGFloat, which is Float on 32-bit architectures and Double on 64-bit architectures
https://developer.apple.com/library/content/documentation/Swift/Conceptual/Swift_Programming_Language/TheBasics.html
Yes there is! There is
Float80
exactly for that, it stores 80 bits (duh), 10 bytes. You can use it like any other floating point type. Note that there areFloat32
,Float64
andFloat80
in Swift, whereFloat32
is just a typealias forFloat
andFloat64
is one forDouble