Commit Graph
8 Commits
Author SHA1 Message Date
reginaldalfret 8630961065 docs(ApproximateEquality): address maintainer review feedback on abstraction and tolerances
Signed-off-by: reginaldalfret <reginaldalfret@gmail.com>
2026-10-08 17:46:40 +05:30
reginaldalfret 0d1ccaf0d3 docs: add dedicated documentation for ApproximateEquality (#153)
Add a comprehensive DocC guide for ApproximateEquality covering:
- Background and motivation for approximate equality in floating-point math
- Relative and absolute tolerance guidelines and formulas
- Special value handling (NaN, infinities, signed zeroes)
- Custom norms with AdditiveArithmetic
- Mathematical properties (non-transitivity and why not to use for Equatable)

Also update RealModule.md to link to the DocC article and restore the
Approximate equality section with a link in Sources/RealModule/README.md.

Resolves #153.

Signed-off-by: reginaldalfret <reginaldalfret@gmail.com>
2026-10-01 18:56:12 +05:30
Stephen Canon aa901641d1 Further docc improvements for RealModule.
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.
2025-08-13 12:38:56 -04:00
Stephen Canon 61a8b91b3e Some formatting cleanup around code blocks. 2025-08-12 13:20:29 -04:00
Stephen Canon 9c548804c8 Massage docc files to make the Documentation check happier 2025-08-11 18:11:44 -04:00
Stephen Canon 2361b4959b Add overview for RealModule documentation. 2025-08-08 13:43:30 -04:00
Stephen Canon 5cc83cc00a WIP 2025-08-08 09:56:01 -04:00
Stephen Canon 5d8425644a Initial work on docc setup. 2025-08-08 09:55:42 -04:00