Version 22.12
Additions
- Added the parser floating-point
f
suffix for literal numbers. (81b0991) - Added support for using native integers in arithmetic operations (when possible). (cc5638b)
- Added the Array
.solve_rec_seq
method. (9a7e3d7) - Added the Math
.solve_seq(array, offset=0)
and.solve_rec_seq(array)
methods. (9a7e3d7) - Added the Math
.linear_recurrence(ker, init, n)
method. (a45fe51) - Added the Math
.linear_recmod(ker, init, n, m)
method. (51c4688) - Added the Number
phi_finder_factor(n, tries=1e4)
method. (2605b84) - Added the Number
k.carmichael(a, b)
method. (a884fcb) - Added the Number
k.lucas_carmichael(a,b)
method. (a884fcb) - Added the Number
k.squarefree_fermat_psp(base, a,b)
method. (a884fcb) - Added the Number
k.carmichael_each(a,b,{...})
method. (c53381a) - Added the Number
k.lucas_carmichael_each(a,b,{...})
method. (c53381a) - Added the Number
k.squarefree_fermat_psp_each(base,a,b,{...})
method. (c53381a) - Added the Number
k.fermat_psp(base, A, B)
andk.fermat_psp_each(base, A, B, {...})
methods. (9437e8f) - Added the Number
k.squarefree_strong_fermat_psp(base, a, b)
method. (c68292a) - Added the Number
k.carmichael_strong_fermat(base, from, upto)
method. (7c9961c) - Added the Number
k.carmichael_strong_fermat_each(base, from, upto, { ... })
method. (a6376ee) - Added the Number
k.each_squarefree_strong_fermat_psp(base, from, upto, { ... })
method. (d3108eb) - Added the Number
k.strong_fermat_psp(base, from, upto)
method. (e98114d) - Added the Number
k.each_strong_fermat_psp(base, from, upto, { ... })
method. (277f5d4) - Added the Number
x.is_float
method. (e85866d) - Added the Number
aliquot(n)
method. (c1f16a8) - Added the Number
prev_composite(n)
method. (6045096) - Added the Number
n.prev_primes(start)
method. (1d76f26) - Added the Number
n.prev_composites(start)
method. (cfb857a) - Added the Number
fld
,cld
,trd
andrdd
aliases foridiv_floor
,idiv_ceil
,idiv_trunc
andidiv_round
. (76f8d8f) - Added the Number
.f
alias for.to_float
. (30b445a) - Added the RangeNumber
carmichael(a..b, k)
method. (511ca35) - Added the RangeNumber
lucas_carmichael(a..b, k)
method. (511ca35) - Added the RangeNumber
each_carmichael(a..b, k, {...})
method. (511ca35) - Added the RangeNumber
each_lucas_carmichael(a..b, k, {...})
method. (511ca35) - Added the Polynomial
rat
andrat_approx
methods. (ff011c3) - Added the Polynomial
abs(x)
,sgn(x)
,gcd(a,b)
,gcdext(a,b)
andlcm(a,b)
methods. (323aebb) - Added the Sidef
.version()
and.numeric_version()
methods. (4c60642) - Added the Perl
.version()
and.numeric_version()
methods. (4c60642) - Added the Mod
.sqr
method. (426b3d3) - Added the String
.ascii2bits
method. (6dbe816) - Added Number and RangeNumber methods for generating, counting and iterating over squarefree semiprimes. (a5b785c)
- REPL: allow
#-n
to be used, which will count backwards. (08a7c0b) - Added the
pretty
alias forstringify
in the Number classes. (6f7e128) - Added the
Sys.readline
alias forSys.scanln
. (86a15c5)
Improvements
- Better interoperability between
Polynomial()
andMod()
. (3896b9a) - Optimized Number
is_cyclic(n)
for better performance. (5b3be4f) - Optimized Number
is_lucas(n)
for better performance withn <= 10^1000
. (f49f8a6) - Optimized Number
is_lucas(n)
for native integers. (2267e2b) - Optimized Number
iroot(n,k)
for positive native values ofn
. (da4fbc5) - Optimization in Number
shift_left()
for native unsigned integers. (9ff3f81) - Optimized Number
special_factor(n)
for much better performance. (8deefb5, 2605b84) - Optimized the Number
primes(a,b)
method whenb
is a native integer. (d145135) - Optimized Number
sigma(n)
andsigma0(n)
for native integers. (9c928a8) - Several simplifications in the RangeNumber class. (7bca926)
- Several simplifications in the Polynomial class. (9eda1e0)
- Several optimizations in the Number class for native integers. (a9f071b, 4d1122e, 5ac2cda)
- Better performance in
is_almost_prime(n,k)
andis_omega_prime(n,k)
for numbers with very large factors. (f765618) - Extended
Polynomial()
to accept an array of pairs as input. (0f4339b) - Extended the Polynomial
eval()
method to recursively evaluate the values of polynomials. (7beedb8) - Extended the Number
expnorm(n,b)
method to support any b > 1, including floating-point values. (7544d9a) - Extended the Number
sum_primes
method to accept and additional argumentk
. (2c0a42b) - Less memory usage when calling the Number
inverse_*
methods with a native integer. (4bc9723)
Bug-fixes
- Fixed the stringification of an empty polynomial to
0
. (50a6bc2) - Fixed several special cases in the Number
*_factor
methods. (741399a) - Fixed several false-positives from
is_carmichael(n)
for some specialn
. (b729120)
All changes: 22.07...22.12