Having perused the MSDN documentation for both the ^ (hat) operator and the Math.Pow() function, I see no explicit difference. Is there one?
There obviously is the difference that one is a function while the other is considered an operator, e.g. this will not work:
Public Const x As Double = 3
Public Const y As Double = Math.Pow(2, x) ' Fails because of const-ness
But this will:
Public Const x As Double = 3
Public Const y As Double = 2^x
But is there a difference in how they produce the end result? Does Math.Pow()
do more safety checking for example? Or is one just some kind of alias for the other?