You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am running Julia Version 0.3.0-prerelease+3679. Commit d0eac34
on Windows with WORD_SIZE 32.
The following behavior is inconsistent: int64(2.0^300) # throws InexactError() int32(2.0^300) # throws InexactError()
but int64(2.0^50) # 1125899906842624 int32(2.0^50) # 0
So for int32InexactError is not thrown when value is too big for 32-bits but less than 64-bits. I would expect Julia to consistently throw InexactError in such cases.
The reason for this behavior is line 81 in file float.jl: iround(x::Float64) = int32(box(Int64,fpsiround(unbox(Float64,x))))
The text was updated successfully, but these errors were encountered:
I am running Julia Version 0.3.0-prerelease+3679. Commit d0eac34
on Windows with WORD_SIZE 32.
The following behavior is inconsistent:
int64(2.0^300) # throws InexactError()
int32(2.0^300) # throws InexactError()
but
int64(2.0^50) # 1125899906842624
int32(2.0^50) # 0
So for
int32
InexactError
is not thrown when value is too big for 32-bits but less than 64-bits. I would expect Julia to consistently throwInexactError
in such cases.The reason for this behavior is line 81 in file float.jl:
iround(x::Float64) = int32(box(Int64,fpsiround(unbox(Float64,x))))
The text was updated successfully, but these errors were encountered: