Releases: apurva313/competitive-math-toolkit
Releases · apurva313/competitive-math-toolkit
v1.0.4
🚀 Release v1.0.4: Major Enhancements & New Features
This update introduces a range of mathematical utilities, including bitwise operations, divisibility checks, prime factorization, and modular arithmetic functions.
🔥 New Features & Improvements
✅ Bitwise Operations – Added functions for AND, OR, XOR, NOT, left shift, and right shift.
✅ Divisibility Functions – Check divisibility of numbers efficiently.
✅ Prime Factorization – Optimized method for finding prime factors.
✅ isPrime – Enhanced algorithm for primality testing.
✅ Modular Arithmetic – Implemented:
modAdd(a, b, m)
: Computes (a + b) mod mmodSubtract(a, b, m)
: Computes (a - b) mod mmodMultiply(a, b, m)
: Computes (a × b) mod mmodInverse(a, m)
: Computes modular inversemodDivide(a, b, m)
: Divides two numbers under modulo using modular inverse
✅ Additional Math Functions:
nthRoot(n, a)
: Computes the nth root of a numberisPerfectSquare(n)
: Checks if n is a perfect squareisPerfectCube(n)
: Checks if n is a perfect cubebinaryExponentiation(base, exp, m)
: Fast modular exponentiationnPr(n, r)
: Computes permutationsisCoprime(a, b)
: Checks if two numbers are coprimesumOfDivisors(n)
: Computes the sum of divisors of ncountPrimes(n)
: Counts the number of primes up to n
🔧 Bug Fixes & Optimizations
- Improved performance of
isPrime
for large numbers. - Optimized prime factorization using efficient algorithms.
- Fixed reference errors in combinatorics module.
📌 Upgrade Now
npm update competitive-math-toolkit
or
npm install competitive-math-toolkit@1.0.4
v1.0.3
🚀 Competitive Math Toolkit v1.0.3 - Improved CRT
🔥 What's New?
- Optimized Chinese Remainder Theorem calculations
- Minor bug fixes and improvements
📦 Install:
npm install competitive-math-toolkit@1.0.3
or
npm update competitive-math-toolkit
Full Changelog: https://github.com/apurva313/competitive-math-toolkit/commits/v1.0.3