I can reproduce on the latest patched build, but this is specific for the 64bit version of R. On a 32bit it works as expected:
> big <- 1.797693134862315708385e+308 > sqrt(big) [1] 1.340781e+154 > big^0.5 [1] 1.340781e+154 The 64bit part might have something to do with it, and now move out of the way for people that actually know what they're talking about... Cheers Joris On Mon, Nov 21, 2011 at 3:41 PM, Martyn Byng <martyn.b...@nag.co.uk> wrote: > 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}} > > ______________________________________________ > R-devel@r-project.org mailing list > https://stat.ethz.ch/mailman/listinfo/r-devel > -- Joris Meys Statistical consultant Ghent University Faculty of Bioscience Engineering Department of Mathematical Modelling, Statistics and Bio-Informatics tel : +32 9 264 59 87 joris.m...@ugent.be ------------------------------- Disclaimer : http://helpdesk.ugent.be/e-maildisclaimer.php ______________________________________________ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel