From jorismeys at gmail.com  Mon Nov 21 16:03:52 2011
From: jorismeys at gmail.com (Joris Meys)
Date: Mon, 21 Nov 2011 16:03:52 +0100
Subject: [Rd] a^b when a is large and b < 1 (64bit R on windows 7)
In-Reply-To: <1321887481.29526.14.camel@brian-rcg>
References: <49E76DF37649DC48A4CE882BC8CE51C901F44592@nagmail2.nag.co.uk>
	<1321887481.29526.14.camel@brian-rcg>
Message-ID: <CAO1zAVa7sZhY2KgDQbVT18nW12zfgeCB25c=JXJmRkqtOdHANw@mail.gmail.com>

Should have specified I only checked on Windows. So: On Windows 7
64bit, the R-32bit works fine, the R-64bit gives the behaviour Martyn
reported.

Cheers
Joris

On Mon, Nov 21, 2011 at 3:58 PM, Brian G. Peterson <brian at braverock.com> wrote:
> On Mon, 2011-11-21 at 14:41 +0000, Martyn Byng wrote:
>> 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 ^?
>
> On a recent Ubuntu 64bit install with R2.14.0 from the repositories, I
> get:
>
>> big <- .Machine$double.xmax
>> big
> [1] 1.797693e+308
>> big^0.5
> [1] 1.340781e+154
>> sqrt(big)
> [1] 1.340781e+154
>
> so it does seem to be specific either to your environment.
>
> --
> Brian G. Peterson
> http://braverock.com/brian/
> Ph: 773-459-4973
> IM: bgpbraverock
>
> ______________________________________________
> R-devel at 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.Meys at Ugent.be
-------------------------------
Disclaimer : http://helpdesk.ugent.be/e-maildisclaimer.php



[Rd] a^b when a is large and b < 1 (64bit R on windows 7)
Joris Meys