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 *

Before commenting, please answer this simple arithmetic question to prove you aren\'t a spambot: *
Time limit is exhausted. Please reload CAPTCHA.