# Int32 and Float64 why the defaults?

**URL:** <https://forum.crystal-lang.org/t/int32-and-float64-why-the-defaults/1797>\
**Category:** Crystal Contrib\
**Created:** [March 7, 2020, 1:36am UTC](https://forum.crystal-lang.org/t/int32-and-float64-why-the-defaults/1797 "2020-03-07T01:36:00Z")\
**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 7, 2020, 1:36am UTC](https://forum.crystal-lang.org/t/int32-and-float64-why-the-defaults/1797/1 "2020-03-07T01:36:00Z")

</div>

Related to [https://github.com/crystal-lang/crystal/issues/8111](https://github.com/crystal-lang/crystal/issues/8111)  
Why are Int32 and Float64 the default primitive types? Why not both 32, or vice versa?  
Thanks!

---

<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 13, 2020, 3:59pm UTC](https://forum.crystal-lang.org/t/int32-and-float64-why-the-defaults/1797/2 "2020-03-13T15:59:39Z")

</div>

Because Int32 occupies less space and is faster. And because you get more precision with Float64 and the speed difference / memory space for float usually doesn’t matter. But I might be wrong. I think we copied that from somewhere else too, I’m not sure.

---

<div class="post-metadata">

**Author:** ![pmplant](https://avatars.discourse-cdn.com/v4/letter/p/3be4f8/32.png) [@pmplant](https://forum.crystal-lang.org/u/pmplant)\
**Post date:** [March 15, 2020, 11:27am UTC](https://forum.crystal-lang.org/t/int32-and-float64-why-the-defaults/1797/3 "2020-03-15T11:27:08Z")

</div>

These are the usual sizes integers and floating point numbers in C when compiled for x64.
