Skip to content

implement operate_to!!(::BigInt, ::typeof(copy), ::T) for small int T#357

Merged
blegat merged 2 commits intojump-dev:masterfrom
nsajko:BigInt-set-set_ui-set_si
Apr 3, 2026
Merged

implement operate_to!!(::BigInt, ::typeof(copy), ::T) for small int T#357
blegat merged 2 commits intojump-dev:masterfrom
nsajko:BigInt-set-set_ui-set_si

Conversation

@nsajko
Copy link
Copy Markdown
Contributor

@nsajko nsajko commented Apr 2, 2026

GMP natively supports integer types no wider than Clong or Culong, so make use of that.

A followup PR may add support for generic subtypes of Integer, too.

Fixes #354

GMP natively supports integer types no wider than `Clong` or `Culong`,
so make use of that.

A followup PR may add support for generic subtypes of `Integer`, too.

Fixes jump-dev#354
@nsajko nsajko force-pushed the BigInt-set-set_ui-set_si branch from 460f4d6 to b20ebda Compare April 2, 2026 09:56
@codecov
Copy link
Copy Markdown

codecov bot commented Apr 2, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 91.57%. Comparing base (c271f3f) to head (f8a1ec3).
⚠️ Report is 1 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master     #357      +/-   ##
==========================================
- Coverage   91.59%   91.57%   -0.02%     
==========================================
  Files          23       23              
  Lines        2307     2315       +8     
==========================================
+ Hits         2113     2120       +7     
- Misses        194      195       +1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@nsajko nsajko marked this pull request as ready for review April 2, 2026 10:09
@nsajko
Copy link
Copy Markdown
Contributor Author

nsajko commented Apr 2, 2026

Codecov is saying the PR indirectly diminishes coverage. However I am not able to view the indirect changes to coverage in the Codecov Web UI, getting error 400.

Co-authored-by: Benoît Legat <benoit.legat@gmail.com>
function operate_to!(
out::BigInt,
::typeof(copy),
in::Union{Bool,Int8,Int16,Int32,Clong,UInt8,UInt16,UInt32,Culong,BigInt},
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not a big fan of calling a variable in, it will make Julia parsers and interpeters trip because it's used in x in set

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I agree, however that is what the surrounding code does. So I followed the pattern for consistency.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Indeed, then that's a separate issue

@blegat blegat merged commit 11a3c45 into jump-dev:master Apr 3, 2026
10 of 11 checks passed
@nsajko nsajko deleted the BigInt-set-set_ui-set_si branch April 4, 2026 02:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

[FR]: implement operate_to!!(::BigInt, ::typeof(copy), ::Int)

2 participants