/** * Extended Euclidean algorithm for solving the smallest * integer solution (|x| + |y| smallest) of the equation `Ax + By = gcd(x,y)`. * * @param a * @param b * @returns * @see https://me.guanghechen.com/post/math/number-theory/%E6%A8%A1%E6%96%B9%E7%A8%8B/basic/ */ declare function euclidean(a: number, b: number): [number, number, number]; /** * Bigint version. * * @param a * @param b * @returns * @see https://me.guanghechen.com/post/math/number-theory/%E6%A8%A1%E6%96%B9%E7%A8%8B/basic/ */ declare function euclideanBigint(a: bigint, b: bigint): [bigint, bigint, bigint]; /** * Find the greatest common divisor of x and y * * @param x * @param y * @returns */ declare function gcd(x: number, y: number): number; /** * Bigint version. * * @param x * @param y * @returns */ declare function gcdBigint(x: bigint, y: bigint): bigint; export { euclidean, euclideanBigint, gcd, gcdBigint };