NevinBR
NevinBR
https://github.com/apple/swift-numerics/blob/f96c6c20666aefcccb63630659eae15623e47837/Sources/Complex/Complex.swift#L227 Currently, `Complex.magnitude` is calculated using the `abs()` free function instead of the `.magnitude` property on its real and imaginary parts. I don’t know if there is any difference at...
It is common to need a random sample from either a real or complex normal distribution. The standard library provides static `random(in:)` methods which sample uniformly, in a constrained extension...
The natural place to write many generic algorithms is the protocol composition `AlgebraicField & ElementaryFunctions`, as it provides all the basic arithmetic operations including negation and division, as well as...
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...
The index calculation `7 = 2 × 3 + 1` had been incorrectly written as `7 = 2 × 2 + 1`.