exponent
- iOS
- 14.0+
- macOS
- 11.0+
- tvOS
- 14.0+
- watchOS
- 7.0+
var exponent: Int { get }var exponent: Int { get }import Swift@frozen struct Float16A half-precision (16b), floating-point value type.
@frozen struct IntA signed integer value type.
init() init(_ other: Float16) Creates a new instance initialized to the given value.
init(_ other: Double) Creates a new instance that approximates the given value.
init(_ other: Float) Creates a new instance that approximates the given value.
init?(_ text: Substring) init?<S>(_ text: S) where S : StringProtocol Creates a new instance from the given string.
init(_ v: Int) init<Source>(_ value: Source) where Source : BinaryInteger init(bitPattern: UInt16) Creates a new value with the given bit pattern.
init?(exactly other: Float16) Creates a new instance initialized to the given value, if it can be represented without rounding.
init?(exactly other: Double) Creates a new instance initialized to the given value, if it can be represented without rounding.
init?(exactly other: Float) Creates a new instance initialized to the given value, if it can be represented without rounding.
init?<Source>(exactly value: Source) where Source : BinaryInteger init(floatLiteral value: Float16) init(from decoder: any Decoder) throws init(integerLiteral value: Int64) init(nan payload: Float16.RawSignificand, signaling: Bool) Creates a NaN (“not a number”) value with the specified payload.
init(sign: FloatingPointSign, exponent: Int, significand: Float16) init(sign: FloatingPointSign, exponentBitPattern: UInt, significandBitPattern: UInt16) init(signOf sign: Float16, magnitudeOf mag: Float16) static var exponentBitCount: Int { get }static var greatestFiniteMagnitude: Float16 { get }static var infinity: Float16 { get }static var leastNonzeroMagnitude: Float16 { get }static var leastNormalMagnitude: Float16 { get }static var nan: Float16 { get }static var pi: Float16 { get }static var signalingNaN: Float16 { get }static var significandBitCount: Int { get }static var ulpOfOne: Float16 { get }The unit in the last place of 1.0.
var binade: Float16 { get }var bitPattern: UInt16 { get }The bit pattern of the value’s encoding.
var debugDescription: String { get }A textual representation of the value, suitable for debugging.
var description: String { get }A textual representation of the value.
var exponentBitPattern: UInt { get }var isCanonical: Bool { get }var isFinite: Bool { get }var isInfinite: Bool { get }var isNaN: Bool { get }var isNormal: Bool { get }var isSignalingNaN: Bool { get }var isSubnormal: Bool { get }var isZero: Bool { get }var magnitude: Float16 { get }var nextUp: Float16 { get }var sign: FloatingPointSign { get }var significand: Float16 { get }var significandBitPattern: UInt16 { get }var significandWidth: Int { get }var ulp: Float16 { get }static func * (lhs: Float16, rhs: Float16) -> Float16 static func *= (lhs: inout Float16, rhs: Float16) static func + (lhs: Float16, rhs: Float16) -> Float16 static func += (lhs: inout Float16, rhs: Float16) static func - (x: Float16) -> Float16 static func - (lhs: Float16, rhs: Float16) -> Float16 static func -= (lhs: inout Float16, rhs: Float16) static func / (lhs: Float16, rhs: Float16) -> Float16 static func /= (lhs: inout Float16, rhs: Float16) mutating func addProduct(_ lhs: Float16, _ rhs: Float16) func advanced(by amount: Float16) -> Float16 func distance(to other: Float16) -> Float16 func encode(to encoder: any Encoder) throws Encodes this value into the given encoder.
mutating func formRemainder(dividingBy other: Float16) mutating func formSquareRoot() mutating func formTruncatingRemainder(dividingBy other: Float16) func hash(into hasher: inout Hasher) func isEqual(to other: Float16) -> Bool func isLess(than other: Float16) -> Bool func isLessThanOrEqualTo(_ other: Float16) -> Bool mutating func negate() mutating func round(_ rule: FloatingPointRoundingRule) func write<Target>(to target: inout Target) where Target : TextOutputStream @frozen struct SIMD16StorageStorage for a vector of 16 floating-point values.
@frozen struct SIMD2StorageStorage for a vector of two floating-point values.
@frozen struct SIMD32StorageStorage for a vector of 32 floating-point values.
@frozen struct SIMD4StorageStorage for a vector of four floating-point values.
@frozen struct SIMD64StorageStorage for a vector of 64 floating-point values.
@frozen struct SIMD8StorageStorage for a vector of eight floating-point values.
typealias Exponent = Inttypealias Magnitude = Float16typealias RawSignificand = UInt16typealias SIMDMaskScalar = Int16