Why can't a negative number be raised to a real power?
Why Math.Pow (-120, 0.1) = NaN?
1
2 answers
Because the root for negative numbers is extracted only for unpaired powers. And 0.1 is 1/10, that is, the root of the tenth power. This means that there is no real number that gives -120 to the power of 10.
10
Author: Valeriy Karchov, 2012-08-27 11:17:16
Because I had to learn math at school.
Raising a negative number to a non-integer power generally results in a complex number, that is, a number with an imaginary part.
i=sqrt(-1); //определение мнимого числа
It is necessary to use a special library with support for complex mathematics, for example
6
Author: Barmaley, 2012-08-27 11:56:20