CVS commit: pkgsrc/math/p5-Math-Prime-Util-GMP

"Thomas Klausner" <[email protected]> Sun, 9 Aug 2026 04:28:04 +0000
Newsgroups gmane.os.netbsd.devel.pkgsrc.cvs
Message-ID <[email protected]>
Module Name:	pkgsrc
Committed By:	wiz
Date:		Sun Aug  9 04:28:04 UTC 2026

Modified Files:
	pkgsrc/math/p5-Math-Prime-Util-GMP: Makefile distinfo

Log Message:
p5-Math-Prime-Util-GMP: update to 0.54.

0.54 2026-08-08

    [API CHANGES]

    - lucas_sequence and is_frobenius_pseudoprime take any integer P,Q
      instead of only native.

    - multifactorial supports large integer n,m.  m must be positive.

    - factor accepts negative inputs.  In list context, negative inputs have
      a leading -1 factor.  Scalar context counts factors of the absolute
      value and does not count the sign.

    - Ranged moebius and euler_phi, plus sieve_primes, sieve_twin_primes,
      and sieve_prime_cluster, return the result count in scalar context.

    [ADDED]

    - muladdint(a,b,c)         returns a*b+c
    - mulsubint(a,b,c)         returns a*b-c
    - addmulint(a,b,c)         returns a+b*c
    - submulint(a,b,c)         returns a-b*c
    - vecprefixsum(list)       prefix sum / cumulative sum of integer list
    - fibonacci(k)             the k-th Fibonacci number
    - lucas_number(k)          the k-th Lucas number
    - catalan_number(n)        the n-th Catalan number
    - bell_number(n)           the n-th Bell number
    - fubini(n)                the n-th ordered Bell number
    - partitionsq(n)           partitions of n into distinct parts
    - euler_phi(n[,nhi])       totient or ranged totient
    - twin_primes([lo,]hi)     returns an array ref of lower twin primes
    - remove_factors(n,k)      returns r: n with all factors of k removed
    - remove_factors_exp(n,k)  as above, returns (r,e) e = times removed
    - znlog(a,g,n)             solve for k where g^k = a mod n
    - rootmod(a,k,n)           modular k-th root
    - allsqrtmod(a,n)          all square roots of a (mod n)
    - allrootmod(a,k,n)        all k-th roots of a (mod n)
    - legendre_phi(n,a)        Legendre's phi function
    - sopf(n)                  sum of distinct prime factors
    - sopfr(n)                 sum of prime factors with multiplicity
    - prime_signature(n)       sorted factorization exponents
    - dedekind_psi(n)          Dedekind psi function
    - aliquot_sum(n)           sum of proper divisors
    - abundance(n)             aliquot_sum(n)-n
    - is_safe_prime(n)         n and (n-1)/2 are both prime

    [FIXES]

    - drand treats a zero limit like an omitted limit and always returns below
      the upper endpoint before scaling.

    - factorialmod takes large (a,m) instead of silently reducing a to UL.
      We guard against values that would result in excessive time, while still
      returning zero for large inputs known to vanish modulo composite m.

    - binomial handles large k more carefully, reflecting k before native
      conversion where possible and croaking instead of silently truncating.

    - binomialmod avoids constructing huge intermediate binomial values for
      more large-input cases.

    - powint croaks on huge exponents instead of truncating.

    - logint accepts large bases.  rootint accepts large roots.

    - fromdigits accepts large bases and digit coefficients without
      truncation, and validates string digits consistently.

    - urandomr accepts signed ranges.

    - is_almost_prime validates k as a non-negative integer and avoids
      truncating large k values.

    - is_power validates large exponents instead of silently truncating them.

    - stirling validates large inputs instead of silently reducing them.

    - primes accepts non-negative ranges matching Math::Prime::Util.

    - Non-negative XS validation accepts signed zero strings.

    - rising_factorial, falling_factorial don't accept a negative second arg.

    - invmod, negmod, sqrtmod, factorialmod, znorder, is_qr, and
      is_primitive_root consistently use |n| for the modulus.

    - random_nbit_prime and related native-count functions croak on oversized
      inputs instead of silently truncating them.

    - random_prime preserves uniform selection after exhausting its initial
      trials, replacing the biased next-prime fallback present since v0.42.

    - random_{maurer,shawe_taylor}_prime_with_cert wasn't producing a cert for
      very small primes (32 and fewer bits).

    - sieve_range width and depth arguments now croak if they don't fit into
      a UV instead of truncating.

    - Frobenius-Khashin algorithm changed from 2013 to 2018 algorithm.

    [PERFORMANCE]

    - znorder(a, p^e) is much faster for large prime powers p^e. (Trizen)

    - is_power is much faster for large-exponent perfect powers with a small
      prime factor.

    - BPSW uses AES Lucas for 64-bit inputs, about 30% faster.


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 pkgsrc/math/p5-Math-Prime-Util-GMP/Makefile
cvs rdiff -u -r1.1 -r1.2 pkgsrc/math/p5-Math-Prime-Util-GMP/distinfo

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
(unnamed) (text/x-diff, 1.7 KB)
Modified files:

