xwu-swift-numerics icon indicating copy to clipboard operation
xwu-swift-numerics copied to clipboard

Notes on numerics in Swift

This is a series of articles discussing the state of Swift numerics. Although some background is covered, the intention is to go beyond material in The Swift Programming Language. Some familiarity with Swift and with the use of numbers in programming is assumed.

  • Concrete integer types, part 1
    Introduction, integer literals, conversions among integer types

  • Concrete integer types, part 2
    Operator precedence, overflow behavior, integer remainder, bitwise operations

  • Concrete binary floating-point types, part 1
    Introduction (IEEE 754, C mathematical functions, finite constants)

  • Concrete binary floating-point types, part 2
    Floating-point precision (striding, fused multiply-add, unit in the last place, approximating π, subnormal values on 32-bit ARM, string representation)

  • Concrete binary floating-point types, part 3
    Float literals, conversions among floating-point types, other initializers

  • Concrete binary floating-point types, part 4
    Signed zero, infinity, and NaN; floating-point remainder; significand representation

  • Numeric types in Foundation
    Foundation.Decimal, Foundation.NSNumber

  • Numeric protocols
    Introduction, design rationale, generic algorithms, conformance

27 February 2018–29 July 2019