Skip to content

Releases: ini/numthy

v0.2.1

Choose a tag to compare

@ini ini released this 18 Jul 16:55

Fixed

  • is_prime(): Corrected Miller-Rabin witness table that resulted in an incorrect output on is_prime(164107).

v0.2.0

Choose a tag to compare

@ini ini released this 28 Feb 16:53

Changed

  • small_roots(): The epsilon keyword argument has been replaced by m: int | None.
    m directly controls the number of Coppersmith shift polynomials. When omitted, the smallest
    sufficient m is chosen automatically. Code using the old epsilon parameter must be updated.

  • solve_polynomial_system(): Now uses the GVW (Gao-Volny-Wang) algorithm over a finite
    field Fₚ to compute a Gröbner basis, followed by FGLM (Faugère-Gianni-Lazard-Mora) conversion
    to lexicographic order. This replaces the previous Buchberger computation over the rationals,
    which was significantly slower and less reliable for larger instances. The solver now also
    reduces the problem by extracting and solving any linear subsystem before invoking Gröbner
    basis machinery.

  • prime_count() and prime_sum() (and related generalized prime counting functions):
    The P2 accumulation step is faster. Prime sums over sieve segments now use block-partitioned
    prefix sums, avoiding a full cumulative accumulation pass per segment.

Fixed

  • conic(): Degenerate conics with a non-square discriminant (b² − 4ac is not a perfect
    square) represent a pair of conjugate lines with no rational intersection. Previously, this
    case incorrectly delegated to the ellipse solver and could produce wrong output. Now the
    singular point is computed directly and returned only if it satisfies the equation.

  • fibonacci(n, mod): For negative n, the sign was applied after the modulo reduction
    (sign * (F % mod)) rather than before ((sign * F) % mod), yielding wrong results.

v0.1.0

Choose a tag to compare

@ini ini released this 01 Feb 00:30
Bump version number