Skip to content

Commit

Permalink
alias gcd
Browse files Browse the repository at this point in the history
  • Loading branch information
Dylan Ferris committed Apr 12, 2024
1 parent 4d59af4 commit e0dba6f
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/bigint.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/**
* Find the greatest common denominator of the two numbers.
*/
export const gcd = (a: bigint, b: bigint): bigint => {
export const greatestCommonDenominator = (a: bigint, b: bigint): bigint => {
if (b === 1n || a === 1n) {
return 1n
}
Expand All @@ -13,6 +13,7 @@ export const gcd = (a: bigint, b: bigint): bigint => {
}
return a < 0n ? -a : a
}
export const gcd = greatestCommonDenominator

/**
* Returns true if the number is prime.
Expand Down

0 comments on commit e0dba6f

Please sign in to comment.