It's a useful operation, but it deserves its own API to allow the use of a custom random source.
Also, the existing API blocks some constant-folding operations because the call to the system random source is an opaque optimization barrier, so removing it allows us to produce better codegen for the other rounding modes.
We're also bumping required Swift version to 5.9, and removing the executable test targets for log/log1p, as they're really only useful for development of those algorithms.
Seeded with rotate(right:) and rotate(left:) on FixedWidthInteger. These implementations are basically sane, but need documentation written for users who are not already familiar with bitwise rotation.
These significantly improve on the state of the art for arguments close to the circle where the result vanishes, producing good componentwise relative accuracy as well as relative accuracy in the complex norm.
Also drops the argument parser dependency, which is desirable to avoid possible circular dependencies in the future with algorithms.
No change to the protocols involved, purely a change so that the module that users import shares the name of the feature they are most likely to be using, rather than a somewhat-esoteric implementation detail.
I had thought that we could get away with just using @_silgen_name to wrap the platform libm functions in ElementaryFunctions conformances, but that's now failing in release builds when both ElementaryFunctions and the Platform module are imported (and actually crashing swiftc).
Fall back on the previous strategy of using C header shims. This adds an extra layer of source abstraction, but we're still able to optimize it away at compile time, even in unoptimized builds, so we can live with it for now.
Two modules to begin with:
- ElementaryFunctions
- Complex
Added README.md files describing each module very roughly, and a project
README to describe goals and process.