25 Commits
Author SHA1 Message Date
Stephen Canon bcde4bc513 Comment cleanups. 2021-08-27 09:25:57 -04:00
Stephen Canon 58f95289a0 Merge pull request #185 from stephentyrone/reciprocal-documentation
Further expand documentation of `reciprocal` with some example use.
2021-08-27 09:09:21 -04:00
Stephen Canon 92f0095962 Document the Augmented enum in RealModule in advance of 1.0 2021-08-19 14:08:22 -04:00
Steve (Numerics) Canon 5827f9a943 80-column formatting for source doc comments
Tidying, plus a few small edits. This commit should not include any code changes.
2021-03-03 14:01:09 -05:00
NevinBR 5a7eb37c19 Cleaned up some comments 2020-11-11 14:05:55 -05:00
Stephen Canon 26c51aca1b Mark all complex elementary functions inlinable
This is kind of dubious, but necessary for performance reasons until we get dependable cross-module specialization. Also has a minor test fix for 32b platforms.
2020-11-09 16:41:45 -05:00
Stephen Canon 16837299c1 Added inverse trig and hyperbolics, some rough test coverage. 2020-11-09 11:25:08 -05:00
Stephen Canon 2b4c6701f2 log and log(onePlus:) implementations for Complex
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.
2020-11-05 15:14:25 -05:00
Stephen Canon 209a794eb6 Initial implementation of log(onePlus:) 2020-10-01 16:39:11 -04:00
Stephen Canon af19aec6ff WIP 2020-10-01 16:39:11 -04:00
Stephen Canon ed8fc21f1e Add TODO for algorithmic improvements on tanh. 2020-10-01 16:39:11 -04:00
Stephen Canon 1cbb94ac71 First pass over hyperbolics and trig functions for Complex. 2020-10-01 16:39:11 -04:00
Stephen Canon 09beddce47 WIP on complex elementary functions.
Rebased on master, then cleaned up exp and expm1. New algorithm for expm1 that gives good componentwise accuracy as well as normwise. I _think_ that this is fundamentally new; I can't recall seeing it anywhere before, though it's simple enough that I expect someone has thought of it before.

Also beefed up testing for exp and expm1. Left sketches of log/pow/sqrt/root in place, though I'm still working on filling out the testing for those.
2020-10-01 16:39:11 -04:00
Stephen Canon 7e032e20fc Merge remote-tracking branch 'upstream/swift-5.3' 2020-08-04 08:26:26 -04:00
Stephen Canon 1ec79f5270 Add Swift version check for differentiable features. 2020-08-04 08:26:22 -04:00
Stephen Canon 40b5a03063 Merge pull request #105 from compnerd/cmake
build: add initial CMake based build system
2020-07-03 09:49:53 -04:00
Stephen Canon 085f6dab2e Merge branch 'master' into swift-5.3 2020-07-01 09:31:40 -04:00
Saleem Abdulrasool f30f73ed10 build: add initial CMake based build system
This adds a CMake based build, which enables the build of swift-numerics
on Windows.  This currently does not add the test suite to the build as
there are still some issues to work out in building the full test suite
which require additional math operations to fully build.
2020-06-25 09:46:54 -07:00
Dan Zheng 86f0b33c65 Define Complex.zeroTangentVectorInitializer.
The `Differentiable.zeroTangentVectorInitializer` protocol requirement is a
closure producing a zero tangent vector, capturing minimal information from
`self`.

Fixes the `Complex: Differentiable` conformance for master toolchains.
2020-06-08 19:53:43 -07:00
Markus Winter 5f09b7ef22 Update documentation in ComplexModule
Replace the now deprecated unsafeLengthSquared reference with the newer lengthSquared in the README.md of the Complex module.
2020-05-26 15:45:37 +02:00
Stephen Canon 750170404a The derivative of Complex.init(_:_:) is broken with the current Xcode toolchain.
Remove it for now; it'll still be present on the -5.3 branch, so we'll pick it up again when we're able to.
2020-05-01 08:50:32 -04:00
Stephen Canon a5cc950a86 Merge pull request #111 from rxwei/complex-derivatives
Make 'Complex' differentiable.
2020-04-22 16:43:46 -04:00
Richard Wei 488e250259 Make 'Complex' differentiable.
* Conform `Complex` to `Differentiable`.
* Define derivatives for `init(_:_:)`, `real`, `imaginary`, `conjugate`, `+(_:_:)`, `-(_:_:)`, `*(_:_:)`, `/(_:_:)`.

Gated under `#if canImport(_Differentiation)`.
2020-04-22 13:35:36 -07:00
Stephen Canon 9dba38cc1a Update README.md 2020-02-21 09:22:40 -05:00
Stephen Canon 76954c06a7 Back to trailing 'Module' 2020-02-21 09:22:40 -05:00