Overload List

  Name Description
Pow(Complex)
Returns the value of this complex number raised to the Power of a complex exponent
Pow(Double)
Returns the value of this complex number raised to the Power of a real component (in double precision).

This method considers special cases where a simpler algorithm would return "ugly" results.

For example when the expression (-1e40)^0.5 is evaluated without considering the special case, the argument of the base is the double number closest to pi. When Sin and cos are used for the final evaluation of the result, the slight difference of the argument from pi causes a non-zero value for the real component of the result. Because the value of the base is so high, the error is magnified. Although the error is normal for floating point calculations, the consideration of commonly occurring special cases improves the accuracy and aesthetics of the results.

If you know a more elegant way to solve this problem, please let me know at [email protected] .

See Also