All pastes #335151 Raw Edit

Anonymous

public text v1 · immutable
·published 2007-02-01 04:04 UTC
rendered paste body
isPrime n = isPrime' 2
  where
    isPrime' m
      | m > round(sqrt n) = True
      | mod (truncate n) m /= 0 = isPrime' (m + 1)
      | otherwise = False

isPrime2 n = isPrime2' 2
  where
    isPrime2' m
      | m > 5863256 = True
      | mod (truncate n) m /= 0 = isPrime2' (m + 1)
      | otherwise = False