daily pastebin goal
17%
SHARE
TWEET

dsa

a guest Apr 16th, 2018 55 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1.         public static bool IsPrimeMoreEfficient(BigInteger num)
  2.         {
  3.             if (num < 2) return false;
  4.             if (num < 4) return true;
  5.             if (num % 2 == 0) return false;
  6.  
  7.             for (BigInteger u = 3; u*u <= num; u += 2)
  8.                 if (num % u == 0) return false;
  9.  
  10.             return true;
  11.         }
RAW Paste Data
Top