0.1.0 Release Notes

Complex ... and yet Elementary

Howdy buckaroos! It's been a while since the last release, as I've been busy with some real-life stuff.

But now I'm back to the grindstone, and I've got a fun release for you. There's a bunch of cleanups and improvements from various contributors (@NevinBR and @markuswntr come to mind), but the big news is that Complex types now conform to the ElementaryFunctions protocol, which means that all your favorite math functions are available for complex types.

The branch cuts of these complex functions should generally match C and C++'s (because all implementations follow Kahan's standard paper on the subject), though the exact numerical results will be slightly different in general. Unlike the real functions, the complex elementary functions are all implemented in Swift--we don't delegate to the host system math library. This is because the general quality of <complex.h> implementations is significantly lower than <math.h> implementations, and some platforms (Windows) don't provide those operations at all. In general, I believe that the basic algorithms used by Swift Numerics for these operations are as good as (and often better) than what C libraries provide, but there is always a possibility of bugs, especially with new code. Don't hesitate to raise an issue if you see anything you suspect.

Special thanks to @compnerd for going above and beyond tracking down a Swift bug that held up this tag (and @eeckstein for fixing it!)

Terms of Service

Privacy Policy

Cookie Policy