We will not be Fielding further questions at this time
There are two changes in this release to call out specifically:
-
Complex's conformance to Codable now uses an unkeyed container, so e.g.
.zero
gets encoded as[0,0]
in JSON instead of the old{"x":0, "y":0}
. -
There's a new protocol,
AlgebraicField
refiningNumeric
by adding the/
,/=
operators, and a.reciprocal: Self?
property. TheReal
protocol refines it andComplex<T>
conforms to it, allowing you to write code that is generic over them. There are some additional operations that it probably makes sense to add to this protocol (e.g. square root); I expect to add them gradually as needed.
I also want to draw special attention to a change that I expect to make in the next tag. In order to make certain use patterns simpler, I intend to give the Complex
module a name that doesn't conflict with the Complex
type. If you have opinions about this change, or suggestions for a naming pattern to adopt for modules in Swift Numerics, please weigh in on that thread.
If you have any questions, use this discussion thread on the Swift forums.