Releases

  • Version 24.01

    trizen 3 months ago 14 commits to master since this release

    Additions

    • Added the Number Num!USE_PFGW class-variable. (disabled by default) (04e7c13d23, 65ee3494ca)
    • Added the Number znlog(a, g, m) method. (c9ba93e633)
    • Added the Number geometric_summod(n, r, m) method. (fe5852e01b)
    • Added the Number centered_pyramidal(n,k) method. (0f76bd941a)
    • Added the Number centered_pyramidal_root(n,k) method. (0f76bd941a)
    • Added the Number antidivisors(n) and antidivisor_count(n) methods. (c733f796ea)
    • Added the Number antidivisor_sum(n) method. (d8d9ca3f43)
    • Added the Number pisano_period(n) method. (2b750d7233)
    • Added the Number solve_quadratic_form(d, n) method. (de88fe0e57)
    • Added the Number smod(a, m) method. (aa825eff2d)
    • Added the Number germain_factor(n) method. (ac72a2b245)
    • Added the Block { ... }.nest(n, initial_value=0) method. (f904fc4cf0)
    • Added the Array .summod(m) and .prodmod(m) methods. (12dc78bc17)
    • REPL: added support for executing a Sidef script in interactive mode (-i). (f1c1848ed7)

    Improvements

    • Much faster generation of Carmichael and Lucas-Carmichael numbers with few prime factors. (6925ddc38c)
    • Slightly better performance in generating native pseudoprimes. (426346ec4c)
    • Optimized Number idiv_ceil(a,b) for native positive integers. (0a9cd662c4)
    • Slightly faster generation of pseudoprimes (Carmichael, Lucas-Carmichal and Fermat). (0a9cd662c4)
    • Call _primality_pretest(n) from _is_prob_prime(n) for large enough n. (8dc1329e0b)
    • Ignore trial-division factors when looking for special factors in Number _factor(n). (30aead5dd0)
    • Minor tweaks in is_almost_prime(n,k) and is_omega_prime(n,k) for slightly better performance. (30f35b60b6)
    • Slightly better performance in Number is_prob_prime(n) and all_prime(...) for n < 10^1000. (858add247d)
    • Optimized Number ipow2(n) and ipow10(n) when the result is a native integer. (b78758147c)
    • Optimized Number n.remove(k) for native integers. (d99908ca1e)
    • Less overhead in Number _big2istr(), _big2uistr and _big2pistr() private functions. (164425cbf8)
    • Slightly better performance in Number is_mersenne_prime. (038de75144)
    • Optimized Number factorial_valuation(n,p) for native integers. (67377c2647)
    • Several optimizations in the Number class for native integers. (204dc7d08d)
    • Better performance in Number is_carmichael(n) and is_lucas_carmichael(n). (74c5901617, 294f4a3cf3, 25df4d76b6)

    Changes

    • Stringify PolyMod objects as x^k + ... + c (mod m). (6847de685f)

    Bug-fixes

    • Workaround for a bug in interactive mode. (5930a89e2d)
    • Allow Set and Bag objects to be used as arrays. (3202fada09)
    • Minor fix in lucas_factor(n,j,tries) when j is nil. (25327caa07)
    • REPL: add typed words to auto-completion only when the code is valid. (731abe594d)
    • REPL: allow variable declarations in interactive mode to contain empty lines. (1e97aaeaa7)
    • REPL: allow lines to extend over multiple lines, by using the backslash (\) character. (5930a89e2d)
    • Fixed a minor issue in Number is_powerful(n,k): return false if n is negative and k == 1. (2074f273c6)

    All changes: https://github.com/trizen/sidef/compare/23.11...24.01

     
  • Version 23.11

    trizen 5 months ago 63 commits to master since this release

    Additions

    • Added the PolyMod([...], m) built-in class. (fe8303dc15)
    • Added the PolyMod chinese(...) method. (fada3757d0)
    • Added the Gauss factor(z) and factor_exp(z) methods. (8827635f58)
    • Added the Gauss divisors(z) method. (805442fde4)
    • Added the Number is_bfsw_psp(n) method. (762af27ec9)
    • Added the Number totient_range(a,b) method. (17aa258024)
    • Added the Number proper_sigma0(n) method. (17aa258024)
    • Added the Number proper_divisors(n) method. (17aa258024)
    • Added the Number mobius_range(n) method. (17aa258024)
    • Added the Number is_deficient(n) method. (17aa258024)
    • Added the Number is_amicable(n,m) method. (17aa258024)
    • Added the Number linear_congruence(n, r, m) method. (219320bbc5)
    • Added the Number bphi(n) method. (a121ecd611)
    • Added the Number iphi(n,k=1) method. (68049c417a)
    • Added the Number nuphi(n) method. (8bd9444c70)
    • Added several more Polynomial methods. (4d182796f7)

    Improvements

    • Optimization in Number modular_quadratic_formula(a,b,c,m) when gcd(2*a, m) == 1. (6f88a08660)
    • Return ealry if input is a prime number in Number special_factor(n). (bae4ff1c27)
    • Extended the Number aliquot(n) method to accept an extra argument. (17aa258024)
    • Minor optimization in Number trial_factor(n,lim). (1b781e9d97)
    • Minor performance improvements in Number is_powerful(n,k). (455eeedf52)
    • Optimized Number is_div(n,k) for native integers. (15dc48239e)
    • Better performance in Number k.powerful_count(n) for non-native n. (9d131a7efe)
    • Optimized the Number divisors(n,k) method for better performance. (e662b70a14)
    • Generalized the Number phi and uphi methods to accept an extra argument. (af72440d81)

    Bug-fixes

    • Fixed an issue in Number modular_quadratic_formula(x,y,z,m) for x != 1. (219320bbc5)
    • Fixed a minor issue in Number irand(0,x). (f92fbc5943)
    • Fixed two rare issues in Number is_almost_prime(n,k) and is_omega_prime(n,k). (bc745ebd78)
    • bin/sidef: add to history only words <= 50 chars in length. (6e4ba2acd7)
    • Make Range::Range, Block::Try and Block::Fork real objects, by inheriting from Sidef::Object::Object. (53224896d8)

    All changes: https://github.com/trizen/sidef/compare/23.10...23.11

     
  • Version 23.10

    trizen 6 months ago 89 commits to master since this release

    Additions

    • Added the Number Num!USE_PARI_GP class-variable (disabled by default). (12fe3dbc35 bd13ad07f8)
    • Added the Number Num!USE_CONJECTURES class-variable (disabled by default). (43b8165fef)
    • Added the Number is_bfw_psp(n) method. (218aa60391)
    • Added support for parsing polynomials as Poly(str). (819a5aed13)
    • Added the Array .bsearch_min{...}, .bsearch_max{...}, .bindex_min{...} and .bindex_max{...} methods. (70d81cbb43)
    • Added the File.link and File.symlink methods. (cf029ea418 379f1a640c)
    • Added support for method-name completion in the REPL. (3d5c1bab9e 1d2f6a9c8e)
    • Added the Array arr.ordered_partitions(k, { ... }) method. (6378d47bcb)

    Improvements

    • Extended the include("file.sf") statement. (865857faff)
    • Use a cryptographically-secure pseudorandom number generator in the Number irand method. (5e5c7e45d9)
    • Improved the Number primality_pretest(n) method for n > 10^1000. (38f844ba22)
    • Better performance in computing the modular Lucas V and U sequences. (1dbbf7e90a, 919bfb3763)
    • Use is_almost_extra_strong_lucas_pseudoprime in Number all_prime and is_safe_prime. (d066781d0c)
    • Slightly better performance in the generation of native k-powerful numbers. (5e5c7e45d9)
    • Slightly better performance in Number is_square(n), is_cube(n) and is_power(n,k) for native integers. (3bbff08b86)
    • Minor performance tweaks inside Number special_factor(n). (68a6048a99)
    • Better bounds in Number nth_powerfree(n,k) for k = 2. (e0016221f9)
    • Much better performance in Number next_perfect_power(n) and prev_perfect_power(n). (81af8f018c)

    Changes

    • Changed the Number is_prob_prime(n) method to use the Frobenius-Underwood test. (38f844ba22)
    • Perl.to_sidef(): parse numbers with a decimal point, as floating-point numbers. (4f34c47380)
    • Return a Sidef::Module::OO object from Block.thread(). (76c87b23e9)

    Bug-fixes

    • No longer use integer in Number smooth_count. (2be17924e3)
    • Extended the Matrix .pow(n) method to accept an arbitrary large integer. (574d6a53b2)
    • Fixed a performance issue in Number prime_count(a,b) when a and b are close to each other. (7e53839c8c)
    • Fixed a segmentation fault in Regex lt, le, gt and ge methods. (9626332738)
    • Fixed a segmentation fault in Array .le, .lt, .gt and .ge methods. (5d543a8f02)
    • Fixed a right-shift issue for native integers with perl < 5.24.0. (67a636a999 d1ee265336)

    All changes: https://github.com/trizen/sidef/compare/23.08...23.10

     
  • Version 23.08

    trizen 8 months ago 137 commits to master since this release

    Additions

    • Added the Num!USE_PRIMESUM class-variable. (disabled by default) (28e2ac365f)
    • Added the Number lpf_sum(a,b) method. (9c70da2bc2)
    • Added the Number gpf_sum(a,b) method. (096ead5857)
    • Added the Number k.squarefree_almost_prime_sum(a,b) method. (601bb750cd)
    • Added the Number k.almost_prime_sum(a,b) method. (6b1d971ab1)
    • Added the Number prime_power_sum(n) method. (90d77d9d1d)
    • Added the Number k.omega_prime_sum(a,b) method. (d2381391d7)
    • Added the Number k.power_count(a,b) and k.power_sum(a,b) methods. (19cd8c95eb)
    • Added the Number perfect_power_sum(n) method. (c799a1c6dd)
    • Added the Number nth_perfect_power(n) method. (ab462f6e62)
    • Added the Number next_perfect_power(n,k=nil) and prev_perfect_power(n,k=nil) methods. (5c195e3a0c)
    • Added the Number prev_prime_power(n) method. (e51de620e4)
    • Added the Number n.prev_omega_prime(k=2) method. (44c3723fcb)
    • Added the Number prev_semiprime(n) method. (ad8928b3c2)
    • Added the Number prev_almost_prime(n,k) method. (ad8928b3c2)
    • Added the Number prev_squarefree(n) method. (cb6917daa3)
    • Added the Number next_squarefree_semiprime(n) method. (a6e26d0f4b)
    • Added the Number n.prev_powerfree(k=2) method. (8457fd4806)
    • Added the Number n.prev_powerful(k=2) method. (8d4907f797)
    • Added the Number n.prev_squarefree_semiprime method. (6da4bba757)
    • Added the Number n.prev_squarefree_almost_prime(k=2) method. (6da4bba757)
    • Added the Number nth_nonpowerfree(n,k) method. (6cc777f36d)
    • Added the Number next_nonpowerfree(n,k=2) and prev_nonpowerfree(n,k=2) methods. (809aa9bdd6)
    • Added the Number muladdmulmod(a, b, c, d, m) and mulsubmulmod(a, b, c, d, m) methods. (9e230f4d1d)
    • Added the Number muladdmod(a,b,c,m), mulsubmod(a,b,c,m) and submulmod(a,b,c,m) methods. (d50ffde020)
    • Added several cube_* and cubefree_* aliases for 3.power_* and 3.powerfree_. (bb0784e3ef)
    • Added the FileHandle .rewind method. (3b4043861e)
    • Added the String .codes method. (6da6122aa4)
    • Added the Range .sort {|a,b| ... } and .sort_by {|v| ... } methods. (1eacc45b15)

    Improvements

    • Extended the Number fibmod method to accept 3 arguments. (b79e09d082)
    • Extended expnorm(n,b) to accept any value for base b, including a complex number. (b79e09d082)
    • Use primecount --phi in Number k.rough_count(n) when Num!USE_PRIMECOUNT is enabled. (28e2ac365f)
    • Extended cop_factor(n) to potentially find more factors. (a2cdf754c0)
    • Allow the Number gamma method to be called as Num.gamma, returning the Euler-Mascheroni constant. (b79e09d082)
    • Added a few more terms in the lookup table for mertens(2**n) and mertens(2**n). (e9ebca02b2)
    • bin/sidef: added the faith rounding option for -M, which does faithful rounding (with mpfr >= 4.0.0). (fde163acbb)
    • Better performance in is_omega_prime(n,k) and is_almost_prime(n,k) for large n. (abc0c1ec17)
    • Num(str, base) now returns a blessed native integer, when possible. (47aa40a702)
    • Added a few more terms in the Number almost_prime_count() lookup tables. (56b16a3c41)
    • Better performance in Number nth_almost_prime(n,k) when the result doesn't fit inside a native integer. (b6afa3ddc1)
    • Better performance in Number k.almost_primes(a,b) and k.omega_prime_count(a,b) when the GitHub version of Math::Prime::Util is installed.
    • Better performance in Number fibonacci(n,k) for k >= 3 and large enough n. (bf9f8b90fd)
    • Added internal cache inside the Number _is_prob_prime internal function. (769708358d)

    Changes

    • Renamed the Number k.non_powerfree(a,b) method to k.nonpowerfree(a,b). (384eb06551)
    • Reimplemented the Array and String .slice(offset, length) methods. (68d11ff609, 11887b8160, 724882efc4)
    • Renamed the Number .partitions method to .partition_count, which better reflects what it returns. (34c2fc9a75)
    • Renamed the Number *squareful* and *cubeful* methods to *squarefull* and *cubefull* respectively. (543349163d)

    Bug-fixes

    • Added a better defined Array .ft(i,j) method. (724882efc4)
    • Fixed the help command inside the REPL. (efa54f179c)
    • Fixed the code generation for a hash-lookup applied on the result of a prefix method-call. (457560033d)
    • Fixed a bug in Number divmod(a,b,m) introduced in version 22.05, when a is evenly divisible by b. (48fcbbe1bc)
     
  • Version 23.05

    trizen 11 months ago 198 commits to master since this release

    Additions

    • Added support for transparently converting Perl subroutines to Sidef blocks. (36f6bc0610)
    • Added the %perl{...} and %Perl{...} syntax for executing arbitrary Perl code. (8aa1284a79)
    • Added the Perl.tie() and Perl.untie() methods. (23724746d5)
    • Added the Number urand(a,b) and useed(n) methods. (f7f6db39e8, 44a6c4bc3b)
    • Added the Number euler_numbers(n) method. (4ae86982d9)
    • Added the Number bernoulli_numbers(n) method. (45733ffaf3)
    • Added the Number addmulmod(x, y, z, m) method. (47c4117c6f)
    • Added the Number fubini(n) and fubini_numbers(n) method. (fcf86d131a)
    • Added the Number composite_sum(a,b,k=1) method. (35f1f43fd0)
    • Added the Number k.powerful_sum(a,b) method. (69846960a3)
    • Added the Number k.non_powerfree(a,b) method. (f2c430dd6c)
    • Added the Number k.non_powerfree_each(a, b, { ... }) method. (6b2133f2d1)
    • Added the Number k.non_powerfree_count(a,b) and k.non_powerfree_sum(a,b) methods. (fce01532a5)
    • Added the Number k.powerfree(a,b) and k.powerfree_each(a,b,{...}) methods. (5e30232f87)
    • Added the Number is_non_powerfree(n,k), is_non_squarefree(n) and is_non_cubefree(n) methods. (11056418ac)
    • Added the Number roots_of_unity(n) method. (0afea1e466)
    • Added the Fraction inv, powmod and invmod methods. (7c3a7ec888)
    • Added the Range neg method. (4a6c5a6366)
    • Added the String .each_slice(n, {...}) method. (b984aa2a2c)
    • Added the String .each_kv{|k,v| ... } method. (8dca2c60e1)
    • Added the String .uniq method. (bbedb55f60)
    • Added the Block .time method. (2adaae1211)
    • Added the Block .bsearch, .bsearch_le, .bsearch_ge and bsearch_inverse methods. (d2759930c2, 5bf031f1bd)
    • Added the Polynomial roots(f) method. (a3397e843d)
    • Added the Polynomial newtwon_method(f, x=1i) method. (a3397e843d)
    • Added the File .open_arw method. (a5baa6cdec)
    • Added the FileHandle.new_buf(encoding=:utf8) class method. (a5baa6cdec)

    Improvements

    • Extended the FileHandle << operator, to accept multiple arguments. (e3c65361c8)
    • Slightly better performance in Number is_squarefree(n), is_powerfree(n,k) and is_powerful(n,k) for native n. (f37ac37e73)
    • Several optimizations in the Number class for native integers when Math::Prime::Util is not installed. (db4692bc9f)
    • Several optimizations in Number ilog(n,b) for native n. (18f62bdab7)
    • Better performance in Number is_abs_euler_psp(n) for native n. (2e7480aa31)
    • Slightly better performance in Number chebyshev_factor(n). (2e7480aa31)
    • Better performance in Number k.powerful_count(n) for native and large n. (7636988096)
    • Slightly better performance in Number prime_power_count(n), k.omega_prime_count(n), k.almost_prime_count(n) and k.squarefree_almost_prime(n). (88a6131b49)
    • Unpack floor(a/b) and ceil(a/b) into a native integer, if possible. (88a6131b49)
    • Faster algorithm in Number squarefree_count(n). (c36fad357a)
    • Extended Number nth_composite(n), nth_prime(n), nth_prime_power(n) and nth_semiprime(n) for non-native integers n. (914595f69c)
    • Use primecount in Number nth_prime(n) when n is large enough and Num!USE_PRIMECOUNT is enabled. (fc781e4322)
    • Improved the Optimizer to cover more cases. (f741a5e31b, 68198cfed7, 7e284dd0a6, 4a6c5a6366)
    • Optimized Number sum(...) for native integers. (7869c37d2d)
    • Optimized Number divmod(a,b,m) for native integers. (b5b1117393, 8b94722248)
    • Deparser: added constant cache for literal numbers and strings. (68198cfed7)
    • Better performance in Number idiv(a,b) for native inputs. (ca17233536)
    • Slightly better performance in Number all_prime(...) for native inputs. (9b796c6d29)
    • Optimized Number powmod(a,n,m) for native inputs. (3de883d50f)
    • Optimized n.is_coprime(k) when either n or k is a native integer. (3de883d50f)
    • Optimized gcd(a,b) when either a or b is a native integer. (3de883d50f)
    • Slightly better performance in Number digits2num for native integers. (428490dece, 5463548435)
    • Better performance in Number n.jordan_totient(k) for large n. (391d4ae193)
    • Optimized Number digits(n,b) and sumdigits(n,b) for native inputs. (dbff96aa6c)
    • Optimized Number n.as_bin, n.as_oct and n.as_hex for native integers n. (dbff96aa6c)
    • Optimized Quadratic div(q,n) where n is a Number object. (dbff96aa6c)
    • Slightly better performance in Number is_abundant(n) for large n and native n. (cc724a2afd)
    • Perl deparser: more efficient code generation for array and hash lookups. (f13784927d)
    • Better performance in znorder(a,n) and lambda(n) for large n. (1fd66bd739)
    • Slightly better performance in special_factor(n). (2a47419704)

    Changes

    • REPL: dump floating-point number with f suffix. (daf91ade2a)
    • No longer UTF-8 encode the self-string in String .open_r. (e3c65361c8)
    • Modified the String .open_r method to accept an optional argument specifying the encoding, which by default is utf8. (a5baa6cdec)
    • Removed several warnings from the File class. (3199b46620)
    • Perl deparser: re-implemented the smartmatch operator (~~) (12f9e2f66c)
    • Renamed the Number method random_safe_prime(n) to random_nbit_safe_prime(n). (f741a5e31b)
    • Changed String hex, oct and bin to return 0 for an empty string (instead of NaN). (f741a5e31b)
    • Parser: no longer parse the + sign as part of a number. (68198cfed7)
    • Parser: no longer parse - as part of a number. (4a6c5a6366)
    • Allow numbers to contain optional whitespace when passed to Number(...). (575792eef5)

    Bug-fixes

    • Fixed an issue in Polynomial(), when the zero coefficient is passed for a power. (787cf8d314)
    • Fixed an issue in Number as_cfrac(n) for rationals and native integers. (bb302652d9)
    • Made RAT % INT to be consistent with INT % INT when the modulo is negative. (7869c37d2d)
    • Fixed a minor issue in _set_int(n) when n is a Perl string with leading zeros. (3de883d50f)
    • String.apply_escapes(): fixed an issue that caused binary strings to get inconsistent byte representations during -O1. (ecf99e60a7)
    • Fixed an edge case in is_almost_prime(n,k) and is_omega_prime(n,k) for numbers n that contain the prime factor 101. (1c16e5f9c5)
    • Fixed an issue Number is_lucas_carmichael(n) for native integers n. (522e4ba951)
     
  • Version 22.12

    trizen 1 year ago 330 commits to master since this release

    Additions

    • Added the parser floating-point f suffix for literal numbers. (81b0991139)
    • Added support for using native integers in arithmetic operations (when possible). (cc5638bd10)
    • Added the Array .solve_rec_seq method. (9a7e3d723b)
    • Added the Math .solve_seq(array, offset=0) and .solve_rec_seq(array) methods. (9a7e3d723b)
    • Added the Math .linear_recurrence(ker, init, n) method. (a45fe514a7)
    • Added the Math .linear_recmod(ker, init, n, m) method. (51c4688457)
    • Added the Number phi_finder_factor(n, tries=1e4) method. (2605b846d9)
    • Added the Number k.carmichael(a, b) method. (a884fcb067)
    • Added the Number k.lucas_carmichael(a,b) method. (a884fcb067)
    • Added the Number k.squarefree_fermat_psp(base, a,b) method. (a884fcb067)
    • Added the Number k.carmichael_each(a,b,{...}) method. (c53381a32d)
    • Added the Number k.lucas_carmichael_each(a,b,{...}) method. (c53381a32d)
    • Added the Number k.squarefree_fermat_psp_each(base,a,b,{...}) method. (c53381a32d)
    • Added the Number k.fermat_psp(base, A, B) and k.fermat_psp_each(base, A, B, {...}) methods. (9437e8f881)
    • Added the Number k.squarefree_strong_fermat_psp(base, a, b) method. (c68292afba)
    • Added the Number k.carmichael_strong_fermat(base, from, upto) method. (7c9961c75e)
    • Added the Number k.carmichael_strong_fermat_each(base, from, upto, { ... }) method. (a6376ee91f)
    • Added the Number k.each_squarefree_strong_fermat_psp(base, from, upto, { ... }) method. (d3108ebf0f)
    • Added the Number k.strong_fermat_psp(base, from, upto) method. (e98114d6fd)
    • Added the Number k.each_strong_fermat_psp(base, from, upto, { ... }) method. (277f5d49d4)
    • Added the Number x.is_float method. (e85866de3b)
    • Added the Number aliquot(n) method. (c1f16a8e06)
    • Added the Number prev_composite(n) method. (6045096967)
    • Added the Number n.prev_primes(start) method. (1d76f26956)
    • Added the Number n.prev_composites(start) method. (cfb857a80c)
    • Added the Number fld, cld, trd and rdd aliases for idiv_floor, idiv_ceil, idiv_trunc and idiv_round. (76f8d8f441)
    • Added the Number .f alias for .to_float. (30b445ade1)
    • Added the RangeNumber carmichael(a..b, k) method. (511ca35657)
    • Added the RangeNumber lucas_carmichael(a..b, k) method. (511ca35657)
    • Added the RangeNumber each_carmichael(a..b, k, {...}) method. (511ca35657)
    • Added the RangeNumber each_lucas_carmichael(a..b, k, {...}) method. (511ca35657)
    • Added the Polynomial rat and rat_approx methods. (ff011c363d)
    • Added the Polynomial abs(x), sgn(x), gcd(a,b), gcdext(a,b) and lcm(a,b) methods. (323aebbc29)
    • Added the Sidef .version() and .numeric_version() methods. (4c606422c8)
    • Added the Perl .version() and .numeric_version() methods. (4c606422c8)
    • Added the Mod .sqr method. (426b3d3b1e)
    • Added the String .ascii2bits method. (6dbe81691d)
    • Added Number and RangeNumber methods for generating, counting and iterating over squarefree semiprimes. (a5b785c029)
    • REPL: allow #-n to be used, which will count backgrounds. (08a7c0b1fa)
    • Added the pretty alias for stringify in the Number classes. (6f7e128c16)
    • Added the Sys.readline alias for Sys.scanln. (86a15c509f)

    Improvements

    • Better interoperability between Polynomial() and Mod(). (3896b9a8ae)
    • Optimized Number is_cyclic(n) for better performance. (5b3be4f773)
    • Optimized Number is_lucas(n) for better performance with n <= 10^1000. (f49f8a6a10)
    • Optimized Number is_lucas(n) for native integers. (2267e2b16e)
    • Optimized Number iroot(n,k) for positive native values of n. (da4fbc5856)
    • Optimization in Number shift_left() for native unsigned integers. (9ff3f81781)
    • Optimized Number special_factor(n) for much better performance. (8deefb5fb8, 2605b846d9)
    • Optimized the Number primes(a,b) method when b is a native integer. (d145135ceb)
    • Optimized Number sigma(n) and sigma0(n) for native integers. (9c928a8510)
    • Several simplifications in the RangeNumber class. (7bca926ac9)
    • Several simplifications in the Polynomial class. (9eda1e00a7)
    • Several optimizations in the Number class for native integers. (a9f071ba5c, 4d1122ea89, 5ac2cda3bf)
    • Better performance in is_almost_prime(n,k) and is_omega_prime(n,k) for numbers with very large factors. (f7656180e8)
    • Extended Polynomial() to accept an array of pairs as input. (0f4339bf0d)
    • Extended the Polynomial eval() method to recursively evaluate the values of polynomials. (7beedb8a76)
    • Extended the Number expnorm(n,b) method to support any b > 1, including floating-point values. (7544d9a7d4)
    • Extended the Number sum_primes method to accept and additional argument k. (2c0a42b68c)
    • Less mememory usage when calling the Number inverse_* methods with a native integer. (4bc9723263)

    Bug-fixes

    • Stringify an empty polynomial to '0'. (50a6bc29df)
    • Fixed several special cases in the Number *_factor methods. (741399a046)
    • Fixed several false-positives from is_carmichael(n) for some special n. (b729120eb0)

    All changes: https://github.com/trizen/sidef/compare/22.07...22.12

     
  • Version 22.07

    trizen 1 year ago 403 commits to master since this release

    Additions

    • Added the Number special_factors(n, tries=1) method. (272ec42727)
    • Added the Number gcd_factors(n, [a,b,c,...]) method. (ef7938a59d)
    • Added the Number pell_factor(n, tries=1e5) method. (f6c4333de3)
    • Added the Number cyclotomic_factor(n, bases...) method. (39ba86fc31)
    • Added the Number is_perfect(n) method. (9c4c74f055)
    • Added the Number n.is_squarefree_almost_prime(k=2) method. (1a7812a0ae)
    • Added the Number composite_lower(n) and composite_upper(n) methods. (6c481306a6)
    • Added the Number composite_count_lower(n) and composite_count_upper(n) methods. (dc92b4cd7a)
    • Added the Number prime_power_lower(n) and prime_power_upper(n) methods. (2d5efab079)
    • Added the Number prime_power_count_lower(n) and prime_power_count_upper(n) methods. (f884606b8d)
    • Added the Number nth_omega_prime(n,k=2) method. (bbc89237bb)
    • Added the Number nth_almost_prime(n, k=2) method. (3d61414744)
    • Added the Number nth_squarefree_almost_prime(n, k=2) method. (271fcdb2f6)
    • Added the Number nth_powerful(n,k=2) method. (7d8d695522, e1180f3c9a)
    • Added the Number nth_prime_power(n) method. (9e4b34e26c)
    • Added the Number nth_squarefree(n) method. (03006f7f0d)
    • Added the Number nth_powerfree(n,k=2) method. (5eb73f154d)
    • Added the Number next_powerfree(n,k=2) method. (5485e847fa)
    • Added the Number next_squarefree_almost_prime(n,k=2) method. (f1c30f55da)
    • Added the Number next_omega_prime(n,k=2) method. (6023b93148)
    • Added the Number next_semiprime(n) method. (4295892eee)
    • Added the Number next_almost_prime(n,k=2) method. (9608c7ff64, 8a45f5f5b8)
    • Added the Number next_powerful(n,k=2) method. (79c5c5a067)
    • Added the Number next_prime_power(n) method. (764eab5d9a)
    • Added the Number k.smooth_divisors(n) and k.rough_divisors(n) methods. (bee1d25899)
    • Added the Number prime_powers(a,b) and prime_powers_each(a,b,{...}) methods. (ae687b8669)
    • Added the Math.seq(a, b, c, ..., { ... }) method. (0fd19d4da8, 277fe12b14)
    • Added the Math.binary_exp(c,x,n,{|a,b| ... }) method. (57845ba183)
    • Added the RangeNumber methods: each_prime_power(a..b, {...}), prime_power_count(a..b) and prime_powers(a..b). (2ecf8bb5c7)

    Improvements

    • Optimized Number is_omega_prime(n,k) for large n and k. (ac7039230e)
    • Optimized Number is_almost_prime(n,k) for large n and k. (c6188a9c9e)
    • Optimized Number nth_composite(n) for large n. (8c47ffd6a8, 6c481306a6)
    • Extended the Number .factor method to accept an optional block. (660429aca3)
    • Use Math::Prime::Util::primes() in more places when Math::Prime::Util is available. (fe757df40d)
    • Optimziation in Number sum_of_squares(n): factorize n only once. (590fc97440)
    • Try to use Math::Prime::Util where possible, even when it's an older version. (806e7c08e5)

    Changes

    • Changed the order of parameters in Number smooth_part and rough_part methods. (bee1d25899)
    • Number squfof_factor(n,tries) now defaults to tries=1e4, when no value is given. (3c831cd569)
    • Modified the result of Math.gcd_factors(n,arr) to multiply to n. (058b71fec5)
    • REPL: call .dump on the result objects. (fc14efe1ba)

    Fixes

    • Fixed the lucas_factor(n) method on 32-bit systems. (b3b21baec8)
    • Fixed some overflow issues on 32-bit systems in nth_composite(n), for large n. (c8493b893f)
    • Prevent infinite looping in Number bsearch_inverse. (e0370a8a02)

    All changes: https://github.com/trizen/sidef/compare/22.05...22.07

     
  • Version 22.05

    trizen 1 year ago 464 commits to master since this release

    Additions

    • Added the Number binomialmod(n,k,m) method. (798dcd57c0, cb18caf341, 1c1e12b60a, 774ec4122e)
    • Added the Number sum_of_squares(n) method. (b8b5e20991)
    • Added the Number difference_of_squares(n) method. (5a94bf6336)
    • Added the Number lnsuperprimorial(n) method. (248b18f76a)
    • Added the Number chebyshev_factor(n,B,x) method. (763b976ed3)
    • Added the Number mbe_factor(n,tries=10) method. (e1bd235936)
    • Added the stringify method to the Number classes. (564f87aa3f)
    • Added the Mod cyclotomic(Mod(x,m), n) method. (9a00535733)
    • Added the Number quadratic_formulaQ(a,b,c) method. (70505ff180)
    • Added the Number cubic_formula(a,b,c,d) method. (ef6c16afa2)
    • Added the Number cyclotomicmod(n,x,m) method. (4c75c2dee5)
    • Added the Number bellmod(n,m) method. (502244cc86)
    • Added the Number smooth_numbers(n, [p1, p2, ...], {|n,p| ... }) method. (d2c20fa129)
    • Added the Number digital_root(n,b=10) method. (ce91e59e97)
    • Added the Number modular_quadratic_formula(a,b,c,m) method. (3619fbd344)
    • Added the Math.gcd_factors(n, array) method. (bfc211b579)
    • Added the Polynomial derivative(f) method. (ae33b89a07)
    • Added the String .slices(n) method. (6dfb5ffb6a)
    • Added the Block flush_cache method. (169f7fe948)
    • Added the Mod chebyshevU and chebyshevT methods. (1365a3a96d)
    • REPL: added support for refering to previous output values. (50343bb6fe)

    Improvements

    • Several optimizations in the Number class. (33984c68b9)
    • Use Math::Prime::Util in k.almost_prime_count(n) and k.omega_prime_count(n) for native n. (7ebdc6c0ef)
    • Use Math::Prime::Util::is_almost_prime() for native integers in Number is_almost_prime(n,k). (a4315a44af)
    • Use Math::Prime::Util::znorder() in is_over_psp for small prime factors. (0f061aa3a0)
    • Use binary splitting in Number sum and prod method for non-Number objects as well. (43a4856454)
    • Significant optimization in Number is_over_psp(n) for numbers that are not overpseudoprimes. (cbd78be327)
    • Optimization in Number sumdigits(n,b) and digits(n,b) for large n and large b. (389d2c16f7)
    • Extended the Number liouville_sum method to accept an additional argument. (360f40257c)
    • Extended the Number sum_remainders(n,v) method to support negative v. (55ddc2c218)
    • Extended the Number exp(n) method to accept an additional argument. (30b1002dc2)
    • Extended the String .to_n method to accept an optional argument. (7e0a93de93)
    • Extended LazyMethod to handle the run method, in addition to call. (5914d6f26b)
    • Minor optimization in Number all_prime(...) when one of the terms is not prime. (f6e71b7adc)

    Changes

    • sidef -t: show at the end a list with the scripts that failed to run. (8c09720587)
    • Check if we have a recent enough version of Math::Prime::Util. (e69bb7a2ec)
    • Support (a/b) % m when m is an integer and gcd(b, m) != 1. (908ce38823)
    • Prefer Rmpz_bin_ui over Rmpz_bin_uiui, as it is considerably faster, especially for large n. (f7f3cf0a8b)
    • Changed #!/usr/bin/perl to #!/usr/bin/env perl in bin/sidef. (822cbb66f8)

    Fixes

    • Handle other types of Number objects in Number mod. (c016dea501)
    • Handle the special case of x = -1 in cyclotomic(n, x) and cyclotomicmod(n,x). (83fe7133d5)
    • Warn when no supported dbm driver was found, during -s. (6efa33da8e)
    • Include array => 1 for Block slurpy array parameters. (954cf77580)
    • Do exact division in divmod(a,b,m) when a is exactly divisible by b. (38fe85556f)
    • Allow calling .uncache on a function that was not cached. (dad21c50d8)
    • Fixed the conversion of Polynomial objects to Number objects (when possible). (3a69907fee)

    All changes: https://github.com/trizen/sidef/compare/22.03...22.05

     
  • Version 22.03

    trizen 2 years ago 535 commits to master since this release

    Additions

    • Added the Array .solve_seq(offset=0) method. (271f3b7ab7)
    • Added the Array random_permutation method. (de2c93b126)
    • Added the Array .binsplit {|a,b| ... } method. (146052bd17)
    • Added the Number dop_factor(n) method. (9b78ab8fef)
    • Added the Number cop_factor(n) method. (d20a5e2d84)
    • Added the Number g.is_ntf(n) method. (ce4fd9c72f)
    • Added the Number sqrtQ(n) method. (f9ffa4abef)
    • Added the Number gcud(...) method. (2e1635e559)
    • Added the Number biudivisors(n) method. (9c7ad77cc0)
    • Added the Number idivisors(n) method. (a59e5e30bc)
    • Added the Number edivisors(n) method. (0376e6bf0d)
    • Added the Number k.power_usigma(n, j=1) and k.power_usigma0(n) methods. (c988c29725)
    • Added the Number k.powerfree_sigma(n,j=1) and k.powerfree_sigma0(n) methods. (fed216084e)
    • Added the Number k.power_sigma(n, j=1) and k.power_sigma0(n) methods. (dc80627a4f)
    • Added the Number k.powerfree_udivisors(n) method. (ab740cf195)
    • Added the Number k.powerfree_usigma(n, j=1) and k.powerfree_usigma0(n) method. (b13a1b98e2)
    • Added the Number perfect_power_divisors(n) and perfect_power_udivisors(n) methods. (cb6466fc79)
    • Added the Number nbsigma(n, k=1) and nbsigma0(n) methods. (93d410ad8b)
    • Added the Number nesigma(n,k=1) and nesigma0(n) methods. (6a97cdd3f1)
    • Added the Number esigma(n,k=1) and esigma0(n) methods. (e8b32e3064)
    • Added the Number nisigma(n,k=1) and nisigma0(n). (d4673604ac)
    • Added the Number isigma(n,k=1) and isigma0(n) methods. (38687ca23c)
    • Added the Number bsigma(n,k=1) and bisigma0(n) methods. (5d62d882b5)
    • Added the Number nusigma(n,k=1) and nusigma0(n) methods. (3bb7616c3e)
    • Added the Number next_squarefree(n) method. (6dcb456f3d)
    • Added the Number n.prev_pow(b) method. (c8e238f667)
    • Added the Number squarefree_part alias for core. (e2a85c7a38)
    • Added the Number k.powerfree_divisors(n) method. (baed58f65f)
    • Added the Number solve_lcg(n, r, m) method. (efcdfadd43)
    • Added the Number is_abs_euler_psp(n) method. (2b7c01ab28)
    • Added the Polynomial binomial(n,k) method. (f78fd29584)
    • Added the Polynomial invmod(f, m) method. (6d7c44464a)
    • Added the Polynomial degree method. (0707f43ce0)
    • Added the Range .while { ... } method. (e4861241e6)
    • Added the RangeNumber mertens(a..b) method. (eecf76fad8)
    • Added several RangeNumber *_count and *_sum methods. (120180469e)
    • Added the String ascii2bin and bin2ascii methods. (00cb654390)
    • Added the String hexlify and unhexlify methods. (4613a60b8c)
    • Added the Math.batch_invmod(array, n) method. (6730bcb27d)
    • Added the Math.batch_gcd(list...) method. (6730bcb27d)
    • Added the Math.remainders(n, array) method. (6730bcb27d)
    • Added the Math.product_tree(list...) method. (6730bcb27d)

    Improvements

    Changes

    • Changed the order of arguments of power_divisors and power_udivisors. (cb6466fc79)
    • Make FileHandle binmode and autoflush methods to return the self filehandle object. (53a286f7f5)
    • Use _adaptive_trial_factor() in Number trial_factor(n) when no additional argument is given. (25ca896beb)

    Fixes

    • Fixed the implementation of FileHandle syswrite(). (fa038c120a)
    • Fixed the Number legendre_phi(n,a) function. (4156a527eb)
    • Fixed two corner-cases in Number iquadratic_formula() (8f34c93927)
    • Fixed Quadratic binary operations on objects with different w values. (4b0870524d)
    • Create the Sidef config directory when it doesn't exist. (062fbdbfbf)
    • Prevent an infinite loop in Array div(a,n) method. (6448fd6098)
    • Added several missing methods in the Fraction, Mod and Polynomial classes. (351324726f)

    All changes: https://github.com/trizen/sidef/compare/3.99...22.03