forked from gluesql/gluesql
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Refactor GCD and LCM functions (gluesql#1331)
- GCD The GCD function is now implemented using iteration not recursive function. An overflow error is prevented when one of the arguments is i64::MIN - LCM An overflow error is prevented when one of the arguments is i64::MIN. An overflow error is prevented when dealing with large prime numbers, i.e) LCM(large prime, large prime). The case where both arguments are zero, ex) LCM(0, 0) is now properly handled.
- Loading branch information
1 parent
b186966
commit 8c3c073
Showing
5 changed files
with
87 additions
and
13 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters