Skip to content

Avoid undefined-reference errors for BigFloat/BigInt - #79

Merged
lkdvos merged 5 commits into
mainfrom
ksh/big
Aug 13, 2026
Merged

Avoid undefined-reference errors for BigFloat/BigInt#79
lkdvos merged 5 commits into
mainfrom
ksh/big

Conversation

@kshyatt

@kshyatt kshyatt commented Aug 6, 2026

Copy link
Copy Markdown
Member

If you create a Vector{BigFloat}(undef, N), because BigFloat is "secretly" itself a vector, once you fill it you can hit undefined reference errors with the naive fill!. This adds a special path for these big numbers and some tests.

@kshyatt
kshyatt requested a review from lkdvos August 6, 2026 12:00
@lkdvos

lkdvos commented Aug 6, 2026

Copy link
Copy Markdown
Member

This is actually a really annoying thing: in Julia 1.12 there is an easy fix by just using map!(Returns(val), A) (single-arg), but that is 1.12+ only. I would slightly prefer if we could make that work anyways instead of having to special case here, but it might require being a bit careful with the 1.10 versions

@codecov

codecov Bot commented Aug 6, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

Files with missing lines Coverage Δ
src/mapreduce.jl 93.38% <100.00%> (+0.56%) ⬆️

... and 1 file with indirect coverage changes

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

@kshyatt

kshyatt commented Aug 13, 2026

Copy link
Copy Markdown
Member Author

I would slightly prefer if we could make that work anyways instead of having to special case here, but it might require being a bit careful with the 1.10 versions

Do we feel strongly enough about this to do it in this PR, or leave a comment and follow up?

@lkdvos

lkdvos commented Aug 13, 2026

Copy link
Copy Markdown
Member

I tried doing what I had in mind here, let me know if this is what you had in mind?

Slightly importantly this is actually not entirely following the Base implementation, which is actually calling map!(f, A) = map!(f, A, A), which has some slightly weird effects about number of arguments that end up being supplied to the function. (i.e. map!(sin, A) would now fail because sin() doesn't work). To be completely honest, I think this is a better design anyways, but it might be too opinionated?

[edit] while writing this I actually changed my mind, this last example seems silly to me, so probably better to follow base anyways, my bad.

@lkdvos
lkdvos merged commit 590bbed into main Aug 13, 2026
8 of 12 checks passed
@lkdvos
lkdvos deleted the ksh/big branch August 13, 2026 14:02
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