Deprecate Integer and isPseudoprime()
This commit is contained in:
		| @@ -12,6 +12,7 @@ | |||||||
|  * Source: $(LINK2 https://github.com/caraus-ecms/tanya/blob/master/source/tanya/math/mp.d, |  * Source: $(LINK2 https://github.com/caraus-ecms/tanya/blob/master/source/tanya/math/mp.d, | ||||||
|  *                 tanya/math/mp.d) |  *                 tanya/math/mp.d) | ||||||
|  */ |  */ | ||||||
|  | deprecated | ||||||
| module tanya.math.mp; | module tanya.math.mp; | ||||||
|  |  | ||||||
| import tanya.algorithm.comparison; | import tanya.algorithm.comparison; | ||||||
|   | |||||||
| @@ -663,15 +663,7 @@ in (z.length > 0, "Division by zero") | |||||||
|     assert(pow(Integer(0), Integer(5), Integer(5)) == 0); |     assert(pow(Integer(0), Integer(5), Integer(5)) == 0); | ||||||
| } | } | ||||||
|  |  | ||||||
| /** | deprecated | ||||||
|  * Checks if $(D_PARAM x) is a prime. |  | ||||||
|  * |  | ||||||
|  * Params: |  | ||||||
|  *  x = The number should be checked. |  | ||||||
|  * |  | ||||||
|  * Returns: $(D_KEYWORD true) if $(D_PARAM x) is a prime number, |  | ||||||
|  *          $(D_KEYWORD false) otherwise. |  | ||||||
|  */ |  | ||||||
| bool isPseudoprime(ulong x) @nogc nothrow pure @safe | bool isPseudoprime(ulong x) @nogc nothrow pure @safe | ||||||
| { | { | ||||||
|     return pow(2, x - 1, x) == 1; |     return pow(2, x - 1, x) == 1; | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user