swift-numerics icon indicating copy to clipboard operation
swift-numerics copied to clipboard

Advanced mathematical types and functions for Swift

Results 82 swift-numerics issues
Sort by recently updated
recently updated
newest added
trafficstars

Currently, complex multiplication is implemented with `*` and `+`: https://github.com/apple/swift-numerics/blob/5428505255ad35b8debd2c2c432350b213e4dff5/Sources/ComplexModule/Complex%2BNumeric.swift#L15-L17 However, there are well-known cancellation issues when computing the sum or difference of products in this manner. Here are some...

~I have a suspicion that [this bug](https://github.com/dabrahams/cmake-xcode-module-path-bug) may be triggered by the CMakeLists doing things they probably shouldn't, e.g. globally setting variables like `CMAKE_Swift_MODULE_DIRECTORY` even when it is not top-level...

# Swift Playgrounds When package is added to a Swift Playgrounds „app“ it automatically sends an error: „clangTarget is not supported“. Can it be fixed? I‘m a newbie to swift...

The real and imaginary part of a complex number are extracted as follows: public var real: RealType { @_transparent get { isFinite ? x : .nan } @_transparent set {...

skipping cache due to an error: https://github.com/apple/swift-numerics.git: The repository could not be found. Make sure a valid repository exists at the specified location and try again.

Add support for `riscv64` as host architecture.

Hi there! I’ve implemented bfloat in swift over [here](https://github.com/ivarflakstad/BFloat16.swift). If you want to I am open to having it be part of numerics. If so lmk what changes would be...

## Overflow-safe integer midpoint with rounding control Draft because I am not sold on the free-function spelling `midpoint(a, b)`. It is desirable by symmetry with `min(a, b)` and `max(a, b)`,...

By returning T.Magnitude instead of T, gcd(a, b) no longer will produce fatal errors and removes a few special case lines of code. This allows the end user of the...

By returning T.Magnitude instead of T, the gcd call never traps. This also allows the end user of the call to decide how to handle the result. PR: https://github.com/apple/swift-numerics/pull/310 (Also...