Skip to content

Permit larger arguments to combinatorial functions#65

Open
kg583 wants to merge 4 commits into
ArkScript-lang:masterfrom
kg583:combinatorics
Open

Permit larger arguments to combinatorial functions#65
kg583 wants to merge 4 commits into
ArkScript-lang:masterfrom
kg583:combinatorics

Conversation

@kg583

@kg583 kg583 commented Jun 11, 2026

Copy link
Copy Markdown

Modifies permutations and binomialCoeff to do less division, reducing precision loss from floats when the answer can be faithfully represented as an integer.

Current: (binomialCoeff 90 13) == 1643385429346678.5
This patch: (binomialCoeff 90 13) == 1643385429346680

(dunno how ArkDoc authorship works when patching something)

@CLAassistant

CLAassistant commented Jun 11, 2026

Copy link
Copy Markdown

CLA assistant check
All committers have signed the CLA.

@SuperFola

Copy link
Copy Markdown
Member

Hi!

Thanks for the fix, could you add a test with your example inside tests/math-tests.ark?

Since the implementation of the functions you modified changed, I'd argue you can add yourself to the authors (add a comma after the url in @author and add your gh profile, if you want to appear as a co author).

@kg583

kg583 commented Jun 12, 2026

Copy link
Copy Markdown
Author

Whoops, thought I already committed that.

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.

3 participants