Hi,
    I am trying to make a R version a RosettaCode task involving big number.
    More precise, I am trying to convert the c-solution
http://rosettacode.org/wiki/RSA_code#C
to R.

   These two lines in C gives me problems:
const char *plaintext = "Rossetta Code";
mpz_import(pt, strlen(plaintext), 1, 1, 0, 0, plaintext);

I have tried:
library(gmp)
plaintext <- "Rossetta Code"
as.bigz(charToRaw(plaintext))

and
library(gmp)
plaintext <- "Rossetta Code
as.big(split(plaintext,""))

Thanks for any help/suggestions

Regards
Martin M. S. Pedersen

        [[alternative HTML version deleted]]

______________________________________________
R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
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