15

I noticed this code in open zepplins contract:

  uint256 public constant INITIAL_SUPPLY = 10000 * (10 ** uint256(decimals));

I've never seen the double ** before. What does it mean?

user714171
  • 641
  • 5
  • 13

3 Answers3

20

from the solidity documentation :

Arithmetic operators: +, -, unary -, unary +, *, /, % (remainder), ** (exponentiation)


so : a**b is a to the power of b (i.e: a*a*a*...*a b times)

Mheni
  • 568
  • 4
  • 12
7

** is ^. 2 ** 3 equals 8( ´ ▽ ` )

zzz jp
  • 91
  • 5
0

This operator is used for exponentiation.

rme7
  • 1