Skip to content

Commit 31ebb87

Browse files
committed
Remove primes docs from rst, add a NEWS.md entry
1 parent 84768d3 commit 31ebb87

File tree

3 files changed

+4
-48
lines changed

3 files changed

+4
-48
lines changed

NEWS.md

+4-1
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ Breaking changes
8888
Library improvements
8989
--------------------
9090

91-
* Most of the combinatorics functions have been moved from `Base`
91+
* Most of the combinatorics functions have been moved from `Base`
9292
to the [Combinatorics.jl package](https://github.com/JuliaLang/Combinatorics.jl) ([#13897]).
9393

9494
* Packages:
@@ -165,6 +165,9 @@ Library improvements
165165
* The `libjulia` library is now properly versioned and installed to the public `<prefix>/lib`
166166
directory, instead of the private `<prefix>/lib/julia` directory.
167167

168+
* Prime number related functions have been moved from `Base` to the
169+
[Primes.jl package](https://github.com/JuliaMath/Primes.jl) ([#16481]).
170+
168171
Deprecated or removed
169172
---------------------
170173

doc/stdlib/math.rst

-13
Original file line numberDiff line numberDiff line change
@@ -1359,19 +1359,6 @@ Mathematical Functions
13591359
13601360
Compute ``factorial(n)/factorial(k)``\ .
13611361

1362-
.. function:: factor(n) -> Dict
1363-
1364-
.. Docstring generated from Julia source
1365-
1366-
Compute the prime factorization of an integer ``n``\ . Returns a dictionary. The keys of the dictionary correspond to the factors, and hence are of the same type as ``n``\ . The value associated with each key indicates the number of times the factor appears in the factorization.
1367-
1368-
.. doctest::
1369-
1370-
julia> factor(100) # == 2*2*5*5
1371-
Dict{Int64,Int64} with 2 entries:
1372-
2 => 2
1373-
5 => 2
1374-
13751362
.. function:: gcd(x,y)
13761363

13771364
.. Docstring generated from Julia source

doc/stdlib/numbers.rst

-34
Original file line numberDiff line numberDiff line change
@@ -455,40 +455,6 @@ Integers
455455
julia> trailing_ones(3)
456456
2
457457

458-
.. function:: isprime(x::Integer) -> Bool
459-
460-
.. Docstring generated from Julia source
461-
462-
Returns ``true`` if ``x`` is prime, and ``false`` otherwise.
463-
464-
.. doctest::
465-
466-
julia> isprime(3)
467-
true
468-
469-
.. function:: isprime(x::BigInt, [reps = 25]) -> Bool
470-
471-
.. Docstring generated from Julia source
472-
473-
Probabilistic primality test. Returns ``true`` if ``x`` is prime; and ``false`` if ``x`` is not prime with high probability. The false positive rate is about ``0.25^reps``\ . ``reps = 25`` is considered safe for cryptographic applications (Knuth, Seminumerical Algorithms).
474-
475-
.. doctest::
476-
477-
julia> isprime(big(3))
478-
true
479-
480-
.. function:: primes([lo,] hi)
481-
482-
.. Docstring generated from Julia source
483-
484-
Returns a collection of the prime numbers (from ``lo``\ , if specified) up to ``hi``\ .
485-
486-
.. function:: primesmask([lo,] hi)
487-
488-
.. Docstring generated from Julia source
489-
490-
Returns a prime sieve, as a ``BitArray``\ , of the positive integers (from ``lo``\ , if specified) up to ``hi``\ . Useful when working with either primes or composite numbers.
491-
492458
.. function:: isodd(x::Integer) -> Bool
493459

494460
.. Docstring generated from Julia source

0 commit comments

Comments
 (0)