# Integer divide is a float?

**URL:** <https://forum.crystal-lang.org/t/integer-divide-is-a-float/1884>\
**Category:** Help & Support\
**Created:** [March 31, 2020, 5:53am UTC](https://forum.crystal-lang.org/t/integer-divide-is-a-float/1884 "2020-03-31T05:53:54Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![rogerdpack](https://yyz2.discourse-cdn.com/flex036/user_avatar/forum.crystal-lang.org/rogerdpack/32/117_2.png) [@rogerdpack](https://forum.crystal-lang.org/u/rogerdpack)\
**Post date:** [March 31, 2020, 5:53am UTC](https://forum.crystal-lang.org/t/integer-divide-is-a-float/1884/1 "2020-03-31T05:53:54Z")

</div>

Is this expected?

```auto
$ crystal eval "puts 3.0//4.0"
0.0 # a float?

```

Just wondering.

---

<div class="post-metadata">

**Author:** ![asterite](https://yyz2.discourse-cdn.com/flex036/user_avatar/forum.crystal-lang.org/asterite/32/60_2.png) [@asterite](https://forum.crystal-lang.org/u/asterite)\
**Post date:** [March 31, 2020, 10:42am UTC](https://forum.crystal-lang.org/t/integer-divide-is-a-float/1884/2 "2020-03-31T10:42:12Z")

</div>

Yes

---

<div class="post-metadata">

**Author:** ![bcardiff](https://yyz2.discourse-cdn.com/flex036/user_avatar/forum.crystal-lang.org/bcardiff/32/3_2.png) [@bcardiff](https://forum.crystal-lang.org/u/bcardiff)\
**Post date:** [March 31, 2020, 2:01pm UTC](https://forum.crystal-lang.org/t/integer-divide-is-a-float/1884/3 "2020-03-31T14:01:29Z")

</div>

The motivation is that / is arithmetic division. And // is floor division. The latest when applied to integers is the only one leads always to integers, hence their type.
