[R] problem with Gauss Hermite ( x and w )
R. Michael Weylandt
michael.weylandt at gmail.com
Fri May 11 06:54:43 CEST 2012
Are you getting caught on order of operations? Note that unary minus
has lower precedence than exponentiation (as it does in math) so
-2.5^(-2.4)
is
x <- 2.5^(-2.4)
-x
Otherwise, I'm not at all sure what your question is: can you give an
example of what you think you should get (and how to get it) and what
R is giving you instead?
Michael
On Thu, May 10, 2012 at 2:30 PM, casperyc <casperyc at hotmail.co.uk> 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
>
> -----
> ######################
> PhD candidate in Statistics
> Big R Fan
> Big LEGO Fan
> Big sTaTs Fan
> ######################
>
> --
> View this message in context: http://r.789695.n4.nabble.com/problem-with-Gauss-Hermite-x-and-w-tp4622115p4624395.html
> Sent from the R help mailing list archive at Nabble.com.
>
> ______________________________________________
> R-help at r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.
More information about the R-help
mailing list