# Different exponent results with Int64 and Float64

**URL:** <https://discourse.julialang.org/t/different-exponent-results-with-int64-and-float64/46804>\
**Category:** General Usage\
**Tags:** question, type\
**Created:** [September 17, 2020, 9:21pm UTC](https://discourse.julialang.org/t/different-exponent-results-with-int64-and-float64/46804 "2020-09-17T21:21:08Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![cadojo](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/cadojo/32/25328_2.png) [@cadojo](https://discourse.julialang.org/u/cadojo)\
**Post date:** [September 17, 2020, 9:21pm UTC](https://discourse.julialang.org/t/different-exponent-results-with-int64-and-float64/46804/1 "2020-09-17T21:21:08Z")

</div>

During a calculation, I realized the following two examples produce different results. This doesn’t match my intuition, because the first example defaults to Int64, and the second example defaults to Float64.

> julia\> (15000000 + 6371000)^3  
> 2227832818647195136

> julia\> (15000000.0 + 6371000.0)^3  
> 9.760555447811e21

Why do the two calculations produce different results? The first example defaults to Int64 when I check the type, and the calculation should be far far below the [max Int64 value](https://docs.julialang.org/en/v1/manual/integers-and-floating-point-numbers/).

---

<div class="post-metadata">

**Author:** ![ericphanson](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/ericphanson/32/215186_2.png) [@ericphanson](https://discourse.julialang.org/u/ericphanson)\
**Post date:** [September 17, 2020, 9:25pm UTC](https://discourse.julialang.org/t/different-exponent-results-with-int64-and-float64/46804/2 "2020-09-17T21:25:59Z")

</div>

> [@cadojo](#):
>
> calculation should be far far below the [max Int64 value](https://docs.julialang.org/en/v1/manual/integers-and-floating-point-numbers/)

Nope, 2^{63} is about 10^{19}, and as the floating point calculation shows, the answer is bigger than that (more like 10^{22}).
