(12C) Check if given number is Prime Number or not
|
09-11-2018, 03:12 AM
Post: #5
|
|||
|
|||
RE: (12C) Check if given number is Prime Number or not
This works only for odd numbers. (Cf. Fermat's factorization method)
Code: 01 STO 0 ; N Examples 899 R/S 29 x<>y 31 199 R/S 1 x<>y 199 (is prime) 1,403 R/S 23 x<>y 61 5,959 R/S 59 x<>y 101 99,799,811 R/S 9,973 x<>y 10,007 Cheers Thomas |
|||
« Next Oldest | Next Newest »
|
User(s) browsing this thread: 1 Guest(s)