This package attempts to add more Differentiable capabilities to the existing swift-numerics package. Every target in swift-numerics has a Differentiable counterpart that @_exported import
s the original module such that when you import NumericsDifferentiable
you will also get all the contents of the Numerics
module from swift-numerics.
- Registers derivatives to the
Float
andDouble
conformances toElementaryFunctions
andRealFunctions
from swift-numerics. - Conforms all
SIMD{n}
types toElementaryFunctions
and adds most of the protocol requirements fromRealFunctions
as well (signGamma
is not implementable) - Registers derivatives for all the provided
ElementaryFunctions
andRealFunctions
implementations on SIMD{n} - Tries to leverage Apple's
simd
framework to accelerate these operations where possible on Apple platforms.
This package makes use of SwiftFormat, which you can install from homebrew.
To apply formatting rules to all files, which you should do before submitting a PR, run from the root of the repository:
swiftformat .
Formatting is validated with the --strict
flag on every PR