mirror of
https://github.com/apple/swift-numerics
synced 2026-11-23 04:34:25 +00:00
This commit _also_ relaxes the constraint on Augmented algorithms from Real to FloatingPoint. It's worth calling out that fastTwoSum does not work with decimal floating-point types, so the unordered `Augemented.sum(_:_:)` now has a radix check and calls into the ordered twoSum function instead for Decimal. This makes more sense that a `BinaryFloatingPoint` constraint, as otherwise generic code written against Real or FloatingPoint would have to do the check at every call site.
444 B
444 B
RealFunctions
A type that extends ElementaryFunctions with additional operations that
are primarily used with real numbers.
Topics
Exponential functions
exp2(_:)exp10(_:)
Logarithmetic functions
log2(_:)log10(_:)
Plane geometry
atan2(y:x:)hypot(_:_:)
Gamma function
gamma(_:)logGamma(_:)signGamma(_:)
Error function
erf(_:)erfc(_:)