Skip to content

Reduce complexity of division and fix pow function to properly return for negative exponents#10

Merged
SamHerts merged 3 commits into
mainfrom
fix_#9
May 8, 2026
Merged

Reduce complexity of division and fix pow function to properly return for negative exponents#10
SamHerts merged 3 commits into
mainfrom
fix_#9

Conversation

@SamHerts
Copy link
Copy Markdown
Owner

@SamHerts SamHerts commented May 8, 2026

As @mfasi showed in #9, when division numerator and denominator get too close in value, but larger than a single vector slice can hold, the recursion in division causes an infinite loop. The pow function also accepted negative numbers and caused issues.

@SamHerts
Copy link
Copy Markdown
Owner Author

SamHerts commented May 8, 2026

TODO: Add a function which bypasses pow's overhead when base is 10. Either string based concatenation or some other method.

@SamHerts SamHerts merged commit 5f0bdca into main May 8, 2026
15 checks passed
@SamHerts SamHerts deleted the fix_#9 branch May 8, 2026 18:00
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.

1 participant