[Rd] a^b when a is large and b < 1 (64bit R on windows 7)
Martyn Byng
Martyn.Byng at nag.co.uk
Mon Nov 21 15:41:36 CET 2011
Hi,
I'm getting some strange behaviour when trying to use the power operator
(a^b) when a is large and b is less than one:
big <- .Machine$double.xmax
big
big^0.5
sqrt(big)
> big <- 1.797693134862315708384e+308
> big^0.5
[1] Inf
> sqrt(big)
[1] 1.340781e+154
I'm guessing that this behaviour is not expected, or am I missing
something about ^?
Cheers
Martyn
> sessionInfo()
R version 2.14.0 (2011-10-31)
Platform: x86_64-pc-mingw32/x64 (64-bit)
locale:
[1] LC_COLLATE=English_United Kingdom.1252
[2] LC_CTYPE=English_United Kingdom.1252
[3] LC_MONETARY=English_United Kingdom.1252
[4] LC_NUMERIC=C
[5] LC_TIME=English_United Kingdom.1252
attached base packages:
[1] stats graphics grDevices utils datasets methods base
________________________________________________________________________
The Numerical Algorithms Group Ltd is a company registered in England
and Wales with company number 1249803. The registered office is:
Wilkinson House, Jordan Hill Road, Oxford OX2 8DR, United Kingdom.
This e-mail has been scanned for all viruses by Star. Th...{{dropped:4}}
More information about the R-devel
mailing list