A module for number theory in Perl. This includes prime sieving,
primality tests, primality proofs, integer factoring, counts /
bounds / approximations for primes, nth primes, and twin primes,
random prime generation, and much more.
This module is the fastest on CPAN for almost all operations it
supports. This includes Math::Prime::XS, Math::Prime::FastSieve,
Math::Factor::XS, Math::Prime::TiedArray, Math::Big::Factors,
Math::Factoring, and Math::Primality (when the GMP module is
available). For numbers in the 10-20 digit range, it is often orders
of magnitude faster. Typically it is faster than Math::Pari for
64-bit operations.
All operations support both Perl UV's (32-bit or 64-bit) and bignums.
If you want high performance with big numbers (larger than Perl's
native 32-bit or 64-bit size), you should install Math::Prime::Util::GMP
and Math::BigInt::GMP. This will be a recurring theme throughout
this documentation -- while all bignum operations are supported in
pure Perl, most methods will be much slower than the C+GMP alternative.
The module is thread-safe and allows concurrency between Perl threads
while still sharing a prime cache. It is not itself multi-threaded.
See the Limitations section if you are using Win32 and threads in
your program. Also note that Math::Pari is not thread-safe (and
will crash as soon as it is loaded in threads), so if you use
Math::BigInt::Pari rather than Math::BigInt::GMP or the default
backend, things will go pear-shaped.
Two scripts are also included and installed by default:
* primes.pl displays primes between start and end values or
expressions, with many options for filtering (e.g.
twin, safe, circular, good, lucky, etc.). Use --help
to see all the options.
* factor.pl operates similar to the GNU factor program.
It supports bigint and expression inputs.
Original from henning@ with adjustments by me
OK sthen@
A module for number theory in Perl using GMP. This includes primality
tests, getting primes in a range, factoring, and more.
While it certainly can be used directly, the main purpose of this
module is for Math::Prime::Util. That module will automatically
load this one if it is installed, greatly speeding up many of its
operations on big numbers.
Inputs and outputs for big numbers are via strings, so you do not
need to use a bigint package in your program. However if you do use
bigints, inputs will be converted internally so there is no need
to convert before a call. Output results are returned as either
Perl scalars (for native-size) or strings (for bigints). Math::Prime::Util
tries to reconvert all strings back into the callers bigint type
if possible, which makes it more convenient for calculations.
The various is_*_pseudoprime tests are more appropriately called
is_*_probable_prime or is_*_prp. They return 1 if the input is a
probable prime based on their test. The naming convention is
historical and follows Pari, Math::Primality, and some other math
packages. The modern definition of pseudoprime is a composite that
passes the test, rather than any number.
Originally from henning@ with adjustments by me
OK sthen@
I had tested an early diff from pirofti that fixed BUILD_DEPENDS but
also bumped REVISION. In the meantime sthen had just fixed them without
the unnecessary REVISION bump. Bumping REVISION will get them building
on sparc64 again.
4ti2 is a software package for algebraic, geometric and combinatorial
problems on linear spaces. It computes Graver basis, Groebner basis,
in case of a linear , matrix or more general lattice program and a lot
more programs in linear spaces.
From Dimitri Karamazav; ok rsadowski@
The C-library cddlib can be used for the reverse operation (i.e. convex hull
computation). This means that one can move back and forth between an inequality
representation and a generator (i.e. vertex and ray) representation of a
polyhedron with cddlib. Also, cddlib can solve a linear programming problem,
i.e. a problem of maximizing and minimizing a linear function over P.
From Dimitri Karamazov; ok rsadowski@
for this name, plus convergence with other packaging systems that use this
name.
While here, update bc-gh to version 3.1.1. Also improve 64-bit check in the
Makefile.
ok jca@ some time ago
This is an implementation of the POSIX bc calculator that implements GNU
bc extensions as well as the period (.) extension from the BSD flavor of
bc.
This bc also includes an implementation of dc in the same binary,
accessible via a symbolic link, which implements all *BSD and GNU
extensions, though the ! command is omitted for security concerns.
ok feinerer@
Works; improvements in-tree to come.
RStudio is an integrated development environment (IDE) for R.
It includes a console, syntax-highlighting editor that supports direct
code execution, as well as tools for plotting, history, debugging and
workspace management.