# Odd behaviour of operators on a range?

**URL:** <https://discourse.julialang.org/t/odd-behaviour-of-operators-on-a-range/45557>\
**Category:** New to Julia\
**Created:** [August 26, 2020, 7:50am UTC](https://discourse.julialang.org/t/odd-behaviour-of-operators-on-a-range/45557 "2020-08-26T07:50:39Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![sylvaticus](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/sylvaticus/32/203883_2.png) [@sylvaticus](https://discourse.julialang.org/u/sylvaticus)\
**Post date:** [August 26, 2020, 7:50am UTC](https://discourse.julialang.org/t/odd-behaviour-of-operators-on-a-range/45557/1 "2020-08-26T07:50:39Z")

</div>

See the first two lines:  
 ![image](https://global.discourse-cdn.com/julialang/original/3X/b/1/b1f68903d1b2c457217458bc933dfb5b0710f960.png)

Intuitively I would have expected it to return 1001:1010 for the plus and 1000:1000:10000 for the multiplication, that is with the range collected before the operation and eventually reimplemented as range…

I am sure this is documented somewhere, just find it pretty odd…

---

<div class="post-metadata">

**Author:** ![simeonschaub](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/simeonschaub/32/216566_2.png) [@simeonschaub](https://discourse.julialang.org/u/simeonschaub)\
**Post date:** [August 26, 2020, 7:58am UTC](https://discourse.julialang.org/t/odd-behaviour-of-operators-on-a-range/45557/2 "2020-08-26T07:58:20Z")

</div>

`.+` and `.*` bind tighter than `:`, so the first two are equivalent to `(1000 .+ 1):10` and `(1000 .* 1):10` respectively. This behavior is certainly expected and unlikely to change.
