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
Hi ! Seems BigFloat fails to compare when used in structs. Here is a minimal example
BigFloat
struct DW1 h::Float64 l::Float64 end struct DW2 h::BigFloat l::BigFloat end x1, y1 = DW1(1, 2), DW1(1, 2) x2, y2 = DW2(1, 2), DW2(1, 2) println("Struct/Float64: ", x1 == y1) println("Struct/BigFloat: ", x2 == y2) println("Tuple workaround: ", (x2.h, x2.l) == (y2.h, y2.l)) println("Attribute workaround: ", x2.h == y2.h && x2.l == y2.l)
My output:
Struct/Float64: true Struct/BigFloat: false Tuple workaround: true Attribute workaround: true
To me, the second line should be true.
My versioninfo():
versioninfo()
Julia Version 1.6.0 Commit f9720dc2eb* (2021-03-24 12:55 UTC) Platform Info: OS: Linux (x86_64-pc-linux-gnu) CPU: Intel(R) Core(TM) i5-7440HQ CPU @ 2.80GHz WORD_SIZE: 64 LIBM: libopenlibm LLVM: libLLVM-11.1.0 (ORCJIT, skylake)
The text was updated successfully, but these errors were encountered:
The difference is
julia> x1.h === y1.h true julia> x2.h === y2.h false
Sorry, something went wrong.
Duplicate of #4648
No branches or pull requests
Hi !
Seems
BigFloat
fails to compare when used in structs. Here is a minimal exampleMy output:
To me, the second line should be true.
My
versioninfo()
:The text was updated successfully, but these errors were encountered: