We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Maybe I'm doing something wrong, but absolute values on ArbComplex returns zero every time:
ArbComplex
julia> z = 0.5 + 0.3im; julia> abs(z) 0.5830951894845301 julia> z = ArbComplex(0.5, 0.3) 0.5 + 0.2999999999999999888977697537484im julia> abs(z) 0
The issue seems to be with z = ArbReal{P}() in
z = ArbReal{P}()
ArbNumerics.jl/src/float/prearith.jl
Lines 84 to 88 in 0cfcf98
function _abs(x::ArbComplex{P}) where {P} z = ArbComplex{P}() ccall(ArbNumerics.@libarb(acb_abs), Cvoid, (Ref{ArbComplex}, Ref{ArbComplex}, Clong), z, x, P) return real(z) end _abs(ArbComplex(0.5, 0.3, bits=256)) abs(0.5 + 0.3im)
julia> _abs(ArbComplex(0.5, 0.3, bits=256)) 0.58309518948453004137536495027902554867375965029811700288720077783633574140908 julia> abs(0.5 + 0.3im) 0.5830951894845301
Then it seems to work.
The text was updated successfully, but these errors were encountered:
thank you for this
Sorry, something went wrong.
fixed in master, merge pending
No branches or pull requests
Maybe I'm doing something wrong, but absolute values on
ArbComplex
returns zero every time:The issue seems to be with
z = ArbReal{P}()
inArbNumerics.jl/src/float/prearith.jl
Lines 84 to 88 in 0cfcf98
Then it seems to work.
The text was updated successfully, but these errors were encountered: