title: What is the Kotlin exponent operator
body: <p>What is the exponent operator in Kotlin. I assumed it would be <code>**</code> but it seems to throw up an error in my code.</p>
  
  <pre><code>when (pendingOperation) {
      "=" -&gt; operand1 = value
      "÷" -&gt; operand1 = if (value == 0.0) {
          Double.NaN // handle attempt to divide by zero
      } else {
          operand1!! / value
      }
      "x" -&gt; operand1 = operand1!! * value
      "−" -&gt; operand1 = operand1!! - value
      "+" -&gt; operand1 = operand1!! + value
      "a^b" -&gt; operand1 = operand1!! ** value
  </code></pre>