There are two formats of exponential operators:
Exponential format 1 (^):
This is an exponential operator that raises the value of an operand. For example, the following example raises the value of 5 by the power of 3:
$ awk 'BEGIN { a = 5; a = a ^ 3; print "a ^ 3 =",a }'
The output on execution of the preceding code is as follows:
a ^ 3 = 125
Exponential format 2 (**):
This also raises the value of an operand. For example, the following example raises the value of 5 by the power of 3:
$ awk 'BEGIN { a = 5; a = a ** 3; print "a ** 3 =",a }'
The output on execution of the preceding code is as follows:
a ** 3 = 125