swift-numerics
swift-numerics copied to clipboard
Conform Quaternion to Elementary Functions
This extends https://github.com/apple/swift-numerics/pull/206 and adds the remaining quaternionic elementary functions; making Quaternion
fully conform to ElementaryFunctions
. 🎉
Most of the functions draw inspiration from the implementation details of the corresponding elementary function on complex numbers. Nonetheless, I greatly appreciate every comment, feedback or suggestions!
Links to new elementary functions:
The implementation is still functional, but I am trying to improve the error bounds on log
and maybe add an executable to validate the worst-case error (much like the ComplexLog tests), and so I would like to leave it as a draft for now.