struct Float80
Inheritance |
AbsoluteValuable, Comparable, CustomDebugStringConvertible, CustomStringConvertible, Equatable, FloatLiteralConvertible, Hashable, IntegerLiteralConvertible, SignedNumberType, Strideable
View Protocol Hierarchy →
|
---|---|
Import | import Swift |
Initializers
Create an instance initialized to value
.
Declaration
init(floatLiteral value: Float80)
Create an instance initialized to value
.
Declaration
init(integerLiteral value: Int64)
Construct from an ASCII representation.
Returns the result of calling the POSIX function
strtold_l
using the "C" locale, unless
text
contains non-ASCII text or whitespace, or is not
completely consumed by the call. Otherwise, returns nil
.
See the strtold (3)
man page for details of
the exact format accepted.
Declaration
init?(_ text: String)
Instance Variables
A textual representation of self
.
Declaration
var debugDescription: String { get }
A textual representation of self
.
Declaration
var description: String { get }
The hash value.
Axiom: x == y
implies x.hashValue == y.hashValue
.
Note: The hash value is not guaranteed to be stable across different invocations of the same program. Do not persist the hash value across program runs.
Declaration
var hashValue: Int { get }
Static Methods
Returns the absolute value of x
.
Declaration
static func abs(x: Float80) -> Float80
Instance Methods
Returns a Self
x
such that self.distanceTo(x)
approximates
n
.
Complexity: O(1).
Declaration
func advancedBy(amount: Float80) -> Float80
Returns a stride x
such that self.advancedBy(x)
approximates
other
.
Complexity: O(1).
Declaration
func distanceTo(other: Float80) -> Float80
Returns the sequence of values (self
, self + stride
, self +
stride + stride
, ... last) where last is the last value in
the progression less than or equal to end
.
Note: There is no guarantee that end
is an element of the sequence.
Declaration
func stride(through end: Float80, by stride: Float80.Stride) -> StrideThrough<Float80>
Declared In
Strideable
Returns the sequence of values (self
, self + stride
, self +
stride + stride
, ... last) where last is the last value in
the progression that is less than end
.
Declaration
func stride(to end: Float80, by stride: Float80.Stride) -> StrideTo<Float80>
Declared In
Strideable
An extended-precision floating-point value type.