diff options
| author | Eugen Wissner <belka@caraus.de> | 2019-09-03 09:13:29 +0200 |
|---|---|---|
| committer | Eugen Wissner <belka@caraus.de> | 2019-09-03 09:13:29 +0200 |
| commit | 048939410cb8ac3974a7d81d3873763712106a8d (patch) | |
| tree | 06d39b7efe450f4449c881f59e612e680b6ee752 /source | |
| parent | c69282a8dfac4e0abfa544cbf13bad8819e2487c (diff) | |
| download | tanya-048939410cb8ac3974a7d81d3873763712106a8d.tar.gz | |
Deprecate Integer and isPseudoprime()
Diffstat (limited to 'source')
| -rw-r--r-- | source/tanya/math/mp.d | 1 | ||||
| -rw-r--r-- | 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; |
