Skip to content
Prev 41866 / 63421 Next

a^b when a is large and b < 1 (64bit R on windows 7)

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)
[1] Inf
[1] 1.340781e+154


I'm guessing that this behaviour is not expected, or am I missing
something about ^?

Cheers

Martyn
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}}