# BitShift operator on float

**URL:** <https://discourse.julialang.org/t/bitshift-operator-on-float/6364>\
**Category:** General Usage\
**Created:** [October 9, 2017, 9:24pm UTC](https://discourse.julialang.org/t/bitshift-operator-on-float/6364 "2017-10-09T21:24:34Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![nico202](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/nico202/32/1009_2.png) [@nico202](https://discourse.julialang.org/u/nico202)\
**Post date:** [October 9, 2017, 9:24pm UTC](https://discourse.julialang.org/t/bitshift-operator-on-float/6364/1 "2017-10-09T21:24:34Z")

</div>

Hi, I wonder why isn’t \<\< (with \>\> and \>\>\>) defined for float (32 and 64). Is it because of flaoting point vs fixed?

Thanks, Nicolò

---

<div class="post-metadata">

**Author:** ![rdeits](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/rdeits/32/286_2.png) [@rdeits](https://discourse.julialang.org/u/rdeits)\
**Post date:** [October 9, 2017, 11:05pm UTC](https://discourse.julialang.org/t/bitshift-operator-on-float/6364/2 "2017-10-09T23:05:00Z")

</div>

> Is it because of flaoting point vs fixed

Yup, basically. This isn’t specific to Julia; see: [c - Left shift Float type - Stack Overflow](https://stackoverflow.com/questions/9315539/left-shift-float-type)

---

<div class="post-metadata">

**Author:** ![stevengj](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/stevengj/32/71_2.png) [@stevengj](https://discourse.julialang.org/u/stevengj)\
**Post date:** [October 10, 2017, 12:22am UTC](https://discourse.julialang.org/t/bitshift-operator-on-float/6364/3 "2017-10-10T00:22:29Z")

</div>

Note also that you can use the `exp2` function to multiply or divide a floating-point number by a power of 2.
