529 Commits
Author SHA1 Message Date
Stephen Canon eb58826429 Merge pull request #362 from charles-zablit/cz/cmake/cmp0157
[CMake] Require CMake 3.29 to enable CMP0157
2026-11-18 11:01:42 -05:00
Charles Zablit 02deda5402 [CMake] Require CMake 3.29 to enable CMP0157 2026-11-06 12:05:41 +00:00
Stephen Canon 669f618518 Merge pull request #360 from stephentyrone/use-builtin-module-for-builtins
Enable and include Builtin module to pickup fadd/fmul_relaxed.
2026-10-11 17:05:59 -04:00
Stephen Canon 673c0f6c3d Enable and include Builtin module to pickup fadd/fmul_relaxed. 2026-10-11 17:00:36 -04:00
Stephen Canon 20fe3d7d8e Merge pull request #358 from stephentyrone/adopt-builtin-relaxed-ops
Use BuiltinRelaxedFP ops instead of C shims when they're available.
2026-10-09 15:31:22 -04:00
Stephen Canon 69890e3639 Use BuiltinRelaxedFP ops instead of C shims when they're available.
There used to not be any way to attach reassociate or contract flags to fadd/fmul from Swift, which meant that we had to use inline C shims to accomplish this. But I added some Builtins to Swift, so now we don't need C to do this any longer.
2026-10-08 11:24:58 -04:00
Stephen Canon 8a65bea94b Merge pull request #336 from kkebo/fix-freebsd-tests
Skip Float80 overflow/underflow tests on FreeBSD
2026-10-08 11:15:15 -04:00
Stephen Canon 9f745b7c9b Merge pull request #355 from reginaldalfret/docs/approximate-equality
docs: add dedicated documentation for ApproximateEquality
2026-10-08 10:44:08 -04:00
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 a7d826ead0 Merge pull request #352 from stephentyrone/fix-cosh-sinh-signs
Fix signs of cosh and sinh near the overflow boundary.
2026-09-10 10:53:41 -04:00
Stephen Canon 20a774f1a6 Merge pull request #351 from stephentyrone/recip-documentation
Relax documented behavior of Complex.reciprocal
2026-09-10 10:30:39 -04:00
Stephen Canon c2d05532d3 Fix signs of cosh and sinh near the overflow boundary.
Resovles https://github.com/apple/swift-numerics/issues/347
2026-09-10 10:27:51 -04:00
Stephen Canon 3b272b08af a word. 2026-09-10 10:09:49 -04:00
Stephen Canon bb7b69501f Relax documented behavior of Complex.reciprocal
In cases of underflow, multiplication by reciprocal may not be the same as division. Document this, rather than tightening the behavior, because it's still about as good as multiplication by reciprocal would be for a Real type.
2026-09-10 10:07:01 -04:00
Stephen Canon 738b0cdb23 Merge pull request #345 from kadyrbekovhamit-cyber/fix-rounding-documentation-examples
Replace nonexistent stochastic-rounding examples
2026-09-10 09:45:04 -04:00
Stephen Canon ee167adfea Merge pull request #350 from pkubaj/add-freebsd-ppc64
cmake: recognize FreeBSD powerpc64le/powerpc64 in get_swift_host_arch
2026-09-10 09:44:45 -04:00
Stephen Canon a6c13f7de8 Merge pull request #348 from kadyrbekovhamit-cyber/patch-2
Correct toNearestOrZero shift example
2026-09-10 09:44:24 -04:00
Piotr Kubaj ea5d4cf4a5 cmake: recognize FreeBSD powerpc64le/powerpc64 in get_swift_host_arch
get_swift_host_arch() maps CMAKE_SYSTEM_PROCESSOR to a Swift architecture
name using the Linux spellings (ppc64le, ppc64).  On FreeBSD the
processor is reported as powerpc64le / powerpc64, so the PowerPC host was
falling through to the "Unrecognized architecture" error.  Accept the
FreeBSD spellings alongside the existing ones.
2026-09-08 09:25:01 +02:00
kadyrbekovhamit-cyber 15eab09844 Correct toNearestOrZero shift example
5 / 2 is exactly halfway between 2 and 3. The toNearestOrZero tie-breaking rule selects 2, the value with smaller magnitude.
2026-09-05 14:08:17 +05:00
kadyrbekovhamit-cyber 2d92c04e96 Leave existing tie-to-zero fix to PR 341 2026-09-04 22:37:41 +05:00
kadyrbekovhamit-cyber aa5684820a Correct rounding documentation examples 2026-09-04 21:30:38 +05:00
Kenta Kubo 63dc00f053 [CI] Enable FreeBSD testing 2026-05-27 22:02:24 +09:00
Kenta Kubo 1f6c508c58 Skip Float80 overflow/underflow tests on FreeBSD
This is a workaround for FreeBSD's bug.
2026-02-07 20:30:49 +09:00
Stephen Canon 899af71c02 Merge pull request #328 from stephentyrone/complex-divide-docs
Added some notes on complex division.
2026-01-28 20:58:00 -05:00
Stephen Canon 178f513ce6 Merge pull request #316 from stephentyrone/enable-macos-github
Enable macos checks via github workflows.
2025-11-13 18:34:22 -05:00
Stephen Canon 3403d50630 Merge branch 'main' into enable-macos-github 2025-11-13 16:09:08 -05:00
Stephen Canon 167fe9b22a Merge pull request #332 from incertum/chore/workflow-permissions
chore: restrict GitHub workflow permissions - future-proof
2025-10-27 17:08:09 -04:00
Melissa Kilby 50552bf86b chore: restrict GitHub workflow permissions - future-proof
Signed-off-by: Melissa Kilby <mkilby@apple.com>
2025-10-17 16:12:07 -07:00
Stephen Canon 18274b1caa Merge pull request #330 from ebariaux/main
Support Embedded Swift
2025-09-25 11:15:42 -04:00
Eric Bariaux 894008997c Ensure compatibility with Swift versions below 6 2025-09-25 12:41:14 +02:00
Eric Bariaux d46e20b4c5 String(reflecting:) not available in Embedded mode.
And Real does not conform to CustomDebugStringConvertible, so can't access debugDescription property directly on x and y
2025-09-18 07:21:15 +02:00
Eric Bariaux 6a7cf593bf Codable not available right-now in Embedded mode 2025-09-18 07:20:19 +02:00
Stephen Canon cbdb286797 Added some notes on complex division. 2025-08-20 19:18:41 -04:00
Stephen Canon be0d7c65d1 Merge pull request #325 from stephentyrone/enable-wasm-testing
Enable workflows testing for wasm.
2025-08-14 12:57:32 -04:00
Stephen Canon 5bfe9e16ce Remove relaxed add/mul for Float16 on wasm, as they cannot be defined. 2025-08-14 09:45:04 -04:00
Stephen Canon 46619b49ec Attempt to turn on workflows testing for wasm. 2025-08-14 09:40:35 -04:00
Stephen Canon 231815ea4b Merge pull request #324 from stephentyrone/disable-windows-5.9
Disable Swift 5.9 testing on Windows for now
2025-08-14 09:36:21 -04:00
Stephen Canon e74905c6d5 Disable Swift 5.9 testing on Windows for now
That docker image seems to be broken, so it's all false positives.
2025-08-14 09:08:40 -04:00
Stephen Canon a50d9575fe Merge pull request #265 from stephentyrone/docc-stuff
Documentation overhaul, including broad .docc adoption and organization.
2025-08-13 23:02:13 -04:00
Stephen Canon 1e94d23860 Cleanup further doc comment typos. 2025-08-13 14:37:51 -04:00
Stephen Canon b3fe4357f8 Fix typo. 2025-08-13 13:50:49 -04:00
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 2c19b7b8cd Last few review notes on complex. 2025-08-12 15:13:07 -04:00
Stephen Canon 221387985a Further review edits from Nate. 2025-08-12 15:04:11 -04:00
Stephen Canon 8b2fd7bbde Provide transliteration of Чебышёв. 2025-08-12 14:52:42 -04:00
Stephen Canon b43c10c1e3 Merge branch 'main' into docc-stuff 2025-08-12 13:23:02 -04:00
Stephen Canon 61a8b91b3e Some formatting cleanup around code blocks. 2025-08-12 13:20:29 -04:00
Stephen Canon 8c4747f116 Merge pull request #321 from stephentyrone/remove-2sum-assert
Remove precondition assert from Augmented.sum(large:small:)
2025-08-11 19:34:53 -04:00
Stephen Canon c3757dc266 Fix typo. (Thanks, Guillaume) 2025-08-11 19:33:27 -04:00