[R] Need to help to get value for bigger calculation
Hans W Borchers
hwborchers at googlemail.com
Tue May 22 12:50:35 CEST 2012
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 = 10000 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
More information about the R-help
mailing list