-
Introduce Prime
newtype. This newtype
is now used extensively in public API:
primes :: Integral a => [Prime a]
primeList :: Integral a => PrimeSieve -> [Prime a]
sieveFrom :: Integer -> [Prime Integer]
nthPrime :: Integer -> Prime Integer
-
New functions nextPrime
and precPrime
. Implement an instance of Enum
for primes (#153):
> [nextPrime 101 .. precPrime 130]
[Prime 101,Prime 103,Prime 107,Prime 109,Prime 113,Prime 127]
-
Add the Hurwitz zeta function on non-negative integer arguments (#126).
-
Implement efficient tests of n-freeness: pointwise and in interval. See isNFree
and nFreesBlock
(#145).
-
Generate preimages of the totient and the sum-of-divisors functions (#142):
> inverseTotient 120 :: [Integer]
[155,310,183,366,225,450,175,350,231,462,143,286,244,372,396,308,248]
-
Generate coefficients of Faulhaber polynomials faulhaberPoly
(#70).
-
Support Gaussian and Eisenstein integers in smooth numbers (#138).
-
Change types of primes
, primeList
, sieveFrom
, nthPrime
, etc.,
to use Prime
newtype.
-
Math.NumberTheory.Primes.{Factorisation,Testing,Counting,Sieve}
are no longer re-exported from Math.NumberTheory.Primes
.
Merge Math.NumberTheory.UniqueFactorisation
into
Math.NumberTheory.Primes
(#135, #153).
-
From now on Math.NumberTheory.Primes.Factorisation.factorise
and similar functions return [(Integer, Word)]
instead of [(Integer, Int)]
.
-
sbcFunctionOnPrimePower
now accepts Prime Word
instead of Word
.
-
Better precision for exact values of Riemann zeta and Dirichlet beta
functions (#123).
-
Speed up certain cases of modular multiplication (#160).
-
Extend Chinese theorem to non-coprime moduli (#71).
-
A new interface for Math.NumberTheory.Moduli.Sqrt
, more robust and type safe (#87, #108).
-
Implement Ramanujan tau function (#112):
> map ramanujan [1..10]
[1,-24,252,-1472,4830,-6048,-16744,84480,-113643,-115920]
-
Implement partition function (#115):
> take 10 partition
[1,1,2,3,5,7,11,15,22,30]
-
Add the Dirichlet beta function on non-negative integer arguments (#120).
E. g.,
> take 5 $ Math.NumberTheory.Zeta.Dirichlet.betas 1e-15
[0.5,0.7853981633974483,0.9159655941772191,0.9689461462593693,0.9889445517411055]
-
Solve linear and quadratic congruences (#129).
-
Support Eisenstein integers (#121).
-
Implement discrete logarithm (#88).
-
Stop reporting units (1, -1, i, -i) as a part of factorisation
for integers and Gaussian integers (#101). Now factorise (-2)
is [(2, 1)]
and not [(-1, 1), (2, 1)]
.
-
Move splitIntoCoprimes
to Math.NumberTheory.Euclidean.Coprimes
.
-
Change types of splitIntoCoprimes
, fromFactors
and prefFactors
using newtype Coprimes
(#89).
-
Sort Gaussian primes by norm (#124).
-
Make return type of primes
and primeList
polymorphic instead of
being limited to Integer
only (#109).
-
Speed up factorisation of Gaussian integers (#116).
-
Speed up computation of primitive roots for prime powers (#127).
-
A general framework for bulk evaluation of arithmetic functions (#77):
> runFunctionOverBlock carmichaelA 1 10
[1,1,2,2,4,2,6,2,6,4]
-
Implement a sublinear algorithm for Mertens function (#90):
> map (mertens . (10 ^)) [0..9]
[1,-1,1,2,-23,-48,212,1037,1928,-222]
-
Add basic support for cyclic groups and primitive roots (#86).
-
Implement an efficient modular exponentiation (#86).
-
Write routines for lazy generation of smooth numbers (#91).
> smoothOverInRange (fromJust (fromList [3,5,7])) 1000 2000
[1029,1125,1215,1225,1323,1575,1701,1715,1875]
-
Add basic combinatorial sequences: binomial coefficients, Stirling
numbers of both kinds, Eulerian numbers of both kinds, Bernoulli
numbers (#39). E. g.,
> take 10 $ Math.NumberTheory.Recurrencies.Bilinear.bernoulli
[1 % 1,(-1) % 2,1 % 6,0 % 1,(-1) % 30,0 % 1,1 % 42,0 % 1,(-1) % 30,0 % 1]
-
Add the Riemann zeta function on non-negative integer arguments (#44).
E. g.,
> take 5 $ Math.NumberTheory.Zeta.zetas 1e-15
[-0.5,Infinity,1.6449340668482262,1.2020569031595945,1.0823232337111381]