-
-
22 Jun 2020 09:19:08 UTC
- Browse (raw)
- Changes
- Homepage
- How to Contribute
- Repository
- Issues (3)
- Testers (1670 / 10 / 0)
- Kwalitee
Bus factor: 1- % Coverage
- License: perl_5
- Perl: v5.6.2
- Activity
24 month- Tools
- Download (333.67KB)
- MetaCPAN Explorer
- Permissions
- Subscribe to distribution
- Permalinks
- This version
- Latest version
- Dependencies
- Carp
- Exporter
- Fcntl
- XSLoader
- base
- and possibly others
- Reverse dependencies
- CPAN Testers List
- Dependency graph
Changes for version 0.52 - 2020-06-22
- ADDED
- powint(a,b) integer a^b
- mulint(a,b) integer a*b
- addint(a,b) integer a+b
- subint(a,b) integer a-b
- divint(a,b) integer a/b quotient (floor)
- modint(a,b) integer a/b modulo (floor)
- divrem(a,b) integer a/b quo + rem (Euclidian)
- tdivrem(a,b) integer a/b quo + rem (truncated)
- absint(n) integer absolute value
- negint(n) integer negate: returns -n
- is_gaussian_prime(a,b) is a+bi a Gaussian prime
- random_safe_prime(b) random b-bit safe prob prime
- next_twin_prime(n) returns start of twin prime > n
- FIXES
- Remove a mod in the AKS test that was in code since 2012.
- squfof126 was not portable. GMP 6.2.0 changed to lazy allocation causing the code to fail. Rewrote function to be more portable.
- is_totient for powers of 2 was returning 0. Thanks Trizen.
- LambertW could fault if given inputs very near the branch point.
- PERFORMANCE
- Trizen suggested binary splitting LCM. Much faster for big lists.
- Trizen improved speed of lucas sequence for large n and even modulus.
- todigits uses a subquadratic algorithm. Thanks to Trizen for request.
- sieving depth for large sizes wasn't optimal on 32-bit machines. Thanks to Seth Troisi.
- LambertW is about 2x faster due to a better and faster initial estimate.
Modules
Utilities related to prime numbers and factoring, using GMPExamples
Module Install Instructions
To install Math::Prime::Util::GMP, copy and paste the appropriate command in to your terminal.
cpanm Math::Prime::Util::GMP
perl -MCPAN -e shell install Math::Prime::Util::GMP
For more information on module installation, please visit the detailed CPAN module installation guide.