# Weird result in power operator

**URL:** https://discourse.julialang.org/t/weird-result-in-power-operator/20824
**Category:** New to Julia
**Created:** [February 15, 2019, 1:43pm UTC](https://discourse.julialang.org/t/weird-result-in-power-operator/20824 "2019-02-15T13:43:40Z")
**Posts on this page:** 1
**Showing post:** 2

<div class="post-metadata">

### Author: ![StefanKarpinski](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/stefankarpinski/32/24_2.png) [@StefanKarpinski](https://discourse.julialang.org/u/StefanKarpinski)
#### Post date: [February 15, 2019, 1:50pm UTC](https://discourse.julialang.org/t/weird-result-in-power-operator/20824/2 "2019-02-15T13:50:26Z")

</div>

The `-` operator has lower precedence than the `^` operator, so the expression `-1.9345e6^1.5` means `-(1.9345e6^1.5)` rather than `(-1.9345e6)^1.5`. If you try the `a = -1.9345e6; a^1.5` version in Matlab you’ll get the same imaginary value as `complex(a)^1.5` gives in Julia.

Also, please quote code in posts:

> [@PSA: how to quote code with backticks](https://discourse.julialang.org/t/psa-how-to-quote-code-with-backticks/7530):
>
> This is a short post on how to use backticks (` and ```) to quote code, so it is easy to read. This post can be linked to new users who are confused by this feature. Why By quoting your code, you get a monospaced font (which preserves indentation) and syntax highlighting. This makes it easier to read your code and help you. Displayed code looks like this: function displayed\_code(x::Int, y::Int) if x \< y println("x is smaller") else println("or not") end end Inline…

---

_[View the full topic](https://discourse.julialang.org/t/weird-result-in-power-operator/20824)._
