Merged
Conversation
odow
commented
Oct 10, 2024
odow
commented
Oct 10, 2024
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #307 +/- ##
==========================================
- Coverage 91.85% 90.41% -1.44%
==========================================
Files 23 22 -1
Lines 2246 2222 -24
==========================================
- Hits 2063 2009 -54
- Misses 183 213 +30 ☔ View full report in Codecov by Sentry. |
Member
Author
|
I don't understand this well enough to figure out what's going on here. |
Member
Author
|
I guess a bunch of our C calls might be invalid now? julia> x, y = setprecision(BigFloat, 32) do
return rand(BigFloat, 1), rand(BigFloat, 1)
end
(BigFloat[0.51086560986], BigFloat[0.18767778529])
julia> accurate = LinearAlgebra.dot(x, y)
0.095878126238614356830099183515159211310674436390399932861328125
julia> output = setprecision(BigFloat, 32) do
buf = MA.buffer_for(LinearAlgebra.dot, Vector{BigFloat}, Vector{BigFloat})
output = BigFloat(0)
MA.buffered_operate_to!!(buf, output, LinearAlgebra.dot, x, y)
return output
end
get_str.c:157: MPFR assertion failed: size_s1 >= m
[48611] signal 6: Abort trap: 6
in expression starting at REPL[85]:1
__pthread_kill at /usr/lib/system/libsystem_kernel.dylib (unknown line)
pthread_kill at /usr/lib/system/libsystem_pthread.dylib (unknown line)
abort at /usr/lib/system/libsystem_c.dylib (unknown line)
mpfr_assert_fail at /Users/oscar/.julia/juliaup/julia-nightly/lib/julia/libmpfr.6.dylib (unknown line)
mpfr_get_str_aux at /Users/oscar/.julia/juliaup/julia-nightly/lib/julia/libmpfr.6.dylib (unknown line)
mpfr_get_str at /Users/oscar/.julia/juliaup/julia-nightly/lib/julia/libmpfr.6.dylib (unknown line)
regular_eg at /Users/oscar/.julia/juliaup/julia-nightly/lib/julia/libmpfr.6.dylib (unknown line)
sprnt_fp at /Users/oscar/.julia/juliaup/julia-nightly/lib/julia/libmpfr.6.dylib (unknown line)
mpfr_vasnprintf_aux at /Users/oscar/.julia/juliaup/julia-nightly/lib/julia/libmpfr.6.dylib (unknown line)
mpfr_asprintf at /Users/oscar/.julia/juliaup/julia-nightly/lib/julia/libmpfr.6.dylib (unknown line)
string_mpfr at ./mpfr.jl:1187
_string at ./mpfr.jl:1233
_string at ./mpfr.jl:1235 [inlined]
show at ./mpfr.jl:1245
show at ./multimedia.jl:47
unknown function (ip: 0x104e1d5e2)This PR seems suspicous JuliaLang/julia#55906 |
Member
|
The printing is actually happened when we try to show the output. Surprisingly, replacing |
Member
|
Here is the MWE a = one(BigFloat)
b = zero(BigFloat)
ccall((:mpfr_swap, :libmpfr), Cvoid, (Ref{BigFloat}, Ref{BigFloat}), b, a)
show(b)It gives |
Member
Author
|
Okay. I tidied things up. Our previous implementation was just needlessly complicated with layers of indirection. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.