# \-0 and 0 are not equivalent in the eye of isequal() while applied in find\*() functions

**URL:** https://discourse.julialang.org/t/0-and-0-are-not-equivalent-in-the-eye-of-isequal-while-applied-in-find-functions/35513
**Category:** General Usage
**Tags:** question
**Created:** [March 4, 2020, 12:01pm UTC](https://discourse.julialang.org/t/0-and-0-are-not-equivalent-in-the-eye-of-isequal-while-applied-in-find-functions/35513 "2020-03-04T12:01:24Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![1634](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/1634/32/12119_2.png) [@1634](https://discourse.julialang.org/u/1634)
#### Post date: [March 4, 2020, 12:01pm UTC](https://discourse.julialang.org/t/0-and-0-are-not-equivalent-in-the-eye-of-isequal-while-applied-in-find-functions/35513/1 "2020-03-04T12:01:25Z")

</div>

```julia
a=[0.0, -0.0, -0.0, -3.0, 1.0, -0.0]
b=findall(isequal(0),a) #can only identify 0
c=findall(isequal(-0),a) #only for -0
bc=findall(isequal(-0)||isequal(0),a) 
#how can I pick all 0 in order in bc instead of 
 #concatennating and arrange b and c?

```

---

<div class="post-metadata">

### Author: ![cormullion](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/cormullion/32/49131_2.png) [@cormullion](https://discourse.julialang.org/u/cormullion)
#### Post date: [March 4, 2020, 12:06pm UTC](https://discourse.julialang.org/t/0-and-0-are-not-equivalent-in-the-eye-of-isequal-while-applied-in-find-functions/35513/2 "2020-03-04T12:06:55Z")

</div>

Hi there! Perhaps you want:

```julia
b=findall(iszero, a)

```

---

<div class="post-metadata">

### Author: ![yuyichao](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/yuyichao/32/20_2.png) [@yuyichao](https://discourse.julialang.org/u/yuyichao)
#### Post date: [March 4, 2020, 12:13pm UTC](https://discourse.julialang.org/t/0-and-0-are-not-equivalent-in-the-eye-of-isequal-while-applied-in-find-functions/35513/3 "2020-03-04T12:13:02Z")

</div>

> [@1634](#):
>
> c=findall(isequal(-0),a) #only for -0

You sure about that? `-0` is the `Int` `0`.

Note that this has nothing to do with `find*`, it’s simply because that’s what you asked for from `isequal`.

```julia
julia> isequal(0.0, -0.0)
false

julia> isequal(0.0, 0.0)
true

```

If you don’t want this behavior, you simply need to provide the condition that you expect. `==` should compare `-0.0` and `0.0` equal so you can just do

```julia
julia> findall(==(0), a)
4-element Array{Int64,1}:
 1
 2
 3
 6

```