Index: pkgsrc/math/p5-Math-Prime-Util-GMP/Makefile
diff -u pkgsrc/math/p5-Math-Prime-Util-GMP/Makefile:1.2 pkgsrc/math/p5-Math-Prime-Util-GMP/Makefile:1.3
--- pkgsrc/math/p5-Math-Prime-Util-GMP/Makefile:1.2	Thu Jul 16 19:04:13 2026
+++ pkgsrc/math/p5-Math-Prime-Util-GMP/Makefile	Sun Aug  9 04:28:04 2026
@@ -1,8 +1,7 @@
-# $NetBSD: Makefile,v 1.2 2026/07/16 19:04:13 wiz Exp $
+# $NetBSD: Makefile,v 1.3 2026/08/09 04:28:04 wiz Exp $
 
-DISTNAME=	Math-Prime-Util-GMP-0.53
+DISTNAME=	Math-Prime-Util-GMP-0.54
 PKGNAME=	p5-${DISTNAME}
-PKGREVISION=	1
 CATEGORIES=	math perl5
 MASTER_SITES=	${MASTER_SITE_PERL_CPAN:=../../authors/id/D/DA/DANAJ/}
 

Index: pkgsrc/math/p5-Math-Prime-Util-GMP/distinfo
diff -u pkgsrc/math/p5-Math-Prime-Util-GMP/distinfo:1.1 pkgsrc/math/p5-Math-Prime-Util-GMP/distinfo:1.2
--- pkgsrc/math/p5-Math-Prime-Util-GMP/distinfo:1.1	Mon Jun 22 05:32:08 2026
+++ pkgsrc/math/p5-Math-Prime-Util-GMP/distinfo	Sun Aug  9 04:28:04 2026
@@ -1,5 +1,5 @@
-$NetBSD: distinfo,v 1.1 2026/06/22 05:32:08 wiz Exp $
+$NetBSD: distinfo,v 1.2 2026/08/09 04:28:04 wiz Exp $
 
-BLAKE2s (Math-Prime-Util-GMP-0.53.tar.gz) = b86c338280ca2c185a5b9e49e4e52ff74c4031f9ec8d53fdf0b0cae0bfb4de19
-SHA512 (Math-Prime-Util-GMP-0.53.tar.gz) = 385c5b427d960cfe29e808fef07777afa40b41aa1839211ede95e54acaebb125255d802420db429db9eecd40df4da6d962a79873a68c79250112356b27d91608
-Size (Math-Prime-Util-GMP-0.53.tar.gz) = 399067 bytes
+BLAKE2s (Math-Prime-Util-GMP-0.54.tar.gz) = 863f76865f4a04889f14abb9c74d612f0064aa9bcc7fa980966062d764375d2f
+SHA512 (Math-Prime-Util-GMP-0.54.tar.gz) = 240041d0322b8e4206f44c561f6b5ad10bb144e943b4c42e7c50a4aae775918a0b6a2f2876404e2dd2814a57fd58fb8b8dadc2c860c00e11af38d4731c6c05d0
+Size (Math-Prime-Util-GMP-0.54.tar.gz) = 439468 bytes