mirror of
https://github.com/apple/swift-numerics
synced 2026-11-24 04:38:11 +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.
28 lines
444 B
Markdown
28 lines
444 B
Markdown
# ``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(_:)``
|