# \#isequal

**URL:** https://discourse.julialang.org/tag/isequal/390.md

[Latest](https://discourse.julialang.org/latest.md) · [Categories](https://discourse.julialang.org/categories.md) · [Tags](https://discourse.julialang.org/tags.md)

---

## [In what case \`x===y\` and \`objectid(x) == objectid(y)\` are not interchangable?](https://discourse.julialang.org/t/in-what-case-x-y-and-objectid-x-objectid-y-are-not-interchangable/123265)

<div class="topic-metadata">

**Author:** [@frankwswang](https://discourse.julialang.org/u/frankwswang)\
**Replies:** 3\
**Last updated:** [November 29, 2024, 11:42pm UTC](https://discourse.julialang.org/t/in-what-case-x-y-and-objectid-x-objectid-y-are-not-interchangable/123265 "2024-11-29T23:42:25Z")

</div>

I was reading the official documentation and found the following statement about objectid: If x === y then objectid(x) == objectid(y) , and usually when x !== y , objectid(x) != objectid(y) . It seems that there are …

---

## [How to compare two vectors whose elements are equal but their types are not the same?](https://discourse.julialang.org/t/how-to-compare-two-vectors-whose-elements-are-equal-but-their-types-are-not-the-same/94309)

<div class="topic-metadata">

**Author:** [@singularitti](https://discourse.julialang.org/u/singularitti)\
**Replies:** 5\
**Last updated:** [February 9, 2023, 3:53pm UTC](https://discourse.julialang.org/t/how-to-compare-two-vectors-whose-elements-are-equal-but-their-types-are-not-the-same/94309 "2023-02-09T15:53:30Z")

</div>

Suppose we have two types, A and B, which are just two wrapper types of Vectors: struct A{T} \<: AbstractVector{T} data::Vector{T} end struct B{T} \<: AbstractVector{T} data::Vector{T} end Base.size(x::Union{A,B}) …

---

## [Why does \`==\` for custom types not compare field equality by default](https://discourse.julialang.org/t/why-does-for-custom-types-not-compare-field-equality-by-default/91730)

<div class="topic-metadata">

**Author:** [@GoodDayToYouAll](https://discourse.julialang.org/u/GoodDayToYouAll)\
**Replies:** 5\
**Last updated:** [December 19, 2022, 10:52am UTC](https://discourse.julialang.org/t/why-does-for-custom-types-not-compare-field-equality-by-default/91730 "2022-12-19T10:52:51Z")

</div>

Hi everyone, so this is less of a question how this works, but more of why it is implemented that way (I am trying to get into the Julia way of thinking and sometimes language designs seem counter intuitive). So I know…

---

## [Edge case in Sets with Floats](https://discourse.julialang.org/t/edge-case-in-sets-with-floats/78787)

<div class="topic-metadata">

**Author:** [@fatteneder](https://discourse.julialang.org/u/fatteneder)\
**Replies:** 6\
**Last updated:** [March 31, 2022, 12:25pm UTC](https://discourse.julialang.org/t/edge-case-in-sets-with-floats/78787 "2022-03-31T12:25:00Z")

</div>

Hi Julia Community, recently I was approached by a colleague who just got started with Julia and ran into a problem that took him ages to debug. We then seat down together and could come up with the following MWE: juli…

---

## [Struct equality seems weird inside Sets](https://discourse.julialang.org/t/struct-equality-seems-weird-inside-sets/51283)

<div class="topic-metadata">

**Author:** [@bsuwal](https://discourse.julialang.org/u/bsuwal)\
**Replies:** 6\
**Last updated:** [December 5, 2020, 12:52am UTC](https://discourse.julialang.org/t/struct-equality-seems-weird-inside-sets/51283 "2020-12-05T00:52:53Z")

</div>

Can someone help me understand this behavior? So I define a struct. To define what equality means for the struct, I define the == function for the struct, and also a hash() function. Note the println() statements i…

---

## [How is equality of anonymous function closures checked?](https://discourse.julialang.org/t/how-is-equality-of-anonymous-function-closures-checked/49397)

<div class="topic-metadata">

**Author:** [@mahrud](https://discourse.julialang.org/u/mahrud)\
**Replies:** 14\
**Last updated:** [November 5, 2020, 2:13pm UTC](https://discourse.julialang.org/t/how-is-equality-of-anonymous-function-closures-checked/49397 "2020-11-05T14:13:08Z")

</div>

I was wondering how equality of functions works in Julia, and eventually stumbled on this example, which I can’t quite explain: julia\> f = x -\> y -\> x + y #1 (generic function with 1 method) julia\> g = f(1); h = f(1); …

---

## [The test isequal(+0.0,-0.0) returns FALSE](https://discourse.julialang.org/t/the-test-isequal-0-0-0-0-returns-false/38404)

<div class="topic-metadata">

**Author:** [@Lian\_Yunlong](https://discourse.julialang.org/u/Lian_Yunlong)\
**Replies:** 16\
**Last updated:** [June 2, 2020, 7:31am UTC](https://discourse.julialang.org/t/the-test-isequal-0-0-0-0-returns-false/38404 "2020-06-02T07:31:09Z")

</div>

so as isequal(+0.0im,-0.0im). I discovered this during a painful debug process. I really want to understand the philosophy behind this designing, and I wish to get some advice on numerical stability. Thank you @everyon…
