Julien Castiaux 36828b106f [FIX] maths/PrimeCheck (#796)
Current implementation is buggy and hard to read.

* Negative values were raising a TypeError due to `math.sqrt`
* 1 was considered prime, it is not.
* 2 was considered not prime, it is.

The implementation has been corrected to fix the bugs and to enhance
readability.

A docstring has been added with the definition of a prime number.

A complete test suite has been written, it tests the 10 first primes, a
negative value, 0, 1 and some not prime numbers.

closes #795
2019-05-11 19:20:25 +08:00
..
2018-10-19 17:14:25 -05:00
2019-05-11 19:20:25 +08:00
2018-10-19 17:14:25 -05:00
2018-10-20 14:45:08 -05:00
2018-10-19 17:14:25 -05:00
2018-10-19 17:14:25 -05:00