apple / apple/swift-numerics

Integer utilities module

Open
#10 13 comments 0 reactions 0 assignees View on GitHub
new module
Dominant language
Swift
Stars
1.9k
Forks
181
Avg merge
2d 5h
Merged PRs (30d)
6

Description

A new module providing additional functionality on the standard library integer types (and more generally, any fixed-width integer type), including:

- [x] - bitwise rotation
- [ ] - full add / sub (with carryin/carryout)
- [x] - saturating arithmetic (functions, not operators)
- [x] - division with rounding control
- [x] - shift with rounding control
- [x] - "true" mod function (Euclidean division)
- [x] - GCD
- [ ] - division by constant (precompute magic multiply and shift a la libdivide)
- [ ] - modulus by constant (use Lemire's method)

Contributor guide

Open the contributing guide

Research direction

No source file or test is named. Start by reviewing the repository's existing module layout and integer-related tests, then determine the scope and API for one unchecked item in this checklist. Done means the selected integer utility is implemented for fixed-width integer types and covered by tests.

Written by the indexing model from the issue text.

Assessment

Tech stack
swift
Domain
backend
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.