[R] problem with Gauss Hermite ( x and w )
Rui Barradas
ruipbarradas at sapo.pt
Thu May 10 22:03:47 CEST 2012
Hello,
> Negative powers mean they take the reciprocal and as far as I am
> concerned, real^real is just a real number.
> Am I mistaking something basic?
Yes, you are.
real^real is not necessarily real.
The most well known example is (-1)^0.5 = imaginary unit.
When you say that -2.5^(-2.4) is real you're computing the negative power of
a POSITIVE real, 2.5 then taking the result's symmetric.
(-2.5)^(-2.4)
[1] NaN
Or
(-1)^0.5
[1] NaN
-1^0.5
[1] -1
(-1 + 0i)^0.5 # algebraically, equal to (-1)^0.5 above, but not in R
notation.
[1] 0+1i
Hope this helps,
Rui Barradas
casperyc wrote
>
> Hi,
>
> I know what complex number are, but I am not sure what you meant by that?
>
>
> ##############CODES###########
>> 2.5^(-2.4)
> [1] 0.1109032
>> -2.5^(-2.4)
> [1] -0.1109032
> ##############CODES###########
>
> works fine.
>
> Negative powers mean they take the reciprocal and as far as I am
> concerned, real^real is just a real number.
>
> Am I mistaking something basic?
>
> Thanks.
>
> Casper
>
--
View this message in context: http://r.789695.n4.nabble.com/problem-with-Gauss-Hermite-x-and-w-tp4622115p4624486.html
Sent from the R help mailing list archive at Nabble.com.
More information about the R-help
mailing list