Skip to content

Instantly share code, notes, and snippets.

@eshamster
Created August 27, 2015 18:37
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save eshamster/2aaa00c00c86e937b3d9 to your computer and use it in GitHub Desktop.
Save eshamster/2aaa00c00c86e937b3d9 to your computer and use it in GitHub Desktop.
(defun calc-GCD (&rest nums)
(inverse-factorize-from-prime
(bundle-lists #'min
(mapcar #'factorize-in-prime nums))))
(defun calc-LCM (&rest nums)
(inverse-factorize-from-prime
(bundle-lists #'max
(mapcar #'factorize-in-prime nums))))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment