What is Swift Numerics
Swift Numerics is a Swift package with a range of fine-grained modules. These modules are collected under two broad categories. The first are modules that are too specialized to be included in the standard library, but generic enough to be found in a common package. The second category includes modules that are "under active development for possible future inclusion in the standard library."
Currently, Swift Numerics has the two most requested modules: real and complex . Real module, At SE-0246 provides recommended basic math functions . This offer has been accepted, but due to some limitations in the compiler, it is not possible to add new functions directly to the standard library. Real provides basic math functions in a separate module so developers can start using them immediately in their projects.
complex The module refers to the complex number type on the underlying actual type. Contains normal arithmetic operators for complex numbers. It complies with the usual protocols such as Equatable, Hashable, Codable and Numeric. Support for complex numbers can be especially useful when working with Fourier conversions and signal processing algorithms.
The modules included in Swift Numerics have minimal dependencies. For example, existing modules only compiler-rt requires run-time support provided by . In addition, the Swift Numerics package is open source under the same license and contribution rules as the Swift project (Apache License 2.0).