One comment on “Prime testing function in R

  1. Cool! I used this instead of gmp to make a primorial function.

    primorial <- function(n) if(n==1) return(1) else │ + if(isprime(n)) return(n*primorial(n-1)) else return(primorial(n-1))

Leave a Reply

Your email address will not be published. Required fields are marked *

* Copy This Password *

* Type Or Paste Password Here *