Skip to content

@coven/math refactor#36

Merged
loucyx merged 14 commits into
mainfrom
math-refactor
Apr 17, 2026
Merged

@coven/math refactor#36
loucyx merged 14 commits into
mainfrom
math-refactor

Conversation

@loucyx
Copy link
Copy Markdown
Contributor

@loucyx loucyx commented Apr 17, 2026

This PR introduces a refactor for @coven/math to make it more robust and fast. Internally now never does operations with number values, only Precise values (tuple of bigint), and only converts to and from number on surface utilities (like calculate). For edge cases like NaN or Infinity, it has a fallback to regular math operations.

Besides that we are introducing a new getGroups util in @coven/expression to make cleaner and safer use of named capture groups. Some libraries that previously were doing use of ?.groups are now using this util.

memoFunction now returns a frozen function, so it can't be mutated.

In @coven/types we have a new ExpectedStringables to create a string type that requires the existence of a set of Stringables.

@loucyx loucyx self-assigned this Apr 17, 2026
@loucyx loucyx requested a review from a team as a code owner April 17, 2026 07:19
@codecov
Copy link
Copy Markdown

codecov Bot commented Apr 17, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@loucyx loucyx merged commit 3b6abeb into main Apr 17, 2026
3 checks passed
@loucyx loucyx deleted the math-refactor branch April 17, 2026 10:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants