From 048939410cb8ac3974a7d81d3873763712106a8d Mon Sep 17 00:00:00 2001 From: Eugen Wissner Date: Tue, 3 Sep 2019 09:13:29 +0200 Subject: [PATCH] Deprecate Integer and isPseudoprime() --- source/tanya/math/mp.d | 1 + source/tanya/math/package.d | 10 +--------- 2 files changed, 2 insertions(+), 9 deletions(-) diff --git a/source/tanya/math/mp.d b/source/tanya/math/mp.d index f47177d..8a4d933 100644 --- a/source/tanya/math/mp.d +++ b/source/tanya/math/mp.d @@ -12,6 +12,7 @@ * Source: $(LINK2 https://github.com/caraus-ecms/tanya/blob/master/source/tanya/math/mp.d, * tanya/math/mp.d) */ +deprecated module tanya.math.mp; import tanya.algorithm.comparison; diff --git a/source/tanya/math/package.d b/source/tanya/math/package.d index 30f68b4..28022ee 100644 --- a/source/tanya/math/package.d +++ b/source/tanya/math/package.d @@ -663,15 +663,7 @@ in (z.length > 0, "Division by zero") assert(pow(Integer(0), Integer(5), Integer(5)) == 0); } -/** - * 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. - */ +deprecated bool isPseudoprime(ulong x) @nogc nothrow pure @safe { return pow(2, x - 1, x) == 1;