There are two changes in this release to call out specifically:
Complex's conformance to Codable now uses an unkeyed container, so e.g.
.zerogets encoded as
[0,0]in JSON instead of the old
There's a new protocol,
Numericby adding the
/=operators, and a
.reciprocal: Self?property. The
Realprotocol refines it and
Complex<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.