[R] Need to help to get value for bigger calculation

2012-05-22 Thread Rehena Sultana
Hello R-Experts,



I want to calculate values like 15^200 or 17^300 in R. In normal case it can 
calculate the small values of b (a^b). I have fixed width = 1 and digits = 
22 but still answers are Inf.

How to deal the cases like these? Thanks in advance.


Regards,
rehena
[[alternative HTML version deleted]]

__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


Re: [R] Need to help to get value for bigger calculation

2012-05-22 Thread Hans W Borchers
Rehena Sultana hena_4567 at yahoo.com writes:

 I want to calculate values like 15^200 or 17^300 in R. In normal case it can 
 calculate the small values of b (a^b).
 I have fixed width = 1 and digits = 22 but still answers are Inf.
 
 How to deal the cases like these? Thanks in advance.

library(Rmpfr)
m15 - mpfr(15, precBits= 1024)
m15^200
165291991078820803015600259355571011187461128806050897708002963982861165
279305672605355515846488679511983197774726563035424119280679882914553697
406070345089013507994161512883544043567583004683422057135011584705353016
03376865386962890625

__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.