# What is the difference between "rand(150) .\<= 0.1" and "rand(150) .= rand(150) .\<= 0.1"?

**URL:** <https://discourse.julialang.org/t/what-is-the-difference-between-rand-150-0-1-and-rand-150-rand-150-0-1/62418>\
**Category:** General Usage\
**Tags:** question\
**Created:** [June 5, 2021, 7:54am UTC](https://discourse.julialang.org/t/what-is-the-difference-between-rand-150-0-1-and-rand-150-rand-150-0-1/62418 "2021-06-05T07:54:08Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![achitsaz73](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/achitsaz73/32/24812_2.png) [@achitsaz73](https://discourse.julialang.org/u/achitsaz73)\
**Post date:** [June 5, 2021, 7:54am UTC](https://discourse.julialang.org/t/what-is-the-difference-between-rand-150-0-1-and-rand-150-rand-150-0-1/62418/1 "2021-06-05T07:54:08Z")

</div>

It was my fault and I asked the wrong question. I apologize and delete the question.

---

<div class="post-metadata">

**Author:** ![johnmyleswhite](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/johnmyleswhite/32/31_2.png) [@johnmyleswhite](https://discourse.julialang.org/u/johnmyleswhite)\
**Post date:** [June 5, 2021, 8:01am UTC](https://discourse.julialang.org/t/what-is-the-difference-between-rand-150-0-1-and-rand-150-rand-150-0-1/62418/2 "2021-06-05T08:01:57Z")

</div>

The second expression does something like the following, but without introducing a binding that makes things clear, no?

```julia
x = rand(150) 
x .= rand(150) .<= 0.1

```

---

<div class="post-metadata">

**Author:** ![achitsaz73](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/achitsaz73/32/24812_2.png) [@achitsaz73](https://discourse.julialang.org/u/achitsaz73)\
**Post date:** [June 5, 2021, 8:16am UTC](https://discourse.julialang.org/t/what-is-the-difference-between-rand-150-0-1-and-rand-150-rand-150-0-1/62418/4 "2021-06-05T08:16:50Z")

</div>

> [@johnmyleswhite](#):
>
> ```julia
> x = rand(150) 
> x .= rand(150) .<= 0.1
> 
> ```

Yes it is definitely clearer but I don’t know if code `rand(150) .= rand(150) .<= 0.1` is exactly equal to  
`x = rand(150) x .= rand(150) .<= 0.1` .

Are they exactly equal?

and what’s the main answer?

tnx
