mirror of
https://github.com/apple/swift.git
synced 2026-06-20 15:42:51 +02:00
9ead8781d4
Co-authored-by: Alex Martini <amartini@apple.com> Co-authored-by: Graham Lee <glee23@apple.com> Co-authored-by: Chris Adamson <cadamson@apple.com> Co-authored-by: Kirby Turner <kirby_turner@apple.com> Co-authored-by: Paris Pinkney <ppinkney@apple.com> Co-authored-by: Dave Spector <dspector@apple.com> Co-authored-by: Sofia Rodriguez Morales <sofia_rodriguez@apple.com> Co-authored-by: Ethan Kusters <ekusters@apple.com> Co-authored-by: Goli Mohammadi <g_mohammadi@apple.com> Co-authored-by: Adora Vaz <a_vaz@apple.com> Co-authored-by: David Rönnqvist <ronnqvist@apple.com> Co-authored-by: Nate Merseth Cook <natecook@apple.com> Co-authored-by: Susan Conant <susan_c@apple.com>
96 lines
1.6 KiB
Markdown
96 lines
1.6 KiB
Markdown
# ``Swift/FloatingPoint``
|
|
|
|
## Topics
|
|
|
|
### Creating a floating point value
|
|
|
|
- ``init(_:)-2f8bx``
|
|
- ``init(_:)-2xwlo``
|
|
- ``init(exactly:)``
|
|
- ``init(sign:exponent:significand:)``
|
|
- ``init(signOf:magnitudeOf:)``
|
|
|
|
### Performing arithmetic
|
|
|
|
- ``+(_:_:)``
|
|
- ``-(_:_:)``
|
|
- ``-(_:)``
|
|
- ``*(_:_:)``
|
|
- ``/(_:_:)``
|
|
|
|
### Performing arithmetic with assignment
|
|
|
|
- ``+=(_:_:)``
|
|
- ``-=(_:_:)``
|
|
- ``*=(_:_:)``
|
|
- ``/=(_:_:)``
|
|
|
|
### Performing calculations
|
|
|
|
- ``addProduct(_:_:)``
|
|
- ``addingProduct(_:_:)``
|
|
- ``remainder(dividingBy:)``
|
|
- ``formRemainder(dividingBy:)``
|
|
- ``squareRoot()``
|
|
- ``formSquareRoot()``
|
|
- ``truncatingRemainder(dividingBy:)``
|
|
- ``formTruncatingRemainder(dividingBy:)``
|
|
- ``negate()``
|
|
|
|
### Rounding
|
|
|
|
- ``round()``
|
|
- ``round(_:)``
|
|
- ``rounded()``
|
|
- ``rounded(_:)``
|
|
|
|
### Comparing values
|
|
|
|
- ``isEqual(to:)``
|
|
- ``isLess(than:)``
|
|
- ``isLessThanOrEqualTo(_:)``
|
|
- ``isTotallyOrdered(belowOrEqualTo:)``
|
|
- ``maximum(_:_:)``
|
|
- ``maximumMagnitude(_:_:)``
|
|
- ``minimum(_:_:)``
|
|
- ``minimumMagnitude(_:_:)``
|
|
|
|
### Querying a floating point value
|
|
|
|
- ``sign``
|
|
- ``significand``
|
|
- ``exponent``
|
|
- ``Exponent``
|
|
- ``floatingPointClass``
|
|
- ``FloatingPointClassification``
|
|
- ``ulp``
|
|
- ``nextDown``
|
|
- ``nextUp``
|
|
|
|
### Querying a floating point value's state
|
|
|
|
- ``isCanonical``
|
|
- ``isFinite``
|
|
- ``isInfinite``
|
|
- ``isNaN``
|
|
- ``isNormal``
|
|
- ``isSignalingNaN``
|
|
- ``isSubnormal``
|
|
- ``isZero``
|
|
|
|
### Accessing numeric constants
|
|
|
|
- ``infinity``
|
|
- ``nan``
|
|
- ``pi``
|
|
- ``radix``
|
|
- ``signalingNaN``
|
|
- ``ulpOfOne``
|
|
|
|
### Accessing magnitude limits
|
|
|
|
- ``greatestFiniteMagnitude``
|
|
- ``leastNonzeroMagnitude``
|
|
- ``leastNormalMagnitude``
|
|
|