# Exponentiation returning negative value or zero value when should be positive

**URL:** <https://discourse.julialang.org/t/exponentiation-returning-negative-value-or-zero-value-when-should-be-positive/82330>\
**Category:** General Usage\
**Created:** [June 6, 2022, 6:13pm UTC](https://discourse.julialang.org/t/exponentiation-returning-negative-value-or-zero-value-when-should-be-positive/82330 "2022-06-06T18:13:41Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Max\_Beez](https://avatars.discourse-cdn.com/v4/letter/m/7bcc69/32.png) [@Max\_Beez](https://discourse.julialang.org/u/Max_Beez)\
**Post date:** [June 6, 2022, 6:13pm UTC](https://discourse.julialang.org/t/exponentiation-returning-negative-value-or-zero-value-when-should-be-positive/82330/1 "2022-06-06T18:13:41Z")

</div>

If I use the exponentiation operator in the terminal for a positive integer to itself, sometimes it returns a negative value or returns zero. Below is two screen shots.

![Screen Shot 2022-06-06 at 11.08.40 AM](https://global.discourse-cdn.com/julialang/original/3X/0/8/08fff5ebb8fba438a23d27e3350bf5e03ed0e37b.png)

![Screen Shot 2022-06-06 at 11.17.44 AM](https://global.discourse-cdn.com/julialang/original/3X/e/9/e9d59edbc30af609753b5ee552885fe53b571e13.png)

Could someone explain why this could be occurring? Or if there is a fix.

---

<div class="post-metadata">

**Author:** ![mbaz](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/mbaz/32/17295_2.png) [@mbaz](https://discourse.julialang.org/u/mbaz)\
**Post date:** [June 6, 2022, 6:18pm UTC](https://discourse.julialang.org/t/exponentiation-returning-negative-value-or-zero-value-when-should-be-positive/82330/2 "2022-06-06T18:18:31Z")

</div>

[https://docs.julialang.org/en/v1.7/manual/faq/#faq-integer-arithmetic](https://docs.julialang.org/en/v1.7/manual/faq/#faq-integer-arithmetic)
