Dim x1 As Double = -0.3 Dim x2 As Double = 0.7 Dim xx As Double = x1 ^ x2 '=-1.#IND xx = Math.Pow(x1, x2) '=-1.#IND xx = -0.3 ^ 0.7 '= -0.43051162024993422 xx = Math.Pow(-0.3, 0.7) '=-1.#IND
x < 0 but not NegativeInfinity; y is not an integer, NegativeInfinity, or PositiveInfinity. Returns NaN
xx = Math.Sign(x1) * Math.Pow(Math.Abs(x1), x2)
^
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)