Does anyone have any idea why the following produced a NaN? I am running this on R 4.0.2 on OSX.
> (1.55e-04/-7.35e-05)^(10/(22.77-12.66))
[1] NaN
If I break it down, I also get a NaN
> a <- (1.55e-04/-7.35e-05)
> b <- (10/(22.77-12.66))
> a^b
[1] NaN
But, if I just put in the numbers, I get the correct answer...
> a
[1] -2.108844
> b
[1] 0.9891197
> -2.108844 ^ 0.9891197
[1] -2.091793
abs(a)^b
, than making that result negative. In order to do the calculation you want, you need to work with complex numbers.-(2.108844 ^ 0.9891197)