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

______________________________________________
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.

Reply via email to